Fix scoped builds crashing on integration publishing#46233
Merged
Conversation
When a build is scoped via BuildTargetingString, only targeted packages have artifact directories. The Integration stage was calling Get-ChildItem on all artifact directories, causing a fatal error for non-targeted packages. Add Test-Path check to gracefully skip packages whose artifact directories don't exist, logging a clear message indicating the package was not targeted. Agent-Logs-Url: https://github.com/Azure/azure-sdk-for-python/sessions/034428c7-04c1-4353-9aac-7b0e713c1aaf Co-authored-by: scbedd <45376673+scbedd@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix integration publishing crash on scoped builds
Fix scoped builds crashing on integration publishing
Apr 9, 2026
…irectory existence When BuildTargetingString is set, split it by comma and test each artifact name against the glob patterns using PowerShell -like before attempting to publish. Non-matching packages are skipped with a clear log message. Closes #42014 Agent-Logs-Url: https://github.com/Azure/azure-sdk-for-python/sessions/88e37a34-ffce-4971-91c0-223321039c44 Co-authored-by: scbedd <45376673+scbedd@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Integration publishing logic in the Python release archetype pipeline to avoid attempting integration publishing for packages that were filtered out by a scoped build (BuildTargetingString), addressing failures where expected artifacts were not produced.
Changes:
- Add a
BuildTargetingStringcheck in the Integration publish step to skip publishing non-targeted packages with a clear log message.
Show a summary per file
| File | Description |
|---|---|
| eng/pipelines/templates/stages/archetype-python-release.yml | Adds targeting-string matching to skip integration publish for artifacts excluded by scoped builds. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 2
benbp
approved these changes
Apr 9, 2026
scbedd
approved these changes
Apr 10, 2026
Member
|
/check-enforcer override |
tendau
pushed a commit
that referenced
this pull request
Apr 13, 2026
* Fix scoped builds: check BuildTargetingString glob match instead of directory existence When BuildTargetingString is set, split it by comma and test each artifact name against the glob patterns using PowerShell -like before attempting to publish. Non-matching packages are skipped with a clear log message. Closes #42014 Agent-Logs-Url: https://github.com/Azure/azure-sdk-for-python/sessions/88e37a34-ffce-4971-91c0-223321039c44 Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: scbedd <45376673+scbedd@users.noreply.github.com>
fafhrd91
pushed a commit
to fafhrd91/azure-sdk-for-python
that referenced
this pull request
Apr 28, 2026
* Fix scoped builds: check BuildTargetingString glob match instead of directory existence When BuildTargetingString is set, split it by comma and test each artifact name against the glob patterns using PowerShell -like before attempting to publish. Non-matching packages are skipped with a clear log message. Closes Azure#42014 Agent-Logs-Url: https://github.com/Azure/azure-sdk-for-python/sessions/88e37a34-ffce-4971-91c0-223321039c44 Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: scbedd <45376673+scbedd@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test-Pathcheck with BuildTargetingString glob matching in Integration stageOriginal prompt
This pull request was created from Copilot chat.