Comments (6)
I'm on board with TriggerFailed
subclassing Failed
-- one of the reasons I was hesitant about that at first was it would then trigger subsequent tasks as if the task had failed (for example, if the subsequent task had an all_failed
trigger) but your skip
analogy helps me see that that is probably a good thing
from prefect.
@jlowin Just so we're on the same page, do you agree that this test should pass and that this gets at the heart of the matter?
def test_flow_runner_with_trigger_task():
flow = prefect.Flow()
task1 = ErrorTask()
task2 = SuccessTask()
flow.add_edge(task1, task2)
flow_state = FlowRunner(flow=flow).run(return_tasks=[task1, task2])
assert isinstance(flow_state, Failed)
assert isinstance(flow_state.data[task1], Success)
assert isinstance(flow_state.data[task2], Trigger_Failed)
assert not isinstance(flow_state.data[task2], Failed)
from prefect.
Yes, I agree. Moreover, it also isn't a SUCCESS State, either.
from prefect.
Question: how should TriggerFailed
terminal states affect the overall status of a Flow
, and should it be a hard-and-fast rule or user-determined?
If we include TriggerFailed
as a not-failed, not-successful Finished
state, then our current flow-level state-logic renders the above Flow
a Success
which doesn't feel right.
I've played with having TriggerFailed
take an optional is_failure
parameter determining whether it should be treated as such, but these leads to all sorts of weird inconsistencies with TriggerFailed().is_failed() is True
vs. isinstance(TriggerFailed(), Failed) is False
.
from prefect.
I'm starting to suspect that TriggerFailed
should just be a subclass of Failed
(maybe it's the Failed
analogue of Skipped
), and whether that results in Flow
failures or not can be adjusted via #26 (i.e., if it's a failure cleanup task, then the Flow would be looking to the inner task for its state, not the TriggerFailed
task).
from prefect.
Closed with #59
from prefect.
Related Issues (20)
- RuntimeError: The task runner must be started before submitting work. HOT 3
- prefect-kubernetes `load_incluster_config()` is not async
- Slow task execution and lack of fault tolerance for server connection failures HOT 3
- Kubernetes worker config use wrong function for configuration
- Show `Updated` datetime instead of `Created` datetime for Flows and Deployments
- How to get original task return value from AsyncCompatProxy after using submit() in Prefect 3. HOT 1
- Database Issue: Broken Dashboard and Unsuccessful Reset/Reinstallation HOT 1
- Parameters in UI look different when class exists in same file as flow vs. different files HOT 1
- Error logging to API using prefect_test_harness
- Expose Prefect Primitives' Configs as TypedDicts
- NoneType can't be used in 'await' expression HOT 9
- Improve Memaid.js diagram styling and consistency in the docs HOT 1
- Port `stream_output` kwarg of `trigger_dbt_cli_command` to 2.x `prefect-dbt` HOT 1
- Work queue concurrency limit not working (as expected)
- ModuleNotFoundError: No module named 'exceptiongroup' HOT 4
- allow templating events into native python types in deployment trigger parameters
- `3.0.0rc14` or `3.0.0rc15` starts prefect server on every app start HOT 5
- Make Flow Version Available in the Runtime HOT 1
- Fix flaky test `tests/test_task_engine.py::TestTaskRunsAsync::test_get_run_logger[False]`
- Generic Secure Block HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prefect.