You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After renaming a flow, I would expect its runtime name to reflect this new given name. However, it returns the flow's function name.
from prefect import flow, runtime, serve
@flow(log_prints=True)
def test_flow():
flow_name = runtime.flow_run.flow_name
print(f"This should be 'renamed_flow' since it has been renamed but instead is: {flow_name}") # it prints 'test_flow'
if __name__ == "__main__":
renamed_flow = test_flow.with_options(name="renamed_flow")
deployment = renamed_flow.to_deployment(name="test_flow_name")
serve(deployment)
In the ui it displays the correct given name
but the print above gives the flow's function name instead of the given name
Version info
Version: 3.1.7
API version: 0.8.4
Python version: 3.10.15
Git commit: c05ffa6d
Built: Mon, Dec 16, 2024 10:06 AM
OS/Arch: darwin/arm64
Profile: local
Server type: server
Pydantic version: 2.7.4
The text was updated successfully, but these errors were encountered:
Bug summary
After renaming a flow, I would expect its runtime name to reflect this new given name. However, it returns the flow's function name.
In the ui it displays the correct given name
but the print above gives the flow's function name instead of the given name
Version info
The text was updated successfully, but these errors were encountered: