Skip to content

Commit

Permalink
flux-job: use lookup with UPDATE flag
Browse files Browse the repository at this point in the history
Problem: The job-info.update-lookup target is being slowly deprecated
over the job-info.lookup target w/ the UPDATE flag.  The "flux job info"
command uses the job-info.update-lookup target.

Update to use job-info.lookup over job-info.update-lookup.
  • Loading branch information
chu11 committed Dec 20, 2023
1 parent 6d95877 commit 9b3e62a
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions src/cmd/flux-job.c
Original file line number Diff line number Diff line change
Expand Up @@ -3442,23 +3442,19 @@ int cmd_info (optparse_t *p, int argc, char **argv)
val = new_val = reconstruct_current_jobspec (jobspec, eventlog);
}
/* The current (non --base) R is obtained through the
* job-info.update-lookup RPC, not the normal job-info.lookup.
* job-info.lookup RPC w/ the UPDATE flag.
*/
else if (!optparse_hasopt (p, "base") && streq (key, "R")) {
json_t *o;
if (!(f = flux_rpc_pack (h,
"job-info.update-lookup",
"job-info.lookup",
FLUX_NODEID_ANY,
0,
"{s:I s:s s:i}",
"{s:I s:[s] s:i}",
"id", id,
"key", key,
"flags", 0))
|| flux_rpc_get_unpack (f, "{s:o}", key, &o) < 0)
"keys", key,
"flags", FLUX_JOB_LOOKUP_UPDATE))
|| flux_rpc_get_unpack (f, "{s:s}", key, &val) < 0)
log_msg_exit ("%s", future_strerror (f, errno ));
if (!(new_val = json_dumps (o, JSON_COMPACT)))
log_msg_exit ("error encoding R object");
val = new_val;
}
/* All other keys are obtained this way.
*/
Expand Down

0 comments on commit 9b3e62a

Please sign in to comment.