Lucas Brum
08/25/2022, 5:11 PMKrishnan Chandra
08/25/2022, 5:45 PMBlake Stefansen
08/25/2022, 6:50 PMprocess
infrastructure and the s3
block for filesystem storage. I build my deployment, the yaml is generated, and my flow code is uploaded to s3.
I have prefect orion running locally, and this deployment applied to my local prefect. I then start a local agent within my python virtual environment.
In orion, I click Run
on my deployment. The flow run is moved to my local work queue, my local agent picks up the flow run, and builds the infrastructure.
The agent then runs the prefect engine, which begins pulling my flow code from s3. In doing so, I receive this flow run failure log:
Flow could not be retrieved from deployment.
Traceback (most recent call last):
File "C:\Users\BStefansen\.virtualenvs\lbx-broadband-pipeline-4k_4F-H8\lib\site-packages\prefect\engine.py", line 254, in retrieve_flow_then_begin_flow_run
flow = await load_flow_from_flow_run(flow_run, client=client)
File "C:\Users\BStefansen\.virtualenvs\lbx-broadband-pipeline-4k_4F-H8\lib\site-packages\prefect\client.py", line 104, in with_injected_client
return await fn(*args, **kwargs)
File "C:\Users\BStefansen\.virtualenvs\lbx-broadband-pipeline-4k_4F-H8\lib\site-packages\prefect\deployments.py", line 55, in load_flow_from_flow_run
await storage_block.get_directory(from_path=None, local_path=".")
File "C:\Users\BStefansen\.virtualenvs\lbx-broadband-pipeline-4k_4F-H8\lib\site-packages\prefect\filesystems.py", line 399, in get_directory
return await self.filesystem.get_directory(
File "C:\Users\BStefansen\.virtualenvs\lbx-broadband-pipeline-4k_4F-H8\lib\site-packages\prefect\filesystems.py", line 260, in get_directory
return self.filesystem.get(from_path, local_path, recursive=True)
File "C:\Users\BStefansen\.virtualenvs\lbx-broadband-pipeline-4k_4F-H8\lib\site-packages\fsspec\spec.py", line 801, in get
self.get_file(rpath, lpath, **kwargs)
File "C:\Users\BStefansen\.virtualenvs\lbx-broadband-pipeline-4k_4F-H8\lib\site-packages\fsspec\spec.py", line 769, in get_file
outfile = open(lpath, "wb")
FileNotFoundError: [Errno 2] No such file or directory: 'C:/Users/BSTEFA~1/AppData/Local/Temp/tmp5t7vj96aprefect/aurora\\aurora_constants.py'
Expectation
I would expect the prefect engine to use s3 file paths for pulling down the flow code, but it seems to be using local file paths. Is this an issue with my deployment/flow setup, or is this a bug?
Environment
• Windows 10
• Python 3.10.5
• Prefect 2.2.0Blake Stefansen
08/25/2022, 7:23 PMs3fs
for DockerContainer
infrastructure blocks, but this is also an issue for me with the process
infrastructure when using prefect cloud. If I run a deployment in the cloud using s3
for filesystem storage and process
for infrastructure, our flow runs error out saying
ModuleNotFoundError: No module named 's3fs'
I'm not sure if this is due to our agent being a kubernetes
agent and our deployment infrastructure being process
, or something else. If the process
just runs a subprocess on a docker image made by the kubernetes agent, then I would assume it's an issue with the default image used by the kubernetes agentPhilip MacMenamin
08/25/2022, 7:36 PMcontext
in a task such that the key would be available to other downstream tasks within that run?Marc-Antoine Bélanger
08/25/2022, 7:36 PMEdmondo Porcu
08/25/2022, 8:38 PMpip install -e ".[dev]"
does not install the packagesTuoyi Zhao
08/25/2022, 9:01 PMKevin Grismore
08/25/2022, 9:02 PMUserWarning: Block document has schema checksum sha256:28a9d16c2589998d5281b0496b25edd76c1a0b159095d0c7fe5eb5dc5ab62549 which does not match the schema checksum for class 'GCS'. This indicates the schema has changed and this block may not load.
Should I delete and recreate my GCS block?Jared Robbins
08/25/2022, 9:08 PMMike Vanbuskirk
08/25/2022, 11:37 PMEmerson Franks
08/25/2022, 11:48 PMhttps://www.youtube.com/watch?v=m9FYoOIfWMc▾
RuntimeError: File system created with scheme 'az' from base path '<az://prefect-logs>' could not be created. You are likely missing a Python module required to use the given storage protocol.
I see some mentions of adding a requirements.txt file and including adlfs in that file but that doesn't seem to get picked up using prefect deployment apply ... I also see some mentions around modifying the deployment.yaml file to include EXTRA_PIP_PACKAGES but that equally doesn't seem to do anything.
How do I get my agent to install adlfs?Vishy ganesh
08/26/2022, 12:56 AMblocks
in prefect 2.0. Can blocks
scoped to workspaces or could we constrain blocks only to certain deployments?
Why you might ask?
I want to ensure that configurations / credentials are not (mis)used intentionally or otherwiseSebastian Seitner
08/26/2022, 7:04 AMOmar Sultan
08/26/2022, 8:23 AM@task(name="DefaultPrefectTask")
def to_print(word):
print(task.name)
print(task.tags)
print(f"Direct printing from creating task with decorator {word}")
return word
Hamza Naanani
08/26/2022, 8:50 AMTim-Oliver
08/26/2022, 10:05 AMPranit
08/26/2022, 11:26 AMModuleNotFoundError: No module named 'prefect.tasks.airbyte'; 'prefect.tasks' is not a package
Have I missed to install any dependency ? I didnt see anything on airbyte/prefect pagesPranit
08/26/2022, 12:06 PMAndreas
08/26/2022, 12:36 PMwith tags("test"):
option but still this applies to tasks inside a flow. Is this a design choice? There are some use cases where setting tags for flows could be proved useful for meOfir
08/26/2022, 1:28 PMOfir
08/26/2022, 1:29 PMtry:
import prefect
except ImportError
def @task(func): return func
?Timo
08/26/2022, 1:59 PMJai P
08/26/2022, 2:32 PMDaskTaskRunner
, but for subflows? E.g. if i have a flow that kicks off a bunch of subflows, i want those to be distributed out and not running on the same instance as the parent flow (or...is that already possible and i'm missing something)? Thanks in advance!Alix Cook
08/26/2022, 2:33 PMname
, and it looks like prefect is passing the parameters spec as the parameter, so
{
"type": "object",
"title": "Parameters",
"properties": {
"name": {
"title": "name",
"default": "world"
}
}
}
is getting passed to my flow, then my flow fails with
prefect.exceptions.SignatureMismatchError: Function expects parameters ['name'] but was provided with parameters ['type', 'title', 'properties']
not really sure what im doing wrong here...Ofir
08/26/2022, 2:38 PMCreate a flow as a context manager and call your tasks on each other as if they were regular functions. Prefect will track each function call and build up a computational graph that represents your workflow. Critically, no tasks are actually executed at this time.
Ofir
08/26/2022, 2:39 PMNathaniel Russell
08/26/2022, 3:04 PMTask 'sync_canvas': Exception encountered during task execution!
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/prefect/engine/task_runner.py", line 859, in get_task_run_state
value = prefect.utilities.executors.run_task_with_timeout(
File "/usr/local/lib/python3.8/site-packages/prefect/utilities/executors.py", line 445, in run_task_with_timeout
return task.run(*args, **kwargs) # type: ignore
File "<string>", line 28, in sync_canvas
TypeError: 'NoneType' object is not iterable
We are using prefect on EC2 spot instances and we think this is likely caused by AWS dropping our spot instances. Is there a way around this while still using spot instances or is this unavoidable with spot instances?Jared Robbins
08/26/2022, 3:16 PMOfir
08/26/2022, 3:55 PMOfir
08/26/2022, 3:55 PM