Skip to content

Handle AzDO upstream-conflict publish failures by enabling allowExternalVersions and retrying#811

Draft
Copilot wants to merge 3 commits into
engfrom
copilot/enable-allow-external-versions
Draft

Handle AzDO upstream-conflict publish failures by enabling allowExternalVersions and retrying#811
Copilot wants to merge 3 commits into
engfrom
copilot/enable-allow-external-versions

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 11, 2026

Publishing to dotnet-workloads can fail when a package is only available via an upstream (for example dotnet-public): publish returns a 409 upstream-source conflict unless the target feed allows external versions. This update adds targeted recovery for that failure mode in the official publish pipeline.

  • Publish flow: detect upstream-source conflict from initial AzDO publish

    • In eng/pipelines/official.yml, the AzDO publish task is now named (InitialPublishToAzDO) and runs with continueOnError: true to allow post-failure inspection.
    • A follow-up PowerShell step reads the timeline/log for that task and checks for the specific upstream-conflict signature:
      • exists in at least one of the feed's upstream sources
  • Feed configuration update via Artifacts REST API

    • On that conflict only, the pipeline resolves the feed from azDOPublishFeed (project/feed or feed-only) and updates feed settings using the Artifacts API:
      • allowExternalVersions = true
    • Includes explicit guardrails for empty feed input and feed lookup failure.
  • Conditional retry

    • The pipeline sets RetryAzdoPublish=true only when the upstream-conflict path is taken.
    • A second AzDO publish task runs only when that variable is set.
- task: 1ES.PublishNuget@1
  name: InitialPublishToAzDO
  continueOnError: true
  inputs:
    publishVstsFeed: ${{ parameters.azDOPublishFeed }}

- powershell: |
    # Read InitialPublishToAzDO log; if upstream-conflict:
    # PATCH feed allowExternalVersions=true
    Write-Host "##vso[task.setvariable variable=RetryAzdoPublish]true"

- task: 1ES.PublishNuget@1
  condition: and(succeededOrFailed(), eq(variables['RetryAzdoPublish'], 'true'))
  inputs:
    publishVstsFeed: ${{ parameters.azDOPublishFeed }}

Copilot AI and others added 2 commits May 11, 2026 23:44
Copilot AI changed the title [WIP] Enable allow externally-sourced versions on upstreamed version Handle AzDO upstream-conflict publish failures by enabling allowExternalVersions and retrying May 11, 2026
Copilot AI requested a review from marcpopMSFT May 11, 2026 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable allow externally-sourced versions on upstreamed version

2 participants