Skip to content

Fix concurrent GitOps image publication on main - #13

Merged
AngelP17 merged 1 commit into
mainfrom
fix/gitops-manifest-publication-race
Dec 4, 2026
Merged

AngelP17 merged 1 commit into
mainfrom
fix/gitops-manifest-publication-race

Conversation

@AngelP17

@AngelP17 AngelP17 commented Dec 4, 2026

Copy link
Copy Markdown
Owner

The failed main GitOps job built, scanned and published its immutable image, but tried to rebase a generated deployment commit across a concurrent update to the same image field.

Require the scanned source SHA to still be main's current remote tip, and publish only with a regular fast-forward push. If main moves in flight, the stale candidate is superseded; if main is unchanged and a push fails, retain a failed job. Only the single Governor image field is edited. The existing build, scan, Docker Hub, and PR/main gates are unchanged.

Disposable bare-Git integration covers publication, no-op repeats, stale source, a true ref-update race injected after the initial remote check, and a non-race push rejection. It passed locally and now runs in PR CI. It does not use Docker Hub, production infrastructure or deploy anything; the existing real publication job remains main-only.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-04T15:36:16.653780Z 57bc0ad PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 57bc0ad8cf

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +243 to +244
- name: Test GitOps publication against disposable Git repositories
run: bash scripts/test-gitops-publication.sh

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Document the new publication policy and local integration test

This change introduces a new GitOps publication policy and a disposable integration test, but does not update any README or documentation. Document that superseded source commits now skip deployment successfully, and include bash scripts/test-gitops-publication.sh as the local verification command so maintainers can interpret skipped publications and reproduce the CI check. The repository's AGENTS.md explicitly requires relevant documentation updates in the same change when commands, tests, or boundaries change.

AGENTS.md reference: AGENTS.md:L110-L110

Useful? React with 👍 / 👎.

@AngelP17
AngelP17 merged commit 518f02f into main Dec 4, 2026
7 checks 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.

1 participant