{CI} Fix cli login issue for regression test pipeline#31940
{CI} Fix cli login issue for regression test pipeline#31940
Conversation
️✔️AzureCLI-FullTest
|
️✔️AzureCLI-BreakingChangeTest
|
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
There was a problem hiding this comment.
Pull Request Overview
This PR fixes CLI login issues in Azure DevOps regression test pipelines by converting bash tasks to AzureCLI@2 tasks. The issue arose from a previous PR that mistakenly converted CLI tasks to simple bash tasks, breaking authentication for commands that require Azure CLI context like az keyvault secret show.
- Converts bash tasks to AzureCLI@2 tasks to provide proper Azure CLI authentication context
- Maintains the same script logic while ensuring CLI commands can execute with proper credentials
- Fixes authentication issues that were preventing GitHub token retrieval from Azure Key Vault
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| scripts/regression_test/regression_test.yml | Converts three bash tasks to AzureCLI@2 tasks for proper CLI authentication |
| scripts/regression_test/extension_regression_test.yml | Converts four bash tasks to AzureCLI@2 tasks for proper CLI authentication |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
| @@ -22,7 +22,13 @@ jobs: | |||
| inputs: | |||
| versionSpec: '3.12' | |||
| displayName: "Use Python 3.12" | |||
There was a problem hiding this comment.
The displayName is moved inside the task inputs section but should be at the task level. Move 'displayName: 'update version'' to be a direct property of the task, not under inputs.
| displayName: "Use Python 3.12" | |
| displayName: "Use Python 3.12" | |
| inputs: | |
| versionSpec: '3.12' |
| @@ -86,7 +91,13 @@ jobs: | |||
| inputs: | |||
| versionSpec: '3.12' | |||
| displayName: "Use Python 3.12" | |||
There was a problem hiding this comment.
The displayName is moved inside the task inputs section but should be at the task level. Move 'displayName: 'Checkout Target Branch'' to be a direct property of the task, not under inputs.
| displayName: "Use Python 3.12" | |
| displayName: "Use Python 3.12" | |
| inputs: | |
| versionSpec: '3.12' |
| steps: | ||
| - bash: | | ||
| - task: AzureCLI@2 | ||
| displayName: 'Create PR' |
There was a problem hiding this comment.
The displayName is moved inside the task inputs section but should be at the task level. Move 'displayName: 'Create PR'' to be a direct property of the task, not under inputs.
| @@ -21,7 +21,13 @@ jobs: | |||
| inputs: | |||
| versionSpec: '3.12' | |||
| displayName: "Use Python 3.12" | |||
There was a problem hiding this comment.
The displayName is moved inside the task inputs section but should be at the task level. Move 'displayName: 'checkout branch'' to be a direct property of the task, not under inputs.
| displayName: "Use Python 3.12" | |
| displayName: "Use Python 3.12" | |
| inputs: | |
| versionSpec: '3.12' |
| @@ -74,7 +79,13 @@ jobs: | |||
| inputs: | |||
| versionSpec: '3.12' | |||
| displayName: "Use Python 3.12" | |||
There was a problem hiding this comment.
The displayName is moved inside the task inputs section but should be at the task level. Move 'displayName: 'checkout cli and extension repo'' to be a direct property of the task, not under inputs.
| displayName: "Use Python 3.12" | |
| displayName: "Use Python 3.12" | |
| inputs: | |
| versionSpec: '3.12' |
| steps: | ||
| - bash: | | ||
| - task: AzureCLI@2 | ||
| displayName: 'Result Summary' |
There was a problem hiding this comment.
The displayName is moved inside the task inputs section but should be at the task level. Move 'displayName: 'Result Summary'' to be a direct property of the task, not under inputs.
Related command
Description
In #31760, some CLI tasks were mistakenly updated to simple bash tasks. Actually there's
az keyvault secret showwithin the bash script to fetch github token which needs CLI environment. This PR will fix the issueTesting Guide
History Notes
[Component Name 1] BREAKING CHANGE:
az command a: Make some customer-facing breaking change[Component Name 2]
az command b: Add some customer-facing featureThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.