2424#include "src/common/libutil/jpath.h"
2525#include "src/common/libutil/grudgeset.h"
2626#include "src/common/libjob/job_hash.h"
27+ #include "src/common/libjob/idf58.h"
2728#include "src/common/libidset/idset.h"
2829#include "ccan/str/str.h"
2930
@@ -282,8 +283,8 @@ static void state_depend_lookup_continuation (flux_future_t *f, void *arg)
282283 assert (jsctx );
283284
284285 if (flux_rpc_get_unpack (f , "{s:s}" , "jobspec" , & s ) < 0 ) {
285- flux_log_error (jsctx -> h , "%s: error jobspec for %ju " ,
286- __FUNCTION__ , ( uintmax_t ) job -> id );
286+ flux_log_error (jsctx -> h , "%s: error jobspec for %s " ,
287+ __FUNCTION__ , idf58 ( job -> id ) );
287288 goto out ;
288289 }
289290
@@ -332,8 +333,8 @@ static void state_run_lookup_continuation (flux_future_t *f, void *arg)
332333 assert (jsctx );
333334
334335 if (flux_rpc_get_unpack (f , "{s:s}" , "R" , & s ) < 0 ) {
335- flux_log_error (jsctx -> h , "%s: error eventlog for %ju " ,
336- __FUNCTION__ , ( uintmax_t ) job -> id );
336+ flux_log_error (jsctx -> h , "%s: error eventlog for %s " ,
337+ __FUNCTION__ , idf58 ( job -> id ) );
337338 goto out ;
338339 }
339340
@@ -555,8 +556,8 @@ static struct job *eventlog_restart_parse (struct job_state_ctx *jsctx,
555556 goto error ;
556557
557558 if (!(a = eventlog_decode (eventlog ))) {
558- flux_log_error (jsctx -> h , "%s: error parsing eventlog for %ju " ,
559- __FUNCTION__ , ( uintmax_t ) job -> id );
559+ flux_log_error (jsctx -> h , "%s: error parsing eventlog for %s " ,
560+ __FUNCTION__ , idf58 ( job -> id ) );
560561 goto error ;
561562 }
562563
@@ -566,8 +567,8 @@ static struct job *eventlog_restart_parse (struct job_state_ctx *jsctx,
566567 json_t * context = NULL ;
567568
568569 if (eventlog_entry_parse (value , & timestamp , & name , & context ) < 0 ) {
569- flux_log_error (jsctx -> h , "%s: error parsing entry for %ju " ,
570- __FUNCTION__ , ( uintmax_t ) job -> id );
570+ flux_log_error (jsctx -> h , "%s: error parsing entry for %s " ,
571+ __FUNCTION__ , idf58 ( job -> id ) );
571572 goto error ;
572573 }
573574
@@ -839,15 +840,15 @@ static int job_update_eventlog_seq (struct job_state_ctx *jsctx,
839840 return 0 ;
840841 if (latest_eventlog_seq <= job -> eventlog_seq ) {
841842 flux_log (jsctx -> h , LOG_INFO ,
842- "%s: job %ju duplicate event (last = %d, latest = %d)" ,
843- __FUNCTION__ , ( uintmax_t ) job -> id ,
843+ "%s: job %s duplicate event (last = %d, latest = %d)" ,
844+ __FUNCTION__ , idf58 ( job -> id ) ,
844845 job -> eventlog_seq , latest_eventlog_seq );
845846 return 1 ;
846847 }
847848 if (latest_eventlog_seq > (job -> eventlog_seq + 1 ))
848849 flux_log (jsctx -> h , LOG_INFO ,
849- "%s: job %ju missed event (last = %d, latest = %d)" ,
850- __FUNCTION__ , ( uintmax_t ) job -> id ,
850+ "%s: job %s missed event (last = %d, latest = %d)" ,
851+ __FUNCTION__ , idf58 ( job -> id ) ,
851852 job -> eventlog_seq , latest_eventlog_seq );
852853 job -> eventlog_seq = latest_eventlog_seq ;
853854 return 0 ;
@@ -912,8 +913,8 @@ static int submit_context_parse (flux_t *h,
912913 "urgency" , & urgency ,
913914 "userid" , & userid ,
914915 "version" , & version ) < 0 ) {
915- flux_log (h , LOG_ERR , "%s: submit context invalid: %ju " ,
916- __FUNCTION__ , ( uintmax_t ) job -> id );
916+ flux_log (h , LOG_ERR , "%s: submit context invalid: %s " ,
917+ __FUNCTION__ , idf58 ( job -> id ) );
917918 errno = EPROTO ;
918919 return -1 ;
919920 }
@@ -963,8 +964,8 @@ static int priority_context_parse (flux_t *h,
963964 || json_unpack (context ,
964965 "{ s:I }" ,
965966 "priority" , (json_int_t * )& job -> priority ) < 0 ) {
966- flux_log (h , LOG_ERR , "%s: priority context invalid: %ju " ,
967- __FUNCTION__ , ( uintmax_t ) job -> id );
967+ flux_log (h , LOG_ERR , "%s: priority context invalid: %s " ,
968+ __FUNCTION__ , idf58 ( job -> id ) );
968969 errno = EPROTO ;
969970 return -1 ;
970971 }
@@ -1003,8 +1004,8 @@ static int finish_context_parse (flux_t *h,
10031004 || json_unpack (context ,
10041005 "{ s:i }" ,
10051006 "status" , & job -> wait_status ) < 0 ) {
1006- flux_log (h , LOG_ERR , "%s: finish context invalid: %ju " ,
1007- __FUNCTION__ , ( uintmax_t ) job -> id );
1007+ flux_log (h , LOG_ERR , "%s: finish context invalid: %s " ,
1008+ __FUNCTION__ , idf58 ( job -> id ) );
10081009 errno = EPROTO ;
10091010 return -1 ;
10101011 }
@@ -1045,8 +1046,8 @@ static int urgency_context_parse (flux_t *h,
10451046 || json_unpack (context , "{ s:i }" , "urgency" , & urgency ) < 0
10461047 || (urgency < FLUX_JOB_URGENCY_MIN
10471048 || urgency > FLUX_JOB_URGENCY_MAX )) {
1048- flux_log (h , LOG_ERR , "%s: urgency context invalid: %ju " ,
1049- __FUNCTION__ , ( uintmax_t ) job -> id );
1049+ flux_log (h , LOG_ERR , "%s: urgency context invalid: %s " ,
1050+ __FUNCTION__ , idf58 ( job -> id ) );
10501051 errno = EPROTO ;
10511052 return -1 ;
10521053 }
@@ -1077,8 +1078,8 @@ static int exception_context_parse (flux_t *h,
10771078 "type" , & type ,
10781079 "severity" , & severity ,
10791080 "note" , & note ) < 0 ) {
1080- flux_log (h , LOG_ERR , "%s: exception context invalid: %ju " ,
1081- __FUNCTION__ , ( uintmax_t ) job -> id );
1081+ flux_log (h , LOG_ERR , "%s: exception context invalid: %s " ,
1082+ __FUNCTION__ , idf58 ( job -> id ) );
10821083 errno = EPROTO ;
10831084 return -1 ;
10841085 }
@@ -1106,8 +1107,8 @@ static int dependency_add (struct job *job,
11061107 && errno != EEXIST )
11071108 /* Log non-EEXIST errors, but it is not fatal */
11081109 flux_log_error (job -> h ,
1109- "job %ju : dependency-add" ,
1110- ( uintmax_t ) job -> id );
1110+ "job %s : dependency-add" ,
1111+ idf58 ( job -> id ) );
11111112 return 0 ;
11121113}
11131114
@@ -1119,8 +1120,8 @@ static int dependency_remove (struct job *job,
11191120 /* No matching dependency is non-fatal error */
11201121 flux_log (job -> h ,
11211122 LOG_DEBUG ,
1122- "job %ju : dependency-remove '%s' not found" ,
1123- ( uintmax_t ) job -> id ,
1123+ "job %s : dependency-remove '%s' not found" ,
1124+ idf58 ( job -> id ) ,
11241125 description );
11251126 rc = 0 ;
11261127 }
@@ -1140,8 +1141,8 @@ static int dependency_context_parse (flux_t *h,
11401141 "{s:s}" ,
11411142 "description" , & description ) < 0 ) {
11421143 flux_log (h , LOG_ERR ,
1143- "job %ju : dependency-%s context invalid" ,
1144- ( uintmax_t ) job -> id ,
1144+ "job %s : dependency-%s context invalid" ,
1145+ idf58 ( job -> id ) ,
11451146 cmd );
11461147 errno = EPROTO ;
11471148 return -1 ;
@@ -1153,8 +1154,8 @@ static int dependency_context_parse (flux_t *h,
11531154 rc = dependency_remove (job , description );
11541155 else {
11551156 flux_log (h , LOG_ERR ,
1156- "job %ju : invalid dependency event: dependency-%s" ,
1157- ( uintmax_t ) job -> id ,
1157+ "job %s : invalid dependency event: dependency-%s" ,
1158+ idf58 ( job -> id ) ,
11581159 cmd );
11591160 return -1 ;
11601161 }
@@ -1166,7 +1167,7 @@ static int memo_update (flux_t *h,
11661167 json_t * o )
11671168{
11681169 if (!o ) {
1169- flux_log (h , LOG_ERR , "%ju : invalid memo context" , ( uintmax_t ) job -> id );
1170+ flux_log (h , LOG_ERR , "%s : invalid memo context" , idf58 ( job -> id ) );
11701171 errno = EPROTO ;
11711172 return -1 ;
11721173 }
@@ -1214,8 +1215,8 @@ static int journal_annotations_event (struct job_state_ctx *jsctx,
12141215 if (!context
12151216 || json_unpack (context , "{ s:o }" , "annotations" , & annotations ) < 0 ) {
12161217 flux_log (jsctx -> h , LOG_ERR ,
1217- "%s: annotations event context invalid: %ju " ,
1218- __FUNCTION__ , ( uintmax_t ) job -> id );
1218+ "%s: annotations event context invalid: %s " ,
1219+ __FUNCTION__ , idf58 ( job -> id ) );
12191220 errno = EPROTO ;
12201221 return -1 ;
12211222 }
@@ -1299,9 +1300,9 @@ static int journal_process_event (struct job_state_ctx *jsctx, json_t *event)
12991300 if (!job && !streq (name , "submit" )) {
13001301 flux_log (jsctx -> h ,
13011302 LOG_ERR ,
1302- "event %s: job %ju not in hash" ,
1303+ "event %s: job %s not in hash" ,
13031304 name ,
1304- ( uintmax_t ) id );
1305+ idf58 ( id ) );
13051306 return 0 ;
13061307 }
13071308
0 commit comments