Skip to content

Make jenkins_generic_job glob more strict by adding mach_comp - #5035

Open
jgfouca wants to merge 2 commits into
masterfrom
jgfouca/jenk_glob
Open

Make jenkins_generic_job glob more strict by adding mach_comp#5035
jgfouca wants to merge 2 commits into
masterfrom
jgfouca/jenk_glob

Conversation

@jgfouca

@jgfouca jgfouca commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Also, transition jenkins and wait_for_tests to modern py string formatting.

We hit a very unlikely edge case where two PM jobs kicked off near the same time and ended up picking the same timestamp, which messed a lot of things up. Making the glob have the mach_comp in addition to the timestamp will prevent this from happening again.

Checklist

  • My code follows the style guidelines of this project (black formatting)
  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • I have added tests that exercise my feature/fix and existing tests continue to pass
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding additions and changes to the documentation

Also, transition jenkins and wait_for_tests to modern py string formatting
@jgfouca
jgfouca requested review from jasonb5 and rljacob and a balanced review from Copilot August 20, 2026 19:40
@jgfouca jgfouca self-assigned this Aug 20, 2026

os.environ["CIME_MACHINE"] = machine.get_machine_name()

mach_comp = f"{machine.get_machine_name()}_{compiler}"

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.

These are the only changes that weren't just string format updating.

Copilot AI left a comment

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.

Pull request overview

Strengthens Jenkins test discovery to avoid cross-job timestamp collisions and modernizes string formatting.

Changes:

  • Restricts TestStatus globbing by machine and compiler.
  • Converts legacy formatting to f-strings.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
CIME/jenkins_generic_job.py Tightens test discovery and modernizes formatting.
CIME/wait_for_tests.py Modernizes string formatting.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

os.environ["CIME_MACHINE"] = machine.get_machine_name()

mach_comp = f"{machine.get_machine_name()}_{compiler}"
globstr = f"{test_root}/*{mach_comp}*{test_id}/TestStatus"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants