JP-4103: Set FAILED status for steps that did not succeed#10497
JP-4103: Set FAILED status for steps that did not succeed#10497melanieclarke wants to merge 2 commits into
Conversation
|
Regtests: Diffs show the most likely difference users might see: tweakreg and outlier_detection now report FAILED instead of SKIPPED for a single input file. Open to suggestions, if folks think this use case should still be "SKIPPED". |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #10497 +/- ##
==========================================
- Coverage 86.40% 86.39% -0.01%
==========================================
Files 373 373
Lines 40112 40114 +2
==========================================
Hits 34658 34658
- Misses 5454 5456 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I haven't reviewed this yet but I have some general questions about the expectations here. What step status do we expect to report for failures due to e.g. the wrong input datamodel type, failing to find a reference file, etc, i.e. failures in the step setup? That is, as opposed to some algorithmic component of the step. I think there are a good amount of these in various places, and changing all of them from SKIPPED to FAILED seems both unnecessary and maybe more confusing. Does this elevate to a "breaking change"? More so than other keywords, I'd think it could be somewhat likely that downstream user workflows would be querying status keywords to decide on what further processing is needed. Should we just make it so In some cases where, say, multiple slits in a MultiSlitModel are processed, is the expectation that some would receive a FAILED and some would pass through fine? |
The two currently supported requests from INS were to report FAILED when:
Both of these were requested so that users would know that the step was attempted, but was not successfully applied for some particular input data. Extending these requests, the distinction I was aiming for here is that SKIPPED should be used if the step was not attempted at all, and FAILED should be used if it was tried (e.g. it's on by default for this mode) but it could not be successfully completed. I think wrong datamodel, no reference file, etc. should fall under FAILED for this definition. I think this change would have minimal user impact in those cases, though, and I would expect it's low priority to make sure we're consistent with this choice everywhere. Even with this distinction, there are some gray areas I'm not sure about, e.g. the master background subtraction handling here. I'm open to suggestions, if we prefer a different definition for FAILED. I'd also be okay with being conservative with it, so that we only set FAILED if it's specifically requested.
I don't think so. It's not a breaking change for the software -- there's no reason this change should trigger a major release for this package. Significant data changes are communicated by other means.
I went back and forth on this one. I settled on the current implementation because it seemed useful to me to define a default behavior for when a step is "not successful", and because it's less disruptive to current usage, but I'd be okay with always requiring the input string too.
Current standard in several steps where this is relevant is to mark the step COMPLETE if any slit completes successfully and SKIPPED otherwise. If we move to FAILED instead of SKIPPED in some cases, the same rules could apply. |
Resolves JP-4103
Update
stpipeutility functionsrecord_step_statusandquery_step_statusto expect three possible values for calibration step status: COMPLETE, SKIPPED, or FAILED.The
record_step_statuscurrently has one parameter (success), which was setting COMPLETE if True, SKIPPED if False. In most use cases for this function, success=False is used to indicate that the step attempted to run but couldn't complete, either because of an internal error, or the input data was invalid for the processing. The status "FAILED" seems more appropriate to these cases, so I changed the default for success=False to FAILED instead of SKIPPED. I also added an option to directly set a status instead, and used it in a few places where SKIPPED seemed more appropriate than FAILED.Steps affected by this default change are:
The other steps directly set SKIPPED or COMPLETE -- we can update those on a case by case basis as needed.
Requires spacetelescope/stdatamodels#722 (merged)
Tasks
Build 12.0(use the latest build if not sure)no-changelog-entry-needed)changes/:echo "changed something" > changes/<PR#>.<changetype>.rst(see changelog readme for instructions)changes/<PR#>.breaking.rstnews fragmentdocs/pageokify_regteststo update the truth files