<#21709 infinite error loop if docker.tools and do...
# github-notifications
c
#21709 infinite error loop if docker.tools and docker.optional_tools have the same entry Issue created by cburroughs Describe the bug With example-docker at pantsbuild/example-docker@17f3ec4
Copy code
+
+tools = ["docker-credential-ecr-login", "getent"]
+optional_tools = ["getent", "sw_vers"]
Results in and infinite error loop of:
Copy code
$ RUST_BACKTRACE=1 pants package src/docker/hello_world::
14:10:50.27 [INFO] Initializing scheduler...
14:10:50.33 [INFO] Initializing Nailgun pool for 16 processes...
14:10:52.26 [INFO] Scheduler initialized.
14:10:52.83 [ERROR] Exception caught: (pyo3_runtime.PanicException)
  File "/home/ecsb/.cache/nce/ab1acf935c4cc43338c604ae7d0f6aa2419f2415d94eb9cae381601dbba70a61/bindings/venvs/2.23.0/lib/python3.9/site-packages/pants/engine/intrinsics.py", line 49, in create_digest
    return await native_engine.create_digest(create_digest)

Exception message: called `Result::unwrap()` on an `Err` value: "Snapshots must be constructed from unique path stats; got duplicates in [Some(\"docker-credential-ecr-login\"), Some(\"getent\")]"


Use --print-stacktrace for more error details and/or -ldebug for more logs. 
See <https://www.pantsbuild.org/2.23/docs/using-pants/troubleshooting-common-issues> for common issues.
Consider reaching out for help: <https://www.pantsbuild.org/community/getting-help>

14:10:52.83 [INFO] Filesystem changed during run: retrying `@rule(pants.engine.intrinsics.create_digest())` in 500ms...
14:10:53.35 [ERROR] Exception caught: (pyo3_runtime.PanicException)
  File "/home/ecsb/.cache/nce/ab1acf935c4cc43338c604ae7d0f6aa2419f2415d94eb9cae381601dbba70a61/bindings/venvs/2.23.0/lib/python3.9/site-packages/pants/engine/intrinsics.py", line 49, in create_digest
    return await native_engine.create_digest(create_digest)

Exception message: called `Result::unwrap()` on an `Err` value: "Snapshots must be constructed from unique path stats; got duplicates in [Some(\"docker-credential-ecr-login\"), Some(\"getent\")]"


Use --print-stacktrace for more error details and/or -ldebug for more logs. 
See <https://www.pantsbuild.org/2.23/docs/using-pants/troubleshooting-common-issues> for common issues.
Consider reaching out for help: <https://www.pantsbuild.org/community/getting-help>

14:10:53.35 [INFO] Filesystem changed during run: retrying `@rule(pants.engine.intrinsics.create_digest())` in 500ms...
While this configuration isn't "valid", it is a likely one when adoption
optional_tools
after having a prior ~/.pants.rc` and merits better error handling. Pants version 2.23.0 EDIT[tdyas]: Link was to example-python, switched link to example-docker. pantsbuild/pants