Skip to content

Conversation

@chu11
Copy link
Member

@chu11 chu11 commented Mar 28, 2023

technically is job-list and things related to job-list

chu11 added 4 commits April 1, 2023 06:11
Problem: In one test in t2800-jobs-cmd.t, a state count used an
incorrect file to determine the number of jobs that failed with
a timeout.

Solution: Use the correct file to determine the number of jobs that
failed due to a timeout.
Problem: An errant single quote existed in a test in t2260-job-list.t.

Remove it.
Problem: There was inconsistent tab vs space indentation in t2260-job-list.t.

Make all indentation tabs for consistency.
Problem: The variable "exception" is used for the "exception_occurred"
job-list field.  This is legacy from when only "exception" was
returned.

Update the variable name to match the field name.
@chu11 chu11 force-pushed the job_list_misc_cleanup branch from 372d66b to 6e8b92e Compare April 1, 2023 13:17
Copy link
Contributor

@grondo grondo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like good cleanup to me. Maybe change the PR title to be more release-notes worthy, and I noted that the full path path to str.h doesn't need to be specified where -I/path/to/libccan is already specified in Makefile.ams

#include <string.h>
#include <jansson.h>

#include "src/common/libccan/ccan/str/str.h"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-I$(top_srcdir)/src/common/libccan is specified in the Makefile, so only ccan/str/str.h is required here.

#include "src/common/libtap/tap.h"
#include "src/common/libjob/sign_none.h"
#include "src/common/libccan/ccan/base64/base64.h"
#include "src/common/libccan/ccan/str/str.h"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#include "src/common/libccan/ccan/str/str.h"
#include "ccan/str/str.h"

#include "src/common/libutil/grudgeset.h"
#include "src/common/libjob/job_hash.h"
#include "src/common/libidset/idset.h"
#include "src/common/libccan/ccan/str/str.h"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#include "src/common/libccan/ccan/str/str.h"
#include "ccan/str/str.h"

#include <assert.h>

#include "src/common/libutil/errno_safe.h"
#include "src/common/libccan/ccan/str/str.h"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#include "src/common/libccan/ccan/str/str.h"
#include "ccan/str/str.h"

chu11 added 2 commits April 1, 2023 10:32
Problem: Flux-core is slowly moving to use streq() instead of
strcmp() when comparing strings.  Some strcmp()s are lingering in
libjob.

Replace strcmp() with streq() as needed.  In a few locations where
the "ccan/str/str.h" header was included, update other includes to
have similar include paths.
Problem: Flux-core is slowly moving to use streq() instead of
strcmp() when comparing strings.  Some strcmp()s are lingering in
the job-list module.

Replace strcmp() with streq() as needed.
@chu11 chu11 changed the title job-list: various small cleanup job-list: minor code consistency cleanup Apr 1, 2023
@chu11 chu11 force-pushed the job_list_misc_cleanup branch from 6e8b92e to f96b74a Compare April 1, 2023 17:48
@chu11
Copy link
Member Author

chu11 commented Apr 1, 2023

@grondo thanks for the review. updated the title and tweaked per your recommendations. There were a few other "src/common/libccan/cccan/..." includes in some files in libjjob, so I just tweaked those includes as well.

@codecov
Copy link

codecov bot commented Apr 1, 2023

Codecov Report

Merging #5031 (f96b74a) into master (9dee13e) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #5031      +/-   ##
==========================================
+ Coverage   83.14%   83.16%   +0.01%     
==========================================
  Files         445      445              
  Lines       76529    76529              
==========================================
+ Hits        63629    63642      +13     
+ Misses      12900    12887      -13     
Impacted Files Coverage Δ
src/common/libjob/jj.c 90.00% <100.00%> (ø)
src/common/libjob/jobspec1.c 84.22% <100.00%> (ø)
src/common/libjob/result.c 81.39% <100.00%> (ø)
src/common/libjob/sign_none.c 88.69% <100.00%> (ø)
src/common/libjob/strtab.c 100.00% <100.00%> (ø)
src/modules/job-list/job_state.c 73.84% <100.00%> (ø)
src/modules/job-list/job_util.c 91.66% <100.00%> (ø)
src/modules/job-list/stats.c 74.21% <100.00%> (ø)

... and 13 files with indirect coverage changes

@mergify mergify bot merged commit fb8dbb4 into flux-framework:master Apr 1, 2023
@chu11 chu11 deleted the job_list_misc_cleanup branch April 1, 2023 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants