Issue with new version of register. Previously (an...
# ask-community
p
Issue with new version of register. Previously (and currently although I'm getting warnings) I was able to register flows with this:
Copy code
prefect register flow --file flow.py --project proj_name
This works without issue, however the recommendation is to use the new format:
Copy code
prefect register --project my-project -p myflows/
this appears to work, however this workflow does not get triggered if I test via the web GUI for example.
Copy code
prefect register flow --file $MODULE_LOC/the_flow/flow.py --project the_proj
Warning: `prefect register flow` is deprecated, please transition to using `prefect register` instead.
Flow URL: <http://localhost:8080/default/flow/eb320e0d-18ab-426f-9929-1b880cf1fadb>
 └── ID: 4e9d85e9-39a0-4e72-a6fb-55941c12bac7
 └── Project: the_proj
 └── Labels: ['ip-172-20-3-23.ec2.internal']
(this works)
Copy code
prefect register --project the_proj -p the_flow/
Collecting flows...
Processing 'the_flow/flow.py':
  Building `Local` storage...
  Registering 'Flow_name'... Done
  └── ID: f9cfe0ca-848d-44b5-a739-566a5c77b387
  └── Version: 5
this doesn't, although it gives the impression it has.
k
Hi @Philip MacMenamin! I’ll try replicate this on my end. Thanks for the details
👍 1
The
prefect register --project the_proj -p the_flow/
worked for me. What Prefect version are you on?
How many flows do you have in that folder?
p
Prefect Version (0.14.19) There is one file in that dir named flow.py, which contains a single flow.
Just to be clear, the registration appears to work. The flow is created, gets an ID, is listed, and appears to be available to use. If I invoke it however it does not get triggered and eventually times out. If I use the old syntax there's no issue.
k
Gotcha was able to replicate-ish. I noticed there was no label when registering that way, and the lack of a label makes the agent fail to pick it up. After fixing the labels, I get a
ModuleNotFoundError
. May open an issue.
p
You're opening an issue Kevin? Or should I? Could you link here if you have opened one? 🙂
k
Hey I just spoke to the core team. This is known and I’ll be opening one and linking it
👍 1
@Marvin open “Relative Path in prefect register CLI Not Being Converted to Absolute”