prefect-client 3.2.11__tar.gz → 3.2.13__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-3.2.11 → prefect_client-3.2.13}/.gitignore +4 -2
- {prefect_client-3.2.11 → prefect_client-3.2.13}/PKG-INFO +1 -1
- prefect_client-3.2.13/src/prefect/_build_info.py +5 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/client/schemas/actions.py +2 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/deployments/runner.py +25 -4
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/flows.py +7 -8
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/logging/loggers.py +5 -4
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/server/api/flow_runs.py +2 -2
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/server/api/server.py +17 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/task_engine.py +27 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/tasks.py +2 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/telemetry/run_telemetry.py +11 -3
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/utilities/annotations.py +43 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/workers/base.py +184 -103
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/workers/process.py +7 -6
- prefect_client-3.2.11/src/prefect/_build_info.py +0 -5
- {prefect_client-3.2.11 → prefect_client-3.2.13}/LICENSE +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/README.md +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/pyproject.toml +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/.prefectignore +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/__main__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/_experimental/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/_experimental/bundles.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/_experimental/lineage.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/_experimental/sla/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/_experimental/sla/client.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/_experimental/sla/objects.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/_internal/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/_internal/_logging.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/_internal/compatibility/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/_internal/compatibility/async_dispatch.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/_internal/compatibility/deprecated.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/_internal/compatibility/migration.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/_internal/concurrency/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/_internal/concurrency/api.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/_internal/concurrency/calls.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/_internal/concurrency/cancellation.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/_internal/concurrency/event_loop.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/_internal/concurrency/inspection.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/_internal/concurrency/primitives.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/_internal/concurrency/services.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/_internal/concurrency/threads.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/_internal/concurrency/waiters.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/_internal/integrations.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/_internal/pydantic/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/_internal/pydantic/annotations/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/_internal/pydantic/annotations/pendulum.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/_internal/pydantic/schemas.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/_internal/pydantic/v1_schema.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/_internal/pydantic/v2_schema.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/_internal/pydantic/v2_validated_func.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/_internal/pytz.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/_internal/retries.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/_internal/schemas/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/_internal/schemas/bases.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/_internal/schemas/fields.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/_internal/schemas/serializers.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/_internal/schemas/validators.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/_result_records.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/_vendor/croniter/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/_vendor/croniter/croniter.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/_waiters.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/agent.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/artifacts.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/automations.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/blocks/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/blocks/abstract.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/blocks/core.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/blocks/fields.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/blocks/notifications.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/blocks/redis.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/blocks/system.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/blocks/webhook.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/cache_policies.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/client/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/client/base.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/client/cloud.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/client/collections.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/client/constants.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/client/orchestration/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/client/orchestration/_artifacts/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/client/orchestration/_artifacts/client.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/client/orchestration/_automations/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/client/orchestration/_automations/client.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/client/orchestration/_blocks_documents/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/client/orchestration/_blocks_documents/client.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/client/orchestration/_blocks_schemas/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/client/orchestration/_blocks_schemas/client.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/client/orchestration/_blocks_types/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/client/orchestration/_blocks_types/client.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/client/orchestration/_concurrency_limits/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/client/orchestration/_concurrency_limits/client.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/client/orchestration/_deployments/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/client/orchestration/_deployments/client.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/client/orchestration/_flow_runs/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/client/orchestration/_flow_runs/client.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/client/orchestration/_flows/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/client/orchestration/_flows/client.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/client/orchestration/_logs/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/client/orchestration/_logs/client.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/client/orchestration/_variables/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/client/orchestration/_variables/client.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/client/orchestration/_work_pools/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/client/orchestration/_work_pools/client.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/client/orchestration/base.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/client/orchestration/routes.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/client/schemas/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/client/schemas/filters.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/client/schemas/objects.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/client/schemas/responses.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/client/schemas/schedules.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/client/schemas/sorting.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/client/subscriptions.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/client/types/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/client/types/flexible_schedule_list.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/client/utilities.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/concurrency/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/concurrency/_asyncio.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/concurrency/_events.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/concurrency/asyncio.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/concurrency/context.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/concurrency/services.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/concurrency/sync.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/concurrency/v1/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/concurrency/v1/_asyncio.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/concurrency/v1/_events.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/concurrency/v1/asyncio.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/concurrency/v1/context.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/concurrency/v1/services.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/concurrency/v1/sync.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/context.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/deployments/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/deployments/base.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/deployments/deployments.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/deployments/flow_runs.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/deployments/schedules.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/deployments/steps/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/deployments/steps/core.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/deployments/steps/pull.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/deployments/steps/utility.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/docker/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/docker/docker_image.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/engine.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/events/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/events/actions.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/events/cli/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/events/cli/automations.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/events/clients.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/events/filters.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/events/related.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/events/schemas/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/events/schemas/automations.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/events/schemas/deployment_triggers.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/events/schemas/events.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/events/schemas/labelling.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/events/utilities.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/events/worker.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/exceptions.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/filesystems.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/flow_engine.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/flow_runs.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/futures.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/infrastructure/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/infrastructure/base.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/infrastructure/provisioners/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/infrastructure/provisioners/cloud_run.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/infrastructure/provisioners/coiled.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/infrastructure/provisioners/container_instance.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/infrastructure/provisioners/ecs.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/infrastructure/provisioners/modal.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/input/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/input/actions.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/input/run_input.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/locking/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/locking/filesystem.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/locking/memory.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/locking/protocol.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/logging/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/logging/configuration.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/logging/filters.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/logging/formatters.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/logging/handlers.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/logging/highlighters.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/logging/logging.yml +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/main.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/plugins.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/py.typed +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/results.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/runner/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/runner/runner.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/runner/server.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/runner/storage.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/runner/submit.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/runner/utils.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/runtime/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/runtime/deployment.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/runtime/flow_run.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/runtime/task_run.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/schedules.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/serializers.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/server/api/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/server/api/admin.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/server/api/artifacts.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/server/api/automations.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/server/api/block_capabilities.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/server/api/block_documents.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/server/api/block_schemas.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/server/api/block_types.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/server/api/clients.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/server/api/collections.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/server/api/collections_data/views/aggregate-worker-metadata.json +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/server/api/concurrency_limits.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/server/api/concurrency_limits_v2.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/server/api/csrf_token.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/server/api/dependencies.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/server/api/deployments.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/server/api/events.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/server/api/flow_run_notification_policies.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/server/api/flow_run_states.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/server/api/flows.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/server/api/logs.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/server/api/middleware.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/server/api/root.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/server/api/run_history.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/server/api/saved_searches.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/server/api/static/prefect-logo-mark-gradient.png +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/server/api/task_run_states.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/server/api/task_runs.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/server/api/task_workers.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/server/api/templates.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/server/api/ui/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/server/api/ui/flow_runs.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/server/api/ui/flows.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/server/api/ui/schemas.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/server/api/ui/task_runs.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/server/api/validation.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/server/api/variables.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/server/api/work_queues.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/server/api/workers.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/settings/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/settings/base.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/settings/constants.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/settings/context.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/settings/legacy.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/settings/models/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/settings/models/api.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/settings/models/cli.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/settings/models/client.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/settings/models/cloud.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/settings/models/deployments.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/settings/models/experiments.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/settings/models/flows.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/settings/models/internal.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/settings/models/logging.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/settings/models/results.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/settings/models/root.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/settings/models/runner.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/settings/models/server/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/settings/models/server/api.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/settings/models/server/database.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/settings/models/server/deployments.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/settings/models/server/ephemeral.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/settings/models/server/events.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/settings/models/server/flow_run_graph.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/settings/models/server/root.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/settings/models/server/services.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/settings/models/server/tasks.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/settings/models/server/ui.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/settings/models/tasks.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/settings/models/testing.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/settings/models/worker.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/settings/profiles.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/settings/profiles.toml +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/settings/sources.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/states.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/task_runners.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/task_runs.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/task_worker.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/telemetry/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/telemetry/bootstrap.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/telemetry/instrumentation.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/telemetry/logging.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/telemetry/processors.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/telemetry/services.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/transactions.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/types/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/types/_datetime.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/types/entrypoint.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/utilities/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/utilities/_deprecated.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/utilities/_engine.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/utilities/_git.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/utilities/asyncutils.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/utilities/callables.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/utilities/collections.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/utilities/compat.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/utilities/context.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/utilities/dispatch.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/utilities/dockerutils.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/utilities/engine.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/utilities/filesystem.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/utilities/generics.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/utilities/hashing.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/utilities/importtools.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/utilities/math.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/utilities/names.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/utilities/processutils.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/utilities/pydantic.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/utilities/render_swagger.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/utilities/schema_tools/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/utilities/schema_tools/hydration.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/utilities/schema_tools/validation.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/utilities/services.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/utilities/slugify.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/utilities/templating.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/utilities/text.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/utilities/timeout.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/utilities/urls.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/utilities/visualization.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/variables.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/workers/__init__.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/workers/block.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/workers/cloud.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/workers/server.py +0 -0
- {prefect_client-3.2.11 → prefect_client-3.2.13}/src/prefect/workers/utilities.py +0 -0
@@ -7,8 +7,9 @@ __pycache__/
|
|
7
7
|
build/
|
8
8
|
dist/
|
9
9
|
sdist/
|
10
|
-
|
11
|
-
uv
|
10
|
+
|
11
|
+
# uv (consider committing later)
|
12
|
+
src/integrations/**/uv.lock
|
12
13
|
|
13
14
|
# Build metadata
|
14
15
|
src/prefect/_build_info.py
|
@@ -75,6 +76,7 @@ prefect.yaml
|
|
75
76
|
|
76
77
|
# Deployment recipes
|
77
78
|
!src/prefect/deployments/recipes/*/**
|
79
|
+
!src/prefect/deployments/templates/prefect.yaml
|
78
80
|
|
79
81
|
# For development doc server if link
|
80
82
|
libcairo.2.dylib
|
@@ -47,6 +47,7 @@ from pydantic import (
|
|
47
47
|
from rich.console import Console
|
48
48
|
from rich.progress import Progress, SpinnerColumn, TextColumn, track
|
49
49
|
from rich.table import Table
|
50
|
+
from typing_extensions import Self
|
50
51
|
|
51
52
|
from prefect._experimental.sla.objects import SlaTypes
|
52
53
|
from prefect._internal.compatibility.async_dispatch import async_dispatch
|
@@ -84,6 +85,7 @@ from prefect.settings import (
|
|
84
85
|
)
|
85
86
|
from prefect.types import ListOfNonEmptyStrings
|
86
87
|
from prefect.types.entrypoint import EntrypointType
|
88
|
+
from prefect.utilities.annotations import freeze
|
87
89
|
from prefect.utilities.asyncutils import run_coro_as_sync, sync_compatible
|
88
90
|
from prefect.utilities.callables import ParameterSchema, parameter_schema
|
89
91
|
from prefect.utilities.collections import get_from_dict, isiterable
|
@@ -135,7 +137,9 @@ class RunnerDeployment(BaseModel):
|
|
135
137
|
_sla: (Experimental) SLA configuration for the deployment. May be removed or modified at any time. Currently only supported on Prefect Cloud.
|
136
138
|
"""
|
137
139
|
|
138
|
-
model_config: ClassVar[ConfigDict] = ConfigDict(
|
140
|
+
model_config: ClassVar[ConfigDict] = ConfigDict(
|
141
|
+
arbitrary_types_allowed=True, validate_assignment=True
|
142
|
+
)
|
139
143
|
|
140
144
|
name: str = Field(..., description="The name of the deployment.")
|
141
145
|
flow_name: Optional[str] = Field(
|
@@ -250,14 +254,30 @@ class RunnerDeployment(BaseModel):
|
|
250
254
|
trigger.name = f"{self.name}__automation_{i}"
|
251
255
|
return self
|
252
256
|
|
257
|
+
@model_validator(mode="after")
|
258
|
+
def validate_deployment_parameters(self) -> Self:
|
259
|
+
"""Update the parameter schema to mark frozen parameters as readonly."""
|
260
|
+
if not self.parameters:
|
261
|
+
return self
|
262
|
+
|
263
|
+
for key, value in self.parameters.items():
|
264
|
+
if isinstance(value, freeze):
|
265
|
+
raw_value = value.unfreeze()
|
266
|
+
if key in self._parameter_openapi_schema.properties:
|
267
|
+
self._parameter_openapi_schema.properties[key]["readOnly"] = True
|
268
|
+
self._parameter_openapi_schema.properties[key]["enum"] = [raw_value]
|
269
|
+
self.parameters[key] = raw_value
|
270
|
+
|
271
|
+
return self
|
272
|
+
|
253
273
|
@model_validator(mode="before")
|
254
274
|
@classmethod
|
255
|
-
def reconcile_paused(cls, values):
|
275
|
+
def reconcile_paused(cls, values: dict[str, Any]) -> dict[str, Any]:
|
256
276
|
return reconcile_paused_deployment(values)
|
257
277
|
|
258
278
|
@model_validator(mode="before")
|
259
279
|
@classmethod
|
260
|
-
def reconcile_schedules(cls, values):
|
280
|
+
def reconcile_schedules(cls, values: dict[str, Any]) -> dict[str, Any]:
|
261
281
|
return reconcile_schedules_runner(values)
|
262
282
|
|
263
283
|
async def _create(
|
@@ -367,7 +387,8 @@ class RunnerDeployment(BaseModel):
|
|
367
387
|
await client.update_deployment(
|
368
388
|
deployment_id,
|
369
389
|
deployment=DeploymentUpdate(
|
370
|
-
**update_payload,
|
390
|
+
**update_payload,
|
391
|
+
parameter_openapi_schema=parameter_openapi_schema,
|
371
392
|
),
|
372
393
|
)
|
373
394
|
|
@@ -1046,10 +1046,9 @@ class Flow(Generic[P, R]):
|
|
1046
1046
|
if not name:
|
1047
1047
|
name = self.name
|
1048
1048
|
else:
|
1049
|
-
#
|
1050
|
-
|
1051
|
-
|
1052
|
-
name = Path(name).stem
|
1049
|
+
# Only strip extension if it is a file path
|
1050
|
+
if (p := Path(name)).is_file():
|
1051
|
+
name = p.stem
|
1053
1052
|
|
1054
1053
|
runner = Runner(name=name, pause_on_shutdown=pause_on_shutdown, limit=limit)
|
1055
1054
|
deployment_id = runner.add_flow(
|
@@ -1490,10 +1489,10 @@ class Flow(Generic[P, R]):
|
|
1490
1489
|
_sla=_sla,
|
1491
1490
|
)
|
1492
1491
|
|
1493
|
-
if
|
1494
|
-
|
1495
|
-
|
1496
|
-
|
1492
|
+
if inspect.isawaitable(to_deployment_coro):
|
1493
|
+
deployment = await to_deployment_coro
|
1494
|
+
else:
|
1495
|
+
deployment = to_deployment_coro
|
1497
1496
|
|
1498
1497
|
from prefect.deployments.runner import deploy
|
1499
1498
|
|
@@ -146,10 +146,11 @@ def get_run_logger(
|
|
146
146
|
**kwargs,
|
147
147
|
)
|
148
148
|
elif (
|
149
|
-
get_logger("prefect.
|
150
|
-
and get_logger("prefect.
|
149
|
+
get_logger("prefect.flow_runs").disabled
|
150
|
+
and get_logger("prefect.task_runs").disabled
|
151
151
|
):
|
152
152
|
logger = logging.getLogger("null")
|
153
|
+
logger.disabled = True
|
153
154
|
else:
|
154
155
|
raise MissingContextError("There is no active flow or task run context.")
|
155
156
|
|
@@ -280,9 +281,9 @@ def disable_run_logger():
|
|
280
281
|
"""
|
281
282
|
Gets both `prefect.flow_run` and `prefect.task_run` and disables them
|
282
283
|
within the context manager. Upon exiting the context manager, both loggers
|
283
|
-
are returned to
|
284
|
+
are returned to their original state.
|
284
285
|
"""
|
285
|
-
with disable_logger("prefect.
|
286
|
+
with disable_logger("prefect.flow_runs"), disable_logger("prefect.task_runs"):
|
286
287
|
yield
|
287
288
|
|
288
289
|
|
@@ -313,7 +313,7 @@ async def read_flow_run(
|
|
313
313
|
)
|
314
314
|
|
315
315
|
|
316
|
-
@router.get("/{id}/graph")
|
316
|
+
@router.get("/{id}/graph", tags=["Flow Run Graph"])
|
317
317
|
async def read_flow_run_graph_v1(
|
318
318
|
flow_run_id: UUID = Path(..., description="The flow run id", alias="id"),
|
319
319
|
db: PrefectDBInterface = Depends(provide_database_interface),
|
@@ -327,7 +327,7 @@ async def read_flow_run_graph_v1(
|
|
327
327
|
)
|
328
328
|
|
329
329
|
|
330
|
-
@router.get("/{id:uuid}/graph-v2")
|
330
|
+
@router.get("/{id:uuid}/graph-v2", tags=["Flow Run Graph"])
|
331
331
|
async def read_flow_run_graph_v2(
|
332
332
|
flow_run_id: UUID = Path(..., description="The flow run id", alias="id"),
|
333
333
|
since: DateTime = Query(
|
@@ -294,12 +294,16 @@ async def prefect_object_not_found_exception_handler(
|
|
294
294
|
)
|
295
295
|
|
296
296
|
|
297
|
+
API_APP_CACHE: dict[tuple[str, str | None], FastAPI] = {}
|
298
|
+
|
299
|
+
|
297
300
|
def create_api_app(
|
298
301
|
dependencies: list[Any] | None = None,
|
299
302
|
health_check_path: str = "/health",
|
300
303
|
version_check_path: str = "/version",
|
301
304
|
fast_api_app_kwargs: dict[str, Any] | None = None,
|
302
305
|
final: bool = False,
|
306
|
+
ignore_cache: bool = False,
|
303
307
|
) -> FastAPI:
|
304
308
|
"""
|
305
309
|
Create a FastAPI app that includes the Prefect REST API
|
@@ -310,10 +314,20 @@ def create_api_app(
|
|
310
314
|
fast_api_app_kwargs: kwargs to pass to the FastAPI constructor
|
311
315
|
final: whether this will be the last instance of the Prefect server to be
|
312
316
|
created in this process, so that additional optimizations may be applied
|
317
|
+
ignore_cache: if set, a new app will be created even if the settings and fast_api_app_kwargs match
|
318
|
+
an existing app in the cache
|
313
319
|
|
314
320
|
Returns:
|
315
321
|
a FastAPI app that serves the Prefect REST API
|
316
322
|
"""
|
323
|
+
cache_key = (
|
324
|
+
prefect.settings.get_current_settings().hash_key(),
|
325
|
+
hash_objects(fast_api_app_kwargs) if fast_api_app_kwargs else None,
|
326
|
+
)
|
327
|
+
|
328
|
+
if cache_key in API_APP_CACHE and not ignore_cache:
|
329
|
+
return API_APP_CACHE[cache_key]
|
330
|
+
|
317
331
|
fast_api_app_kwargs = fast_api_app_kwargs or {}
|
318
332
|
api_app = FastAPI(title=API_TITLE, **fast_api_app_kwargs)
|
319
333
|
api_app.add_middleware(GZipMiddleware)
|
@@ -389,6 +403,8 @@ def create_api_app(
|
|
389
403
|
)
|
390
404
|
return await call_next(request)
|
391
405
|
|
406
|
+
API_APP_CACHE[cache_key] = api_app
|
407
|
+
|
392
408
|
return api_app
|
393
409
|
|
394
410
|
|
@@ -655,6 +671,7 @@ def create_app(
|
|
655
671
|
}
|
656
672
|
},
|
657
673
|
final=final,
|
674
|
+
ignore_cache=ignore_cache,
|
658
675
|
)
|
659
676
|
ui_app = create_ui_app(ephemeral)
|
660
677
|
|
@@ -24,6 +24,7 @@ from typing import (
|
|
24
24
|
Type,
|
25
25
|
TypeVar,
|
26
26
|
Union,
|
27
|
+
overload,
|
27
28
|
)
|
28
29
|
from uuid import UUID
|
29
30
|
|
@@ -1527,6 +1528,32 @@ async def run_generator_task_async(
|
|
1527
1528
|
await engine.result()
|
1528
1529
|
|
1529
1530
|
|
1531
|
+
@overload
|
1532
|
+
def run_task(
|
1533
|
+
task: "Task[P, R]",
|
1534
|
+
task_run_id: Optional[UUID] = None,
|
1535
|
+
task_run: Optional[TaskRun] = None,
|
1536
|
+
parameters: Optional[dict[str, Any]] = None,
|
1537
|
+
wait_for: Optional["OneOrManyFutureOrResult[Any]"] = None,
|
1538
|
+
return_type: Literal["state"] = "state",
|
1539
|
+
dependencies: Optional[dict[str, set[TaskRunInput]]] = None,
|
1540
|
+
context: Optional[dict[str, Any]] = None,
|
1541
|
+
) -> State[R]: ...
|
1542
|
+
|
1543
|
+
|
1544
|
+
@overload
|
1545
|
+
def run_task(
|
1546
|
+
task: "Task[P, R]",
|
1547
|
+
task_run_id: Optional[UUID] = None,
|
1548
|
+
task_run: Optional[TaskRun] = None,
|
1549
|
+
parameters: Optional[dict[str, Any]] = None,
|
1550
|
+
wait_for: Optional["OneOrManyFutureOrResult[Any]"] = None,
|
1551
|
+
return_type: Literal["result"] = "result",
|
1552
|
+
dependencies: Optional[dict[str, set[TaskRunInput]]] = None,
|
1553
|
+
context: Optional[dict[str, Any]] = None,
|
1554
|
+
) -> R: ...
|
1555
|
+
|
1556
|
+
|
1530
1557
|
def run_task(
|
1531
1558
|
task: "Task[P, Union[R, Coroutine[Any, Any, R]]]",
|
1532
1559
|
task_run_id: Optional[UUID] = None,
|
@@ -16,6 +16,7 @@ from opentelemetry.trace import (
|
|
16
16
|
from typing_extensions import TypeAlias
|
17
17
|
|
18
18
|
import prefect
|
19
|
+
import prefect.settings
|
19
20
|
from prefect.client.orchestration import PrefectClient, SyncPrefectClient
|
20
21
|
from prefect.client.schemas import FlowRun, TaskRun
|
21
22
|
from prefect.client.schemas.objects import State
|
@@ -50,15 +51,19 @@ class RunTelemetry:
|
|
50
51
|
default_factory=lambda: get_tracer("prefect", prefect.__version__)
|
51
52
|
)
|
52
53
|
span: Span | None = None
|
54
|
+
_enabled: bool = field(
|
55
|
+
default_factory=lambda: prefect.settings.get_current_settings().cloud.enable_orchestration_telemetry
|
56
|
+
)
|
53
57
|
|
54
58
|
async def async_start_span(
|
55
59
|
self,
|
56
60
|
run: FlowOrTaskRun,
|
57
61
|
client: PrefectClient,
|
58
62
|
parameters: dict[str, Any] | None = None,
|
59
|
-
) -> Span:
|
63
|
+
) -> Span | None:
|
64
|
+
if not self._enabled:
|
65
|
+
return None
|
60
66
|
traceparent, span = self._start_span(run, parameters)
|
61
|
-
|
62
67
|
if self._run_type(run) == "flow" and traceparent:
|
63
68
|
# Only explicitly update labels if the run is a flow as task runs
|
64
69
|
# are updated via events.
|
@@ -73,7 +78,10 @@ class RunTelemetry:
|
|
73
78
|
run: FlowOrTaskRun,
|
74
79
|
client: SyncPrefectClient,
|
75
80
|
parameters: dict[str, Any] | None = None,
|
76
|
-
) -> Span:
|
81
|
+
) -> Span | None:
|
82
|
+
if not self._enabled:
|
83
|
+
return None
|
84
|
+
|
77
85
|
traceparent, span = self._start_span(run, parameters)
|
78
86
|
|
79
87
|
if self._run_type(run) == "flow" and traceparent:
|
@@ -2,6 +2,8 @@ import warnings
|
|
2
2
|
from operator import itemgetter
|
3
3
|
from typing import Any, cast
|
4
4
|
|
5
|
+
from pydantic import GetCoreSchemaHandler
|
6
|
+
from pydantic_core import core_schema, to_json
|
5
7
|
from typing_extensions import Self, TypeVar
|
6
8
|
|
7
9
|
T = TypeVar("T", infer_variance=True)
|
@@ -108,3 +110,44 @@ class NotSet:
|
|
108
110
|
"""
|
109
111
|
Singleton to distinguish `None` from a value that is not provided by the user.
|
110
112
|
"""
|
113
|
+
|
114
|
+
|
115
|
+
class freeze(BaseAnnotation[T]):
|
116
|
+
"""
|
117
|
+
Wrapper for parameters in deployments.
|
118
|
+
|
119
|
+
Indicates that this parameter should be frozen in the UI and not editable
|
120
|
+
when creating flow runs from this deployment.
|
121
|
+
|
122
|
+
Example:
|
123
|
+
```python
|
124
|
+
@flow
|
125
|
+
def my_flow(customer_id: str):
|
126
|
+
# flow logic
|
127
|
+
|
128
|
+
deployment = my_flow.deploy(parameters={"customer_id": freeze("customer123")})
|
129
|
+
```
|
130
|
+
"""
|
131
|
+
|
132
|
+
def __new__(cls, value: T) -> Self:
|
133
|
+
try:
|
134
|
+
to_json(value)
|
135
|
+
except Exception:
|
136
|
+
raise ValueError("Value must be JSON serializable")
|
137
|
+
return super().__new__(cls, value)
|
138
|
+
|
139
|
+
def unfreeze(self) -> T:
|
140
|
+
"""Return the unwrapped value."""
|
141
|
+
return self.unwrap()
|
142
|
+
|
143
|
+
@classmethod
|
144
|
+
def __get_pydantic_core_schema__(
|
145
|
+
cls, source: type[Any], handler: GetCoreSchemaHandler
|
146
|
+
) -> core_schema.CoreSchema:
|
147
|
+
return core_schema.no_info_after_validator_function(
|
148
|
+
cls, # Use the class itself as the validator
|
149
|
+
core_schema.any_schema(),
|
150
|
+
serialization=core_schema.plain_serializer_function_ser_schema(
|
151
|
+
lambda x: x.unfreeze() # Serialize by unwrapping the value
|
152
|
+
),
|
153
|
+
)
|