Azure / Azure/azure-rest-api-specs
[spec-gen-sdk-status] Does not flow issue_number from DevOps Pipeline
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 424
Description
## Summary
The following PR hit an issue on the second-to-last commit:
https://github.com/Azure/azure-rest-api-specs/pull/37621
Checks got stuck in this state, where `Automated merging requirements met` was pending forever:
A workaround would have been to do anything that triggers a re-run of `Summarize Checks`, like adding label `PipelineBotTrigger`. `Summarize Checks` is designed to be eventually consistent. The problem in this PR, is the last trigger of `Summarize Checks` did not include an `issue_number`, which caused the check to exit early with a no-op.
## Timeline
- DevOps Pipeline `SDK Validation - Python` runs from 10:06 to 10:56
- https://dev.azure.com/azure-sdk/public/_build/results?buildId=5459921&view=results
- artifact `spec-gen-sdk-artifact.json` includes `"prNumber": "37621"` (correctly)
- Action `SDK Validation Status` triggers at 10:57 on check_run:completed
- https://github.com/Azure/azure-rest-api-specs/actions/runs/18538013273/job/52838048200
- BUG: extractInputs() returns issue_number:null
- https://github.com/Azure/azure-rest-api-specs/actions/runs/18538013273/job/52838048200#step:5:18
- Subsequent code in `SDK Validation Status` just flows `issue_number=null` all the way to the output. It doesn't try to get the `issue_number` from the pipeline artifact, or by lookup from the `head_sha`.
- `Summarize Checks` triggers at 10:58 on workflow_run:completed
- Exits early, since no `issue_number`
- https://github.com/Azure/azure-rest-api-specs/actions/runs/18540154260/job/52845308796 (similar run)
## Fix
Fix is to extract `issue_number` from the pipeline artifact, either in `context.js` (preferred since lower-level), or in `SDK Validation Status`.
Contributor guide
Assessment
This issue has not been assessed yet.