Manh-Ha
08/18/2022, 12:12 PM$ prefect deployment build ./expenses.py:export_raw_expenses -n export-raw-expenses -t kubernetes -ib kubernetes-job/job --storage-block azure/azure-storage
Found flow 'export-raw-expenses'
Successfully uploaded 2 files to <az://prefect/htoh-prefect>
Traceback (most recent call last):
File "/Users/manhha/Library/Caches/pypoetry/virtualenvs/htoh-prefect-8QVbx3Ri-py3.10/lib/python3.10/site-packages/prefect/cli/_utilities.py", line 41, in wrapper
return fn(*args, **kwargs)
File "/Users/manhha/Library/Caches/pypoetry/virtualenvs/htoh-prefect-8QVbx3Ri-py3.10/lib/python3.10/site-packages/prefect/utilities/asyncutils.py", line 193, in wrapper
return run_async_in_new_loop(async_fn, *args, **kwargs)
File "/Users/manhha/Library/Caches/pypoetry/virtualenvs/htoh-prefect-8QVbx3Ri-py3.10/lib/python3.10/site-packages/prefect/utilities/asyncutils.py", line 140, in run_async_in_new_loop
return anyio.run(partial(__fn, *args, **kwargs))
File "/Users/manhha/Library/Caches/pypoetry/virtualenvs/htoh-prefect-8QVbx3Ri-py3.10/lib/python3.10/site-packages/anyio/_core/_eventloop.py", line 70, in run
return asynclib.run(func, *args, **backend_options)
File "/Users/manhha/Library/Caches/pypoetry/virtualenvs/htoh-prefect-8QVbx3Ri-py3.10/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 292, in run
return native_run(wrapper(), debug=debug)
File "/usr/local/Cellar/python@3.10/3.10.6_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/local/Cellar/python@3.10/3.10.6_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
return future.result()
File "/Users/manhha/Library/Caches/pypoetry/virtualenvs/htoh-prefect-8QVbx3Ri-py3.10/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 287, in wrapper
return await func(*args)
File "/Users/manhha/Library/Caches/pypoetry/virtualenvs/htoh-prefect-8QVbx3Ri-py3.10/lib/python3.10/site-packages/prefect/cli/deployment.py", line 477, in build
infrastructure = await Block.load(infra_block)
File "/Users/manhha/Library/Caches/pypoetry/virtualenvs/htoh-prefect-8QVbx3Ri-py3.10/lib/python3.10/site-packages/prefect/blocks/core.py", line 514, in load
return cls._from_block_document(block_document)
File "/Users/manhha/Library/Caches/pypoetry/virtualenvs/htoh-prefect-8QVbx3Ri-py3.10/lib/python3.10/site-packages/prefect/blocks/core.py", line 415, in _from_block_document
block = block_cls.parse_obj(block_document.data)
File "pydantic/main.py", line 521, in pydantic.main.BaseModel.parse_obj
File "/Users/manhha/Library/Caches/pypoetry/virtualenvs/htoh-prefect-8QVbx3Ri-py3.10/lib/python3.10/site-packages/prefect/blocks/core.py", line 103, in __init__
super().__init__(*args, **kwargs)
File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for KubernetesJob
customizations
string indices must be integers (type=type_error)
It looks like the string that the system doesn't like the string I input to the Customizations field:
{
"op": "add",
"path": "/spec/template/spec/containers/0/imagePullPolicy",
"value": "Always"
}
I tried to consult the doc but it only mention the JSON 6902 patch, but nothing more. There is however an example in the Github repo of Prefect.
Do you know if I'm missing something?Jenny
08/23/2022, 10:13 AMManh-Ha
08/23/2022, 1:18 PM