Skip to content

Fix snapshot concurrency and release retries - #3

Merged
riccardobl merged 1 commit into
jMonkeyEngine:masterfrom
toaster0123:fix/testdata-publishing-retries
Oct 31, 2026
Merged

riccardobl merged 1 commit into
jMonkeyEngine:masterfrom
toaster0123:fix/testdata-publishing-retries

Conversation

@toaster0123

Copy link
Copy Markdown
Contributor

Follow-up to #2.

The new snapshot workflow can publish two commits to the same daily snapshot concurrently, allowing an older commit to replace newer snapshot metadata. Release retries also allocate a new version after a tag has already been pushed, and missing publishing credentials are only detected after creating the release.

Changes

  • Serialize snapshot uploads without cancelling an upload in progress, and skip commits that no longer match the head of master before uploading.
  • Check all publishing credentials before creating a tag or GitHub release.
  • Record the originating workflow run in an annotated release tag. Retries reuse that version and verify its commit, including when retried on another day. A new dispatch still allocates a new daily version.
  • Reuse an existing GitHub release, and skip Maven uploads that a previous attempt recorded as successful. Abort if publishing history cannot be read.
  • Propagate version-helper errors and document the retry/snapshot behavior.

Validation

  • Existing scripts/next-version-test.sh: all 15 checks passed.
  • YAML parsing and Bash syntax checks passed.
  • Executed the actual workflow shell blocks against an isolated local Git remote, with GitHub and Maven calls mocked. Covered missing credentials, fresh-checkout retries on a later day, missing/existing releases, distinct dispatches of the same commit, mismatched/ambiguous tags, lightweight tags, failed/successful Maven attempts, unreadable history, stale snapshots, and helper/remote lookup failures.
  • No release or Sonatype publication was triggered during validation.

The retry guard recognizes uploads recorded as successful by GitHub Actions. It does not claim transactional recovery when a remote upload is accepted but the client loses the response.

Serialize snapshot uploads and skip superseded master commits. Validate
publishing credentials before creating a release, preserve each workflow
run's version in its annotated tag, and skip uploads already recorded as
successful on a previous attempt.

@jaime-jmebot jaime-jmebot 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.

This is a solid set of improvements to the snapshot and release workflows!

  • Snapshot Concurrency: Serializing uploads and checking master HEAD prevents stale or concurrent commits from overwriting snapshot metadata.
  • Release Retries & Tag Reuse: Checking credentials upfront and tagging releases with the workflow run marker enables reliable, idempotent retries.
  • Publication Check: Reusing existing GitHub releases and skipping Sonatype uploads if a previous run attempt already succeeded prevents duplicate publish attempts.

Everything looks clean and well-tested. Great work!

@riccardobl
riccardobl merged commit 9ff1584 into jMonkeyEngine:master Oct 31, 2026
1 check passed
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