-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RenameFlowRunTask: use default flow_run_id value from context #3548
RenameFlowRunTask: use default flow_run_id value from context #3548
Conversation
Hi! Thanks for picking up this issue. Note that the |
# Conflicts: # tests/tasks/prefect/test_flow_run_rename.py
Co-authored-by: Michael Adkins <madkinszane@gmail.com>
Co-authored-by: Michael Adkins <madkinszane@gmail.com>
…m:sp1thas/prefect into default_flow_run_id_for_renameflowruntask
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
@@ -30,24 +31,30 @@ def __init__( | |||
def run(self, flow_run_id: str, flow_run_name: str) -> bool: | |||
""" | |||
Args: | |||
- flow_run_id (str, optional): The ID of the flow run to rename | |||
- flow_run_id (str, optional): The ID of the flow run to rename. If `None`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically an empty string will trigger a context lookup too
- flow_run_id (str, optional): The ID of the flow run to rename. If `None`, | |
- flow_run_id (str, optional): The ID of the flow run to rename. If empty, |
Summary
Use default
flow_run_id
value forRenameFlowRunTask
from context. More details: #3535Changes
RenameFlow.run
will useflow_run_id
from context if is not provided.Importance
This PR will simplify the usage of
RenameFlowRunTask
by makingflow_run_id
parameter optional.I'm not sure about the added test, take a closer look :)
Checklist
This PR:
changes/
directory (if appropriate)docs/outline.toml
for API reference docs (if appropriate)