Can output_files/output_directories in a `Process`...
# development
h
Can output_files/output_directories in a
Process
be globs?
w
no. but … i’m not 100% sure that we enforce that.
we should.
because the remote execution API requires literals
h
hmmm
that presents a problem
w
can you put something inside of an output directory?
directories are implicitly a recursive glob.
after that you can use
DirectorySubset
to filter out some subset.
h
Right now the thing (
setup.py develop
) writes all over the place
I'll see if I can restrict it
hmm, is it easy to cwd in a process execution before running the actual process?
w
with a bash or python wrapper script, yes.
there is also a “working_directory” parameter on Process that i have not fully understood… but @enough-analyst-54434 fixed its semantics recently. cc @fast-nail-55400
h
that might be the solution
f
at least in REAPI, the “working directory” is a directory in the input root that will be the current directory for the process during execution
w
it should now be consistent
f
@enough-analyst-54434’s fix was for a REAPI compliance bug I introduced in the remote cache code. The output directories are captured relative to the working directory as opposed to the root of the sandbox.
but I had not included the relative to working directory behavior
frankly I think the REAPI should be changed but that idea did not carry the day at the REAPI Working Group given other impls followed the standard
h
Locally, at least, the working directory is the root of the sandbox, AFAICT
w
yes: that is the default value of that Process argument.
f
but just a default, REAPI allows it to be changed
h
ok, and if I plumb that through then outputs should be specified relative to the working directory?
I didn't quite understand from the above what is the correct behavior vs the current behavior
w
the current behavior matches the spec as far as we know.
yes, you can use the setting, and using it should be consistent across local and remote
here was John’s change to fix the known issue: http://github.com/pantsbuild/pants/pull/12197
h
Great, just what I need then