Jovan Sakovic
06/22/2023, 9:39 AMJovan Sakovic
06/22/2023, 9:39 AM10:35:42.708 | ERROR | prefect.flow_runs.worker - Failed to submit flow run '3cc5be53-6972-42ef-a0af-f653e0906fbd' to infrastructure.
Traceback (most recent call last):
File "/Users/sakce/Documents/vcs/r-and-d/pacc-git/.venv/lib/python3.10/site-packages/docker/api/client.py", line 268, in _raise_for_status
response.raise_for_status()
File "/Users/sakce/Documents/vcs/r-and-d/pacc-git/.venv/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: <http+docker://localhost/v1.43/images/create?tag=latest&fromImage=meteo>
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/sakce/Documents/vcs/r-and-d/pacc-git/.venv/lib/python3.10/site-packages/prefect/workers/base.py", line 827, in _submit_run_and_capture_errors
result = await self.run(
File "/Users/sakce/Documents/vcs/r-and-d/pacc-git/.venv/lib/python3.10/site-packages/prefect_docker/worker.py", line 406, in run
container, created_event = await run_sync_in_worker_thread(
File "/Users/sakce/Documents/vcs/r-and-d/pacc-git/.venv/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 "/Users/sakce/Documents/vcs/r-and-d/pacc-git/.venv/lib/python3.10/site-packages/anyio/to_thread.py", line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/Users/sakce/Documents/vcs/r-and-d/pacc-git/.venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
File "/Users/sakce/Documents/vcs/r-and-d/pacc-git/.venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run
result = context.run(func, *args)
File "/Users/sakce/Documents/vcs/r-and-d/pacc-git/.venv/lib/python3.10/site-packages/prefect_docker/worker.py", line 544, in _create_and_start_container
self._pull_image(docker_client, configuration)
File "/Users/sakce/Documents/vcs/r-and-d/pacc-git/.venv/lib/python3.10/site-packages/prefect_docker/worker.py", line 687, in _pull_image
return docker_client.images.pull(image, tag)
File "/Users/sakce/Documents/vcs/r-and-d/pacc-git/.venv/lib/python3.10/site-packages/docker/models/images.py", line 465, in pull
pull_log = self.client.api.pull(
File "/Users/sakce/Documents/vcs/r-and-d/pacc-git/.venv/lib/python3.10/site-packages/docker/api/image.py", line 429, in pull
self._raise_for_status(response)
File "/Users/sakce/Documents/vcs/r-and-d/pacc-git/.venv/lib/python3.10/site-packages/docker/api/client.py", line 270, in _raise_for_status
raise create_api_error_from_http_exception(e) from e
File "/Users/sakce/Documents/vcs/r-and-d/pacc-git/.venv/lib/python3.10/site-packages/docker/errors.py", line 39, in create_api_error_from_http_exception
raise cls(e, response=response, explanation=explanation) from e
docker.errors.ImageNotFound: 404 Client Error for <http+docker://localhost/v1.43/images/create?tag=latest&fromImage=meteo>: Not Found ("pull access denied for meteo, repository does not exist or may require 'docker login': denied: requested access to the resource is denied")
Jovan Sakovic
06/22/2023, 9:51 AMpush: true
and after running prefect deploy
again, it failed at pushing the image to discdiver
Jovan Sakovic
06/22/2023, 9:51 AM10:49:17.332 | DEBUG | prefect.profiles - Using profile 'cloud'
? Would you like to use an existing deployment configuration? [Use arrows to move; enter to select; n to select none]
โโโโโณโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโ
โ โ Name โ Entrypoint โ Description โ
โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ
โ > โ meteo-docker โ meteo-flow.py:main โ โ
โโโโโดโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโ
No, configure a new deployment
10:49:18.884 | DEBUG | prefect.client - Connecting to API at <https://api.prefect.cloud/api/accounts/3808a084-de28-4b31-97be-0cc9f4b130c0/workspaces/5426583a-ff26-48e3-90e5-6146bed8ef5d/>
? Would you like to schedule when this flow runs? [y/n] (y): n
Running deployment build steps...
> Running build_docker_image step...
10:49:20.795 | DEBUG | prefect.client - Connecting to API at <https://api.prefect.cloud/api/accounts/3808a084-de28-4b31-97be-0cc9f4b130c0/workspaces/5426583a-ff26-48e3-90e5-6146bed8ef5d/>
10:49:20.805 | DEBUG | prefect.client - Connecting to API at <https://api.prefect.cloud/api/accounts/3808a084-de28-4b31-97be-0cc9f4b130c0/workspaces/5426583a-ff26-48e3-90e5-6146bed8ef5d/>
10:49:20.814 | DEBUG | prefect.client - Connecting to API at <https://api.prefect.cloud/api/accounts/3808a084-de28-4b31-97be-0cc9f4b130c0/workspaces/5426583a-ff26-48e3-90e5-6146bed8ef5d/>
10:49:20.821 | DEBUG | prefect.client - Connecting to API at <https://api.prefect.cloud/api/accounts/3808a084-de28-4b31-97be-0cc9f4b130c0/workspaces/5426583a-ff26-48e3-90e5-6146bed8ef5d/>
10:49:20.828 | DEBUG | prefect.client - Connecting to API at <https://api.prefect.cloud/api/accounts/3808a084-de28-4b31-97be-0cc9f4b130c0/workspaces/5426583a-ff26-48e3-90e5-6146bed8ef5d/>
10:49:20.835 | DEBUG | prefect.client - Connecting to API at <https://api.prefect.cloud/api/accounts/3808a084-de28-4b31-97be-0cc9f4b130c0/workspaces/5426583a-ff26-48e3-90e5-6146bed8ef5d/>
Step 1/4 : FROM prefecthq/prefect:2.10.16-python3.10
---> ec64b2ea5e2e
Step 2/4 : COPY . /opt/prefect/docker/
---> ba9fb8906e62
Step 3/4 : WORKDIR /opt/prefect/docker/
---> Running in 8bd62f266db2
---> f20123e4c222
Step 4/4 : LABEL io.prefect.version=2.10.16
---> Running in 310ad21adb6e
---> 44ac3e44090e
Successfully built 44ac3e44090e
The push refers to repository [<http://docker.io/discdiver/jovan-meteo|docker.io/discdiver/jovan-meteo>]
Preparing
Preparing
Preparing
Preparing
Preparing
Preparing
Preparing
Preparing
Preparing
Preparing
Preparing
Preparing
Preparing
Preparing
Preparing
Preparing
Waiting
Waiting
Waiting
Waiting
Waiting
Waiting
Waiting
Waiting
Waiting
Waiting
Waiting
Traceback (most recent call last):
File "/Users/sakce/Documents/vcs/r-and-d/pacc-git/.venv/lib/python3.10/site-packages/prefect/deployments/steps/core.py", line 122, in run_steps
step_output = await run_step(step, upstream_outputs)
File "/Users/sakce/Documents/vcs/r-and-d/pacc-git/.venv/lib/python3.10/site-packages/prefect/deployments/steps/core.py", line 93, in run_step
result = await from_async.call_soon_in_new_thread(
File "/Users/sakce/Documents/vcs/r-and-d/pacc-git/.venv/lib/python3.10/site-packages/prefect/_internal/concurrency/calls.py", line 292, in aresult
return await asyncio.wrap_future(self.future)
File "/Users/sakce/Documents/vcs/r-and-d/pacc-git/.venv/lib/python3.10/site-packages/prefect/_internal/concurrency/calls.py", line 316, in _run_sync
result = self.fn(*self.args, **self.kwargs)
File "/Users/sakce/Documents/vcs/r-and-d/pacc-git/.venv/lib/python3.10/site-packages/prefect/_internal/compatibility/deprecated.py", line 149, in wrapper
return fn(*args, **kwargs)
File "/Users/sakce/Documents/vcs/r-and-d/pacc-git/.venv/lib/python3.10/site-packages/prefect_docker/deployments/steps.py", line 231, in build_docker_image
raise OSError(event["error"])
OSError: denied: requested access to the resource is denied
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/sakce/Documents/vcs/r-and-d/pacc-git/.venv/lib/python3.10/site-packages/prefect/cli/_utilities.py", line 41, in wrapper
return fn(*args, **kwargs)
File "/Users/sakce/Documents/vcs/r-and-d/pacc-git/.venv/lib/python3.10/site-packages/prefect/utilities/asyncutils.py", line 255, in coroutine_wrapper
return call()
File "/Users/sakce/Documents/vcs/r-and-d/pacc-git/.venv/lib/python3.10/site-packages/prefect/_internal/concurrency/calls.py", line 383, in __call__
return self.result()
File "/Users/sakce/Documents/vcs/r-and-d/pacc-git/.venv/lib/python3.10/site-packages/prefect/_internal/concurrency/calls.py", line 283, in result
return self.future.result(timeout=timeout)
File "/Users/sakce/Documents/vcs/r-and-d/pacc-git/.venv/lib/python3.10/site-packages/prefect/_internal/concurrency/calls.py", line 169, in result
return self.__get_result()
File "/Users/sakce/.pyenv/versions/3.10.10/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
raise self._exception
File "/Users/sakce/Documents/vcs/r-and-d/pacc-git/.venv/lib/python3.10/site-packages/prefect/_internal/concurrency/calls.py", line 346, in _run_async
result = await coro
File "/Users/sakce/Documents/vcs/r-and-d/pacc-git/.venv/lib/python3.10/site-packages/prefect/cli/deploy.py", line 244, in deploy
await _run_single_deploy(
File "/Users/sakce/Documents/vcs/r-and-d/pacc-git/.venv/lib/python3.10/site-packages/prefect/client/utilities.py", line 51, in with_injected_client
return await fn(*args, **kwargs)
File "/Users/sakce/Documents/vcs/r-and-d/pacc-git/.venv/lib/python3.10/site-packages/prefect/cli/deploy.py", line 436, in _run_single_deploy
await run_steps(build_steps, step_outputs, print_function=app.console.print)
File "/Users/sakce/Documents/vcs/r-and-d/pacc-git/.venv/lib/python3.10/site-packages/prefect/deployments/steps/core.py", line 150, 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.
Jovan Sakovic
06/22/2023, 9:51 AMprefect.yaml
# Welcome to your prefect.yaml file! You can you this file for storing and managing
# configuration for deploying your flows. We recommend committing this file to source
# control along with your flow code.
# Generic metadata about this project
name: pacc-git
prefect-version: 2.10.16
# build section allows you to manage and build docker images
build:
- prefect_docker.deployments.steps.build_docker_image:
id: build_image
requires: prefect-docker>=0.3.0
image_name: discdiver/jovan-meteo
tag: latest
dockerfile: auto
push: true
# push section allows you to manage if and how this project is uploaded to remote locations
push:
# pull section allows you to provide instructions for cloning this project in remote locations
pull:
- prefect.deployments.steps.set_working_directory:
directory: /opt/prefect/
# the deployments section allows you to provide configuration for deploying flows
deployments:
- name: meteo-docker
version:
tags: []
description:
entrypoint: meteo-flow.py:main
parameters: {}
work_pool:
name: docker-pool
work_queue_name:
job_variables:
image: '{{ build_image.image }}'
schedule:
Nate
06/22/2023, 9:55 AMimage_name: discdiver/jovan-meteo
Nate
06/22/2023, 9:55 AMJovan Sakovic
06/22/2023, 10:56 AMdocker login
โ ๏ธNate
06/22/2023, 11:22 AM