This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
Cloud Run max timeout is now 1 day instead of 1 hour. Relaxing the va… #246
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Cloud Run has changed their max timeout for jobs from 1 hour to 1 day. I tried making the change in just my work pool config but I need the worker to also update with the new max.
Closes
Example
Even when I update the work pool in Prefect Server to have a different max timeout the 1 hour max time is still defined in the worker running in Cloud Run as a service.
Relevant stack trace.
File "/usr/local/lib/python3.10/site-packages/prefect/cli/_utilities.py", line 41, in wrapper
return fn(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/prefect/utilities/asyncutils.py", line 255, in coroutine_wrapper
return call()
File "/usr/local/lib/python3.10/site-packages/prefect/_internal/concurrency/calls.py", line 398, in call
return self.result()
File "/usr/local/lib/python3.10/site-packages/prefect/_internal/concurrency/calls.py", line 284, in result
return self.future.result(timeout=timeout)
File "/usr/local/lib/python3.10/site-packages/prefect/_internal/concurrency/calls.py", line 168, in result
return self.__get_result()
File "/usr/local/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
raise self._exception
File "/usr/local/lib/python3.10/site-packages/prefect/_internal/concurrency/calls.py", line 355, in _run_async
result = await coro
File "/usr/local/lib/python3.10/site-packages/prefect/cli/worker.py", line 146, in start
async with worker_cls(
File "/usr/local/lib/python3.10/site-packages/prefect/workers/base.py", line 1109, in aexit
await self.teardown(*exc_info)
File "/usr/local/lib/python3.10/site-packages/prefect/workers/base.py", line 532, in teardown
await self._runs_task_group.aexit(*exc_info)
File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 597, in aexit
raise exceptions[0]
File "/usr/local/lib/python3.10/site-packages/prefect/workers/base.py", line 635, in cancel_run
configuration = await self._get_configuration(flow_run)
File "/usr/local/lib/python3.10/site-packages/prefect/workers/base.py", line 969, 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 152, in from_template_and_values
return cls(**populated_configuration)
File "/usr/local/lib/python3.10/site-packages/pydantic/v1/main.py", line 341, in init
raise validation_error
pydantic.v1.error_wrappers.ValidationError: 1 validation error for CloudRunWorkerJobConfiguration
Screenshots
Checklist
pre-commit
checks.pre-commit install && pre-commit run --all
locally for formatting and linting.mkdocs serve
view documentation locally.