Skip to content

Release Verification and Retry#49415

Draft
danieljurek wants to merge 9 commits into
mainfrom
djurek/release-verification
Draft

Release Verification and Retry#49415
danieljurek wants to merge 9 commits into
mainfrom
djurek/release-verification

Conversation

@danieljurek

@danieljurek danieljurek commented Jun 8, 2026

Copy link
Copy Markdown
Member

Summary

This PR adds optional post-publish verification for the Java ESRP Maven Central flow. When enabled, the release pipeline verifies that the published package main JARs are actually downloadable from Maven Central after the ESRP publish step completes.

Example release with a "failed" package release and success on retry (see attempts 1 and 2): https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6402988&view=logs&j=db16c569-aaa8-51c6-7af6-7a4439e8b73c&t=a4b20b29-bac1-5de5-989a-c44c74ee2b32&s=c3fcf85f-577d-5e17-eee8-b87fb40e1fa5

Code changes

  1. eng/pipelines/templates/steps/java-esrp-publishing.yml

    • Adds a new VerifyJarPublish template parameter.
    • Adds an optional PowerShell verification step that runs after EsrpRelease@9 when VerifyJarPublish is true.
    • The verification step:
      • scans the flattened ESRP directory for *.pom files
      • uses mvn help:evaluate to read groupId, artifactId, and version
      • filters to packages that have a matching main ${artifactId}-${version}.jar
      • attempts to download each published JAR from Maven Central using maven-dependency-plugin:copy
      • retries failed downloads with a fresh local Maven repo per attempt
      • fails the job if any package JAR still cannot be downloaded
  2. eng/pipelines/templates/stages/archetype-java-release-batch.yml

    • Adds the VerifyJarPublish stage parameter.
    • Passes that parameter into java-esrp-publishing.yml so the verification step can be turned on for batch Java releases.

Behavior

  • The new verification is opt-in through VerifyJarPublish.
  • It validates package JAR publication, not sources/javadocs/modules/readmes.
  • It is intended to catch cases where ESRP publish succeeds but Maven Central availability lags or fails for specific packages.

@danieljurek danieljurek self-assigned this Jun 8, 2026
@danieljurek danieljurek marked this pull request as ready for review June 8, 2026 19:18
Copilot AI review requested due to automatic review settings June 8, 2026 19:18
@danieljurek danieljurek requested a review from benbp as a code owner June 8, 2026 19:18
@danieljurek

Copy link
Copy Markdown
Member Author

@raych1 -- I've wired this to run in archetype-java-release-batch.yml but not on -release-patch or -release-pom-only ... I think that's reasonable but maybe we also want to add -release-patch?

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an optional post-publish verification step to the Java ESRP Maven Central release flow to confirm that published main JARs are actually downloadable from Maven Central after ESRP publish completes.

Changes:

  • Added a VerifyJarPublish parameter and an optional PowerShell verification step after EsrpRelease@9 that retries Maven Central JAR downloads and fails on persistent misses.
  • Plumbed VerifyJarPublish through the batch Java release stage template to control enabling the verification behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
eng/pipelines/templates/steps/java-esrp-publishing.yml Adds an opt-in PowerShell step to verify published JARs are downloadable from Maven Central with retries.
eng/pipelines/templates/stages/archetype-java-release-batch.yml Introduces/passes a stage parameter to enable the new post-publish JAR verification step.

Comment thread eng/pipelines/templates/stages/archetype-java-release-batch.yml
Comment thread eng/pipelines/templates/steps/java-esrp-publishing.yml
Comment thread eng/pipelines/templates/steps/java-esrp-publishing.yml
--batch-mode `
-q `
org.apache.maven.plugins:maven-dependency-plugin:copy `
-DremoteRepositories=central::default::https://repo.maven.apache.org/maven2 `

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would need to be the CFS Url.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How should we handle CFS in this context? We're supposed to be checking Maven Central directly and if we checked in another job, this job which runs the ESRP release itself wouldn't be retryable without running all jobs in the stage.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After discussion: This should instead by the public maven Azure SDK for Java feed

@raych1

raych1 commented Jun 8, 2026

Copy link
Copy Markdown
Member

@raych1 -- I've wired this to run in archetype-java-release-batch.yml but not on -release-patch or -release-pom-only ... I think that's reasonable but maybe we also want to add -release-patch?

I think we should add to patch release pipeline too.

@danieljurek

Copy link
Copy Markdown
Member Author

Taking this back into draft mode while I test the CFS change.

@danieljurek danieljurek marked this pull request as draft June 8, 2026 22:31
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.

3 participants