Skip to content

fix(core): stop listing Azure resources at startup - #54870

Merged
neriousy merged 2 commits into
devfrom
azure-startup-discovery
Oct 12, 2026
Merged

neriousy merged 2 commits into
devfrom
azure-startup-discovery

Conversation

@neriousy

@neriousy neriousy commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Issue for this PR

Closes #54864

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

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 az was on PATH and that azureProfile.json had a subscription, so every startup ran az account get-access-token for the management scope and queried Resource Graph, even without an Azure connection and with Azure excluded by enabled_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?

  • Replaced the two listing tests with one: with a signed-in CLI profile and no connection, the plugin runs no az commands 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.ts and bun typecheck in packages/core.

Screenshots / recordings

N/A

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Added by the opencode bot (AI-generated).

Related: #54145

@opencode-agent opencode-agent Bot left a comment

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.

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

@neriousy
neriousy enabled auto-merge (squash) October 12, 2026 16:54
@neriousy
neriousy merged commit 7bac892 into dev Oct 12, 2026
9 checks passed
@neriousy
neriousy deleted the azure-startup-discovery branch October 12, 2026 17:04
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.

azure: startup requests CLI tokens without an Azure connection

1 participant