https://pantsbuild.org/ logo
h

happy-kitchen-89482

05/07/2023, 9:40 AM
Is this docker error in our testprojects expected?
Copy code
$ pants package testprojects/src/python/docker:test-example-synth
12:38:03.56 [INFO] Completed: Building docker image test-example-synth:1.2.5
12:38:03.56 [ERROR] 1 Exception encountered:

Engine traceback:
  in select
    ..
  in pants.core.goals.package.package_asset
    `package` goal

Traceback (most recent call last):
  File "/Users/benjyw/src/pants/src/python/pants/engine/internals/selectors.py", line 626, in native_engine_generator_send
    res = rule.send(arg) if err is None else rule.throw(throw or err)
  File "/Users/benjyw/src/pants/src/python/pants/core/goals/package.py", line 157, in package_asset
    packages = await MultiGet(
  File "/Users/benjyw/src/pants/src/python/pants/engine/internals/selectors.py", line 361, in MultiGet
    return await _MultiGet(tuple(__arg0))
  File "/Users/benjyw/src/pants/src/python/pants/engine/internals/selectors.py", line 168, in __await__
    result = yield self.gets
  File "/Users/benjyw/src/pants/src/python/pants/engine/internals/selectors.py", line 626, in native_engine_generator_send
    res = rule.send(arg) if err is None else rule.throw(throw or err)
  File "/Users/benjyw/src/pants/src/python/pants/core/goals/package.py", line 108, in environment_aware_package
    package = await Get(
  File "/Users/benjyw/src/pants/src/python/pants/engine/internals/selectors.py", line 118, in __await__
    result = yield self
  File "/Users/benjyw/src/pants/src/python/pants/engine/internals/selectors.py", line 626, in native_engine_generator_send
    res = rule.send(arg) if err is None else rule.throw(throw or err)
  File "/Users/benjyw/src/pants/src/python/pants/backend/docker/goals/package_image.py", line 432, in build_docker_image
    raise ProcessExecutionFailure(
pants.engine.process.ProcessExecutionFailure: Process 'Building docker image test-example-synth:1.2.5' failed with exit code 1.
stdout:

stderr:
#1 [internal] load build definition from Dockerfile.test-example-synth
#1 sha256:5d7165f52d4d300f129be2be1ce9a4773881a2902eb63aaf4d040e7cca8d5075
#1 transferring dockerfile: 174B done
#1 DONE 0.0s

#2 [internal] load .dockerignore
#2 sha256:a7e622f2b945b649e477fe5ebf1aaf1114dfc6b6ac665448661afaf74dcb0b02
#2 transferring context: 2B done
#2 DONE 0.0s

#3 [internal] load metadata for <http://docker.io/library/python:3.7|docker.io/library/python:3.7>
#3 sha256:146e0b59ab11553244a74c112f481de5aa004752fc1eecc6ab329704c6c67c04
Failed to fire hook: while creating logrus local file hook: user: Current requires cgo or $USER, $HOME set in environment
[2023-05-07T09:38:03.554619000Z][docker-credential-desktop][F] get system info: retrieving product name: exec: "sw_vers": executable file not found in $PATH
[goroutine 1 [running, locked to thread]:
[common/pkg/system.init.0()
[	common/pkg/system/os_info.go:32 +0x1bc
#3 ERROR: rpc error: code = Unknown desc = error getting credentials - err: exit status 1, out: ``
------
 > [internal] load metadata for <http://docker.io/library/python:3.7|docker.io/library/python:3.7>:
------
failed to solve with frontend dockerfile.v0: failed to create LLB definition: rpc error: code = Unknown desc = error getting credentials - err: exit status 1, out: ``



Use `--keep-sandboxes=on_failure` to preserve the process chroot for inspection.
$
b

broad-processor-92400

05/07/2023, 11:32 AM
That seems to be a vaguely inconsistent thing visible outside of pants’ tests too, eg https://pantsbuild.slack.com/archives/C046T6T9U/p1681851671803859
c

curved-television-6568

05/08/2023, 12:04 PM
Nope, not expected.