Skip to content
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

fix: Handle buildx output with BUILDX_NO_DEFAULT_ATTESTATIONS=1 #21735

Merged

Conversation

tobni
Copy link
Contributor

@tobni tobni commented Dec 8, 2024

Related reading as to why attestations can be disabled by users: aws/aws-cdk#30258, https://stackoverflow.com/questions/77207485/why-are-there-extra-untagged-images-in-amazon-ecr-after-doing-docker-push

In short, upstream tooling is not really ready for buildx + docker desktop default outputs, and when disabling these we get a stdout which current pants parsing code was not ready for.

Fixes #21729

@tobni tobni added category:bugfix Bug fixes for released features needs-cherrypick backend: Docker Docker backend-related issues labels Dec 8, 2024
@tobni tobni added this to the 2.22.x milestone Dec 8, 2024
@tobni tobni force-pushed the add/containerd-snapshotter-without-attestations branch from 742ec22 to 174b6d4 Compare December 8, 2024 12:26
Copy link
Contributor

@huonw huonw left a comment

Choose a reason for hiding this comment

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

Thanks for this

@tobni tobni merged commit b0c8d8e into pantsbuild:main Dec 9, 2024
24 checks passed
@WorkerPants
Copy link
Member

I tried to automatically cherry-pick this change back to each relevant milestone, so that it is available in those older releases of Pants.

❌ 2.22.x

I was unable to cherry-pick this PR to 2.22.x, likely due to merge-conflicts.

Steps to Cherry-Pick locally

To resolve:

  1. (Ensure your git working directory is clean)
  2. Run the following script to reproduce the merge-conflicts:
    git fetch https://github.com/pantsbuild/pants main \
      && git fetch https://github.com/pantsbuild/pants 2.22.x \
      && git checkout -b cherry-pick-21735-to-2.22.x FETCH_HEAD \
      && git cherry-pick b0c8d8e0db38d3f63cbd633803a5a3a7d09231c5
  3. Fix the merge conflicts and commit the changes
  4. Run build-support/cherry_pick/make_pr.sh "21735" "2.22.x"

Please note that I cannot re-run CI if a job fails. Please work with your PR approver(s) to re-run CI if necessary.

✔️ 2.23.x

Successfully opened #21738.

✔️ 2.24.x

Successfully opened #21737.


When you're done manually cherry-picking, please remove the needs-cherrypick label on this PR.

Thanks again for your contributions!

🤖 Beep Boop here's my run link

@WorkerPants WorkerPants added the auto-cherry-picking-failed Auto Cherry-Picking Failed label Dec 9, 2024
tobni added a commit that referenced this pull request Dec 10, 2024
…ry-pick of #21735) (#21738)

Related reading as to why attestations can be disabled by users:
aws/aws-cdk#30258,
https://stackoverflow.com/questions/77207485/why-are-there-extra-untagged-images-in-amazon-ecr-after-doing-docker-push

In short, upstream tooling is not really ready for buildx + docker
desktop default outputs, and when disabling these we get a stdout which
current pants parsing code was not ready for.

Fixes #21729

Co-authored-by: Tobias Nilsson <[email protected]>
tobni added a commit that referenced this pull request Dec 10, 2024
…ry-pick of #21735) (#21737)

Related reading as to why attestations can be disabled by users:
aws/aws-cdk#30258,
https://stackoverflow.com/questions/77207485/why-are-there-extra-untagged-images-in-amazon-ecr-after-doing-docker-push

In short, upstream tooling is not really ready for buildx + docker
desktop default outputs, and when disabling these we get a stdout which
current pants parsing code was not ready for.

Fixes #21729

Co-authored-by: Tobias Nilsson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-cherry-picking-failed Auto Cherry-Picking Failed backend: Docker Docker backend-related issues category:bugfix Bug fixes for released features needs-cherrypick
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pants fails to parse Docker Image ID for BuildKit builds with attestations disabled
3 participants