Closed MeasureSpace closed 1 month ago
hi @MeasureSpace - hmm I'll note that this appears to work as expected
from prefect import __version__, flow
f = flow.from_source(
source="https://gist.github.com/3eb9333625d465cb74381c5116be7aee.git",
entrypoint="tour_of_artifacts.py:main",
).with_options(name="xx")
assert f.name == "xx"
assert __version__ == "3.0.1"
if __name__ == "__main__":
f.serve()
can you explain where you're seeing the unexpected flow name?
Hi @zzstoatzz , thanks a lot for looking into this. I did the assert
name as well. The name actually was changed. Now I believe the issue happened during the deploy()
process. Please see the snapshot below. The deployment table shows GFS-data-ingestion/staging-gfs-realtime
and the actual run command shows prefect deployment run 'staging-gfs-data-ingestion/staging-gfs-realtime'
. In reality, the name remains as the default flow name which is GFS-data-ingestion
. Any thoughts?
hi @MeasureSpace - I've added a PR to update the handling in .deploy
Bug summary
The flow name doesn't change with the
with_option
function. Even I changed the flow name with thewith_option(name='xx')
. The deployed flow name is still the default one. See following code to reproduce:Version info (
prefect version
output)Additional context
No response