Kazushi Nagayama
08/18/2023, 2:23 PMJake Kaplan
08/18/2023, 2:38 PMKazushi Nagayama
08/18/2023, 2:46 PMJake Kaplan
08/18/2023, 2:49 PMKazushi Nagayama
08/19/2023, 4:39 AMTraceback (most recent call last):
File "/Users/kazushi/opt/anaconda3/lib/python3.9/site-packages/prefect/cli/_utilities.py", line 41, in wrapper
return fn(*args, **kwargs)
File "/Users/kazushi/opt/anaconda3/lib/python3.9/site-packages/prefect/utilities/asyncutils.py", line 255, in coroutine_wrapper
return call()
File "/Users/kazushi/opt/anaconda3/lib/python3.9/site-packages/prefect/_internal/concurrency/calls.py", line 383, in __call__
return self.result()
File "/Users/kazushi/opt/anaconda3/lib/python3.9/site-packages/prefect/_internal/concurrency/calls.py", line 283, in result
return self.future.result(timeout=timeout)
File "/Users/kazushi/opt/anaconda3/lib/python3.9/site-packages/prefect/_internal/concurrency/calls.py", line 169, in result
return self.__get_result()
File "/Users/kazushi/opt/anaconda3/lib/python3.9/concurrent/futures/_base.py", line 391, in __get_result
raise self._exception
File "/Users/kazushi/opt/anaconda3/lib/python3.9/site-packages/prefect/_internal/concurrency/calls.py", line 346, in _run_async
result = await coro
File "/Users/kazushi/opt/anaconda3/lib/python3.9/site-packages/prefect/cli/deploy.py", line 257, in deploy
await _run_single_deploy(
File "/Users/kazushi/opt/anaconda3/lib/python3.9/site-packages/prefect/client/utilities.py", line 51, in with_injected_client
return await fn(*args, **kwargs)
File "/Users/kazushi/opt/anaconda3/lib/python3.9/site-packages/prefect/cli/deploy.py", line 511, in _run_single_deploy
await run_steps(build_steps, step_outputs, print_function=app.console.print)
File "/Users/kazushi/opt/anaconda3/lib/python3.9/site-packages/prefect/deployments/steps/core.py", line 152, in run_steps
raise StepExecutionError(f"Encountered error while running {fqn}") from exc
prefect.deployments.steps.core.StepExecutionError: Encountered error while running prefect_docker.deployments.steps.build_docker_image
An exception occurred.
To execute flow runs from this deployment, start a worker in a separate terminal that pulls work from the 'my-cloud-run-pool' work pool:
$ prefect worker start --pool 'my-cloud-run-pool'
Jake Kaplan
08/19/2023, 3:14 PMKazushi Nagayama
08/19/2023, 3:15 PMFlow could not be retrieved from deployment.
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/prefect/deployments/steps/core.py", line 124, in run_steps
step_output = await run_step(step, upstream_outputs)
File "/usr/local/lib/python3.10/site-packages/prefect/deployments/steps/core.py", line 95, in run_step
result = await from_async.call_soon_in_new_thread(
File "/usr/local/lib/python3.10/site-packages/prefect/_internal/concurrency/calls.py", line 292, in aresult
return await asyncio.wrap_future(self.future)
File "/usr/local/lib/python3.10/site-packages/prefect/_internal/concurrency/calls.py", line 316, in _run_sync
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.10/site-packages/prefect/deployments/steps/pull.py", line 28, in set_working_directory
os.chdir(directory)
FileNotFoundError: [Errno 2] No such file or directory: '/opt/prefect/prefect'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/prefect/engine.py", line 395, in retrieve_flow_then_begin_flow_run
flow = await load_flow_from_flow_run(flow_run, client=client)
File "/usr/local/lib/python3.10/site-packages/prefect/client/utilities.py", line 51, in with_injected_client
return await fn(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/prefect/deployments/deployments.py", line 207, in load_flow_from_flow_run
output = await run_steps(deployment.pull_steps)
File "/usr/local/lib/python3.10/site-packages/prefect/deployments/steps/core.py", line 152, in run_steps
raise StepExecutionError(f"Encountered error while running {fqn}") from exc
prefect.deployments.steps.core.StepExecutionError: Encountered error while running prefect.deployments.steps.set_working_directory
# pull section allows you to provide instructions for cloning this project in remote locations
pull:
- prefect.deployments.steps.set_working_directory:
directory: /opt/prefect/prefect
Jake Kaplan
08/19/2023, 3:33 PMKazushi Nagayama
08/19/2023, 3:43 PMCOPY . /opt/prefect/
in DockerfileFlow 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: '/opt/prefect/awr.py'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/prefect/engine.py", line 395, in retrieve_flow_then_begin_flow_run
flow = await load_flow_from_flow_run(flow_run, client=client)
File "/usr/local/lib/python3.10/site-packages/prefect/client/utilities.py", line 51, in with_injected_client
return await fn(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/prefect/deployments/deployments.py", line 222, 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/site-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/site-packages/anyio/to_thread.py", line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run
result = context.run(func, *args)
File "/usr/local/lib/python3.10/site-packages/prefect/flows.py", line 975, in load_flow_from_entrypoint
flow = import_object(entrypoint)
File "/usr/local/lib/python3.10/site-packages/prefect/utilities/importtools.py", line 201, in import_object
module = load_script_as_module(script_path)
File "/usr/local/lib/python3.10/site-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 'awr.py' encountered an exception: FileNotFoundError(2, 'No such file or directory')
docker run ls /opt/prefect
to the image does say that the file is there though"terminated: Application failed to start: "/usr/local/bin/python": exec format error"
--platform linux/amd64
to docker build
prefect deploy
iâd have to manually rebuild the docker image with --platform linux/amd64
and push
it. might be something for the prefect team to fix in the future!Jake Kaplan
08/19/2023, 4:34 PMprefect.yaml
! It's likely just not a default prompt of prefect deploy
https://github.com/PrefectHQ/prefect-docker/blob/main/prefect_docker/deployments/steps.py#L136C1-L146prefect deploy
Kazushi Nagayama
08/20/2023, 4:14 PMplatform: linux/amd64
Jake Kaplan
08/23/2023, 1:19 PMKazushi Nagayama
08/23/2023, 2:18 PMa27a3f3c-fc6c-402c-b274-ea79051c82c2
and flow run is helpful-dachshund
Jake Kaplan
08/23/2023, 3:01 PMKazushi Nagayama
08/23/2023, 3:06 PMJake Kaplan
08/25/2023, 4:35 PMKazushi Nagayama
08/27/2023, 9:09 AMJake Kaplan
08/29/2023, 2:05 PMPENDING
-> RUNNING
at least. If it ran out of CPU or memory you should see a CRASHED
state reported. The only thing I have seen similar is when the container fails to start but GCP reports a successful status code? but it sounds like the only thing that changed between the original and the no-op was the flow code itself. Which really shouldn't have impact hereKazushi Nagayama
08/30/2023, 4:27 AM