Repository navigation
fix(core): stop listing Azure resources at startup - #54870
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Looks good. I ran the #54864 reproduction (stub az, signed-in azureProfile.json, idle --standalone startup) from source. The base makes one az account get-access-token call, both by default and with enabled_providers excluding Azure. With this change there are no az calls in either case. provider-azure.test.ts passes (the new test fails against the base), and typecheck in packages/core is clean.
Public API is unchanged. The only visible difference is that the Azure CLI connect form's resource field is a plain text input again instead of a picker.
No blocking concerns.
Related: #54145
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #54864
Type of change
What does this PR do?
#53794 added a background job at Azure plugin startup that listed Azure resources for the connect form. It only checked that
azwas on PATH and thatazureProfile.jsonhad a subscription, so every startup ranaz account get-access-tokenfor the management scope and queried Resource Graph, even without an Azure connection and with Azure excluded byenabled_providers.This removes that startup listing. The Azure CLI method's resource field is a plain text input again. Deployment discovery is unchanged and still only calls Azure for an active Azure connection, so both cases in the issue now make no calls.
Gating on provider policy alone wouldn't fix the main case (Azure allowed but never connected). Bringing back the resource picker would need loading form options on demand when the connect dialog opens, which is a separate change.
How did you verify your code works?
azcommands and sends no Azure requests, and still validates and stores a typed resource name. It fails on the previous code.bun test test/plugin/provider-azure.test.tsandbun typecheckinpackages/core.Screenshots / recordings
N/A
Checklist
Added by the opencode bot (AI-generated).
Related: #54145