Skip to content

DM-54540: bps report failed while reporting on a restarted task #88

Merged
mxk62 merged 9 commits into
mainfrom
tickets/DM-54540
Jul 15, 2026
Merged

DM-54540: bps report failed while reporting on a restarted task #88
mxk62 merged 9 commits into
mainfrom
tickets/DM-54540

Conversation

@mxk62

@mxk62 mxk62 commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Checklist

  • ran Jenkins
  • added a release note for user-visible changes to doc/changes

@codecov

codecov Bot commented Jun 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.83333% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.26%. Comparing base (15f6b27) to head (e5f3462).
⚠️ Report is 10 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
python/lsst/ctrl/bps/htcondor/htcondor_service.py 0.00% 7 Missing ⚠️
python/lsst/ctrl/bps/htcondor/lssthtc.py 94.73% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #88      +/-   ##
==========================================
+ Coverage   84.79%   85.26%   +0.46%     
==========================================
  Files          19       19              
  Lines        4263     4417     +154     
  Branches      458      463       +5     
==========================================
+ Hits         3615     3766     +151     
- Misses        570      575       +5     
+ Partials       78       76       -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@mxk62
mxk62 force-pushed the tickets/DM-54540 branch from 6841d9c to 0ca237f Compare June 9, 2026 15:27
@mxk62
mxk62 marked this pull request as ready for review June 9, 2026 15:44
@mxk62
mxk62 force-pushed the tickets/DM-54540 branch from 876ebe1 to 4dfdb04 Compare June 9, 2026 15:45
@mxk62
mxk62 force-pushed the tickets/DM-54540 branch from 4dfdb04 to cd109bd Compare June 19, 2026 15:48

@MichelleGower MichelleGower 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.

3 bps restarts have held jobs and 2 bps restarts if some succeed one first restart doesn't have correct counts (like previously reported problem but need 1 more restart).

Comment thread doc/changes/DM-54540.bugfix.rst Outdated
Comment thread python/lsst/ctrl/bps/htcondor/lssthtc.py
@mxk62
mxk62 force-pushed the tickets/DM-54540 branch 3 times, most recently from 8afd8c9 to 1b4296e Compare July 13, 2026 23:57

@MichelleGower MichelleGower 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.

Refactoring those pieces of code made it look much better in addition to fixing the problems. Merge approved.

mxk62 added 9 commits July 15, 2026 15:15
A bug was causing mixing up condor_dagman job data with those related to
DAGMan jobs if `dag.nodes.log` was missing.  Fixed that.
During workflow restarts, selected files are being moved to a dedicated
backup directory as HTCondor recreates them with the fresh content once
a workflow is restarted.  However, the backup function was also moving
out such files for subdags that succeeded.  HTCondor does not rerun
DAGs that completed successfully.  Their absence led to reporting
incorrect job status counts as the information in these files is used by
the plugin's reporting mechanism.  Made changes to ensure that only
files of the failed subdags are backed up.
_udpate_rescue_file() was trying to back up files for each failed
subdags However, at the time of its execution these files were already
backed up. Also, the function, in its current implementation, doesn't
have access to the correct location of the backup directory. As a result
it was creating an empty directory tree in the directory with the failed
subdag.  Modified it so it has a single responsibility -- updating the
rescue file of the main DAG.
The function responsible for backing up files between restarts was using
a very simple strategy to determine if files in a subdag directory needs
a backup -- if a subdag directory contained a rescue file, the files
were backed up. This strategy turned out to be too simplistic. It
erroneously was backing up files for subdags that completed successfully
after a restart as rescue files from previous failures were still
present.  To address this limitation, now the subdags that fails (if
any) are being retrieved directly from the main DAG rescue file.
Contrary to the names of the methods in all other test cases, the names
of the methods in the ReadSingleNodeStatusTestCase were using snake_case
instead of camelCase. Fixed that.
Turned an entire 'Notes' section in a docstring to a regular paragrah in
order to avoid a mysterious error from docutils.
@mxk62
mxk62 force-pushed the tickets/DM-54540 branch from 4c0acf1 to e5f3462 Compare July 15, 2026 19:15
@mxk62
mxk62 merged commit d76ca70 into main Jul 15, 2026
20 checks passed
@mxk62
mxk62 deleted the tickets/DM-54540 branch July 15, 2026 19:19
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