prefect-client 2.19.7__tar.gz → 2.19.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {prefect-client-2.19.7/src/prefect_client.egg-info → prefect-client-2.19.9}/PKG-INFO +1 -1
- {prefect-client-2.19.7 → prefect-client-2.19.9}/requirements-client.txt +1 -1
- {prefect-client-2.19.7 → prefect-client-2.19.9}/requirements.txt +1 -1
- {prefect-client-2.19.7 → prefect-client-2.19.9}/setup.cfg +1 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/client/schemas/objects.py +5 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/deployments/deployments.py +9 -2
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/engine.py +54 -12
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/exceptions.py +4 -1
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/flows.py +145 -46
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/runner/server.py +1 -1
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/tasks.py +27 -12
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/utilities/asyncutils.py +10 -5
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/workers/block.py +9 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9/src/prefect_client.egg-info}/PKG-INFO +1 -1
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect_client.egg-info/requires.txt +1 -1
- {prefect-client-2.19.7 → prefect-client-2.19.9}/LICENSE +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/MANIFEST.in +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/README.md +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/requirements-dev.txt +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/setup.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/.prefectignore +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/__init__.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/__init__.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/_logging.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/compatibility/__init__.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/compatibility/deprecated.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/compatibility/experimental.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/concurrency/__init__.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/concurrency/api.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/concurrency/calls.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/concurrency/cancellation.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/concurrency/event_loop.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/concurrency/inspection.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/concurrency/primitives.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/concurrency/services.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/concurrency/threads.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/concurrency/waiters.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/__init__.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/_base_model.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/_compat.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/_flags.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/_types.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/annotations/__init__.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/annotations/pendulum.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/schemas.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/utilities/__init__.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/utilities/config_dict.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/utilities/field_validator.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/utilities/model_construct.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/utilities/model_copy.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/utilities/model_dump.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/utilities/model_dump_json.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/utilities/model_fields.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/utilities/model_fields_set.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/utilities/model_json_schema.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/utilities/model_rebuild.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/utilities/model_validate.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/utilities/model_validate_json.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/utilities/model_validator.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/utilities/type_adapter.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/v1_schema.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/v2_schema.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/v2_validated_func.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/pytz.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/schemas/__init__.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/schemas/bases.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/schemas/fields.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/schemas/serializers.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_internal/schemas/validators.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/__init__.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/__init__.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/applications.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/background.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/concurrency.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/datastructures.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/dependencies/__init__.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/dependencies/models.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/dependencies/utils.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/encoders.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/exception_handlers.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/exceptions.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/logger.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/middleware/__init__.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/middleware/asyncexitstack.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/middleware/cors.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/middleware/gzip.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/middleware/httpsredirect.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/middleware/trustedhost.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/middleware/wsgi.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/openapi/__init__.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/openapi/constants.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/openapi/docs.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/openapi/models.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/openapi/utils.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/param_functions.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/params.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/requests.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/responses.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/routing.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/security/__init__.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/security/api_key.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/security/base.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/security/http.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/security/oauth2.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/security/open_id_connect_url.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/security/utils.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/staticfiles.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/templating.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/testclient.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/types.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/utils.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/websockets.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/__init__.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/_compat.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/_exception_handler.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/_utils.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/applications.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/authentication.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/background.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/concurrency.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/config.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/convertors.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/datastructures.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/endpoints.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/exceptions.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/formparsers.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/middleware/__init__.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/middleware/authentication.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/middleware/base.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/middleware/cors.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/middleware/errors.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/middleware/exceptions.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/middleware/gzip.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/middleware/httpsredirect.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/middleware/sessions.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/middleware/trustedhost.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/middleware/wsgi.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/requests.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/responses.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/routing.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/schemas.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/staticfiles.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/status.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/templating.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/testclient.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/types.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/websockets.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/_version.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/agent.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/artifacts.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/automations.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/blocks/__init__.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/blocks/abstract.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/blocks/core.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/blocks/fields.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/blocks/kubernetes.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/blocks/notifications.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/blocks/system.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/blocks/webhook.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/client/__init__.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/client/base.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/client/cloud.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/client/collections.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/client/constants.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/client/orchestration.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/client/schemas/__init__.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/client/schemas/actions.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/client/schemas/filters.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/client/schemas/responses.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/client/schemas/schedules.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/client/schemas/sorting.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/client/subscriptions.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/client/utilities.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/concurrency/__init__.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/concurrency/asyncio.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/concurrency/events.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/concurrency/services.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/concurrency/sync.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/context.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/deployments/__init__.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/deployments/base.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/deployments/runner.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/deployments/schedules.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/deployments/steps/__init__.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/deployments/steps/core.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/deployments/steps/pull.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/deployments/steps/utility.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/deprecated/__init__.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/deprecated/data_documents.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/deprecated/packaging/__init__.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/deprecated/packaging/base.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/deprecated/packaging/docker.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/deprecated/packaging/file.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/deprecated/packaging/orion.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/deprecated/packaging/serializers.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/events/__init__.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/events/actions.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/events/cli/__init__.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/events/cli/automations.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/events/clients.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/events/filters.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/events/instrument.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/events/related.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/events/schemas/__init__.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/events/schemas/automations.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/events/schemas/deployment_triggers.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/events/schemas/events.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/events/schemas/labelling.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/events/utilities.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/events/worker.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/filesystems.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/flow_runs.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/futures.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/infrastructure/__init__.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/infrastructure/base.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/infrastructure/container.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/infrastructure/kubernetes.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/infrastructure/process.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/infrastructure/provisioners/__init__.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/infrastructure/provisioners/cloud_run.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/infrastructure/provisioners/container_instance.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/infrastructure/provisioners/ecs.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/infrastructure/provisioners/modal.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/input/__init__.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/input/actions.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/input/run_input.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/logging/__init__.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/logging/configuration.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/logging/filters.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/logging/formatters.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/logging/handlers.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/logging/highlighters.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/logging/loggers.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/logging/logging.yml +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/manifests.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/new_flow_engine.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/new_task_engine.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/plugins.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/profiles.toml +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/py.typed +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/pydantic/__init__.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/pydantic/main.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/results.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/runner/__init__.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/runner/runner.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/runner/storage.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/runner/submit.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/runner/utils.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/runtime/__init__.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/runtime/deployment.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/runtime/flow_run.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/runtime/task_run.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/serializers.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/server/api/collections_data/views/aggregate-worker-metadata.json +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/server/api/static/prefect-logo-mark-gradient.png +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/settings.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/software/__init__.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/software/base.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/software/conda.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/software/pip.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/software/python.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/states.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/task_engine.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/task_runners.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/task_server.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/types/__init__.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/utilities/__init__.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/utilities/annotations.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/utilities/callables.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/utilities/collections.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/utilities/compat.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/utilities/context.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/utilities/dispatch.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/utilities/dockerutils.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/utilities/engine.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/utilities/filesystem.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/utilities/hashing.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/utilities/importtools.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/utilities/math.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/utilities/names.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/utilities/processutils.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/utilities/pydantic.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/utilities/render_swagger.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/utilities/schema_tools/__init__.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/utilities/schema_tools/hydration.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/utilities/schema_tools/validation.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/utilities/services.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/utilities/slugify.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/utilities/templating.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/utilities/text.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/utilities/timeout.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/utilities/visualization.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/variables.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/workers/__init__.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/workers/base.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/workers/process.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/workers/server.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect/workers/utilities.py +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect_client.egg-info/SOURCES.txt +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect_client.egg-info/dependency_links.txt +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/src/prefect_client.egg-info/top_level.txt +0 -0
- {prefect-client-2.19.7 → prefect-client-2.19.9}/versioneer.py +0 -0
@@ -17,6 +17,7 @@ import pendulum
|
|
17
17
|
|
18
18
|
from prefect._internal.compatibility.deprecated import (
|
19
19
|
DeprecatedInfraOverridesField,
|
20
|
+
deprecated_class,
|
20
21
|
)
|
21
22
|
from prefect._internal.pydantic import HAS_PYDANTIC_V2
|
22
23
|
from prefect.types import NonNegativeInteger, PositiveInteger
|
@@ -917,6 +918,10 @@ class Flow(ObjectBaseModel):
|
|
917
918
|
return raise_on_name_with_banned_characters(v)
|
918
919
|
|
919
920
|
|
921
|
+
@deprecated_class(
|
922
|
+
start_date="Jun 2024",
|
923
|
+
help="Will be removed in Prefect 3 in favor of prefect.client.schemas.actions.DeploymentScheduleCreate",
|
924
|
+
)
|
920
925
|
class MinimalDeploymentSchedule(PrefectBaseModel):
|
921
926
|
schedule: SCHEDULE_TYPES = Field(
|
922
927
|
default=..., description="The schedule for the deployment."
|
@@ -238,12 +238,17 @@ async def run_deployment(
|
|
238
238
|
return flow_run
|
239
239
|
|
240
240
|
|
241
|
+
@deprecated_callable(
|
242
|
+
start_date="Jun 2024",
|
243
|
+
help="Will be moved in Prefect 3 to prefect.flows:load_flow_from_flow_run",
|
244
|
+
)
|
241
245
|
@inject_client
|
242
246
|
async def load_flow_from_flow_run(
|
243
247
|
flow_run: FlowRun,
|
244
248
|
client: PrefectClient,
|
245
249
|
ignore_storage: bool = False,
|
246
250
|
storage_base_path: Optional[str] = None,
|
251
|
+
use_placeholder_flow: bool = True,
|
247
252
|
) -> Flow:
|
248
253
|
"""
|
249
254
|
Load a flow from the location/script provided in a deployment's storage document.
|
@@ -270,7 +275,7 @@ async def load_flow_from_flow_run(
|
|
270
275
|
f"Importing flow code from module path {deployment.entrypoint}"
|
271
276
|
)
|
272
277
|
flow = await run_sync_in_worker_thread(
|
273
|
-
load_flow_from_entrypoint, deployment.entrypoint
|
278
|
+
load_flow_from_entrypoint, deployment.entrypoint, use_placeholder_flow
|
274
279
|
)
|
275
280
|
return flow
|
276
281
|
|
@@ -314,7 +319,9 @@ async def load_flow_from_flow_run(
|
|
314
319
|
).absolute()
|
315
320
|
run_logger.debug(f"Importing flow code from '{import_path}'")
|
316
321
|
|
317
|
-
flow = await run_sync_in_worker_thread(
|
322
|
+
flow = await run_sync_in_worker_thread(
|
323
|
+
load_flow_from_entrypoint, str(import_path), use_placeholder_flow
|
324
|
+
)
|
318
325
|
|
319
326
|
return flow
|
320
327
|
|
@@ -113,7 +113,10 @@ from typing_extensions import Literal
|
|
113
113
|
import prefect
|
114
114
|
import prefect.context
|
115
115
|
import prefect.plugins
|
116
|
-
from prefect._internal.compatibility.deprecated import
|
116
|
+
from prefect._internal.compatibility.deprecated import (
|
117
|
+
deprecated_callable,
|
118
|
+
deprecated_parameter,
|
119
|
+
)
|
117
120
|
from prefect._internal.compatibility.experimental import experimental_parameter
|
118
121
|
from prefect._internal.concurrency.api import create_call, from_async, from_sync
|
119
122
|
from prefect._internal.concurrency.calls import get_current_call
|
@@ -417,9 +420,12 @@ async def retrieve_flow_then_begin_flow_run(
|
|
417
420
|
|
418
421
|
try:
|
419
422
|
flow = (
|
420
|
-
|
423
|
+
# We do not want to use a placeholder flow at runtime
|
424
|
+
load_flow_from_entrypoint(entrypoint, use_placeholder_flow=False)
|
421
425
|
if entrypoint
|
422
|
-
else await load_flow_from_flow_run(
|
426
|
+
else await load_flow_from_flow_run(
|
427
|
+
flow_run, client=client, use_placeholder_flow=False
|
428
|
+
)
|
423
429
|
)
|
424
430
|
except Exception:
|
425
431
|
message = (
|
@@ -975,6 +981,10 @@ async def orchestrate_flow_run(
|
|
975
981
|
return state
|
976
982
|
|
977
983
|
|
984
|
+
@deprecated_callable(
|
985
|
+
start_date="Jun 2024",
|
986
|
+
help="Will be moved in Prefect 3 to prefect.flow_runs:pause_flow_run",
|
987
|
+
)
|
978
988
|
@overload
|
979
989
|
async def pause_flow_run(
|
980
990
|
wait_for_input: None = None,
|
@@ -987,6 +997,10 @@ async def pause_flow_run(
|
|
987
997
|
...
|
988
998
|
|
989
999
|
|
1000
|
+
@deprecated_callable(
|
1001
|
+
start_date="Jun 2024",
|
1002
|
+
help="Will be moved in Prefect 3 to prefect.flow_runs:pause_flow_run",
|
1003
|
+
)
|
990
1004
|
@overload
|
991
1005
|
async def pause_flow_run(
|
992
1006
|
wait_for_input: Type[T],
|
@@ -1095,6 +1109,10 @@ async def pause_flow_run(
|
|
1095
1109
|
)
|
1096
1110
|
|
1097
1111
|
|
1112
|
+
@deprecated_callable(
|
1113
|
+
start_date="Jun 2024",
|
1114
|
+
help="Will be moved in Prefect 3 to prefect.flow_runs:_in_process_pause",
|
1115
|
+
)
|
1098
1116
|
@inject_client
|
1099
1117
|
async def _in_process_pause(
|
1100
1118
|
timeout: int = 3600,
|
@@ -1190,6 +1208,10 @@ async def _in_process_pause(
|
|
1190
1208
|
raise FlowPauseTimeout("Flow run was paused and never resumed.")
|
1191
1209
|
|
1192
1210
|
|
1211
|
+
@deprecated_callable(
|
1212
|
+
start_date="Jun 2024",
|
1213
|
+
help="Will be moved in Prefect 3 to prefect.flow_runs.pause_flow_run.",
|
1214
|
+
)
|
1193
1215
|
@inject_client
|
1194
1216
|
async def _out_of_process_pause(
|
1195
1217
|
flow_run_id: UUID,
|
@@ -1212,6 +1234,10 @@ async def _out_of_process_pause(
|
|
1212
1234
|
raise RuntimeError(response.details.reason)
|
1213
1235
|
|
1214
1236
|
|
1237
|
+
@deprecated_callable(
|
1238
|
+
start_date="Jun 2024",
|
1239
|
+
help="Will be moved in Prefect 3 to prefect.flow_runs:suspend_flow_run",
|
1240
|
+
)
|
1215
1241
|
@overload
|
1216
1242
|
async def suspend_flow_run(
|
1217
1243
|
wait_for_input: None = None,
|
@@ -1343,6 +1369,10 @@ async def suspend_flow_run(
|
|
1343
1369
|
raise Pause()
|
1344
1370
|
|
1345
1371
|
|
1372
|
+
@deprecated_callable(
|
1373
|
+
start_date="Jun 2024",
|
1374
|
+
help="Will be moved in Prefect 3 to prefect.flow_runs:resume_flow_run",
|
1375
|
+
)
|
1346
1376
|
@sync_compatible
|
1347
1377
|
async def resume_flow_run(flow_run_id, run_input: Optional[Dict] = None):
|
1348
1378
|
"""
|
@@ -1375,6 +1405,7 @@ def enter_task_run_engine(
|
|
1375
1405
|
return_type: EngineReturnType,
|
1376
1406
|
task_runner: Optional[BaseTaskRunner],
|
1377
1407
|
mapped: bool,
|
1408
|
+
entering_from_task_run: Optional[bool] = False,
|
1378
1409
|
) -> Union[PrefectFuture, Awaitable[PrefectFuture], TaskRun]:
|
1379
1410
|
"""Sync entrypoint for task calls"""
|
1380
1411
|
|
@@ -1402,14 +1433,20 @@ def enter_task_run_engine(
|
|
1402
1433
|
if flow_run_context.timeout_scope and flow_run_context.timeout_scope.cancel_called:
|
1403
1434
|
raise TimeoutError("Flow run timed out")
|
1404
1435
|
|
1436
|
+
call_arguments = {
|
1437
|
+
"task": task,
|
1438
|
+
"flow_run_context": flow_run_context,
|
1439
|
+
"parameters": parameters,
|
1440
|
+
"wait_for": wait_for,
|
1441
|
+
"return_type": return_type,
|
1442
|
+
"task_runner": task_runner,
|
1443
|
+
}
|
1444
|
+
|
1445
|
+
if not mapped:
|
1446
|
+
call_arguments["entering_from_task_run"] = entering_from_task_run
|
1447
|
+
|
1405
1448
|
begin_run = create_call(
|
1406
|
-
begin_task_map if mapped else get_task_call_return_value,
|
1407
|
-
task=task,
|
1408
|
-
flow_run_context=flow_run_context,
|
1409
|
-
parameters=parameters,
|
1410
|
-
wait_for=wait_for,
|
1411
|
-
return_type=return_type,
|
1412
|
-
task_runner=task_runner,
|
1449
|
+
begin_task_map if mapped else get_task_call_return_value, **call_arguments
|
1413
1450
|
)
|
1414
1451
|
|
1415
1452
|
if task.isasync and (
|
@@ -1536,6 +1573,7 @@ async def get_task_call_return_value(
|
|
1536
1573
|
return_type: EngineReturnType,
|
1537
1574
|
task_runner: Optional[BaseTaskRunner],
|
1538
1575
|
extra_task_inputs: Optional[Dict[str, Set[TaskRunInput]]] = None,
|
1576
|
+
entering_from_task_run: Optional[bool] = False,
|
1539
1577
|
):
|
1540
1578
|
extra_task_inputs = extra_task_inputs or {}
|
1541
1579
|
|
@@ -1546,6 +1584,7 @@ async def get_task_call_return_value(
|
|
1546
1584
|
wait_for=wait_for,
|
1547
1585
|
task_runner=task_runner,
|
1548
1586
|
extra_task_inputs=extra_task_inputs,
|
1587
|
+
entering_from_task_run=entering_from_task_run,
|
1549
1588
|
)
|
1550
1589
|
if return_type == "future":
|
1551
1590
|
return future
|
@@ -1564,12 +1603,14 @@ async def create_task_run_future(
|
|
1564
1603
|
wait_for: Optional[Iterable[PrefectFuture]],
|
1565
1604
|
task_runner: Optional[BaseTaskRunner],
|
1566
1605
|
extra_task_inputs: Dict[str, Set[TaskRunInput]],
|
1606
|
+
entering_from_task_run: Optional[bool] = False,
|
1567
1607
|
) -> PrefectFuture:
|
1568
1608
|
# Default to the flow run's task runner
|
1569
1609
|
task_runner = task_runner or flow_run_context.task_runner
|
1570
1610
|
|
1571
1611
|
# Generate a name for the future
|
1572
1612
|
dynamic_key = _dynamic_key_for_task_run(flow_run_context, task)
|
1613
|
+
|
1573
1614
|
task_run_name = (
|
1574
1615
|
f"{task.name}-{dynamic_key}"
|
1575
1616
|
if flow_run_context and flow_run_context.flow_run
|
@@ -1604,8 +1645,9 @@ async def create_task_run_future(
|
|
1604
1645
|
)
|
1605
1646
|
)
|
1606
1647
|
|
1607
|
-
|
1608
|
-
|
1648
|
+
if not entering_from_task_run:
|
1649
|
+
# Track the task run future in the flow run context
|
1650
|
+
flow_run_context.task_run_futures.append(future)
|
1609
1651
|
|
1610
1652
|
if task_runner.concurrency_type == TaskConcurrencyType.SEQUENTIAL:
|
1611
1653
|
await future._wait()
|
@@ -178,7 +178,10 @@ class ParameterTypeError(PrefectException):
|
|
178
178
|
|
179
179
|
@classmethod
|
180
180
|
def from_validation_error(cls, exc: ValidationError) -> Self:
|
181
|
-
bad_params = [
|
181
|
+
bad_params = [
|
182
|
+
f'{".".join(str(item) for item in err["loc"])}: {err["msg"]}'
|
183
|
+
for err in exc.errors()
|
184
|
+
]
|
182
185
|
msg = "Flow run received invalid parameters:\n - " + "\n - ".join(bad_params)
|
183
186
|
return cls(msg)
|
184
187
|
|
@@ -28,6 +28,8 @@ from typing import (
|
|
28
28
|
List,
|
29
29
|
NoReturn,
|
30
30
|
Optional,
|
31
|
+
Set,
|
32
|
+
Tuple,
|
31
33
|
Type,
|
32
34
|
TypeVar,
|
33
35
|
Union,
|
@@ -75,6 +77,7 @@ from prefect.exceptions import (
|
|
75
77
|
MissingFlowError,
|
76
78
|
ObjectNotFound,
|
77
79
|
ParameterTypeError,
|
80
|
+
ScriptError,
|
78
81
|
UnspecifiedFlowError,
|
79
82
|
)
|
80
83
|
from prefect.filesystems import ReadableDeploymentStorage
|
@@ -1647,6 +1650,7 @@ def load_flow_from_script(path: str, flow_name: str = None) -> Flow:
|
|
1647
1650
|
|
1648
1651
|
def load_flow_from_entrypoint(
|
1649
1652
|
entrypoint: str,
|
1653
|
+
use_placeholder_flow: bool = True,
|
1650
1654
|
) -> Flow:
|
1651
1655
|
"""
|
1652
1656
|
Extract a flow object from a script at an entrypoint by running all of the code in the file.
|
@@ -1654,6 +1658,9 @@ def load_flow_from_entrypoint(
|
|
1654
1658
|
Args:
|
1655
1659
|
entrypoint: a string in the format `<path_to_script>:<flow_func_name>` or a module path
|
1656
1660
|
to a flow function
|
1661
|
+
use_placeholder_flow: If True, a placeholder flow will be used if the entrypoint
|
1662
|
+
cannot be loaded for any reason (e.g. dependencies are missing). If False, an
|
1663
|
+
exception will be raised.
|
1657
1664
|
|
1658
1665
|
Returns:
|
1659
1666
|
The flow object from the script
|
@@ -1677,6 +1684,17 @@ def load_flow_from_entrypoint(
|
|
1677
1684
|
raise MissingFlowError(
|
1678
1685
|
f"Flow function with name {func_name!r} not found in {path!r}. "
|
1679
1686
|
) from exc
|
1687
|
+
except ScriptError as exc:
|
1688
|
+
# If the flow has dependencies that are not installed in the current
|
1689
|
+
# environment, fallback to loading the flow via AST parsing. The
|
1690
|
+
# drawback of this approach is that we're unable to actually load the
|
1691
|
+
# function, so we create a placeholder flow that will re-raise this
|
1692
|
+
# exception when called.
|
1693
|
+
|
1694
|
+
if use_placeholder_flow:
|
1695
|
+
flow = load_placeholder_flow(entrypoint=entrypoint, raises=exc)
|
1696
|
+
else:
|
1697
|
+
raise
|
1680
1698
|
|
1681
1699
|
if not isinstance(flow, Flow):
|
1682
1700
|
raise MissingFlowError(
|
@@ -1802,24 +1820,138 @@ async def serve(
|
|
1802
1820
|
await runner.start()
|
1803
1821
|
|
1804
1822
|
|
1805
|
-
def
|
1806
|
-
entrypoint: str, arg: str = "name"
|
1807
|
-
) -> Optional[str]:
|
1823
|
+
def load_placeholder_flow(entrypoint: str, raises: Exception):
|
1808
1824
|
"""
|
1809
|
-
|
1825
|
+
Load a placeholder flow that is initialized with the same arguments as the
|
1826
|
+
flow specified in the entrypoint. If called the flow will raise `raises`.
|
1810
1827
|
|
1811
|
-
|
1812
|
-
|
1828
|
+
This is useful when a flow can't be loaded due to missing dependencies or
|
1829
|
+
other issues but the base metadata defining the flow is still needed.
|
1813
1830
|
|
1814
1831
|
Args:
|
1815
|
-
entrypoint: a string in the format `<path_to_script>:<flow_func_name>`
|
1816
|
-
|
1832
|
+
entrypoint: a string in the format `<path_to_script>:<flow_func_name>`
|
1833
|
+
or a module path to a flow function
|
1834
|
+
raises: an exception to raise when the flow is called
|
1835
|
+
"""
|
1836
|
+
|
1837
|
+
def _base_placeholder():
|
1838
|
+
raise raises
|
1839
|
+
|
1840
|
+
def sync_placeholder_flow(*args, **kwargs):
|
1841
|
+
_base_placeholder()
|
1842
|
+
|
1843
|
+
async def async_placeholder_flow(*args, **kwargs):
|
1844
|
+
_base_placeholder()
|
1845
|
+
|
1846
|
+
placeholder_flow = (
|
1847
|
+
async_placeholder_flow
|
1848
|
+
if is_entrypoint_async(entrypoint)
|
1849
|
+
else sync_placeholder_flow
|
1850
|
+
)
|
1851
|
+
|
1852
|
+
arguments = load_flow_arguments_from_entrypoint(entrypoint)
|
1853
|
+
arguments["fn"] = placeholder_flow
|
1854
|
+
|
1855
|
+
return Flow(**arguments)
|
1856
|
+
|
1857
|
+
|
1858
|
+
def load_flow_arguments_from_entrypoint(
|
1859
|
+
entrypoint: str, arguments: Optional[Union[List[str], Set[str]]] = None
|
1860
|
+
) -> Dict[str, Any]:
|
1861
|
+
"""
|
1862
|
+
Extract flow arguments from an entrypoint string.
|
1863
|
+
|
1864
|
+
Loads the source code of the entrypoint and extracts the flow arguments
|
1865
|
+
from the `flow` decorator.
|
1866
|
+
|
1867
|
+
Args:
|
1868
|
+
entrypoint: a string in the format `<path_to_script>:<flow_func_name>`
|
1869
|
+
or a module path to a flow function
|
1870
|
+
"""
|
1871
|
+
|
1872
|
+
func_def, source_code = _entrypoint_definition_and_source(entrypoint)
|
1873
|
+
|
1874
|
+
if arguments is None:
|
1875
|
+
# If no arguments are provided default to known arguments that are of
|
1876
|
+
# built-in types.
|
1877
|
+
arguments = {
|
1878
|
+
"name",
|
1879
|
+
"version",
|
1880
|
+
"retries",
|
1881
|
+
"retry_delay_seconds",
|
1882
|
+
"description",
|
1883
|
+
"timeout_seconds",
|
1884
|
+
"validate_parameters",
|
1885
|
+
"persist_result",
|
1886
|
+
"cache_result_in_memory",
|
1887
|
+
"log_prints",
|
1888
|
+
}
|
1889
|
+
|
1890
|
+
result = {}
|
1891
|
+
|
1892
|
+
for decorator in func_def.decorator_list:
|
1893
|
+
if (
|
1894
|
+
isinstance(decorator, ast.Call)
|
1895
|
+
and getattr(decorator.func, "id", "") == "flow"
|
1896
|
+
):
|
1897
|
+
for keyword in decorator.keywords:
|
1898
|
+
if keyword.arg not in arguments:
|
1899
|
+
continue
|
1900
|
+
|
1901
|
+
if isinstance(keyword.value, ast.Constant):
|
1902
|
+
# Use the string value of the argument
|
1903
|
+
result[keyword.arg] = str(keyword.value.value)
|
1904
|
+
continue
|
1905
|
+
|
1906
|
+
# if the arg value is not a raw str (i.e. a variable or expression),
|
1907
|
+
# then attempt to evaluate it
|
1908
|
+
namespace = safe_load_namespace(source_code)
|
1909
|
+
literal_arg_value = ast.get_source_segment(source_code, keyword.value)
|
1910
|
+
cleaned_value = (
|
1911
|
+
literal_arg_value.replace("\n", "") if literal_arg_value else ""
|
1912
|
+
)
|
1913
|
+
|
1914
|
+
try:
|
1915
|
+
evaluated_value = eval(cleaned_value, namespace) # type: ignore
|
1916
|
+
result[keyword.arg] = str(evaluated_value)
|
1917
|
+
except Exception as e:
|
1918
|
+
logger.info(
|
1919
|
+
"Failed to parse @flow argument: `%s=%s` due to the following error. Ignoring and falling back to default behavior.",
|
1920
|
+
keyword.arg,
|
1921
|
+
literal_arg_value,
|
1922
|
+
exc_info=e,
|
1923
|
+
)
|
1924
|
+
# ignore the decorator arg and fallback to default behavior
|
1925
|
+
continue
|
1926
|
+
|
1927
|
+
if "name" in arguments and "name" not in result:
|
1928
|
+
# If no matching decorator or keyword argument for `name' is found
|
1929
|
+
# fallback to the function name.
|
1930
|
+
result["name"] = func_def.name.replace("_", "-")
|
1931
|
+
|
1932
|
+
return result
|
1933
|
+
|
1934
|
+
|
1935
|
+
def is_entrypoint_async(entrypoint: str) -> bool:
|
1936
|
+
"""
|
1937
|
+
Determine if the function specified in the entrypoint is asynchronous.
|
1938
|
+
|
1939
|
+
Args:
|
1940
|
+
entrypoint: A string in the format `<path_to_script>:<func_name>` or
|
1941
|
+
a module path to a function.
|
1817
1942
|
|
1818
1943
|
Returns:
|
1819
|
-
|
1944
|
+
True if the function is asynchronous, False otherwise.
|
1820
1945
|
"""
|
1946
|
+
func_def, _ = _entrypoint_definition_and_source(entrypoint)
|
1947
|
+
return isinstance(func_def, ast.AsyncFunctionDef)
|
1948
|
+
|
1949
|
+
|
1950
|
+
def _entrypoint_definition_and_source(
|
1951
|
+
entrypoint: str,
|
1952
|
+
) -> Tuple[Union[ast.FunctionDef, ast.AsyncFunctionDef], str]:
|
1821
1953
|
if ":" in entrypoint:
|
1822
|
-
#
|
1954
|
+
# Split by the last colon once to handle Windows paths with drive letters i.e C:\path\to\file.py:do_stuff
|
1823
1955
|
path, func_name = entrypoint.rsplit(":", maxsplit=1)
|
1824
1956
|
source_code = Path(path).read_text()
|
1825
1957
|
else:
|
@@ -1828,6 +1960,7 @@ def load_flow_argument_from_entrypoint(
|
|
1828
1960
|
if not spec or not spec.origin:
|
1829
1961
|
raise ValueError(f"Could not find module {path!r}")
|
1830
1962
|
source_code = Path(spec.origin).read_text()
|
1963
|
+
|
1831
1964
|
parsed_code = ast.parse(source_code)
|
1832
1965
|
func_def = next(
|
1833
1966
|
(
|
@@ -1844,42 +1977,8 @@ def load_flow_argument_from_entrypoint(
|
|
1844
1977
|
),
|
1845
1978
|
None,
|
1846
1979
|
)
|
1980
|
+
|
1847
1981
|
if not func_def:
|
1848
1982
|
raise ValueError(f"Could not find flow {func_name!r} in {path!r}")
|
1849
|
-
for decorator in func_def.decorator_list:
|
1850
|
-
if (
|
1851
|
-
isinstance(decorator, ast.Call)
|
1852
|
-
and getattr(decorator.func, "id", "") == "flow"
|
1853
|
-
):
|
1854
|
-
for keyword in decorator.keywords:
|
1855
|
-
if keyword.arg == arg:
|
1856
|
-
if isinstance(keyword.value, ast.Constant):
|
1857
|
-
return (
|
1858
|
-
keyword.value.value
|
1859
|
-
) # Return the string value of the argument
|
1860
|
-
|
1861
|
-
# if the arg value is not a raw str (i.e. a variable or expression),
|
1862
|
-
# then attempt to evaluate it
|
1863
|
-
namespace = safe_load_namespace(source_code)
|
1864
|
-
literal_arg_value = ast.get_source_segment(
|
1865
|
-
source_code, keyword.value
|
1866
|
-
)
|
1867
|
-
try:
|
1868
|
-
evaluated_value = eval(literal_arg_value, namespace) # type: ignore
|
1869
|
-
except Exception as e:
|
1870
|
-
logger.info(
|
1871
|
-
"Failed to parse @flow argument: `%s=%s` due to the following error. Ignoring and falling back to default behavior.",
|
1872
|
-
arg,
|
1873
|
-
literal_arg_value,
|
1874
|
-
exc_info=e,
|
1875
|
-
)
|
1876
|
-
# ignore the decorator arg and fallback to default behavior
|
1877
|
-
break
|
1878
|
-
return str(evaluated_value)
|
1879
|
-
|
1880
|
-
if arg == "name":
|
1881
|
-
return func_name.replace(
|
1882
|
-
"_", "-"
|
1883
|
-
) # If no matching decorator or keyword argument is found
|
1884
1983
|
|
1885
|
-
return
|
1984
|
+
return func_def, source_code
|
@@ -202,7 +202,7 @@ def _build_generic_endpoint_for_flows(
|
|
202
202
|
|
203
203
|
try:
|
204
204
|
flow = load_flow_from_entrypoint(body.entrypoint)
|
205
|
-
except (MissingFlowError, ScriptError, ModuleNotFoundError):
|
205
|
+
except (FileNotFoundError, MissingFlowError, ScriptError, ModuleNotFoundError):
|
206
206
|
return JSONResponse(
|
207
207
|
status_code=status.HTTP_404_NOT_FOUND,
|
208
208
|
content={"message": "Flow not found"},
|
@@ -6,7 +6,6 @@ Module containing the base workflow task class and decorator - for most use case
|
|
6
6
|
|
7
7
|
import datetime
|
8
8
|
import inspect
|
9
|
-
import os
|
10
9
|
from copy import copy
|
11
10
|
from functools import partial, update_wrapper
|
12
11
|
from typing import (
|
@@ -76,6 +75,8 @@ P = ParamSpec("P") # The parameters of the task
|
|
76
75
|
|
77
76
|
logger = get_logger("tasks")
|
78
77
|
|
78
|
+
NUM_CHARS_DYNAMIC_KEY: int = 8
|
79
|
+
|
79
80
|
|
80
81
|
def task_input_hash(
|
81
82
|
context: "TaskRunContext", arguments: Dict[str, Any]
|
@@ -125,6 +126,28 @@ def exponential_backoff(backoff_factor: float) -> Callable[[int], List[float]]:
|
|
125
126
|
return retry_backoff_callable
|
126
127
|
|
127
128
|
|
129
|
+
def _generate_task_key(fn: Callable[..., Any]) -> str:
|
130
|
+
"""Generate a task key based on the function name and source code.
|
131
|
+
We may eventually want some sort of top-level namespace here to
|
132
|
+
disambiguate tasks with the same function name in different modules,
|
133
|
+
in a more human-readable way, while avoiding relative import problems (see #12337).
|
134
|
+
As long as the task implementations are unique (even if named the same), we should
|
135
|
+
not have any collisions.
|
136
|
+
Args:
|
137
|
+
fn: The function to generate a task key for.
|
138
|
+
"""
|
139
|
+
if not hasattr(fn, "__qualname__"):
|
140
|
+
return to_qualified_name(type(fn))
|
141
|
+
|
142
|
+
qualname = fn.__qualname__.split(".")[-1]
|
143
|
+
|
144
|
+
code_hash = (
|
145
|
+
h[:NUM_CHARS_DYNAMIC_KEY] if (h := hash_objects(fn.__code__)) else "unknown"
|
146
|
+
)
|
147
|
+
|
148
|
+
return f"{qualname}-{code_hash}"
|
149
|
+
|
150
|
+
|
128
151
|
@PrefectObjectRegistry.register_instances
|
129
152
|
class Task(Generic[P, R]):
|
130
153
|
"""
|
@@ -292,17 +315,7 @@ class Task(Generic[P, R]):
|
|
292
315
|
|
293
316
|
self.tags = set(tags if tags else [])
|
294
317
|
|
295
|
-
|
296
|
-
self.task_key = to_qualified_name(type(self.fn))
|
297
|
-
else:
|
298
|
-
try:
|
299
|
-
task_origin_hash = hash_objects(
|
300
|
-
self.name, os.path.abspath(inspect.getsourcefile(self.fn))
|
301
|
-
)
|
302
|
-
except TypeError:
|
303
|
-
task_origin_hash = "unknown-source-file"
|
304
|
-
|
305
|
-
self.task_key = f"{self.fn.__qualname__}-{task_origin_hash}"
|
318
|
+
self.task_key = _generate_task_key(self.fn)
|
306
319
|
|
307
320
|
self.cache_key_fn = cache_key_fn
|
308
321
|
self.cache_expiration = cache_expiration
|
@@ -685,6 +698,7 @@ class Task(Generic[P, R]):
|
|
685
698
|
return_type=return_type,
|
686
699
|
client=get_client(),
|
687
700
|
)
|
701
|
+
entering_from_task_run = bool(TaskRunContext.get())
|
688
702
|
|
689
703
|
return enter_task_run_engine(
|
690
704
|
self,
|
@@ -693,6 +707,7 @@ class Task(Generic[P, R]):
|
|
693
707
|
task_runner=SequentialTaskRunner(),
|
694
708
|
return_type=return_type,
|
695
709
|
mapped=False,
|
710
|
+
entering_from_task_run=entering_from_task_run,
|
696
711
|
)
|
697
712
|
|
698
713
|
@overload
|
@@ -261,14 +261,14 @@ def sync_compatible(async_fn: T) -> T:
|
|
261
261
|
"""
|
262
262
|
|
263
263
|
@wraps(async_fn)
|
264
|
-
def coroutine_wrapper(*args, **kwargs):
|
264
|
+
def coroutine_wrapper(*args, _sync: Optional[bool] = None, **kwargs):
|
265
265
|
from prefect._internal.concurrency.api import create_call, from_sync
|
266
266
|
from prefect._internal.concurrency.calls import get_current_call, logger
|
267
267
|
from prefect._internal.concurrency.event_loop import get_running_loop
|
268
268
|
from prefect._internal.concurrency.threads import get_global_loop
|
269
269
|
from prefect.settings import PREFECT_EXPERIMENTAL_DISABLE_SYNC_COMPAT
|
270
270
|
|
271
|
-
if PREFECT_EXPERIMENTAL_DISABLE_SYNC_COMPAT:
|
271
|
+
if PREFECT_EXPERIMENTAL_DISABLE_SYNC_COMPAT or _sync is False:
|
272
272
|
return async_fn(*args, **kwargs)
|
273
273
|
|
274
274
|
global_thread_portal = get_global_loop()
|
@@ -276,12 +276,17 @@ def sync_compatible(async_fn: T) -> T:
|
|
276
276
|
current_call = get_current_call()
|
277
277
|
current_loop = get_running_loop()
|
278
278
|
|
279
|
-
if
|
279
|
+
if (
|
280
|
+
current_thread.ident == global_thread_portal.thread.ident
|
281
|
+
and _sync is not True
|
282
|
+
):
|
280
283
|
logger.debug(f"{async_fn} --> return coroutine for internal await")
|
281
284
|
# In the prefect async context; return the coro for us to await
|
282
285
|
return async_fn(*args, **kwargs)
|
283
|
-
elif
|
284
|
-
|
286
|
+
elif (
|
287
|
+
in_async_main_thread()
|
288
|
+
and (not current_call or is_async_fn(current_call.fn))
|
289
|
+
and _sync is not True
|
285
290
|
):
|
286
291
|
# In the main async context; return the coro for them to await
|
287
292
|
logger.debug(f"{async_fn} --> return coroutine for user await")
|