Skip to content

feat(krater): pull CI's image instead of building on weft - #103

Merged
jaspermayone merged 1 commit into
mainfrom
claude/krater-pull-image
Nov 13, 2026
Merged

jaspermayone merged 1 commit into
mainfrom
claude/krater-pull-image

Conversation

@Adambomb210

Copy link
Copy Markdown
Collaborator

Weft stops building Krater's image itself. This needs patchworklabsorg/krater#76, which pushes ghcr.io/patchworklabsorg/krater:<full sha> for each commit on main.

Why: docker build on weft starved the host twice on 2026-11-12 (18:03–18:06 and 19:22–19:25 UTC). Staging and production both stopped answering, even when only staging was deploying.

What changes in krater-build (both instances):

  • It pulls <registry>:<sha> (new option registry, default ghcr.io/patchworklabsorg/krater) with a 10-minute timeout.
  • It checks the image's org.patchworklabs.krater.rev label against the commit, then tags it <prefix>:<sha> and drops the registry tag, so the existing cleanup still works.
  • A failed pull or a wrong label falls back to today's build from source. Older commits, rollbacks and the next production push (built before CI pushed images) all go that way.
  • The unit runs at Nice=19, idle I/O. The build itself runs inside dockerd, so this only covers git and the pull.
  • restartIfChanged stays off, so the switch restarts nothing.

Before it helps: the pull is anonymous, so the GHCR package must be public. I'll check after krater#76's first push; until then every pull just fails over to a build.

Tested: nix build .#checks.x86_64-linux.krater-weft passes, with new greps for the pull and label check.

🤖 Generated with Claude Code

Krater's CI now pushes ghcr.io/patchworklabsorg/krater:<sha> for each commit on main (krater#76).
krater-build pulls it for the commit in source-rev, checks its org.patchworklabs.krater.rev label, and tags
it <prefix>:<sha>; a failed pull or a wrong label falls back to today's build from source. Builds on weft
starved the host twice on 2026-11-12 (staging and production both stopped answering for about 3 minutes).

The unit runs at Nice 19 and idle I/O. Its definition changes, but restartIfChanged is off, so a switch
restarts nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Adambomb210
Adambomb210 requested review from a team and jaspermayone November 13, 2026 04:15
@jaspermayone
jaspermayone added this pull request to stack #106 November 13, 2026 12:38
@jaspermayone
jaspermayone merged commit 3c9526b into main Nov 13, 2026
5 checks passed
jaspermayone added a commit that referenced this pull request Nov 13, 2026
* origin/main:
  feat(krater): blue/green portal deploys, on for staging (#104)
  feat(krater): pull CI's image instead of building on weft (#103)
  feat(ansible): run ad converge build from ad.yml (#105)
  feat(selvage): add a staging instance on twill (#102)
  feat(selvage): pass the admin web ui paths through nginx on twill (#100)
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