fix(ci): run dependency PR file/git ops inside a clone of the target repo
CI / validate (pull_request) Failing after 1m10s
CI / auto-merge (pull_request) Skipped

This commit is contained in:
Emil Simeonov
2026-09-19 04:22:11 +02:00
parent 0fc1d82365
commit 2bdb7542fc
3 changed files with 49 additions and 18 deletions
+13 -5
View File
@@ -17,11 +17,19 @@ in a JSON manifest. Two gaps in devx block that:
## Approach
REQ-1: `create_dependency_pr` gains `--manifest <path>` +
`--verify-container <owner/name>`: before opening the PR it resolves the
container tag's OCI digest via the registry `manifests` API
(`Docker-Content-Digest`), then updates manifest fields
`{version, git_ref, image_tag, image_digest, source_commit, updated_at}`
in the PR branch instead of a regex bump.
`--verify-container <owner/name>` + `--container-tag` +
`--source-ref`: before opening the PR it resolves the container tag's
OCI digest via the packages API (`manifest.json` blob sha256), then
updates manifest fields `{version, git_ref, image_tag, image_digest,
source_run_id, updated_at}` in the PR branch instead of a regex bump.
`--container-tag` decouples the image tag from the release version
(sso-bridge images tag `__init__.py.__version__`, not the git tag).
REQ-1b: `create_dependency_pr` clones the *target* repo into a tempdir
and performs all file lookups and git operations inside it. Previously
it operated on CWD — the producer repo's own checkout — so file updates
silently targeted the wrong repo and the whole dep-PR path no-oped
behind `|| echo warning`.
REQ-2: `clean_images` gains `--protect` (repeatable): named versions are
never deleted regardless of `--keep` trimming.