:pants: Pants 2.19 is close to ready, so if you ha...
# general
b
👖 Pants 2.19 is close to ready, so if you haven't tested the release candidates, now is the right time! Thank you! You can upgrade by setting
pants_version = "2.19.0rc3"
in your
pants.toml
. If you do this and run smoke tests to validate, that would be great and provide assurance that the upgrade will be easier for you when 2.19.0 comes out. For instance: push it to your CI and/or run a few of your common commands locally. If you've got more time and are excited for any features/bug-fixes, please put them through their paces too! Release notes: https://github.com/pantsbuild/pants/blob/4c9fe780df2362a4f98c03992f1d9fc261a7eed6/src/python/pants/notes/2.19.x.md Highlights: • Test retries for flaky tests. • Using the
parametrize
to set multiple fields at once when generating new groups of targets. •
buildx
support in the Docker backend. • New backends for running semgrep and openapi-format. If you find any bugs or weirdness or other questions, please ask here or file issues https://github.com/pantsbuild/pants/issues/new (While you're here, don't miss the #C18RRR4JK channel, which indicates all new releases, for testing even earlier 😄 )
🥳 7
🔥 3
l
I’ve been using the
buildx
support in both CI and local dev since the first RC and it’s been working great FWIW! Thank you for this! 🎉
👍 1
c
Minor check but our CI passed. with rc3
👍 1
a
Excited to try the buildx support! Will that allow us to use buildx for caching (e.g. in GH actions) and to crossbuild images for i.e. ARM in CI?
on that note - is there documentation for buildx support (so I can try it)
l
I’m using buildx to build amd64 and arm64 images in CI on GH runners. It takes a bit of finangling since you have to enable
containerd
but otherwise it’s working great. I pulled instructions out of the PR that landed the functionality, just needed to add this to pants.toml:
Copy code
[docker]
use_buildx = true
🔥 1
a
nice - do you have a link to the pr handy? how would I pass params to buildx through pants?
l
PR is here: https://github.com/pantsbuild/pants/pull/20154 Depending on the buildx arg you need, some of them are now params on the
docker_image
target (such as output types). I’m not sure beyond that, we haven’t had a need to pass anything specific.
Then in GHA, before we build our images with
pants package
we set up qemu/containerd/buildx. The explicit buildx bootstrap is required if you’re building more than one image, otherwise docker will throw a container busy error when pants tries to run things in parallel.
Copy code
- name: Setup qemu for cross-platform builds
        uses: docker/setup-qemu-action@v3
      - name: Setup buildkit for cross-platform builds
        uses: docker/setup-buildx-action@v3
      - name: Set up containerd image store
        run: |
          cat /etc/docker/daemon.json | jq '. | .+{"features": {"containerd-snapshotter": true}}' | sudo tee /etc/docker/daemon.json
          cat /etc/docker/daemon.json
          sudo systemctl restart docker
      - name: Bootstrap buildx container
        run: |
          docker buildx inspect --bootstrap
🤩 2
b
Re docs, the release notes link to a few different parts: https://github.com/pantsbuild/pants/blob/4c9fe780df2362a4f98c03992f1d9fc261a7eed6/src/python/pants/notes/2.19.x.md#docker Please feel free to file issues if they're confusing or could be improved: https://github.com/pantsbuild/pants/issues/new (or better, yet, pull requests making the improvements 🙂 )
n
Docs yet to come, but added a PR to example-docker repo for this - https://github.com/pantsbuild/example-docker/pull/12/files
l
Oooh I like
with: daemon-config: …
that’s much nicer. Thanks!