-
Notifications
You must be signed in to change notification settings - Fork 226
Update custom Azure pipeline YAML conditions to respect canceled status and remove obsolete CADL files #10858
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
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 ensures that custom conditions in Azure Pipeline YAML files properly respect a canceled pipeline state by incorporating succeeded() checks into the conditions.
- Updated conditions in apiview-review-gen-typespec.yml and apiview-review-gen-cadl.yml to include succeeded() with existing checks.
- Updated conditions in detect-api-changes.yml and perf.yml to prepend succeeded() to the conditional expressions.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| eng/pipelines/apiview-review-gen-typespec.yml | Added succeeded() to conditions for Reviews and APIViewURL. |
| eng/pipelines/apiview-review-gen-cadl.yml | Added succeeded() to conditions for Reviews and APIViewURL. |
| eng/common/pipelines/templates/steps/detect-api-changes.yml | Prepended succeeded() to the condition to enforce cancellation checks. |
| eng/common/pipelines/templates/jobs/perf.yml | Prepended succeeded() to the condition for Profile parameter. |
benbp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I checked all other spots and it pretty much got it right and excluded the ones that don't fit.
d853401 to
1deea74
Compare
|
/azp run azure-sdk-tools - sync - eng-common |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
The following pipelines have been queued for testing: |
|
/azp run azure-sdk-tools - sync - eng-common |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
The following pipelines have been queued for testing: |
Co-authored-by: benbp <[email protected]>
Co-authored-by: praveenkuttappan <[email protected]>
1deea74 to
f0635a2
Compare
|
/azp run azure-sdk-tools - sync - eng-common |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
The following pipelines have been queued for testing: |
Sync eng/common directory with azure-sdk-tools for PR Azure/azure-sdk-tools#10858 See [eng/common workflow](https://github.com/Azure/azure-sdk-tools/blob/main/eng/common/README.md#workflow) Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: benbp <[email protected]>
Sync eng/common directory with azure-sdk-tools for PR Azure/azure-sdk-tools#10858 See [eng/common workflow](https://github.com/Azure/azure-sdk-tools/blob/main/eng/common/README.md#workflow) Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: benbp <[email protected]>
This PR updates custom conditions in Azure Pipeline YAML files to properly respect canceled pipeline status and removes obsolete CADL pipeline files that were superseded by TypeSpec equivalents.
Problem
When Azure Pipeline conditions don't explicitly include success/failure state functions, they default to
always()behavior, which means steps continue to run even when a pipeline is canceled. This is problematic because:Additionally, the repository contained obsolete CADL pipeline files that were no longer needed since CADL was renamed to TypeSpec.
Solution
Pipeline Condition Updates
Updated custom conditions in 3 YAML files within
eng/pipelinesandeng/common/pipelinesdirectories:apiview-review-gen-typespec.yml - 2 conditions updated:
detect-api-changes.yml - 1 condition updated:
perf.yml - 1 condition updated:
File Cleanup
Removed obsolete CADL pipeline files:
eng/pipelines/apiview-review-gen-cadl.ymleng/scripts/Create-Apiview-Token-Cadl.ps1These files were duplicates of the TypeSpec equivalents and are no longer needed since CADL was renamed to TypeSpec.
Testing
Conditionparameters already had proper defaults (succeeded())Impact
These changes ensure that when pipelines are canceled, steps with custom conditions will properly respect the canceled state and not continue executing unnecessarily. The removal of obsolete CADL files reduces maintenance overhead and eliminates duplicate functionality.
Fixes #10836.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.