Skip to content

Make ProxyNetwork CA cleanup fail closed - #7043

Open
bbartels wants to merge 3 commits into
moby:masterfrom
bbartels:master
Open

Make ProxyNetwork CA cleanup fail closed#7043
bbartels wants to merge 3 commits into
moby:masterfrom
bbartels:master

Conversation

@bbartels

Copy link
Copy Markdown

ProxyNetwork cleanup errors were discarded, allowing successful cache or export results to retain BuildKit’s temporary CA. Bundles without trailing newlines were also not restored byte-for-byte.

Changes

  • Fail-closed executors
    • Propagate cleanup failures from runc and containerd executors.
    • Join cleanup and process errors so both causes remain discoverable.
err = stderrors.Join(
    err,
    errors.Wrap(cleanupErr, "failed to clean up proxy CA"),
)
  • Exact bundle restoration

    • Keep the separator newline inside the removable injected block.
    • Preserve empty bundles, trailing-newline state, and build-time bundle changes.
  • Cache safety

    • Bump the ProxyNetwork cache salt from v0 to v1.
    • Leave non-ProxyNetwork and --network=none cache identities unchanged.
  • Regression coverage

    • Cover exact restoration, deleted bundles, oversized cleanup failures, combined process/cleanup errors, and exporter suppression.
    • Exercise both rootful OCI/runc and containerd workers.
  • Lifecycle documentation

    • Document fail-closed behavior, crash recovery invariants, and trust-store scope limitations.

Copilot AI and others added 3 commits August 17, 2026 03:35
Co-authored-by: bbartels <23058572+bbartels@users.noreply.github.com>
Co-authored-by: bbartels <23058572+bbartels@users.noreply.github.com>
…up-errors

Make ProxyNetwork CA cleanup fail closed
@bbartels

Copy link
Copy Markdown
Author

Hi @crazy-max, unsure what the right process is to ask for a review, but would be keen to see this get merged :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants