Repository navigation
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cdced73c5f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| """ | ||
| job_id = None | ||
| if stdout and regex: | ||
| match = re.search(regex, stdout, re.MULTILINE) |
There was a problem hiding this comment.
Validate job-id regexes before launching the submit command
When a scheduler package supplies a syntactically invalid job_id_regex, this call occurs only after the submission process has completed, so the scheduler may already have accepted the job before re.error escapes. Looper then writes no record, leaves its pool/tallies unfinalized, and reports a failure that can prompt the user to resubmit the same work; compile the regex before Popen or handle parsing errors as a record warning.
Useful? React with 👍 / 👎.
| command = os.path.basename(compute["submission_command"].split()[0]) | ||
| return JOB_ID_REGEXES.get(command) |
There was a problem hiding this comment.
Match sbatch's parsable output
When a custom compute package uses the common submission_command: sbatch --parsable without an explicit regex, this selects the normal Submitted batch job ... pattern solely from the executable name. SchedMD documents that --parsable outputs only the job ID and optional cluster name, so every successful submission in this configuration produces job_id: null; select a parsable-aware pattern such as one matching the leading numeric ID.
Useful? React with 👍 / 👎.
Today looper throws away the job id that the scheduler prints when it submits a job (for example
Submitted batch job 12345fromsbatch). So once looper exits, there is no easy way to find, check on, or cancel the jobs it started, or to pick up after a crash.With this PR, every real submission (not dry runs) writes a small JSON file next to its
.subscript,<job_name>.submission.json. It holds the job id, the samples, the pipeline, the compute package, the submit command, the time, what the submit command printed, and its return code. A rerun overwrites the file with the latest submission.job_id_regex. The default divvy config sets it for the SLURM and SGE packages, and looper picks a default forsbatch,qsubandbsubwhen it is not set. Set it tonullto turn it off.There is also an optional provenance feature, off by default. With
--record-environment(orrecord_environment: truein the compute settings, so a divvy package, the pipeline interface or--computecan turn it on), the record also lists the container images the job used (docker, apptainer, or the images in a bulker crate) and their digests, so you can tell later exactly which software ran. It only looks at what is already on the machine; it never pulls images or contacts a registry, and if something cannot be found it is simply left out.Tests: unit and integration suites pass, ruff is clean. Docs and the changelog entry will come in a separate PR to
master, where the docs live.