Ofir
05/02/2023, 5:19 PM/prefect
prefix.
Otherwise users will get a blank page when visiting /prefect, because the assets won’t be pointing to the right location.
Does anyone have any experience with that?
Should I set PREFECT_UI_SERVE_BASE
env var?
How should the Dockerfile for the agent change?Choenden Kyirong
05/02/2023, 6:17 PMLucas Zago
05/02/2023, 7:50 PMkiran
05/02/2023, 8:46 PMS3 Bucket
block. One is older and has deprecated fields, another seems like the (current) newest version, etc.Kelvin Tan
05/02/2023, 10:21 PMfrom prefect.blocks.system import Secret
secret_block = Secret.load("BLOCK_NAME")
# Access the stored secret
secret_block.get()
print(secret_block.value._secret_value)
Is this the "correct" approach?Tejaswi Bhangi
05/02/2023, 10:26 PMJulius Iver Reyes
05/03/2023, 5:30 AMRussell Brooks
05/03/2023, 6:30 AMNick
05/03/2023, 8:52 AMprefect agent start
again.Ollie Sellers
05/03/2023, 9:53 AMMalavika S Menon
05/03/2023, 11:36 AMNaila Chennit
05/03/2023, 12:44 PMlivenessProbe:
failureThreshold: 2
httpGet:
path: /healthz
port: 8080
initialDelaySeconds: 360
periodSeconds: 300
but I am facing this error Liveness probe failed: Get "<http://10.112.2.178:8080/healthz>": dial tcp 10.112.2.178:8080: connect: connection refused
. Any idea please ?Ouail Bendidi
05/03/2023, 1:58 PMblock_slug_1/block_name_1
block_slug_2/block_name_1
(I'm on latest prefect 2.10.6 right now)Vadym Dytyniak
05/03/2023, 2:10 PMDownloading flow code from storage at 'sample'
Flow could not be retrieved from deployment.
Traceback (most recent call last):
File "<frozen importlib._bootstrap_external>", line 879, in exec_module
File "<frozen importlib._bootstrap_external>", line 1016, in get_code
File "<frozen importlib._bootstrap_external>", line 1073, in get_data
FileNotFoundError: [Errno 2] No such file or directory: '/my_org/flows/equities/sample/sample.py'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/prefect/engine.py", line 276, in retrieve_flow_then_begin_flow_run
flow = await load_flow_from_flow_run(flow_run, client=client)
File "/usr/local/lib/python3.10/dist-packages/prefect/client/utilities.py", line 40, in with_injected_client
return await fn(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/prefect/deployments.py", line 217, in load_flow_from_flow_run
flow = await run_sync_in_worker_thread(load_flow_from_entrypoint, str(import_path))
File "/usr/local/lib/python3.10/dist-packages/prefect/utilities/asyncutils.py", line 91, in run_sync_in_worker_thread
return await anyio.to_thread.run_sync(
File "/usr/local/lib/python3.10/dist-packages/anyio/to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 867, in run
result = context.run(func, *args)
File "/usr/local/lib/python3.10/dist-packages/prefect/flows.py", line 809, in load_flow_from_entrypoint
flow = import_object(entrypoint)
File "/usr/local/lib/python3.10/dist-packages/prefect/utilities/importtools.py", line 201, in import_object
module = load_script_as_module(script_path)
File "/usr/local/lib/python3.10/dist-packages/prefect/utilities/importtools.py", line 164, in load_script_as_module
raise ScriptError(user_exc=exc, path=path) from exc
prefect.exceptions.ScriptError: Script at 'flows/equities/sample/sample.py' encountered an exception: FileNotFoundError(2, 'No such file or directory')
Do you have any ideas what's changed recently?Kiril Kamenev
05/03/2023, 4:28 PM<@U03MK7Z2ULQ>
and <!subteam^S037DR39NGP>
in the message body, but they just come as plain text. Looks like the message body is sanitized by Prefect. Does anyone have a similar issue or knows how to get it working? 🙏David
05/03/2023, 4:38 PMfrom prefect.deployments import Deployment
from prefect.filesystems import GitHub
from etl_web_to_gcs import etl
github_block = GitHub.load("github-block")
# Deployment Object
github_dep = Deployment.build_from_flow(
flow=etl,
name="github-flow",
infrastructure=github_block
)
if __name__ == "__main__":
github_dep.apply()
When I run the code above, I get the following error:
...
cls_init(__pydantic_self__, **data)
File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for Deployment
infrastructure
Infrastructure block must have 'run-infrastructure' capabilities. (type=value_error)
Any idea how to fix this?Joshua Gitter
05/03/2023, 5:17 PMCody
05/03/2023, 5:38 PMpre-commit run --all
step due to my machine, but the change is just to documentation, not the actual code.gperrone
05/03/2023, 5:52 PMCrash detected! Execution was cancelled by the runtime environment
error log with no other context. What is everyone’s experience with submitting a large amount of tasks? I have a different flow that submits about 1000 concurrent tasks and I have not had any problems with that oneAndreas Gustafsson
05/03/2023, 6:20 PMJean-Michel Provencher
05/03/2023, 6:49 PMAric Huang
05/03/2023, 8:15 PMRayTaskRunner
. Ray is initialized from within a task
and an ActorPool
is used to run some logic, and then another task
runs which may take a few minutes to run. After the task using Ray completes, after a minute or so the entire flow crashes with the following error:
gcs_rpc_client.h:533: Failed to connect to GCS within 60 seconds. GCS may have been killed. It's either GCS is terminated by `ray stop` or is killed unexpectedly. If it is killed unexpectedly, see the log file gcs_server.out. <https://docs.ray.io/en/master/ray-observability/ray-logging.html#logging-directory-structure>. The program will terminate.
I have a minimal example here: https://gist.github.com/concreted/6d9f4a1165fc79c510f9a63ac28363b4 Saving that to a file ray_test.py
and running python ray_test.py
should reproduce the issue. I see the issue on Ubuntu 18.04, but not on Mac.Jean-Michel Provencher
05/03/2023, 8:54 PMOscar Montanes
05/03/2023, 8:59 PMAaron
05/04/2023, 1:47 AMKirill Egorov
05/04/2023, 5:53 AMMalavika S Menon
05/04/2023, 7:13 AMKirill Egorov
05/04/2023, 7:16 AMBlue Radar
05/04/2023, 8:36 AMfrom prefect.utilities.tasks import defaults_from_attrs
@defaults_from_attrs("params", "upstream_result")
def run(self, params={}, poll_interval: str = None):
-----
I got stuck with this in prefect 2.0 to use the alternate one to use in my custom libraryDavid Steiner Sand
05/04/2023, 9:28 AM2.7.4
to 2.10.6
, but when I try to do the same to the agents, all of them fail to start with the error: RuntimeError: Unable to find any timezone configuration
. Any ideas?