Manually created `Constant` task is not returned with `flow.tasks`
See original GitHub issueDescription
I have manually created a Constant
task and added it to a Flow
. However, the flow does not return it when I execute flow.tasks
. Here is some code to replicate the bug:
from prefect import task, Flow
from prefect.tasks.core.constants import Constant
@task
def do_nothing(arg):
pass
with Flow("constants") as flow:
do_nothing(Constant({"x": 1, "y": [9, 10]}, name='asdf'))
flow.tasks
The code above returns: {<Task: do_nothing>}
Expected Behavior
I expected to have {<Task: do_nothing>, <Task: asdf>}
returned as shown in this prefect tutorial in the “Auto-generation of Tasks” example
Environment
I am using prefect==0.8.1
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Constant Tasks - Prefect Docs
Return an optional result. When this function runs successfully, the task is considered successful and the result (if any) can be made available...
Read more >Common Salesforce Flow Errors and How to Troubleshoot Them
If your flow is running in user mode, an error will be returned. How do you know which context your flow is running...
Read more >Dynamic Task Mapping — Airflow Documentation
Dynamic Task Mapping allows a way for a workflow to create a number of tasks at runtime based upon current data, rather than...
Read more >Store and manage values in variables in Power Automate
Learn how to store, manage, use, and pass values by using variables in your flows.
Read more >15 Working with Task Flow Activities
Restores a previous persistent save point, including application state and data, ... that points to a method, which takes no arguments and returns...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for the help! I ended up using the first route you mentioned above. In my mind, perhaps a good route forward is to be able to be identified by name w/
flow.constants
.Thank you!