Skip to content

provenance: avoid missing args in history provenance - #6221

Merged
tonistiigi merged 1 commit into
moby:masterfrom
tonistiigi:provenance-args-fix
Sep 12, 2025
Merged

tonistiigi merged 1 commit into
moby:masterfrom
tonistiigi:provenance-args-fix

Conversation

@tonistiigi

Copy link
Copy Markdown
Member

Currently creating provenance changes the args array of the Capture to the args that are later set as provenance args. This means that if provenance is created multiple times (an extra one for the history record), then the initial set of args has already been processed, and some values may be missing.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
@tonistiigi
tonistiigi requested a review from Copilot September 12, 2025 20:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes an issue where creating provenance multiple times (particularly for history records) would result in missing arguments. The original code was directly modifying the Capture.Args map during provenance processing, causing subsequent provenance creation to lose previously processed arguments.

  • Clone the args map before processing to preserve the original arguments
  • Update all references to use the cloned map instead of modifying the original

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@tonistiigi
tonistiigi merged commit 80dc6b2 into moby:master Sep 12, 2025
140 checks passed
@crazy-max crazy-max added this to the v0.25.0 milestone Sep 13, 2025
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.

3 participants