Skip to content

Fix attest extra arguments #3027

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 3, 2025

Conversation

LaurentGoderre
Copy link
Member

The new parsing of attest argument broke support for extra args for the attest command in buildkit as shown with these tests:

https://github.com/moby/buildkit/blob/master/frontend/attestations/parse_test.go#L31-L58

Note that the case should preserved for these args as well as they are set as env var in the scanner.

@crazy-max
Copy link
Member

attest argument broke support for extra args for the attest command in buildkit as shown with these tests:

https://github.com/moby/buildkit/blob/master/frontend/attestations/parse_test.go#L31-L58

Hum indeed, I forgot the extra arguments support which has been introduced in moby/buildkit#5372. I think we also need docs changes:

Signed-off-by: Laurent Goderre <[email protected]>
@LaurentGoderre LaurentGoderre marked this pull request as ready for review February 27, 2025 22:10
@LaurentGoderre LaurentGoderre force-pushed the fix-attest-extra-args branch 2 times, most recently from 24c1e37 to 630c42a Compare February 28, 2025 16:26
writer := csv.NewWriter(&attr)
writer.Write([]string{pair})
writer.Flush()
pair = strings.TrimSpace(attr.String())
Copy link
Member

Choose a reason for hiding this comment

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

You may add a comment in here that csv writer adds a newline. Not entirely obvious.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done!

@crazy-max crazy-max merged commit 128acdb into docker:master Mar 3, 2025
131 checks passed
@LaurentGoderre LaurentGoderre deleted the fix-attest-extra-args branch March 3, 2025 15:45
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