Skip to content

ci(platform): fix release pipeline race condition#1380

Merged
larryro merged 1 commit into
mainfrom
ci/issue-1349-fix-release-race
Apr 11, 2026
Merged

ci(platform): fix release pipeline race condition#1380
larryro merged 1 commit into
mainfrom
ci/issue-1349-fix-release-race

Conversation

@yannickmonney

@yannickmonney yannickmonney commented Apr 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Defer GitHub Release creation until after all container image manifests are pushed, eliminating the 15-20 minute window where a release is visible but images are not pullable
  • Add manifest verification step in the create-release job that confirms all 5 service manifests exist before publishing
  • Filter out versions with incomplete manifests from the CLI version selector (defense-in-depth)
  • Improve pullImage() error messaging to detect "not found" / "manifest unknown" errors and suggest waiting for recent releases
  • Collect all failed image pulls before throwing in deploy() for a clearer error summary

Changes

.github/workflows/release.yml

  • create-release now depends on [prepare, manifest] instead of [prepare]
  • Added manifest verification step before release creation
  • trigger-cli now depends on [prepare, manifest] instead of [prepare, create-release]

tools/cli/src/lib/docker/pull-image.ts

  • Added isManifestNotFound() helper to detect manifest-not-found errors
  • Show timing-aware warning when a pull fails due to missing manifest

tools/cli/src/lib/actions/deploy.ts

  • Collect all failed image pulls before throwing, with a message suggesting the release may still be building

tools/cli/src/lib/registry/get-available-versions.ts

  • Added hasCompleteManifests() that verifies manifests exist across all 5 services
  • Filter out versions with incomplete manifests from the selector (checks top 5 candidates)

Test plan

  • All 40 CLI tests pass (14 new tests added)
  • Lint passes
  • Typecheck passes (pre-existing errors in fetch-reference.ts unrelated)
  • Trigger a test release and verify the GitHub Release only appears after manifests are pushed
  • Verify the CLI version selector filters out versions still being built
  • Verify deploy error message is helpful when an image is temporarily missing

Closes #1349

Summary by CodeRabbit

  • Bug Fixes

    • Improved image pull error reporting by collecting all failures and displaying them together instead of stopping on the first error.
  • Chores

    • Enhanced release validation to verify all service container images are available before publishing a release.
    • Refined version availability checks to ensure complete service manifest presence across all services.

@coderabbitai

coderabbitai Bot commented Apr 11, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: ff89b9dc-5896-4900-91c0-2d0dbcf0c3d8

📥 Commits

Reviewing files that changed from the base of the PR and between 7188486 and 65ffc7b.

📒 Files selected for processing (6)
  • .github/workflows/release.yml
  • tools/cli/src/lib/actions/deploy.ts
  • tools/cli/src/lib/docker/pull-image.test.ts
  • tools/cli/src/lib/docker/pull-image.ts
  • tools/cli/src/lib/registry/get-available-versions.test.ts
  • tools/cli/src/lib/registry/get-available-versions.ts

📝 Walkthrough

Walkthrough

The PR adds validation to prevent incomplete image availability issues during releases and deployments. The release workflow now verifies that all service manifests (platform, rag, crawler, db, proxy) exist in GHCR before proceeding with a GitHub release. The deployment logic collects all failed image pulls instead of failing immediately, reporting them together. Image pulling now logs manifest-not-found errors with a brief "wait and retry" message rather than full stderr output. Version discovery filters out versions lacking complete manifests across all services. Tests are updated to validate the new logging behavior and manifest completeness checks.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~28 minutes

Possibly related PRs

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/issue-1349-fix-release-race

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps greptile-apps Bot 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.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Defer GitHub Release creation until after all container manifests are
pushed, eliminating the 15-20 minute window where a release is visible
but images are not pullable. Also add manifest verification in the CLI
version selector to filter out incomplete versions, and improve error
messages when image pulls fail for recent releases.

Closes #1349
@larryro larryro force-pushed the ci/issue-1349-fix-release-race branch from 3520552 to 65ffc7b Compare April 11, 2026 07:20
@larryro larryro merged commit 14e768f into main Apr 11, 2026
8 of 9 checks passed
@larryro larryro deleted the ci/issue-1349-fix-release-race branch April 11, 2026 07:21
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.

Error when install application 0.2.16

2 participants