fix(renovate): fail-safe dry run, catch-all post-upgrade rule, merge open items
- renovate.yml: a workflow_dispatch is a dry run unless the input is exactly "false" (an empty input no longer goes live); drop RENOVATE_BINARY_SOURCE install, the -full image ships its tools. - renovate.json: the postUpgradeTasks rule matches every package, because with executionMode branch only the first upgrade of a branch counts; the script is a no-op when no image input changed. - bump_image_versions.py: docstring describes the real wiring. - CLAUDE.md, CONTRIBUTING.md: one open item for the first live run, runner slot note. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
This commit is contained in:
1 parent
7730440759
commit
b92adb931c
5 files changed
+38
-28
No files matched your search
@@ -75,8 +75,8 @@ protection, or create tags: those are the operator's.
|
||||
`image.yml` (`scripts/bump_image_versions.py [<base-ref>]`, idempotent, edits only the
|
||||
version line; `check_image_versions.py bump` then passes). The merge builds the image on
|
||||
`main`. PR 2 moves the consumers' `image:<version>@sha256:<digest>` pins to that digest.
|
||||
`renovate.json` runs the script as a `postUpgradeTasks` command (branch mode, file filter
|
||||
`image.yml`; allowed by the one anchored regex in `RENOVATE_ALLOWED_COMMANDS` of `renovate.yml`),
|
||||
`renovate.json` runs the script as a `postUpgradeTasks` command of a catch-all rule (matches every package, since
|
||||
only the first upgrade of a branch counts; branch mode, file filter `image.yml`; allowed by the one anchored regex in `RENOVATE_ALLOWED_COMMANDS` of `renovate.yml`),
|
||||
so PR 1 carries the bump. PR 2 stays a hand edit until Phase 4 (pin-follow for
|
||||
`git.rkdr.net/mortis/*` is `enabled: false`; it needs a dry run against the registry first).
|
||||
- **Bot-diff gate:** the `lint` workflow runs `scripts/check_bot_pr_diff.py` on pull requests. A
|
||||
@@ -104,20 +104,28 @@ protection, or create tags: those are the operator's.
|
||||
- **Dry run:** Actions > Renovate > Run workflow with `dry_run=true` (the default for a manual run;
|
||||
sets `RENOVATE_DRY_RUN=full`, `LOG_LEVEL=debug`). Read the debug log: no branch or PR is created. The
|
||||
schedule runs live.
|
||||
- **Unverified (settle with the first dry run and first live run):** that the job token can run Renovate on
|
||||
Gitea (user lookup, branch push, PR creation); that `origin/main` exists and the clone is deep enough
|
||||
for the merge-base in Renovate's checkout (the script fails with its one-line error otherwise); that
|
||||
`python3` is in the image; that the `permissions:` block is enforced on this Gitea. Also unverified:
|
||||
that PRs opened with the job token trigger the PR workflows. Gitea, like GitHub, may not start
|
||||
workflows for events created by the job token, in which case the required `Lint` and `Build` checks
|
||||
never run and automerge cannot work.
|
||||
- **Open decision (do not pick without the operator):** if job-token PRs do not trigger CI, either
|
||||
(a) push the PR with a user token held as a repo secret from a Kamino-only user, or (b) have
|
||||
`renovate.yml` dispatch lint against the branch. Until decided, bot PRs need a manual run.
|
||||
- **Open item: the first live run (do not enable automerge for bot PRs until one has shown it gets Lint and
|
||||
Build).** The dry run proves the READS (lookups, config, branch plan) and, from the Renovate 44.161.0
|
||||
source (confirm by the log line for the post-upgrade task), also runs `postUpgradeTasks`. Only the first
|
||||
LIVE run proves the writes: (1) that the job token can push a branch and open a PR. Renovate puts the
|
||||
token in the clone URL, while `lint.yml` uses an http extraheader, so basic auth with the job token is
|
||||
unproven; a fallback is to set `GIT_CONFIG_COUNT`/`GIT_CONFIG_KEY_0`/`GIT_CONFIG_VALUE_0` for the same
|
||||
extraheader. (2) That PRs opened with the job token trigger the PR workflows: Gitea, like GitHub, may not
|
||||
start workflows for events created by the job token, in which case the required `Lint` and `Build`
|
||||
checks never run and automerge cannot work. If so, the decision is the operator's: either push the PR
|
||||
with a user token held as a repo secret from a Kamino-only user, or have `renovate.yml` dispatch lint
|
||||
against the branch; until then bot PRs need a manual run. (3) That bot PRs are held by `main`'s required
|
||||
status checks (check the branch protection). Also confirm in the log: Renovate clones blobless with full
|
||||
history, so `origin/main` exists for the script (source-based); `python3` is in the image; the
|
||||
`permissions:` block is enforced on this Gitea; `github.head_ref` is populated (the gate fails closed
|
||||
on an empty one, via `EVENT_NAME`). Safety net: a failing or disallowed post-upgrade command opens the
|
||||
PR WITHOUT the bump plus a red `renovate/artifacts` status, and `check_image_versions.py bump` then
|
||||
fails lint.
|
||||
- **The workflow holds the runner's slot:** the `kamino-runner` host has a single slot (the label is
|
||||
`kamino-docker`), and the Renovate job may run up to 30 minutes (`timeout-minutes`) from 03:17 UTC, so
|
||||
Lint, Build and Molecule checks queue behind it.
|
||||
- **Not enabled yet:** credentials for the `git.rkdr.net` registry (`hostRules`) and pin-follow. The
|
||||
`pre-commit` manager is beta. Unverified: that bot PRs are held by `main`'s required status checks
|
||||
(check the branch protection before enabling automerge), and that `github.head_ref` is populated on
|
||||
this Gitea (the gate fails closed on an empty one, via `EVENT_NAME`).
|
||||
`pre-commit` manager is beta.
|
||||
- **Hand edits on a bot branch:** a commit pushed by hand to a `renovate/` branch makes Renovate treat
|
||||
the branch as modified: it stops rebasing it, so merge that pull request by hand.
|
||||
- **The guard runs from `main`:** the lint step extracts `scripts/` from `origin/main` and runs the
|
||||
|
||||
Reference in new issue
Block a user