Skip to content

DAOS-623 build: add a linter to normalize config#17781

Open
jolivier23 wants to merge 18 commits intomasterfrom
jvolivie/buildconfig_list
Open

DAOS-623 build: add a linter to normalize config#17781
jolivier23 wants to merge 18 commits intomasterfrom
jvolivie/buildconfig_list

Conversation

@jolivier23
Copy link
Copy Markdown
Contributor

@jolivier23 jolivier23 commented Mar 24, 2026

  • Ensures entries are alphabetized
  • Ensures names are lowercase

Change-Id: I9d8839df99c4e2930067483fa760b9ef5c9c2b2a

Steps for the author:

  • Commit message follows the guidelines.
  • Appropriate Features or Test-tag pragmas were used.
  • Appropriate Functional Test Stages were run.
  • At least two positive code reviews including at least one code owner from each category referenced in the PR.
  • Testing is complete. If necessary, forced-landing label added and a reason added in a comment.

After all prior steps are complete:

  • Gatekeeper requested (daos-gatekeeper added as a reviewer).

Change-Id: I9d8839df99c4e2930067483fa760b9ef5c9c2b2a
Signed-off-by: Jeff Olivier <jeffolivier@google.com>
@jolivier23 jolivier23 requested review from grom72 and soumagne March 24, 2026 17:13
soumagne
soumagne previously approved these changes Mar 24, 2026
Change-Id: I0ad1c874a84b6153daa6a36d0ebdd62bbb22b0ff
Signed-off-by: Jeff Olivier <jeffolivier@google.com>
@daosbuild3
Copy link
Copy Markdown
Collaborator

@daosbuild3
Copy link
Copy Markdown
Collaborator

Test stage Unit Test with memcheck completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos/job/PR-17781/1/display/redirect

@daosbuild3
Copy link
Copy Markdown
Collaborator

Test stage Unit Test bdev with memcheck completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos/job/PR-17781/1/display/redirect

@daosbuild3
Copy link
Copy Markdown
Collaborator

Test stage Unit Test bdev completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos/job/PR-17781/1/display/redirect

@github-actions
Copy link
Copy Markdown

Ticket title is 'Generic ticket for minor code cleanup and improvement'
Status is 'Resolved'
Labels: 'request_for_2.6.5,request_for_2.6.6,request_for_2.8,scrubbed_2.6.5'
Job should run at elevated priority (1)
https://daosio.atlassian.net/browse/DAOS-623

@github-actions github-actions bot added the priority Ticket has high priority (automatically managed) label Mar 24, 2026
@jolivier23 jolivier23 requested a review from soumagne March 24, 2026 18:35
soumagne
soumagne previously approved these changes Mar 24, 2026
…list

Change-Id: I736674b78af5bd4aa239fe079b649623e7c8fbb3
Change-Id: I5129d21e31cfc5d15bf49d5623d190e04181416f
Signed-off-by: Jeff Olivier <jeffolivier@google.com>
…list

Change-Id: I0de0103c93b60b70d9feaa5103da27338561d1b9
Change-Id: I26aa812984e9d2ebe0985f405b8bdc14582942a9
Signed-off-by: Jeff Olivier <jeffolivier@google.com>
…list

Change-Id: I0d7ee2cd0d08eceafbc4fa0cb091aa3c34edbb51
Change-Id: I200e9006b2bc23733fc4e688d1b449b1619f5aac
Signed-off-by: Jeff Olivier <jeffolivier@google.com>
daltonbohning
daltonbohning previously approved these changes Apr 8, 2026
Comment on lines +23 to +24
# Use python to perform the check and fix
python3 - <<EOF
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why not put this in a python file instead?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

gemini wrote the script...who am I to question my overlord? Though you make a good point. Maybe the whole script should be python. Let me play with it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ok, I reworked it in python. Even added some tests. A few of my own tests seem to work.

…list

Change-Id: I0006a16e7f1c8d8395b094fc944bb413d8e5b2db
Change-Id: I566f13f8c0988b85b8a44b2d9bed88486769511d
Signed-off-by: Jeff Olivier <jeffolivier@google.com>
@daosbuild3
Copy link
Copy Markdown
Collaborator

Change-Id: Ibfc442d09482a4c33e01ca9f98fafd4ee180682a
Signed-off-by: Jeff Olivier <jeffolivier@google.com>
Change-Id: I2dd33c8bd57883467c70261b01e39ae3b5895819
Signed-off-by: Jeff Olivier <jeffolivier@google.com>
Change-Id: Iee193632aaa43209b7bef689930127db34c0d644
Signed-off-by: Jeff Olivier <jeffolivier@google.com>
…list

Change-Id: I3440bae491e159b0bde5d9304d69d021027a95b9
@daosbuild3
Copy link
Copy Markdown
Collaborator

Test stage Unit Test bdev with memcheck completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos/job/PR-17781/8/display/redirect

Change-Id: I359022d6bf66cf047d59a3519229b6ae968e8daf
Signed-off-by: Jeff Olivier <jeffolivier@google.com>
Change-Id: I7cd818494d6d8b53256f22f8c9c357c983dd2362
Signed-off-by: Jeff Olivier <jeffolivier@google.com>
@@ -1,31 +1,28 @@
[component]
component=daos
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is holdover from when scons_local supported cart, daos, cppr, and iof independently

Comment on lines +17 to +35
def print_githook_header(name):
"""Print the standard git hook header."""
print(f"{name + ':':<17} ", end='', flush=True)


def git_diff_cached_files(file_path):
"""Check if the file has staged changes."""
target = os.environ.get('TARGET')
if not target:
# If TARGET is not set, we can't easily determine what to diff against
# in the same way hook_base.sh does. For now, we'll return True to
# force a check if we're not sure, or try to find a base.
return True

cmd = ['git', 'diff', target, '--cached', '--name-only', '--diff-filter=d', '--', file_path]
result = subprocess.run(
cmd, capture_output=True, text=True, check=False,
shell=False) # nosec B603
return result.stdout.strip()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Does it not work in the env to call the bash equivalents for these functions?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sorry, I'm not sure which functions you are referring to here. Maybe commented on a different line than you wanted?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I mean instead of writing print_githook_header can we not call the bash function for it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The short answer is the bash function is defined in hook_base.sh and not visible to python. And it's a one-liner. Maybe what we should do is create a python library to do what the bash scripts do and then we could invoke python from bash :-)

…list

Change-Id: I7dca976027d822b8eee19faa4fad9e6af430af60
Change-Id: I5156238fea520e7b921aa02e107ea39f23407b51
Signed-off-by: Jeff Olivier <jeffolivier@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority Ticket has high priority (automatically managed)

Development

Successfully merging this pull request may close these issues.

4 participants