Pin test_package_pex_environment's image to a particular sha#19324
Merged
thejcannon merged 2 commits intopantsbuild:mainfrom Jun 15, 2023
Merged
Pin test_package_pex_environment's image to a particular sha#19324thejcannon merged 2 commits intopantsbuild:mainfrom
test_package_pex_environment's image to a particular sha#19324thejcannon merged 2 commits intopantsbuild:mainfrom
Conversation
huonw
commented
Jun 15, 2023
| rule_runner.write_digest(context.digest, path_prefix="contents") | ||
| with zipfile.ZipFile(os.path.join(rule_runner.build_root, "contents", pex_file), "r") as zf: | ||
| assert json.loads(zf.read("PEX-INFO"))["distributions"].keys() == { | ||
| "psutil-5.9.2-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", |
Contributor
Author
There was a problem hiding this comment.
I don't know why the distributions changed from 3.9 to 3.7 (both locally and in CI)?
huonw
commented
Jun 15, 2023
| name="python_38", | ||
| image="python:3.8", | ||
| image="python:3.8-buster@sha256:bc4b9fb034a871b285bea5418cedfcaa9d2ab5590fb5fb6f0c42aaebb2e2c911", | ||
| platform="linux_x86_64", |
Contributor
Author
There was a problem hiding this comment.
The sha256 digest is specific to a particular platform, so we need to be specific here, or else running on arm64 (e.g. M1 Mac) fails because the x86-64 image doesn't match the default (linux_arm64).
test_package_pex_environment's image to a particular sha
Member
|
Hey y'all. I'm going to merge this PR since it unblocks CI for other PRs. We can address concerns in follow-up PRs |
thejcannon
approved these changes
Jun 15, 2023
github-actions bot
pushed a commit
that referenced
this pull request
Jun 15, 2023
This pins the docker image used in `src/python/pants/backend/docker/util_rules/docker_build_context_test.py:test_packaged_pex_environment` to https://hub.docker.com/layers/library/python/3.8-buster/images/sha256-bc4b9fb034a871b285bea5418cedfcaa9d2ab5590fb5fb6f0c42aaebb2e2c911?context=explore, which is (at the time of writing) the most recent `3.8-buster` image. This test has recently started failing with an error when building `psutil`: ``` E psutil/_psutil_common.c:9:10: fatal error: Python.h: No such file or directory E 9 | #include <Python.h> E | ^~~~~~~~~~ E compilation terminated. E error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1 E ---------------------------------------- E ERROR: Failed building wheel for psutil ``` The failure correlates with the change in base image (from buster to bookworm) docker-library/python#822, which seems to have been published at 2023-06-14T23:05Z (https://hub.docker.com/layers/library/python/3.8/images/sha256-b904ee5365f53d19de5ff11c1ce96a616224a55306d55e3cf29a11e969a3a7e0?context=explore). This change, that pins to the older image, seems to fix the problem. This fixes https://pantsbuild.slack.com/archives/C0D7TNJHL/p1686790197387729
github-actions bot
pushed a commit
that referenced
this pull request
Jun 15, 2023
This pins the docker image used in `src/python/pants/backend/docker/util_rules/docker_build_context_test.py:test_packaged_pex_environment` to https://hub.docker.com/layers/library/python/3.8-buster/images/sha256-bc4b9fb034a871b285bea5418cedfcaa9d2ab5590fb5fb6f0c42aaebb2e2c911?context=explore, which is (at the time of writing) the most recent `3.8-buster` image. This test has recently started failing with an error when building `psutil`: ``` E psutil/_psutil_common.c:9:10: fatal error: Python.h: No such file or directory E 9 | #include <Python.h> E | ^~~~~~~~~~ E compilation terminated. E error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1 E ---------------------------------------- E ERROR: Failed building wheel for psutil ``` The failure correlates with the change in base image (from buster to bookworm) docker-library/python#822, which seems to have been published at 2023-06-14T23:05Z (https://hub.docker.com/layers/library/python/3.8/images/sha256-b904ee5365f53d19de5ff11c1ce96a616224a55306d55e3cf29a11e969a3a7e0?context=explore). This change, that pins to the older image, seems to fix the problem. This fixes https://pantsbuild.slack.com/archives/C0D7TNJHL/p1686790197387729
github-actions bot
pushed a commit
that referenced
this pull request
Jun 15, 2023
This pins the docker image used in `src/python/pants/backend/docker/util_rules/docker_build_context_test.py:test_packaged_pex_environment` to https://hub.docker.com/layers/library/python/3.8-buster/images/sha256-bc4b9fb034a871b285bea5418cedfcaa9d2ab5590fb5fb6f0c42aaebb2e2c911?context=explore, which is (at the time of writing) the most recent `3.8-buster` image. This test has recently started failing with an error when building `psutil`: ``` E psutil/_psutil_common.c:9:10: fatal error: Python.h: No such file or directory E 9 | #include <Python.h> E | ^~~~~~~~~~ E compilation terminated. E error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1 E ---------------------------------------- E ERROR: Failed building wheel for psutil ``` The failure correlates with the change in base image (from buster to bookworm) docker-library/python#822, which seems to have been published at 2023-06-14T23:05Z (https://hub.docker.com/layers/library/python/3.8/images/sha256-b904ee5365f53d19de5ff11c1ce96a616224a55306d55e3cf29a11e969a3a7e0?context=explore). This change, that pins to the older image, seems to fix the problem. This fixes https://pantsbuild.slack.com/archives/C0D7TNJHL/p1686790197387729
thejcannon
pushed a commit
that referenced
this pull request
Jun 15, 2023
…y-pick of #19324) (#19337) This pins the docker image used in `src/python/pants/backend/docker/util_rules/docker_build_context_test.py:test_packaged_pex_environment` to https://hub.docker.com/layers/library/python/3.8-buster/images/sha256-bc4b9fb034a871b285bea5418cedfcaa9d2ab5590fb5fb6f0c42aaebb2e2c911?context=explore, which is (at the time of writing) the most recent `3.8-buster` image. This test has recently started failing with an error when building `psutil`: ``` E psutil/_psutil_common.c:9:10: fatal error: Python.h: No such file or directory E 9 | #include <Python.h> E | ^~~~~~~~~~ E compilation terminated. E error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1 E ---------------------------------------- E ERROR: Failed building wheel for psutil ``` The failure correlates with the change in base image (from buster to bookworm) docker-library/python#822, which seems to have been published at 2023-06-14T23:05Z (https://hub.docker.com/layers/library/python/3.8/images/sha256-b904ee5365f53d19de5ff11c1ce96a616224a55306d55e3cf29a11e969a3a7e0?context=explore). This change, that pins to the older image, seems to fix the problem. This fixes https://pantsbuild.slack.com/archives/C0D7TNJHL/p1686790197387729 Co-authored-by: Huon Wilson <huon@exoflare.io>
thejcannon
pushed a commit
that referenced
this pull request
Jun 15, 2023
…y-pick of #19324) (#19335) This pins the docker image used in `src/python/pants/backend/docker/util_rules/docker_build_context_test.py:test_packaged_pex_environment` to https://hub.docker.com/layers/library/python/3.8-buster/images/sha256-bc4b9fb034a871b285bea5418cedfcaa9d2ab5590fb5fb6f0c42aaebb2e2c911?context=explore, which is (at the time of writing) the most recent `3.8-buster` image. This test has recently started failing with an error when building `psutil`: ``` E psutil/_psutil_common.c:9:10: fatal error: Python.h: No such file or directory E 9 | #include <Python.h> E | ^~~~~~~~~~ E compilation terminated. E error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1 E ---------------------------------------- E ERROR: Failed building wheel for psutil ``` The failure correlates with the change in base image (from buster to bookworm) docker-library/python#822, which seems to have been published at 2023-06-14T23:05Z (https://hub.docker.com/layers/library/python/3.8/images/sha256-b904ee5365f53d19de5ff11c1ce96a616224a55306d55e3cf29a11e969a3a7e0?context=explore). This change, that pins to the older image, seems to fix the problem. This fixes https://pantsbuild.slack.com/archives/C0D7TNJHL/p1686790197387729 Co-authored-by: Huon Wilson <huon@exoflare.io>
thejcannon
pushed a commit
that referenced
this pull request
Jun 15, 2023
…y-pick of #19324) (#19336) This pins the docker image used in `src/python/pants/backend/docker/util_rules/docker_build_context_test.py:test_packaged_pex_environment` to https://hub.docker.com/layers/library/python/3.8-buster/images/sha256-bc4b9fb034a871b285bea5418cedfcaa9d2ab5590fb5fb6f0c42aaebb2e2c911?context=explore, which is (at the time of writing) the most recent `3.8-buster` image. This test has recently started failing with an error when building `psutil`: ``` E psutil/_psutil_common.c:9:10: fatal error: Python.h: No such file or directory E 9 | #include <Python.h> E | ^~~~~~~~~~ E compilation terminated. E error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1 E ---------------------------------------- E ERROR: Failed building wheel for psutil ``` The failure correlates with the change in base image (from buster to bookworm) docker-library/python#822, which seems to have been published at 2023-06-14T23:05Z (https://hub.docker.com/layers/library/python/3.8/images/sha256-b904ee5365f53d19de5ff11c1ce96a616224a55306d55e3cf29a11e969a3a7e0?context=explore). This change, that pins to the older image, seems to fix the problem. This fixes https://pantsbuild.slack.com/archives/C0D7TNJHL/p1686790197387729 Co-authored-by: Huon Wilson <huon@exoflare.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pins the docker image used in
src/python/pants/backend/docker/util_rules/docker_build_context_test.py:test_packaged_pex_environmentto https://hub.docker.com/layers/library/python/3.8-buster/images/sha256-bc4b9fb034a871b285bea5418cedfcaa9d2ab5590fb5fb6f0c42aaebb2e2c911?context=explore, which is (at the time of writing) the most recent3.8-busterimage.This test has recently started failing with an error when building
psutil:The failure correlates with the change in base image (from buster to bookworm) docker-library/python#822, which seems to have been published at 2023-06-14T23:05Z (https://hub.docker.com/layers/library/python/3.8/images/sha256-b904ee5365f53d19de5ff11c1ce96a616224a55306d55e3cf29a11e969a3a7e0?context=explore).
This change, that pins to the older image, seems to fix the problem.
This fixes https://pantsbuild.slack.com/archives/C0D7TNJHL/p1686790197387729