happy-kitchen-89482
02/24/2022, 4:58 PMhappy-kitchen-89482
02/24/2022, 5:00 PMhappy-kitchen-89482
02/24/2022, 5:00 PMhappy-kitchen-89482
02/24/2022, 5:00 PMancient-vegetable-10556
02/24/2022, 5:00 PMancient-vegetable-10556
02/24/2022, 5:01 PMancient-vegetable-10556
02/24/2022, 5:01 PMancient-vegetable-10556
02/24/2022, 5:02 PMquiet-evening-25363
02/24/2022, 5:27 PMplatforms
set to my current platform, which I'm looking up by running pex --help
on my local system. Building the pex with platforms
unset succeeds, but building the pex with the platform set to my system's string fails with a missing package error (pasted below). What would be the difference between running pants package
in these two ways?
ERROR: Could not find a version that satisfies the requirement grpc-google-iam-v1
ERROR: No matching distribution found for grpc-google-iam-v1
happy-kitchen-89482
02/24/2022, 5:29 PMhigh-yak-85899
02/24/2022, 5:29 PMhappy-kitchen-89482
02/24/2022, 5:29 PMenough-analyst-54434
02/24/2022, 5:29 PMenough-analyst-54434
02/24/2022, 5:30 PMancient-vegetable-10556
02/24/2022, 5:30 PMenough-analyst-54434
02/24/2022, 5:31 PMhundreds-father-404
02/24/2022, 5:31 PMA platform build assumes the platform is foreign and requires wheels:See the warning at https://www.pantsbuild.org/docs/awslambda-python#step-3-run-package for more about this
enough-analyst-54434
02/24/2022, 5:33 PM--resolve-local-platforms
flag which you can set up either in the pex_binary.resolve_local_platforms=True
bool field or else globally via [pex-binary-defaults] resolve_local_platforms = True
enough-analyst-54434
02/24/2022, 5:36 PMenough-analyst-54434
02/24/2022, 5:37 PMenough-analyst-54434
02/24/2022, 5:37 PM[python-repos]
.ancient-vegetable-10556
02/24/2022, 5:38 PMancient-vegetable-10556
02/24/2022, 5:41 PMCOURSIER_ARCHIVE_CACHE
value determined by the values of our repositories config, the fix I proposed yesterday should just workancient-vegetable-10556
02/24/2022, 5:41 PMquiet-evening-25363
02/24/2022, 5:42 PMhappy-kitchen-89482
02/24/2022, 5:48 PMfew-arm-93065
02/24/2022, 6:36 PMdocker_image(
name="python_base",
source="python/Dockerfile",
registries=["base_images"],
repository="python",
image_tags=["internal_build"],
skip_push=True
)
So this builds and tags base_images/python_base:internal_build
, and other docker_image targets have it as a pants dependency, and their dockerfiles start with FROM base_images/python_base:internal_build
. All of this worked, until I switched the python_base's source image, from FROM ubuntu:20.04
to FROM amd64/ubuntu:20.04
(I'm building on an M1 mac, and trying to force x86 virtualization in my images). Pants can still build python_base, but it can't build any images that depend on it, instead, docker tries to pull the image from docker.io:
#3 [internal] load metadata for <http://docker.io/base_images/python:internal_build|docker.io/base_images/python:internal_build>
#3 sha256:658dd15cabbf2cf418526dfa6c6ce44508d99eec32bbad5dcc6be686cbc57fe2
#3 ERROR: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
------
> [internal] load metadata for <http://docker.io/base_images/python:internal_build|docker.io/base_images/python:internal_build>:
------
failed to solve with frontend dockerfile.v0: failed to create LLB definition: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
However, I see can the image on my system:
> docker image ls | grep base_images/python
base_images/python internal_build 438b7f434621 54 minutes ago 328MB
And I can build the image that depends on base_images/python using a standard docker build
command, it has no problem finding the image. Any idea where I could look next?wonderful-yak-59945
02/24/2022, 6:39 PMurl
at the correct repo manually
2. blow away ~/.cache/pants
(and ~/Library/Caches/Coursier
?) before re-running the resolve
is that roughly accurate?ancient-vegetable-10556
02/24/2022, 6:40 PMancient-vegetable-10556
02/24/2022, 7:03 PM--coursier-repos
configuration, without needing to re-download JDKs every time we change the repos configuration.
So Pants will, at the very least, be insulated against the cache poisoning