flux-core icon indicating copy to clipboard operation
flux-core copied to clipboard

job list tools should be able to display full jobid paths

Open grondo opened this issue 2 months ago • 2 comments

Sometimes a user wants to report a jobid running within a subinstance (e.g. a flux run within a batch job) for debugging, but a jobid alone is not enough for admins to locate the job. For this case, it may be helpful to have a way for job list tools like flux jobs and flux pstree to display full jobid paths in an output format, instead of the local jobid.

One solution would be to add an optional new JobInfo property like {id_path}. Another would be to extend the JobID class to add an optional path and allow {id.path}. Either way, the tool is going to have to pass in the parent path (or a handle to the current instance so the jobid-path attribute can be fetched). This could end up being slightly awkward because currently the JobInfo object is solely created from the job-list response dict.

grondo avatar Oct 20 '25 23:10 grondo

Just brainstorming here:

idea 1 - could we build the "id.path" for every job and store it somewhere. eventlog seems like the wrong place, but that's the idea I'm going with. Stick it somewhere.

idea 2 - could we stick the parent jobid path somewhere like in jobspec attributes? Then it'd be easy to construct the path.

chu11 avatar Oct 21 '25 00:10 chu11

Getting the parent path is easy since it is in a broker attribute. The awkward part is that currently a handle isn't required to construct a JobInfo object, so the property would have to be initialized after a JobInfo is constructed (like the InstanceInfo), or perhaps an optional parent path or Flux handle could be passed in to the constructor.

I don't think we need to store a parent path for every job and return it with job-list, since it would the same for every job.

grondo avatar Oct 21 '25 00:10 grondo