Skip to content

fix(patchable): Fail when the mirror rejects the pushed base ref - #1640

Merged
lfrancke merged 2 commits into
mainfrom
feat/patchable
Sep 14, 2026
Merged

lfrancke merged 2 commits into
mainfrom
feat/patchable

Conversation

@lfrancke

Copy link
Copy Markdown
Member

Description

libgit2 reports a reference the remote refused through the push_update_reference callback rather than by failing the push, so init version --mirror logged success and wrote a patchable.toml with a mirror that never received anything.

--ssh selects a transport for a single invocation, but its rewritten URL was stored in patchable.toml, which forces SSH on everyone who checks that file out and makes checkout --ssh fail because the stored URL has no https scheme.

An existing configuration is now detected before the fetch and the push, so a re-run fails immediately instead of mirroring and then refusing to overwrite.

The fmt layer wrote to stderr directly instead of through the IndicatifLayer, so log lines were printed on top of a progress bar that was never cleared.

Definition of Done Checklist

Note

Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant.

Please make sure all these things are done and tick the boxes

  • Changes are OpenShift compatible
  • All added packages (via microdnf or otherwise) have a comment on why they are added
  • Things not downloaded from Red Hat repositories should be mirrored in the Stackable repository and downloaded from there
  • All packages should have (if available) signatures/hashes verified
  • Add an entry to the CHANGELOG.md file
  • Integration tests ran successfully
TIP: Running integration tests with a new product image

The image can be built and uploaded to the kind cluster with the following commands:

boil build <IMAGE> --image-version <RELEASE_VERSION> --strip-architecture --load
kind load docker-image <MANIFEST_URI> --name=<name-of-your-test-cluster>

See the output of boil to retrieve the image manifest URI for <MANIFEST_URI>.

libgit2 reports a reference the remote refused through the push_update_reference
callback rather than by failing the push, so `init version --mirror` logged
success and wrote a patchable.toml with a mirror that never received anything.

--ssh selects a transport for a single invocation, but its rewritten URL was
stored in patchable.toml, which forces SSH on everyone who checks that file out
and makes `checkout --ssh` fail because the stored URL has no https scheme.

An existing configuration is now detected before the fetch and the push, so a
re-run fails immediately instead of mirroring and then refusing to overwrite.

The fmt layer wrote to stderr directly instead of through the IndicatifLayer,
so log lines were printed on top of a progress bar that was never cleared.
@lfrancke lfrancke self-assigned this Sep 14, 2026
@lfrancke
lfrancke requested a review from dervoeti September 14, 2026 15:06
@lfrancke lfrancke moved this to Development: Waiting for Review in Stackable Engineering Sep 14, 2026
0.3.2 is yanked, which fails the cargo-deny advisories check. It is reached
through git2, so both boil and patchable depend on it.
@dervoeti dervoeti moved this from Development: Waiting for Review to Development: In Review in Stackable Engineering Sep 14, 2026
@lfrancke
lfrancke added this pull request to the merge queue Sep 14, 2026
@lfrancke lfrancke moved this from Development: In Review to Development: Done in Stackable Engineering Sep 14, 2026
Merged via the queue into main with commit b0fae19 Sep 14, 2026
13 checks passed
@lfrancke
lfrancke deleted the feat/patchable branch September 14, 2026 15:51
@lfrancke lfrancke moved this from Development: Done to Done in Stackable Engineering Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants