Skip to content

Validate target service resource#1181

Merged
weikanglim merged 10 commits into
Azure:mainfrom
weikanglim:weilim/service-tag-errors
Nov 19, 2022
Merged

Validate target service resource#1181
weikanglim merged 10 commits into
Azure:mainfrom
weikanglim:weilim/service-tag-errors

Conversation

@weikanglim

@weikanglim weikanglim commented Nov 17, 2022

Copy link
Copy Markdown
Contributor
  1. Remove fallback logic for azure service resource to default to envName + serviceName. This logic predates public preview of azd, and the abbreviated fallback no longer makes sense in azd.
  2. When loading the project, validate that:
    • The service resource is valid, has been provisioned, and matches one unique resource exactly
    • The service resource type matches the expected resource type specified by the target host
  3. Fix azd show not working as expected when an explicit resourceName is specified in azure.yaml
  4. Update mocks for listing arm resources to support filtering

Addresses #1037

Fallback to envName + serviceName has been around prior to public preview, and no longer makes much sense given that it's not a well-known resource abbreviation.
Comment thread cli/azd/cmd/show.go Outdated
@ellismg

ellismg commented Nov 17, 2022

Copy link
Copy Markdown
Member

Addresses #103

I think you meant #1037

@ellismg ellismg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Will take a more in depth pass tomorrow (and sign off) but overal this looked like the right thing to me. Thanks for the improvements here, love the actionable error messages!

Comment thread cli/azd/pkg/environment/deployment_scope.go Outdated
Comment thread cli/azd/test/mocks/mock_context.go Outdated
@azure-sdk

Copy link
Copy Markdown
Collaborator

Azure Dev CLI Install Instructions

Install scripts

MacOS/Linux

May elevate using sudo on some platforms and configurations

bash:

curl -fsSL https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/1181/uninstall-azd.sh | bash;
curl -fsSL https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/1181/install-azd.sh | bash -s -- --base-url https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/1181 --version '' --verbose

pwsh:

Invoke-RestMethod 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/1181/uninstall-azd.ps1' -OutFile uninstall-azd.ps1; ./uninstall-azd.ps1
Invoke-RestMethod 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/1181/install-azd.ps1' -OutFile install-azd.ps1; ./install-azd.ps1 -BaseUrl 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/1181' -Version '' -Verbose

Windows

powershell -c "Set-ExecutionPolicy Bypass Process; irm 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/1181/uninstall-azd.ps1' > uninstall-azd.ps1; ./uninstall-azd.ps1;"
powershell -c "Set-ExecutionPolicy Bypass Process; irm 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/1181/install-azd.ps1' > install-azd.ps1; ./install-azd.ps1 -BaseUrl 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/1181' -Version '' -Verbose;"

Standalone Binary

Container

docker run -it azdevcliextacr.azurecr.io/azure-dev:pr-1181

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.

3 participants