Skip to content

GithubPipeline: ConfigurePipeline: az-cli: Customize identity resource group and naming#401

Merged
illume merged 2 commits intoAzure:mainfrom
gambtho:thgamble/pipelinetouchup
Mar 16, 2026
Merged

GithubPipeline: ConfigurePipeline: az-cli: Customize identity resource group and naming#401
illume merged 2 commits intoAzure:mainfrom
gambtho:thgamble/pipelinetouchup

Conversation

@gambtho
Copy link
Copy Markdown
Collaborator

@gambtho gambtho commented Mar 11, 2026

Fixes #420

Summary

  • Allow users to customize the resource group where the managed identity is created, defaulting to rg-<projectName>
  • Derive identity name from project name instead of namespace (id-<projectName>-github)
  • Thread projectName through the pipeline wizard to the workload identity setup component
  • Show full repo name (owner/repo) in the repo selector instead of just the repo name
  • Add createResourceGroup and getResourceGroupLocation az-cli helpers to ensure the identity resource group exists before creating the managed identity

Type of Change

  • New feature (non-breaking change which adds functionality)

Changes Made

  • ConfigurePipelineButton: pass projectName to the wizard
  • GitHubPipelineWizard: accept and forward projectName prop through orchestration hook
  • WorkloadIdentitySetup: add editable TextField for identity resource group, remove unused namespace prop, sync state when projectName changes; show TextField in error state for retry
  • useWorkloadIdentitySetup: add creating-rg step to ensure identity resource group exists before identity creation; use identityResourceGroup for identity and credential operations
  • useGitHubPipelineOrchestration: plumb projectName through and expose it in the result
  • RepoSelector: display fullName (owner/repo) instead of just name
  • az-cli.ts: add getResourceGroupLocation, resourceGroupExists, and createResourceGroup functions using runAzCommand with input validation

Test Plan

  1. Open an AKS project → Configure Pipeline
  2. Proceed through GitHub auth and repo selection to the Workload Identity step
  3. Verify the "Identity Resource Group" field defaults to rg-<projectName>
  4. Verify the identity name shown is id-<projectName>-github
  5. Edit the resource group field to a custom value and click Continue — verify the custom RG is used
  6. If the RG doesn't exist, verify it gets created automatically
  7. If the RG already exists, verify setup proceeds without attempting to create it
  8. Verify the repo selector shows owner/repo format (not just repo name)
  9. Trigger an error (e.g., use an inaccessible RG name) — verify the TextField reappears in the error view so you can edit it before clicking Retry
  10. Verify Retry with a corrected RG name proceeds successfully
  11. Run npm test -- --run and confirm all new tests pass

Copilot AI review requested due to automatic review settings March 11, 2026 01:33
@gambtho gambtho changed the title pipeline: customize resource group and identity name pipeline: customize identity resource group and naming Mar 11, 2026
@gambtho gambtho force-pushed the thgamble/pipelinetouchup branch from 3116c9f to ecdb268 Compare March 11, 2026 01:35
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds support in the AKS Desktop GitHub Pipeline flow to customize the Azure resource group used for managed identity creation and to base identity naming on a “project name” rather than namespace.

Changes:

  • Added Azure CLI helpers to fetch a resource group’s location and create a resource group.
  • Updated workload identity setup to (attempt to) ensure an identity-specific resource group exists and to name identities via projectName.
  • Updated GitHub Pipeline wizard/orchestration and UI to pass projectName, allow editing the identity resource group, and display repo full name in the selector.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
plugins/aks-desktop/src/utils/azure/az-cli.ts Adds resource-group location lookup and resource-group creation helpers for the pipeline flow.
plugins/aks-desktop/src/components/GitHubPipeline/hooks/useWorkloadIdentitySetup.ts Creates/uses an identity-specific resource group and switches identity naming input to projectName.
plugins/aks-desktop/src/components/GitHubPipeline/hooks/useGitHubPipelineOrchestration.ts Plumbs optional projectName through the orchestration hook return value.
plugins/aks-desktop/src/components/GitHubPipeline/components/WorkloadIdentitySetup.tsx Adds identity RG input field and updates identity naming to use projectName.
plugins/aks-desktop/src/components/GitHubPipeline/components/RepoSelector.tsx Displays repo full name instead of short name.
plugins/aks-desktop/src/components/GitHubPipeline/GitHubPipelineWizard.tsx Accepts and passes projectName into the workload identity setup step.
plugins/aks-desktop/src/components/ConfigurePipeline/ConfigurePipelineButton.tsx Provides projectName when launching the pipeline wizard from a project.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread plugins/aks-desktop/src/utils/azure/az-cli.ts Outdated
Comment thread plugins/aks-desktop/src/utils/azure/az-cli.ts Outdated
@gambtho gambtho force-pushed the thgamble/pipelinetouchup branch from ecdb268 to 1253948 Compare March 11, 2026 04:08
@illume
Copy link
Copy Markdown
Collaborator

illume commented Mar 11, 2026

Can you please add the issue for this to the PR description?

@illume illume requested a review from Copilot March 11, 2026 14:43
@illume illume changed the title pipeline: customize identity resource group and naming ConfigurePipeline: GithubPipeline: az-cli: Customize identity resource group and naming Mar 11, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Collaborator

@illume illume left a comment

Choose a reason for hiding this comment

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

Can you please add some tests?

Some steps to manually test in the PR would also be helpful.

@illume illume marked this pull request as draft March 11, 2026 18:30
@illume illume added p-none No priority was assigned enhancement New feature or request labels Mar 12, 2026
@illume illume changed the title ConfigurePipeline: GithubPipeline: az-cli: Customize identity resource group and naming GithubPipeline: ConfigurePipeline: az-cli: Customize identity resource group and naming Mar 12, 2026
@gambtho gambtho force-pushed the thgamble/pipelinetouchup branch 2 times, most recently from e8bcdb9 to 164783f Compare March 12, 2026 14:14
@gambtho gambtho marked this pull request as ready for review March 12, 2026 14:43
Copilot AI review requested due to automatic review settings March 12, 2026 14:43
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 29 out of 29 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread plugins/aks-desktop/src/utils/azure/az-cli.ts Outdated
@gambtho gambtho force-pushed the thgamble/pipelinetouchup branch from 164783f to 5c7e992 Compare March 14, 2026 04:04
@gambtho gambtho requested a review from illume March 14, 2026 04:07
Copy link
Copy Markdown
Collaborator

@illume illume left a comment

Choose a reason for hiding this comment

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

🎉 thanks!

@illume illume merged commit 38176cf into Azure:main Mar 16, 2026
8 checks passed
@illume illume mentioned this pull request Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request p-none No priority was assigned

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GithubPipeline: Allow customizing identity resource group and naming

3 participants