Braun Reyes
04/04/2023, 5:42 PMprefect deployment build example_flow.py:flow_1 -n base -sb s3/common-utils-dev-test/flow-group-1/flow-1 -ib ecs-task/common-utils-flow-1-dev-test --override 'task_customizations=[{"op": "replace", "path": "/overrides/cpu", "value": "512"}, {"op": "replace", "path": "/overrides/memory", "value": "1024"}]' -q prefect-v2-queue-dev-test -v dev --params '{"param_name": "param_value"}' -t common-utils -t flow-group-1 -a --cron '0 0 * * *'
It results in this infra override in deployments
{
"task_customizations": "[{\"op\": \"replace\", \"path\": \"/overrides/cpu\", \"value\": \"512\"}, {\"op\": \"replace\", \"path\": \"/overrides/memory\", \"value\": \"1024\"}]"
}
however when I submit the flow run I get this error
Submission failed. pydantic.error_wrappers.ValidationError: 1 validation error for ECSTask task_customizations instance of JsonPatch expected (type=type_error.arbitrary_type; expected_arbitrary_type=JsonPatch)
anyone know why this would not work.Braun Reyes
04/04/2023, 10:11 PM@pytest.mark.usefixtures("ecs_mocks")
async def test_task_customizations_as_string(aws_credentials):
task = ECSTask(
aws_credentials=aws_credentials,
memory=512,
cpu=256,
task_customizations='[{"op": "replace", "path": "/overrides/cpu", "value": "512"}, {"op": "replace", "path": "/overrides/memory", "value": "1024"}]',
) # type: ignore
original_run_task = task._run_task
mock_run_task = MagicMock(side_effect=original_run_task)
task._run_task = mock_run_task
await run_then_stop_task(task)
overrides = mock_run_task.call_args[0][1].get("overrides")
assert overrides["memory"] == "1024"
assert overrides["cpu"] == "512"
Amit Mukherjee
04/11/2023, 7:30 PMDylan
04/13/2023, 10:42 AMAndy Dienes
04/13/2023, 1:43 PMListObjects: permission denied
) https://github.com/PrefectHQ/prefect/issues/9188
it's quite a painful one since it appears to happen very randomly and i have no idea how to get around itAndy Dienes
04/13/2023, 1:43 PMRyan Strandt
04/14/2023, 5:30 PMMaciej
04/17/2023, 11:05 PMChristian Becker
04/19/2023, 5:58 AMJaime Raldua Veuthey
04/20/2023, 9:12 AMFelipe
04/20/2023, 10:26 PMAndy Dienes
04/23/2023, 12:56 AMJaime Raldua Veuthey
04/26/2023, 8:55 AMLuca Vehbiu
05/01/2023, 2:34 PMSubmission failed. botocore.exceptions.ClientError: An error occurred (UnrecognizedClientException) when calling the RegisterTaskDefinition operation: The security token included in the request is invalid
Andy Dienes
05/18/2023, 12:04 AMbotocore.exceptions.SSLError: SSL validation failed for <https://my-bucket.s3.amazonaws.com/native/my/path/to/file.json> EOF occurred in violation of protocol (_ssl.c:2423)
has anybody encountered this? is this likely just a permissions / role problem?Matt Alhonte
05/18/2023, 3:43 AMECSTask
won't be deprecated until Workers & Projects are out of Beta, right?Vishnu Duggirala
06/09/2023, 4:43 PMNico Neumann
06/13/2023, 4:16 PMprefect-aws
package to fix this issue: https://github.com/PrefectHQ/prefect-aws/pull/273?Chris Reuter
06/13/2023, 7:49 PMAaron Wormus
06/16/2023, 3:14 PMSecretBinary
and reading the block like this:
from prefect_aws import AwsSecret
def my_flow():
secrets_manager = AwsSecret.load("aaron-secret")
print(secrets_manager.read_secret())
Gives me a
KeyError: 'SecretBinary'
Ankit
07/05/2023, 3:56 PMImportError: cannot import name 'SecretField' from 'pydantic' (/usr/local/lib/python3.8/dist-packages/pydantic/__init__.py)
Ankit
07/05/2023, 3:57 PMClaire Herdeman
07/11/2023, 5:34 PM"readonlyRootFilesystem": true,
to the container definition, but then the flow fails to load. Looks like the error is when it tries to make the directory and can't, which makes sense
File "/usr/local/lib/python3.10/os.py", line 225, in makedirs
mkdir(name, mode)
OSError: [Errno 30] Read-only file system: '/opt/prefect/./<flow_name>
Ankit
07/13/2023, 2:02 PMAssertionError
Traceback (most recent call last):
File "/usr/lib/python3.8/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.8/asyncio/base_events.py", line 603, in run_until_complete
self.run_forever()
File "/usr/lib/python3.8/asyncio/base_events.py", line 570, in run_forever
self._run_once()
File "/usr/lib/python3.8/asyncio/base_events.py", line 1823, in _run_once
event_list = self._selector.select(timeout)
File "/usr/lib/python3.8/selectors.py", line 468, in select
fd_event_list = self._selector.poll(timeout, max_ev)
File "/usr/local/lib/python3.8/dist-packages/prefect/engine.py", line 1670, in cancel_flow_run
raise TerminationSignal(signal=signal.SIGTERM)
prefect.exceptions.TerminationSignal
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/prefect/engine.py", line 1533, in orchestrate_task_run
result = await run_sync(task.fn, *args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/prefect/utilities/asyncutils.py", line 165, in run_sync_in_interruptible_worker_thread
assert result is not NotSet
AssertionError
Finished in state Failed('Task run encountered an exception: Traceback (most recent call last):\n File "/usr/lib/python3.8/asyncio/runners.py", line 44, in run\n return loop.run_until_complete(main)\n File "/usr/lib/python3.8/asyncio/base_events.py", line 603, in run_until_complete\n self.run_forever()\n File "/usr/lib/python3.8/asyncio/base_events.py", line 570, in run_forever\n self._run_once()\n File "/usr/lib/python3.8/asyncio/base_events.py", line 1823, in _run_once\n event_list = self._selector.select(timeout)\n File "/usr/lib/python3.8/selectors.py", line 468, in select\n fd_event_list = self._selector.poll(timeout, max_ev)\n File "/usr/local/lib/python3.8/dist-packages/prefect/engine.py", line 1670, in cancel_flow_run\n raise TerminationSignal(signal=signal.SIGTERM)\nprefect.exceptions.TerminationSignal\n\nDuring handling of the above exception, another exception occurred:\n\nAssertionError\n')
Luca Vehbiu
07/13/2023, 7:34 PMLuis Arias
08/07/2023, 3:37 PMFlow run could not be submitted to infrastructure: Failed to run ECS task, cluster 'arn:aws:ecs:******' does not appear to have any container instances associated with it. Confirm that you have EC2 container instances available.
Vishnu Duggirala
08/24/2023, 7:09 PMRuntimeError: Timed out after 120.82966995239258s while watching task for status RUNNING
Romain Vincent
08/31/2023, 4:35 PM{
"AWS_ACCESS_KEY_ID": "{{ prefect.blocks.aws-credentials.<my-aws-block>.aws_access_key_id }}",
"AWS_SECRET_ACCESS_KEY": "{{ prefect.blocks.aws-credentials.<my-aws-block>.aws_secret_access_key }}"
}
Unfortunately, my ecs tasks crashes at submission time with this error :
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/prefect/workers/base.py", line 831, in _submit_run_and_capture_errors
configuration = await self._get_configuration(flow_run)
File "/usr/local/lib/python3.10/site-packages/prefect/workers/base.py", line 906, in _get_configuration
configuration = await self.job_configuration.from_template_and_values(
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/workers/base.py", line 125, in from_template_and_values
populated_configuration = await resolve_block_document_references(
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/utilities/templating.py", line 205, in resolve_block_document_references
updated_value = await resolve_block_document_references(
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/utilities/templating.py", line 205, in resolve_block_document_references
updated_value = await resolve_block_document_references(
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/utilities/templating.py", line 228, in resolve_block_document_references
block_type_slug, block_document_name = (
ValueError: too many values to unpack (expected 2)
I guess it has to do with the formatting, but I could not find the related documentation. Any help would be appreciated!Yaron Levi
09/10/2023, 5:09 PMLuis Arias
09/11/2023, 2:49 PMprefect-aws
repo and am creating a venv so I can start work on https://github.com/PrefectHQ/prefect-aws/issues/310. Do you have a recommended python version?