Skip to content

Fix subscription ID not being disabled on Azure provisioning dialog - #12888

Merged
David Fowler (davidfowl) merged 2 commits into
mainfrom
jamesnk/azure-provisioning-fixes
Nov 11, 2025
Merged

Fix subscription ID not being disabled on Azure provisioning dialog#12888
David Fowler (davidfowl) merged 2 commits into
mainfrom
jamesnk/azure-provisioning-fixes

Conversation

@JamesNK

@JamesNK James Newton-King (JamesNK) commented Nov 11, 2025

Copy link
Copy Markdown
Member

Description

PR #12172 added a new tenant ID option. However, if there is no subscription ID then the choice input is left enabled.

PR changes:

  • Subscription ID is disabled until a tenant is selected
  • Removes unnessessary dynamic load options whe subscription ID is a disabled textbox

Fixes #12882

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?

@github-actions

github-actions Bot commented Nov 11, 2025

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12888

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 12888"

Copilot AI 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.

Pull Request Overview

This PR fixes a bug where the subscription ID input field was not properly disabled when there's no pre-configured subscription ID. The issue was introduced in PR #12172 which added tenant ID selection.

Key changes:

  • Conditional creation of InputLoadOptions for subscription ID (only when not pre-configured)
  • Always initialize subscription ID input as disabled
  • Removed redundant null check inside the LoadCallback

@davidfowl

Copy link
Copy Markdown
Collaborator

Does this preserve when the subscription is already set from config? (Which means the tenant isn’t required)

@JamesNK

Copy link
Copy Markdown
Member Author

I think so. The changes are minor (listed in PR body).

I would test, but I don't know how to get just a SubscriptionId preset but still have the dialog pop up.

@davidfowl

Copy link
Copy Markdown
Collaborator

Set Azure:SubscriptionId in your config

@JamesNK

Copy link
Copy Markdown
Member Author

It's already broken on main.

image

Location input is disabled and is never enabled when there is an Azure:SubscriptionId in the config.

@JamesNK

Copy link
Copy Markdown
Member Author

I believe I've fixed both scenarios. Please double check.

.interaction-input-dialog .interaction-input ::deep fluent-select,
.interaction-input-dialog .interaction-input ::deep fluent-combobox {
.interaction-input-dialog .interaction-input ::deep fluent-combobox,
.interaction-input-dialog .interaction-input ::deep label {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Unrelated. Label width not being the same as input has bugged me

@davidfowl
David Fowler (davidfowl) merged commit 1d5ab36 into main Nov 11, 2025
296 checks passed
@davidfowl
David Fowler (davidfowl) deleted the jamesnk/azure-provisioning-fixes branch November 11, 2025 15:11
@dotnet-policy-service dotnet-policy-service Bot added this to the 13.1 milestone Nov 11, 2025
@JamesNK

Copy link
Copy Markdown
Member Author

/backport to release/13.0

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/13.0: https://github.com/dotnet/aspire/actions/runs/19281772994

Copilot AI added a commit that referenced this pull request Nov 20, 2025
Co-authored-by: JamesNK <303201+JamesNK@users.noreply.github.com>
James Newton-King (JamesNK) added a commit that referenced this pull request Nov 21, 2025
Co-authored-by: JamesNK <303201+JamesNK@users.noreply.github.com>
James Newton-King (JamesNK) added a commit that referenced this pull request Dec 9, 2025
* Initial plan

* Add unit tests for PR #12888 subscription ID input behavior

Co-authored-by: JamesNK <303201+JamesNK@users.noreply.github.com>

* Add unit tests for PR #13065 changes

- Add assertion for InputType.Choice when subscription ID is not configured
- Add assertion for Resource Group having no default value initially
- Add test for Resource Group default value behavior during dynamic loading

Co-authored-by: JamesNK <303201+JamesNK@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: JamesNK <303201+JamesNK@users.noreply.github.com>
@github-actions github-actions Bot locked and limited conversation to collaborators Dec 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-integrations Issues pertaining to Aspire Integrations packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Azure provisioning Subscription ID input not disabled

3 participants