Skip to content

[staticwebapp] Add Static Web App extension #5819

Merged
zhoxing-ms merged 30 commits into
Azure:mainfrom
StrawnSC:swa-dbconnection
Mar 15, 2023
Merged

[staticwebapp] Add Static Web App extension #5819
zhoxing-ms merged 30 commits into
Azure:mainfrom
StrawnSC:swa-dbconnection

Conversation

@StrawnSC
Copy link
Copy Markdown
Contributor


This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally?

For new extensions:

About Extension Publish

There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update src/index.json automatically.
The precondition is to put your code inside this repository and upgrade the version in the pull request but do not modify src/index.json.

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Jan 30, 2023

staticwebapp

@StrawnSC StrawnSC marked this pull request as ready for review February 22, 2023 17:21
Comment thread src/staticwebapp/azext_staticwebapp/_params.py Outdated
Comment thread src/staticwebapp/azext_staticwebapp/_params.py Outdated
Comment thread src/staticwebapp/azext_staticwebapp/_params.py Outdated
@classmethod
def _validate(cls, sku: 'Sku', connection_type: 'ConnectionType', database_name, username, password):
if not cls._is_supported(sku, connection_type):
raise ValidationError(f"Authentication type '{connection_type}' is not supported for "
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is better to point out what types are supported.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion, just added that

Comment thread src/staticwebapp/azext_staticwebapp/_utils.py Outdated
Comment thread src/staticwebapp/azext_staticwebapp/_utils.py Outdated
Comment thread src/staticwebapp/azext_staticwebapp/_utils.py Outdated
Comment thread src/staticwebapp/azext_staticwebapp/_clients.py
Co-authored-by: Yan Zhu <105691024+yanzhudd@users.noreply.github.com>
Comment thread src/staticwebapp/azext_staticwebapp/_params.py
Co-authored-by: Yan Zhu <105691024+yanzhudd@users.noreply.github.com>
Comment thread src/staticwebapp/azext_staticwebapp/_utils.py Outdated
Comment thread src/staticwebapp/azext_staticwebapp/_utils.py Outdated
Comment thread src/staticwebapp/azext_staticwebapp/_utils.py Outdated
Comment thread src/staticwebapp/azext_staticwebapp/azext_metadata.json Outdated
Comment thread src/staticwebapp/azext_staticwebapp/commands.py Outdated
@zhoxing-ms
Copy link
Copy Markdown
Contributor

vcr.errors.CannotOverwriteExistingCassetteException: Can't overwrite existing cassette ('/mnt/vss/_work/1/s/src/staticwebapp/azext_staticwebapp/tests/latest/recordings/test_staticwebapp_dbconnection_azure_sql.yaml') in your current record mode ('once').
No match for the request (<Request (PUT) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test000001/providers/Microsoft.Sql/servers/cli-test000003?api-version=2022-08-01-preview>) was found.
Found 1 similar requests with 1 different matcher(s) :

1 - (<Request (PUT) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test000001/providers/Microsoft.Sql/servers/cli-test000003?api-version=2021-02-01-preview>)..)
Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
Matchers failed :
_custom_request_query_matcher - assertion failure :
None

I see that the CI pipeline of this PR failed due to the inconsistent api-version of Microsoft.Sql. Could you please re-record these failed test cases?

@StrawnSC StrawnSC requested review from yanzhudd and zhoxing-ms March 14, 2023 21:25
@joslinmicrosoft joslinmicrosoft mentioned this pull request Mar 14, 2023
3 tasks
@zhoxing-ms zhoxing-ms merged commit 509f9d4 into Azure:main Mar 15, 2023
@azclibot
Copy link
Copy Markdown
Collaborator

[Release] Update index.json for extension [ staticwebapp ] : https://dev.azure.com/azclitools/internal/_build/results?buildId=41438&view=results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants