Jason Carter
07/23/2020, 7:22 PMprefect backend server, prefect server start and prefect agent start
in that order but no flow in the UI.
import prefect
from prefect import task, Flow
@task
def hello_task():
logger = prefect.context.get("logger")
<http://logger.info|logger.info>("Hello, Cloud!")
flow = Flow("hello-flow", tasks=[hello_task])
# flow.run()
flow.register()
Dylan
07/23/2020, 7:42 PMprefect backend
is properly set in your config.toml
? Are you receiving an error message when trying to run the above script?Jason Carter
07/23/2020, 7:46 PMprefect backend server
so I assume it's set correctly but I can reach for the config.
And no, I'm not receiving any errors the script runs as expected python first_flow.py
backend = "cloud"
line 7 of my config file (in a conda env)Dylan
07/23/2020, 7:53 PMprefect backend server
command expects to updateJason Carter
07/23/2020, 7:55 PMprefect backend server
been expected to work? If manually then why the backend server call?Dylan
07/23/2020, 7:56 PMprefect backend server
expects to change your user configuration file, but it doesn’t create one for you if it’s not present I think$HOME/.prefect/config.toml
exists, prefect backend server
should update it appropriately and you’ll be all set 👍Jason Carter
07/23/2020, 8:08 PMconfig.toml
in that location but I do have a backend.toml
filebackend = "server"
Dylan
07/23/2020, 8:57 PMprefect config
and prefect version
for me, please?Matt Allen
07/23/2020, 9:54 PMThe UI is up and running, everything is green, I ranJust checking, once you did all this did you also runin that order but no flow in the UI.prefect backend server, prefect server start and prefect agent start
python my_flow_file.py
as well? That's a step that isn't necessary in airflow but is necessary in prefectJason Carter
07/24/2020, 4:05 PMpython file_name.py
brought everything together. Seems like a manual step for production CI/CD process, but I'm sure I just haven't gotten to those docs yet.1. Updated Conda
2. Created condo env on python3 (latest)
3. Had issues, chat on Slack, starting over
4. Remove all previous versions globally and in the env plus delete left over files
5. Env - installed prefect -c condo-forge prefect
6. Prefect config gives "cloud" as backend
7. Prefect config (~/.prefect) but no actual folder, the only config.toml on machine is in condo env
8. Prefect version (0.12.5)
9. Prefect backend server
10. Prefect config now gives "server" as backend
11. Added "flow.run()" and executed from cli - worked
12. Commented out "flow.run()" and added "flow.register()"
13. Refreshed prefect UI, nothing in "flow" shows up
14. Start "docker agent" prefect agent start docker
15. Nothing showing up in Prefect UI
16. Ran $python first_flow.py flow is now showing up in UI
Dylan
07/24/2020, 4:06 PM