Skip to content

ci(docker): build on unified release tags + wait for dep images like jans#2907

Merged
moabu merged 1 commit into
mainfrom
ci/docker-publish-on-tag
Jun 26, 2026
Merged

ci(docker): build on unified release tags + wait for dep images like jans#2907
moabu merged 1 commit into
mainfrom
ci/docker-publish-on-tag

Conversation

@mo-auto

@mo-auto mo-auto commented Jun 26, 2026

Copy link
Copy Markdown
Member

Summary

Fixes the docker publish on a tag release — the run that went green but built/published nothing (28161595588).

1. Build on the unified v* release tag. Prepare only proceeded for per-image docker-<img>-v* tags; a unified v6.2.0 tag hit the catch-all elif refs/tags/* → BUILD="", so prep.outputs.build was empty and the build/push steps were skipped (the job still reported success). Added a refs/tags/v* case that builds every image at its Dockerfile version — the OCI image.version label (6.2.0-1).

2. flex-all-in-one waits for its dependency images, like jans. Replaced the docker pull poll with jans's mechanism: poll the sibling matrix jobs' conclusions (docker (admin-ui), docker (persistence-loader)) via gh api .../jobs — proceed on success/skipped, fail fast if a dependency job fails/cancels/times out. Added actions: read + GH_TOKEN so the poll can read job status.

Summary by CodeRabbit

  • Bug Fixes
    • Improved image build handling for unified release tags, so versioned Docker images are tagged more consistently.
    • Made multi-image build coordination more reliable by waiting for related builds to finish before continuing, reducing failed or incomplete image releases.
    • Added safer build permissions and token handling to support the updated release workflow.

…jans

Two fixes for the docker publish on a tag release:
- Prepare only built for per-image docker-<img>-v* tags; a unified v6.2.0 tag hit the catch-all
  (BUILD=""), so prep.outputs.build was empty and build/push were skipped - the job went green but
  published nothing. Add a refs/tags/v* case that builds every image at its Dockerfile version (the
  OCI image.version label, e.g. 6.2.0-1).
- flex-all-in-one now waits for admin-ui + persistence-loader the way jans's all-in-one does: poll
  those sibling matrix jobs' conclusions via the API (proceed on success/skipped, fail fast on a
  failed dep) instead of polling docker pull. Adds actions:read + GH_TOKEN for the poll.

Signed-off-by: moauto <54212639+mo-auto@users.noreply.github.com>
@mo-auto mo-auto requested review from iromli and moabu as code owners June 26, 2026 07:30
@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 581394dd-17de-418c-ac61-adee24812d83

📥 Commits

Reviewing files that changed from the base of the PR and between ae03500 and c84d515.

📒 Files selected for processing (1)
  • .github/workflows/docker_build_image.yml

📝 Walkthrough

Walkthrough

The workflow adds GitHub Actions read access, passes GH_TOKEN to prep, recognizes unified refs/tags/v* release tags when selecting VERSION, and changes flex-all-in-one to wait on sibling job conclusions instead of image-pull retries.

Changes

Docker build workflow

Layer / File(s) Summary
Auth and version selection
.github/workflows/docker_build_image.yml
Adds actions: read, sets GH_TOKEN for prep, and maps refs/tags/v* to MAIN_VERSION as VERSION.
Sibling job polling
.github/workflows/docker_build_image.yml
Replaces the flex-all-in-one image-pull retry gate with polling for docker (admin-ui) and docker (persistence-loader) conclusions, treating success and skipped as ready and stopping on failure states or timeout.

Sequence Diagram(s)

sequenceDiagram
  participant FlexAllInOne as flex-all-in-one
  participant GitHubActionsAPI as GitHub Actions API
  participant AdminUIJob as docker (admin-ui)
  participant PersistenceLoaderJob as docker (persistence-loader)
  FlexAllInOne->>GitHubActionsAPI: request sibling job conclusions
  GitHubActionsAPI->>AdminUIJob: check conclusion
  GitHubActionsAPI->>PersistenceLoaderJob: check conclusion
  AdminUIJob-->>GitHubActionsAPI: success / skipped / failure
  PersistenceLoaderJob-->>GitHubActionsAPI: success / skipped / failure
  GitHubActionsAPI-->>FlexAllInOne: return conclusions
  alt both success or skipped
    FlexAllInOne->>FlexAllInOne: continue build
  else any failure, cancelled, or timed_out
    FlexAllInOne->>FlexAllInOne: abort
  else still pending until timeout
    FlexAllInOne->>GitHubActionsAPI: sleep then poll again
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Suggested labels

area-CI

Suggested reviewers

  • moabu
  • iromli

Poem

A bunny hopped through CI bright,
With tags and tokens set just right.
It watched those sibling jobs turn green,
Then built a fresh image, neat and clean.
🐇✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/docker-publish-on-tag

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.

@mo-auto mo-auto added the area-CI Indicates work required in automatic builds or CI infrastructure label Jun 26, 2026
@moabu moabu merged commit 9767a7e into main Jun 26, 2026
6 of 7 checks passed
@moabu moabu deleted the ci/docker-publish-on-tag branch June 26, 2026 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-CI Indicates work required in automatic builds or CI infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants