Skip to content

fix(ci): fetch the bot branch before pushing with a lease - #33

Merged
pyramation merged 1 commit into
mainfrom
fix/regenerate-push
Aug 13, 2026
Merged

fix(ci): fetch the bot branch before pushing with a lease#33
pyramation merged 1 commit into
mainfrom
fix/regenerate-push

Conversation

@pyramation

Copy link
Copy Markdown
Collaborator

The regenerate run did everything right and failed on the last line:

! [rejected] feat/regenerate-ops-client -> feat/regenerate-ops-client (stale info)

--force-with-lease compares against a local ref for the remote branch, and actions/checkout doesn't fetch that branch. With nothing to compare against, git refuses rather than assuming — so the first run succeeds (no remote branch exists yet) and every run after it fails, having already spent ten minutes doing the work.

Fetching the branch first makes the lease meaningful rather than removing it. The push still refuses if someone else moved that branch, which is worth keeping since a human may have pushed a fix onto it.

The run itself was a success

Worth recording, since this was the workflow's first execution in its rewritten form. Every new step worked:

  • pull:all and codegen — 7 operators, nginx gone, traefik and tekton present
  • the ordered-parts install loop with CRD waits
  • cilium install at runtime
  • swagger fetch and client regeneration
  • the commit: 142,202 insertions, 73,075 deletions across 11 files

Only the push was wrong.

The regenerate run did everything correctly -- pulled manifests, regenerated
the operator objects, stood up the cluster, installed every operator, fetched
the swagger, regenerated the client, committed 142k lines -- and then failed on
the last line:

    ! [rejected] feat/regenerate-ops-client (stale info)

--force-with-lease compares against a local ref for the remote branch, and
actions/checkout does not fetch that branch. With nothing to compare, git
refuses rather than assuming. So the first run succeeds (no remote branch yet)
and every run after it fails, having already spent ten minutes doing the work.

Fetching the branch first makes the lease meaningful rather than removing it:
the push still refuses if someone else moved the branch, which is worth keeping
for a branch a human may have pushed a fix to.
@pyramation
pyramation merged commit 1f9a375 into main Aug 13, 2026
6 checks passed
@pyramation
pyramation deleted the fix/regenerate-push branch August 13, 2026 01:19
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