Grant
07/06/2023, 9:03 PMModuleNotFoundError: No module named 'prefect.deployments.steps'; 'prefect.deployments' is not a package
This error did not occur when I followed the same process on my local machine using the exact same github repo. Not sure what the differences would be, I am using the same version of prefect in both locations?
This is the section in the .yaml file that is causing the error in one location but not another:
pull:
- prefect.deployments.steps.git_clone:
repository: <https://github.com/steeldynamics/Data-Pipeline-Flows.git>
branch: All-Flows
Nate
07/07/2023, 2:24 AMprefect.projects
has not yet been replaced by prefect.deployments
if you update the version of prefect on that machine, you should be good to goMarvin
07/07/2023, 2:29 AMNate
07/07/2023, 2:29 AMGrant
07/07/2023, 1:28 PMMarvin
07/07/2023, 1:28 PMJimmy Le
07/08/2023, 2:51 PMNate
07/08/2023, 5:04 PMJimmy Le
07/08/2023, 5:04 PMNate
07/08/2023, 5:07 PMprefect.deployments
should be available in 2.10.20.
could you describe how you encountered it? like did your worker throw this or did you see it locally?Jimmy Le
07/08/2023, 5:09 PMNate
07/08/2023, 5:10 PMJimmy Le
07/08/2023, 5:26 PMRunning deployment push steps...
> Running tag step...
Traceback (most recent call last):
File "/Users/lejimmy/Library/Mobile Documents/com~apple~CloudDocs/Projects/validator-health-check/venv/lib/python3.11/site-packages/prefect/deployments/steps/core.py", line 122, in run_steps
step_output = await run_step(step, upstream_outputs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/lejimmy/Library/Mobile Documents/com~apple~CloudDocs/Projects/validator-health-check/venv/lib/python3.11/site-packages/prefect/deployments/steps/core.py", line 79, in run_step
raise ValueError(
ValueError: Step has unexpected additional keys: requires, image_name, tag
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/lejimmy/Library/Mobile Documents/com~apple~CloudDocs/Projects/validator-health-check/venv/lib/python3.11/site-packages/prefect/cli/_utilities.py", line 41, in wrapper
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/Users/lejimmy/Library/Mobile Documents/com~apple~CloudDocs/Projects/validator-health-check/venv/lib/python3.11/site-packages/prefect/utilities/asyncutils.py", line 255, in coroutine_wrapper
return call()
^^^^^^
File "/Users/lejimmy/Library/Mobile Documents/com~apple~CloudDocs/Projects/validator-health-check/venv/lib/python3.11/site-packages/prefect/_internal/concurrency/calls.py", line 383, in __call__
return self.result()
^^^^^^^^^^^^^
File "/Users/lejimmy/Library/Mobile Documents/com~apple~CloudDocs/Projects/validator-health-check/venv/lib/python3.11/site-packages/prefect/_internal/concurrency/calls.py", line 283, in result
return self.future.result(timeout=timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/lejimmy/Library/Mobile Documents/com~apple~CloudDocs/Projects/validator-health-check/venv/lib/python3.11/site-packages/prefect/_internal/concurrency/calls.py", line 169, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/Users/lejimmy/Library/Mobile Documents/com~apple~CloudDocs/Projects/validator-health-check/venv/lib/python3.11/site-packages/prefect/_internal/concurrency/calls.py", line 346, in _run_async
result = await coro
^^^^^^^^^^
File "/Users/lejimmy/Library/Mobile Documents/com~apple~CloudDocs/Projects/validator-health-check/venv/lib/python3.11/site-packages/prefect/cli/deploy.py", line 251, in deploy
await _run_single_deploy(
File "/Users/lejimmy/Library/Mobile Documents/com~apple~CloudDocs/Projects/validator-health-check/venv/lib/python3.11/site-packages/prefect/client/utilities.py", line 51, in with_injected_client
return await fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/lejimmy/Library/Mobile Documents/com~apple~CloudDocs/Projects/validator-health-check/venv/lib/python3.11/site-packages/prefect/cli/deploy.py", line 511, in _run_single_deploy
await run_steps(push_steps, step_outputs, print_function=app.console.print)
File "/Users/lejimmy/Library/Mobile Documents/com~apple~CloudDocs/Projects/validator-health-check/venv/lib/python3.11/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 tag
Nate
07/08/2023, 9:08 PMValueError: Step has unexpected additional keys: requires, image_name, tag
Jimmy Le
07/08/2023, 9:09 PMNate
07/08/2023, 9:12 PMimage_name: zzstoatzz/test
tag: latest
---------------
Created project in /Users/nate/src/play/testing/prefect-sandbox/testing-prefect/test-docker-git with the following new files:
.prefectignore
prefect.yaml
.prefect/
⯠cat prefect.yaml | grep build
# build section allows you to manage and build docker images
build:
- prefect_docker.deployments.steps.build_docker_image:
id: build_image
image_name: '{{ build_image.image_name }}'
tag: '{{ build_image.tag }}'
image: '{{ build_image.image }}'
Jimmy Le
07/08/2023, 9:13 PMNate
07/08/2023, 9:27 PMJimmy Le
08/15/2023, 11:22 PM