bitter-ability-32190
12/28/2022, 3:12 PM600
, and my user. When running with the daemon I see the error, without I see a different error (later in the code).
What perms/user does the daemon run as?enough-analyst-54434
12/28/2022, 3:31 PMps -ef | grep pantsd
or your favorite variant to see the user.bitter-ability-32190
12/28/2022, 3:31 PM$ ps -ef | grep pantsd
josh 31864 18485 0 09:31 pts/0 00:00:00 grep --color=auto pantsd
The file in question:
$ ls -l ~/.aws/credentials
-rw------- 1 josh josh 116 Nov 15 08:56 /home/josh/.aws/credentials
enough-analyst-54434
12/28/2022, 3:33 PMbitter-ability-32190
12/28/2022, 3:33 PM--color=auto
? Makes me think it matched the daemonenough-analyst-54434
12/28/2022, 3:34 PMbitter-ability-32190
12/28/2022, 3:34 PMenough-analyst-54434
12/28/2022, 3:35 PMbitter-ability-32190
12/28/2022, 3:48 PMjosh 36453 12042 4 09:46 ? 00:00:07 pantsd [/home/josh/work/pants]
enough-analyst-54434
12/28/2022, 4:01 PMbitter-ability-32190
12/28/2022, 4:02 PMenough-analyst-54434
12/28/2022, 4:03 PMbitter-ability-32190
12/28/2022, 4:03 PMenough-analyst-54434
12/28/2022, 4:04 PMbitter-ability-32190
12/28/2022, 4:06 PMjosh
, should it not be able to read a file whose owner is josh
?
Perhaps I'll test this with an empty file in my source tree with those permsenough-analyst-54434
12/28/2022, 4:30 PMbitter-ability-32190
12/28/2022, 4:42 PMenough-analyst-54434
12/28/2022, 4:49 PMbitter-ability-32190
12/28/2022, 5:07 PM11:06:50.38 [INFO] Filesystem changed during run: retrying `ExportCodegen` in 500ms...
11:06:53.89 [INFO] Filesystem changed during run: retrying `ExportCodegen` in 500ms...
11:06:57.41 [INFO] Filesystem changed during run: retrying `ExportCodegen` in 500ms...
11:07:00.92 [INFO] Filesystem changed during run: retrying `ExportCodegen` in 500ms...
11:07:04.44 [INFO] Filesystem changed during run: retrying `ExportCodegen` in 500ms...
11:07:07.95 [INFO] Filesystem changed during run: retrying `ExportCodegen` in 500ms...
RUST_BACKTRACE
seems to kick the filewatcher continusously.pants.d/run-tracker
shows:
11:15:25.14 [31m[ERROR][0m panic at 'called `Result::unwrap()` on an `Err` value: CredentialsNotLoaded(CredentialsNotLoaded { source: "no providers in chain provided credentials" })', src/downloads.rs:119
11:15:25.14 [31m[ERROR][0m Please set RUST_BACKTRACE=1, re-run, and then file a bug at <https://github.com/pantsbuild/pants/issues>.
This is with:
$ RUST_BACKTRACE=1 ./pants export-codegen //:dumpit
enough-analyst-54434
12/28/2022, 5:18 PMbitter-ability-32190
12/28/2022, 5:18 PMenough-analyst-54434
12/28/2022, 5:19 PMbitter-ability-32190
12/28/2022, 5:19 PMenough-analyst-54434
12/28/2022, 5:20 PMbitter-ability-32190
12/28/2022, 5:22 PM~
as a path and the home for the daemon is not my home~/...
and HOME
isnt set on the daemonHOME
set? Seems like this certainly would match the behavior of --no-pantsd
Finally, we empty the environment forYeah that's not a bad goal. This particular use comes from the intrinsic though 🤔runs to enforce explicit usage of `CompleteEnvironment`/`Environment`.pantsd
HOME
and any AWS_*
env vars...enough-analyst-54434
12/28/2022, 7:57 PMbitter-ability-32190
12/28/2022, 7:58 PMenough-analyst-54434
12/28/2022, 7:59 PMbitter-ability-32190
12/28/2022, 8:45 PMEnvironmentVarsRequest
which I don't think the intrinsics can use. I would assume I could use CompleteEnvironmentVars
as an input, but wiring that up gives a GraphError (it also means each download node would depend on all env vars. Not fatal but maybe unfortunate)intrinsics.insert(
Intrinsic {
product: types.directory_digest,
inputs: vec![
DependencyKey::new(types.download_file),
DependencyKey::new(types.complete_env_vars),
],
},
Box::new(download_file_to_digest),
);
# Keep in sync with <http://intrinsics.rs|intrinsics.rs>
oh booooo