dtcenter / METplus

Python scripting infrastructure for MET tools.
https://metplus.readthedocs.io
Apache License 2.0
97 stars 37 forks source link

Consider adding flag for skipping processing for each LOOP_BY if part of the chain fails #2601

Open DanielAdriaansen opened 4 months ago

DanielAdriaansen commented 4 months ago

Describe the New Feature

When @JohnHalleyGotway was testing dtcenter/MET#2897, he encountered a failure in one but not all of the processes in the PROCESS_LIST. In this case, the process list was: PROCESS_LIST = PyEmbedIngest,PointStat,PlotPointObs

John's question was whether PointStat and PlotPointObs should attempt to run if PyEmbedIngest failed. Currently, the behavior is to run all processes in the PROCESS_LIST regardless of failures of upstream processes.

This issue is to suggest adding a configuration item for users to REQUIRE_ALL_SUCCEED or something to that effect, which keeps track of the error or success of each process in the PROCESS_LIST. If an error is recorded, then the PROCESS_LIST is halted for the current iteration of METplus Wrappers (e.g. current iteration of LOOP_BY), and the Wrappers will proceed to the next time.

This is may only apply to instances where the user is calling PyEmbedIngest, since presumably the result of that process is required downstream. So perhaps the work is something like adding PY_EMBED_INGEST_STOP_ON FAIL, for example.

Acceptance Testing

Try the new config item and ensure METplus Wrappers is advancing to the next iteration based on the failure state.

Time Estimate

1 Day

Relevant Deadlines

NONE.

Funding Source

NONE.

Define the Metadata

Assignee

Labels

Milestone and Projects

Define Related Issue(s)

Consider the impact to the other METplus components.

New Feature Checklist

See the METplus Workflow for details.