Josh Greenhalgh
03/12/2021, 2:55 PMdef register_deploy():
# pylint: disable=missing-function-docstring
with prefect.context(
config={
"cloud": {"graphql": os.environ["GRPAHQL_ENDPOINT"]},
"server": {"ui": {"endpoint": os.environ["UI_ENDPOINT"]}},
}
):
for flow_name, flow in all_flows.items():
<http://logging.info|logging.info>(f"Registering flow: {flow_name}")
flow.register(project_name=PROD_PROJECT, labels=[SHARED_LABEL])
This works (in terms of registering) but the stdout is the following;
Result check: OK
Flow URL: <http://localhost:8080/default/flow/a6013647-a31e-4d3c-9e7e-82e69c02f71e>
└── ID: d78a0fc5-3990-461d-91d7-593a4278b6b2
└── Project: prod
└── Labels: ['prefect-agent']
I thought setting config.server.ui.endpoint
would lead to that endpoint being printed but it seems to not (localhost:8080
as opposed to UI_ENDPOINT
) - any ideas?Mariia Kerimova
03/12/2021, 3:28 PMPREFECT__SERVER__UI__ENDPOINT
?Josh Greenhalgh
03/12/2021, 3:37 PMMariia Kerimova
03/12/2021, 6:48 PMprefect diagnostics
?Josh Greenhalgh
03/12/2021, 6:49 PM{
"config_overrides": {},
"env_vars": [],
"system_information": {
"platform": "macOS-10.15.7-x86_64-i386-64bit",
"prefect_backend": "server",
"prefect_version": "0.14.11",
"python_version": "3.8.7"
}
}
Mariia Kerimova
03/12/2021, 6:54 PMJosh Greenhalgh
03/12/2021, 6:55 PMprefect.config.server.ui.endpoint
to get the base url - so it should work cos that is set as expected just after the context managerMariia Kerimova
03/12/2021, 9:00 PMfrom prefect.utilities.configuration import set_temporary_config
def register_deploy():
with set_temporary_config({"server": {"ui": {"endpoint": "<>"}}}):