Skip to content

Serialize Play publishing to prevent edit-expired races#166

Merged
patrickrb merged 2 commits into
devfrom
ci/serialize-play-publish
Jun 8, 2026
Merged

Serialize Play publishing to prevent edit-expired races#166
patrickrb merged 2 commits into
devfrom
ci/serialize-play-publish

Conversation

@patrickrb

Copy link
Copy Markdown
Owner

Problem

The Build APK check on the dev→main release PR (#165) went red. The APK and AAB built fine — the failure was in the final Publish AAB to Play Internal track step:

##[error]This edit has expired, please create a new Edit.

Root cause

Two pushes to dev landed 19 seconds apart and both reached the Play publish step concurrently:

Run Trigger Started Result
27165014434 Merge #161 20:29:25Z ✅ published dev-333
27165030095 Merge #163 20:29:44Z dev-334 — edit expired

The Google Play Developer API allows only one active "edit" per app. When the second run opened its edit while the first still held one, the first commit invalidated the second → This edit has expired. Nothing was wrong with the build.

Fix

Add a workflow-level concurrency group so all release-publishing runs (pushes to main/dev and v* tags) share a single play-publish queue and run one-at-a-time:

concurrency:
  group: >-
    ${{ (github.event_name == 'push'
          && (github.ref == 'refs/heads/main'
            || github.ref == 'refs/heads/dev'
            || startsWith(github.ref, 'refs/tags/v')))
        && 'play-publish'
        || format('build-{0}', github.run_id) }}
  cancel-in-progress: false
  • cancel-in-progress: false — an in-flight upload finishes instead of being killed mid-publish.
  • PRs and feature-branch pushes get a unique per-run group (build-<run_id>) so they're never queued and CI stays fast.

Notes

  • No app code changed, so there's no unit test to add — this is CI orchestration config only. Validated that the workflow YAML parses.
  • The already-failed dev-334 run will be re-run separately to clear the red check on Release: dev → main (PRs #151–#172) #165; with no concurrent edit live, it succeeds.

🤖 Generated with Claude Code

Two pushes to dev landed 19s apart (merges of #161 and #163) and both
ran the "Publish AAB to Play Internal track" step concurrently. Google
Play permits only one active edit per app, so the second run's edit was
invalidated mid-upload and the job failed with "This edit has expired,
please create a new Edit."

Add a workflow-level concurrency group so all release-publishing runs
(pushes to main/dev and v* tags) share a single "play-publish" queue and
never overlap on the Play API. cancel-in-progress is false so an
in-flight upload finishes instead of being killed. PRs and feature-branch
pushes get a unique per-run group and are never queued.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Jun 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 6.56%. Comparing base (4f2e2e4) to head (e9da591).
⚠️ Report is 5 commits behind head on dev.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##               dev    #166   +/-   ##
=======================================
  Coverage     6.56%   6.56%           
  Complexity     695     695           
=======================================
  Files          272     272           
  Lines        31563   31563           
  Branches      4982    4982           
=======================================
  Hits          2071    2071           
  Misses       29348   29348           
  Partials       144     144           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the release GitHub Actions workflow to prevent Google Play publishing failures caused by concurrent “edit” sessions, by serializing publish-capable runs into a single concurrency queue.

Changes:

  • Adds workflow-level concurrency to ensure pushes to main, dev, and v* tags share a single play-publish group.
  • Sets cancel-in-progress: false so an in-flight publish isn’t interrupted mid-upload.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/build-release.yml Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@patrickrb patrickrb merged commit c3fe3b2 into dev Jun 8, 2026
2 checks passed
@patrickrb patrickrb deleted the ci/serialize-play-publish branch June 9, 2026 03:29
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.

2 participants