cool-easter-32542
07/12/2024, 10:34 PMIntrinsicError: Client error (403) downloading file when running the pants command that needs to download this external tool from S3.
Taking a deeper look on the S3 download handler, I've noticed that the AWS_PROFILE env var is not present when pants is running through pantsd, and therefore the AWS credentials are not correctly loaded to download the file, causing the error above.
Doing a simple <http://logger.info|logger.info>(os.environ) inside a custom plugin revealed that I only have HOME, USER, PATH and __PANTS_BIN_NAME, env vars available when running pants through pantsd, so I'm assuming the pantsd process only have these preserved env vars forwarded to its process. When I run pants commands with --no-pantsd I have all my host env vars available on os.environ.
Describe the solution you'd like
It would be nice to have an option/setting to specify additional env vars that should be forwarded to the pantsd process, or forward all host env vars, if its possible, like running pants commands with the --no-pantsd flag do.
pantsbuild/pants