[us-commits] [ehb54/us3lims_common] a6f9e2: Validate sbatch submission status before recording...
emre brookes
noreply at github.com
Sat Jun 20 18:05:55 MDT 2026
Branch: refs/heads/main
Home: https://github.com/ehb54/us3lims_common
Commit: a6f9e2ef5a75d86857bb1a34acafa0e6573a7b62
https://github.com/ehb54/us3lims_common/commit/a6f9e2ef5a75d86857bb1a34acafa0e6573a7b62
Author: ehb54 <brookes at uthscsa.edu>
Date: 2026-06-20 (Sat, 20 Jun 2026)
Changed paths:
M class/submit_local.php
M global_config.php.template
Log Message:
-----------
Validate sbatch submission status before recording a gfacID
submit_job() never checked the exit status of the sbatch/qsub exec()
call, and parsed the job ID positionally from the first output line
assuming it was always "Submitted batch job <N>". Under scheduler
load, sbatch can instead fail with e.g. "sbatch: error: Batch job
submission failed: Socket timed out on send/recv operation" - the
positional parse of that line happens to land on the literal word
"job", which then got stored as gfacID and tracked through the rest
of the pipeline as if a real job existed, eventually surfacing much
later and opaquely as "Failed data fetch" during cleanup.
Validate the sbatch output against /^Submitted batch job\s+(\d+)/
and check exec()'s exit status before accepting a job ID. Retry the
submission with exponential backoff on failure (configurable via
$global_sbatch_submit_retries / $global_sbatch_submit_retry_wait_seconds
in global_config.php, overridable per-cluster), since this class of
failure is transient and load-related. If all retries are exhausted,
update_db() now marks the request SUBMIT_TIMEOUT with the real error
instead of recording an empty/bogus gfacID and launching a jobmonitor
to watch a job that was never submitted.
Fixes ehb54/ultrascan-tickets#915
Commit: 847e5742c9b159e56f1b3bbc82d72546fe9ec7a2
https://github.com/ehb54/us3lims_common/commit/847e5742c9b159e56f1b3bbc82d72546fe9ec7a2
Author: ehb54 <brookes at uthscsa.edu>
Date: 2026-06-20 (Sat, 20 Jun 2026)
Changed paths:
M class/submit_local.php
Log Message:
-----------
Extract mark_autoflow_submit_failed() to remove duplication
The submission-failure handling in update_db() inlined the same
connect/query/error/close pattern already used by the rest of the
function. Pull it into a small dedicated method instead.
Commit: 65ff7461ff08cfb95bbb820e7270133bc9672a2a
https://github.com/ehb54/us3lims_common/commit/65ff7461ff08cfb95bbb820e7270133bc9672a2a
Author: ehb54 <brookes at uthscsa.edu>
Date: 2026-06-20 (Sat, 20 Jun 2026)
Changed paths:
M class/submit_local.php
Log Message:
-----------
Mark mark_autoflow_submit_failed() as private
Fixes the SonarCloud-flagged missing visibility modifier (php:S1784).
Commit: 07777995aaccb65764ffb804c55ae5e29c8c6369
https://github.com/ehb54/us3lims_common/commit/07777995aaccb65764ffb804c55ae5e29c8c6369
Author: ehb54 <brookes at uthscsa.edu>
Date: 2026-06-20 (Sat, 20 Jun 2026)
Changed paths:
Log Message:
-----------
Retrigger SonarCloud analysis after fixing cpd.exclusions setting
Commit: ed4504fe59fb16de017293bf2a1168bcc884dee1
https://github.com/ehb54/us3lims_common/commit/ed4504fe59fb16de017293bf2a1168bcc884dee1
Author: ehb54 <brookes at uthscsa.edu>
Date: 2026-06-20 (Sat, 20 Jun 2026)
Changed paths:
M class/submit_local.php
Log Message:
-----------
Reduce submit_job() cognitive complexity, fix method naming
Extract the sbatch/qsub retry loop and result-parsing logic out of
submit_job() into two small private helpers (attemptSubmit(),
parseSubmitResult()), addressing SonarCloud's flagged Cognitive
Complexity (29 vs 15 allowed). No behavior change, just relocated
code.
Also rename mark_autoflow_submit_failed() to markAutoflowSubmitFailed()
to satisfy the PHP method naming convention rule (php:S100).
Commit: 367f2e89e377f413ebb2c4c5a3baef1074ee3646
https://github.com/ehb54/us3lims_common/commit/367f2e89e377f413ebb2c4c5a3baef1074ee3646
Author: emre brookes <ehb54 at users.noreply.github.com>
Date: 2026-06-20 (Sat, 20 Jun 2026)
Changed paths:
M class/submit_local.php
M global_config.php.template
Log Message:
-----------
Merge pull request #21 from ehb54/ehb54-issue-915
Validate sbatch submission status before recording a gfacID
Compare: https://github.com/ehb54/us3lims_common/compare/2257f349a7f8...367f2e89e377
To unsubscribe from these emails, change your notification settings at https://github.com/ehb54/us3lims_common/settings/notifications
More information about the us-commits
mailing list