prefect-client 3.3.8.dev3__tar.gz → 3.4.0__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.3.8.dev3 → prefect_client-3.4.0}/PKG-INFO +3 -3
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/pyproject.toml +2 -2
- prefect_client-3.4.0/src/prefect/_build_info.py +5 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/_versioning.py +2 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/blocks/core.py +25 -6
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/client/schemas/objects.py +4 -2
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/deployments/runner.py +54 -4
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/flows.py +15 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/futures.py +1 -14
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/infrastructure/provisioners/cloud_run.py +1 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/runner/runner.py +1 -1
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/server/api/server.py +18 -1
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/server/api/workers.py +39 -4
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/settings/base.py +7 -7
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/settings/models/experiments.py +2 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/workers/base.py +34 -11
- prefect_client-3.3.8.dev3/src/prefect/_build_info.py +0 -5
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/.gitignore +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/LICENSE +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/README.md +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/.prefectignore +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/__main__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/_experimental/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/_experimental/bundles/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/_experimental/bundles/execute.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/_experimental/lineage.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/_experimental/sla/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/_experimental/sla/client.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/_experimental/sla/objects.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/_internal/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/_internal/_logging.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/_internal/compatibility/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/_internal/compatibility/async_dispatch.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/_internal/compatibility/deprecated.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/_internal/compatibility/migration.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/_internal/concurrency/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/_internal/concurrency/api.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/_internal/concurrency/calls.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/_internal/concurrency/cancellation.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/_internal/concurrency/event_loop.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/_internal/concurrency/inspection.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/_internal/concurrency/primitives.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/_internal/concurrency/services.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/_internal/concurrency/threads.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/_internal/concurrency/waiters.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/_internal/integrations.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/_internal/pydantic/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/_internal/pydantic/schemas.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/_internal/pydantic/v1_schema.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/_internal/pydantic/v2_schema.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/_internal/pydantic/v2_validated_func.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/_internal/pytz.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/_internal/retries.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/_internal/schemas/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/_internal/schemas/bases.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/_internal/schemas/fields.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/_internal/schemas/serializers.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/_internal/schemas/validators.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/_result_records.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/_vendor/croniter/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/_vendor/croniter/croniter.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/_waiters.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/agent.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/artifacts.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/automations.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/blocks/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/blocks/abstract.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/blocks/fields.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/blocks/notifications.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/blocks/redis.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/blocks/system.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/blocks/webhook.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/cache_policies.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/client/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/client/base.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/client/cloud.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/client/collections.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/client/constants.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/client/orchestration/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/client/orchestration/_artifacts/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/client/orchestration/_artifacts/client.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/client/orchestration/_automations/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/client/orchestration/_automations/client.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/client/orchestration/_blocks_documents/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/client/orchestration/_blocks_documents/client.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/client/orchestration/_blocks_schemas/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/client/orchestration/_blocks_schemas/client.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/client/orchestration/_blocks_types/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/client/orchestration/_blocks_types/client.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/client/orchestration/_concurrency_limits/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/client/orchestration/_concurrency_limits/client.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/client/orchestration/_deployments/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/client/orchestration/_deployments/client.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/client/orchestration/_flow_runs/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/client/orchestration/_flow_runs/client.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/client/orchestration/_flows/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/client/orchestration/_flows/client.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/client/orchestration/_logs/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/client/orchestration/_logs/client.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/client/orchestration/_variables/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/client/orchestration/_variables/client.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/client/orchestration/_work_pools/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/client/orchestration/_work_pools/client.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/client/orchestration/base.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/client/orchestration/routes.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/client/schemas/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/client/schemas/actions.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/client/schemas/filters.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/client/schemas/responses.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/client/schemas/schedules.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/client/schemas/sorting.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/client/subscriptions.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/client/types/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/client/types/flexible_schedule_list.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/client/utilities.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/concurrency/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/concurrency/_asyncio.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/concurrency/_events.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/concurrency/asyncio.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/concurrency/context.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/concurrency/services.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/concurrency/sync.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/concurrency/v1/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/concurrency/v1/_asyncio.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/concurrency/v1/_events.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/concurrency/v1/asyncio.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/concurrency/v1/context.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/concurrency/v1/services.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/concurrency/v1/sync.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/context.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/deployments/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/deployments/base.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/deployments/deployments.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/deployments/flow_runs.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/deployments/schedules.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/deployments/steps/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/deployments/steps/core.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/deployments/steps/pull.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/deployments/steps/utility.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/docker/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/docker/docker_image.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/engine.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/events/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/events/actions.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/events/cli/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/events/cli/automations.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/events/clients.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/events/filters.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/events/related.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/events/schemas/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/events/schemas/automations.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/events/schemas/deployment_triggers.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/events/schemas/events.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/events/schemas/labelling.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/events/utilities.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/events/worker.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/exceptions.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/filesystems.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/flow_engine.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/flow_runs.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/infrastructure/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/infrastructure/base.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/infrastructure/provisioners/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/infrastructure/provisioners/coiled.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/infrastructure/provisioners/container_instance.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/infrastructure/provisioners/ecs.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/infrastructure/provisioners/modal.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/input/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/input/actions.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/input/run_input.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/locking/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/locking/filesystem.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/locking/memory.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/locking/protocol.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/logging/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/logging/configuration.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/logging/filters.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/logging/formatters.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/logging/handlers.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/logging/highlighters.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/logging/loggers.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/logging/logging.yml +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/main.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/plugins.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/py.typed +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/results.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/runner/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/runner/server.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/runner/storage.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/runner/submit.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/runner/utils.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/runtime/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/runtime/deployment.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/runtime/flow_run.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/runtime/task_run.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/schedules.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/serializers.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/server/api/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/server/api/admin.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/server/api/artifacts.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/server/api/automations.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/server/api/block_capabilities.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/server/api/block_documents.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/server/api/block_schemas.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/server/api/block_types.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/server/api/clients.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/server/api/collections.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/server/api/collections_data/views/aggregate-worker-metadata.json +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/server/api/concurrency_limits.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/server/api/concurrency_limits_v2.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/server/api/csrf_token.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/server/api/dependencies.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/server/api/deployments.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/server/api/events.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/server/api/flow_run_states.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/server/api/flow_runs.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/server/api/flows.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/server/api/logs.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/server/api/middleware.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/server/api/root.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/server/api/run_history.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/server/api/saved_searches.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/server/api/static/prefect-logo-mark-gradient.png +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/server/api/task_run_states.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/server/api/task_runs.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/server/api/task_workers.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/server/api/templates.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/server/api/ui/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/server/api/ui/flow_runs.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/server/api/ui/flows.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/server/api/ui/schemas.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/server/api/ui/task_runs.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/server/api/validation.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/server/api/variables.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/server/api/work_queues.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/settings/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/settings/constants.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/settings/context.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/settings/legacy.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/settings/models/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/settings/models/api.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/settings/models/cli.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/settings/models/client.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/settings/models/cloud.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/settings/models/deployments.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/settings/models/flows.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/settings/models/internal.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/settings/models/logging.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/settings/models/results.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/settings/models/root.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/settings/models/runner.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/settings/models/server/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/settings/models/server/api.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/settings/models/server/database.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/settings/models/server/deployments.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/settings/models/server/ephemeral.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/settings/models/server/events.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/settings/models/server/flow_run_graph.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/settings/models/server/root.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/settings/models/server/services.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/settings/models/server/tasks.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/settings/models/server/ui.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/settings/models/tasks.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/settings/models/testing.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/settings/models/worker.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/settings/profiles.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/settings/profiles.toml +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/settings/sources.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/states.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/task_engine.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/task_runners.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/task_runs.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/task_worker.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/tasks.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/telemetry/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/telemetry/bootstrap.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/telemetry/instrumentation.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/telemetry/logging.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/telemetry/processors.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/telemetry/run_telemetry.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/telemetry/services.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/transactions.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/types/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/types/_datetime.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/types/entrypoint.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/utilities/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/utilities/_ast.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/utilities/_deprecated.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/utilities/_engine.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/utilities/_git.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/utilities/annotations.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/utilities/asyncutils.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/utilities/callables.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/utilities/collections.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/utilities/compat.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/utilities/context.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/utilities/dispatch.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/utilities/dockerutils.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/utilities/engine.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/utilities/filesystem.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/utilities/generics.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/utilities/hashing.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/utilities/importtools.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/utilities/math.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/utilities/names.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/utilities/processutils.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/utilities/pydantic.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/utilities/render_swagger.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/utilities/schema_tools/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/utilities/schema_tools/hydration.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/utilities/schema_tools/validation.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/utilities/services.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/utilities/slugify.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/utilities/templating.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/utilities/text.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/utilities/timeout.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/utilities/urls.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/utilities/visualization.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/variables.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/workers/__init__.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/workers/block.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/workers/cloud.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/workers/process.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/workers/server.py +0 -0
- {prefect_client-3.3.8.dev3 → prefect_client-3.4.0}/src/prefect/workers/utilities.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: prefect-client
|
3
|
-
Version: 3.
|
3
|
+
Version: 3.4.0
|
4
4
|
Summary: Workflow orchestration and management.
|
5
5
|
Project-URL: Changelog, https://github.com/PrefectHQ/prefect/releases
|
6
6
|
Project-URL: Documentation, https://docs.prefect.io
|
@@ -40,7 +40,7 @@ Requires-Dist: jsonpatch<2.0,>=1.32
|
|
40
40
|
Requires-Dist: jsonschema<5.0.0,>=4.0.0
|
41
41
|
Requires-Dist: opentelemetry-api<2.0.0,>=1.27.0
|
42
42
|
Requires-Dist: orjson<4.0,>=3.7
|
43
|
-
Requires-Dist: packaging<
|
43
|
+
Requires-Dist: packaging<25.1,>=21.3
|
44
44
|
Requires-Dist: pathspec>=0.8.0
|
45
45
|
Requires-Dist: pendulum<4,>=3.0.0; python_version < '3.13'
|
46
46
|
Requires-Dist: prometheus-client>=0.20.0
|
@@ -62,7 +62,7 @@ Requires-Dist: typing-extensions<5.0.0,>=4.10.0
|
|
62
62
|
Requires-Dist: ujson<6.0.0,>=5.8.0
|
63
63
|
Requires-Dist: uvicorn!=0.29.0,>=0.14.0
|
64
64
|
Requires-Dist: websockets<16.0,>=13.0
|
65
|
-
Requires-Dist: whenever<0.
|
65
|
+
Requires-Dist: whenever<0.9.0,>=0.7.3; python_version >= '3.13'
|
66
66
|
Provides-Extra: notifications
|
67
67
|
Requires-Dist: apprise<2.0.0,>=1.1.0; extra == 'notifications'
|
68
68
|
Description-Content-Type: text/markdown
|
@@ -44,7 +44,7 @@ dependencies = [
|
|
44
44
|
"jsonschema>=4.0.0,<5.0.0",
|
45
45
|
"opentelemetry-api>=1.27.0,<2.0.0",
|
46
46
|
"orjson>=3.7,<4.0",
|
47
|
-
"packaging>=21.3,<
|
47
|
+
"packaging>=21.3,<25.1",
|
48
48
|
"pathspec>=0.8.0",
|
49
49
|
"pendulum>=3.0.0,<4; python_version<'3.13'",
|
50
50
|
"prometheus-client>=0.20.0",
|
@@ -66,7 +66,7 @@ dependencies = [
|
|
66
66
|
"ujson>=5.8.0,<6.0.0",
|
67
67
|
"uvicorn>=0.14.0,!=0.29.0",
|
68
68
|
"websockets>=13.0,<16.0",
|
69
|
-
"whenever>=0.7.3,<0.
|
69
|
+
"whenever>=0.7.3,<0.9.0; python_version>='3.13'",
|
70
70
|
]
|
71
71
|
[project.urls]
|
72
72
|
Changelog = "https://github.com/PrefectHQ/prefect/releases"
|
@@ -422,6 +422,8 @@ async def get_inferred_version_info(
|
|
422
422
|
get_git_version_info,
|
423
423
|
]
|
424
424
|
|
425
|
+
if version_type is VersionType.SIMPLE:
|
426
|
+
return None
|
425
427
|
if version_type:
|
426
428
|
if version_type not in type_to_getter:
|
427
429
|
raise ValueError(f"Unknown version type: {version_type}")
|
@@ -95,6 +95,12 @@ class InvalidBlockRegistration(Exception):
|
|
95
95
|
"""
|
96
96
|
|
97
97
|
|
98
|
+
class UnknownBlockType(Exception):
|
99
|
+
"""
|
100
|
+
Raised when a block type is not found in the registry.
|
101
|
+
"""
|
102
|
+
|
103
|
+
|
98
104
|
def _collect_nested_reference_strings(
|
99
105
|
obj: dict[str, Any] | list[Any],
|
100
106
|
) -> list[dict[str, Any]]:
|
@@ -374,15 +380,15 @@ class Block(BaseModel, ABC):
|
|
374
380
|
for field_name in type(self).model_fields
|
375
381
|
}
|
376
382
|
)
|
377
|
-
|
383
|
+
extra_fields = {
|
378
384
|
"block_type_slug": self.get_block_type_slug(),
|
379
385
|
"_block_document_id": self._block_document_id,
|
380
386
|
"_block_document_name": self._block_document_name,
|
381
387
|
"_is_anonymous": self._is_anonymous,
|
382
|
-
}
|
383
|
-
|
384
|
-
|
385
|
-
|
388
|
+
}
|
389
|
+
jsonable_self |= {
|
390
|
+
key: value for key, value in extra_fields.items() if value is not None
|
391
|
+
}
|
386
392
|
return jsonable_self
|
387
393
|
|
388
394
|
@classmethod
|
@@ -786,7 +792,20 @@ class Block(BaseModel, ABC):
|
|
786
792
|
# before looking up the block class, but only do this once
|
787
793
|
load_prefect_collections()
|
788
794
|
|
789
|
-
|
795
|
+
try:
|
796
|
+
return lookup_type(cls, key)
|
797
|
+
except KeyError:
|
798
|
+
message = f"No block class found for slug {key!r}."
|
799
|
+
# Handle common blocks types used for storage, which is the primary use case for looking up blocks by key
|
800
|
+
if key == "s3-bucket":
|
801
|
+
message += " Please ensure that `prefect-aws` is installed."
|
802
|
+
elif key == "gcs-bucket":
|
803
|
+
message += " Please ensure that `prefect-gcp` is installed."
|
804
|
+
elif key == "azure-blob-storage-container":
|
805
|
+
message += " Please ensure that `prefect-azure` is installed."
|
806
|
+
else:
|
807
|
+
message += " Please ensure that the block class is available in the current environment."
|
808
|
+
raise UnknownBlockType(message)
|
790
809
|
|
791
810
|
def _define_metadata_on_nested_blocks(
|
792
811
|
self, block_document_references: dict[str, dict[str, Any]]
|
@@ -1453,14 +1453,16 @@ class Agent(ObjectBaseModel):
|
|
1453
1453
|
class WorkPoolStorageConfiguration(PrefectBaseModel):
|
1454
1454
|
"""A work pool storage configuration"""
|
1455
1455
|
|
1456
|
-
model_config: ClassVar[ConfigDict] = ConfigDict(extra="forbid")
|
1457
|
-
|
1458
1456
|
bundle_upload_step: Optional[dict[str, Any]] = Field(
|
1459
1457
|
default=None, description="The bundle upload step for the work pool."
|
1460
1458
|
)
|
1461
1459
|
bundle_execution_step: Optional[dict[str, Any]] = Field(
|
1462
1460
|
default=None, description="The bundle execution step for the work pool."
|
1463
1461
|
)
|
1462
|
+
default_result_storage_block_id: Optional[UUID] = Field(
|
1463
|
+
default=None,
|
1464
|
+
description="The block document ID of the default result storage block.",
|
1465
|
+
)
|
1464
1466
|
|
1465
1467
|
|
1466
1468
|
class WorkPool(ObjectBaseModel):
|
@@ -35,7 +35,15 @@ import importlib
|
|
35
35
|
import tempfile
|
36
36
|
from datetime import datetime, timedelta
|
37
37
|
from pathlib import Path
|
38
|
-
from typing import
|
38
|
+
from typing import (
|
39
|
+
TYPE_CHECKING,
|
40
|
+
Any,
|
41
|
+
ClassVar,
|
42
|
+
Iterable,
|
43
|
+
List,
|
44
|
+
Optional,
|
45
|
+
Union,
|
46
|
+
)
|
39
47
|
from uuid import UUID
|
40
48
|
|
41
49
|
from pydantic import (
|
@@ -58,6 +66,7 @@ from prefect._internal.schemas.validators import (
|
|
58
66
|
reconcile_paused_deployment,
|
59
67
|
reconcile_schedules_runner,
|
60
68
|
)
|
69
|
+
from prefect._versioning import VersionType, get_inferred_version_info
|
61
70
|
from prefect.client.base import ServerType
|
62
71
|
from prefect.client.orchestration import PrefectClient, get_client
|
63
72
|
from prefect.client.schemas.actions import DeploymentScheduleCreate, DeploymentUpdate
|
@@ -154,6 +163,13 @@ class RunnerDeployment(BaseModel):
|
|
154
163
|
version: Optional[str] = Field(
|
155
164
|
default=None, description="An optional version for the deployment."
|
156
165
|
)
|
166
|
+
version_type: Optional[VersionType] = Field(
|
167
|
+
default=None,
|
168
|
+
description=(
|
169
|
+
"The type of version information to use for the deployment. The version type"
|
170
|
+
" will be inferred if not provided."
|
171
|
+
),
|
172
|
+
)
|
157
173
|
tags: ListOfNonEmptyStrings = Field(
|
158
174
|
default_factory=list,
|
159
175
|
description="One of more tags to apply to this deployment.",
|
@@ -219,6 +235,7 @@ class RunnerDeployment(BaseModel):
|
|
219
235
|
" a built runner."
|
220
236
|
),
|
221
237
|
)
|
238
|
+
|
222
239
|
# (Experimental) SLA configuration for the deployment. May be removed or modified at any time. Currently only supported on Prefect Cloud.
|
223
240
|
_sla: Optional[Union[SlaTypes, list[SlaTypes]]] = PrivateAttr(
|
224
241
|
default=None,
|
@@ -232,6 +249,9 @@ class RunnerDeployment(BaseModel):
|
|
232
249
|
_parameter_openapi_schema: ParameterSchema = PrivateAttr(
|
233
250
|
default_factory=ParameterSchema,
|
234
251
|
)
|
252
|
+
_version_from_flow: bool = PrivateAttr(
|
253
|
+
default=False,
|
254
|
+
)
|
235
255
|
|
236
256
|
@property
|
237
257
|
def entrypoint_type(self) -> EntrypointType:
|
@@ -241,6 +261,20 @@ class RunnerDeployment(BaseModel):
|
|
241
261
|
def full_name(self) -> str:
|
242
262
|
return f"{self.flow_name}/{self.name}"
|
243
263
|
|
264
|
+
def _get_deployment_version_info(
|
265
|
+
self, version_type: Optional[VersionType] = None
|
266
|
+
) -> VersionInfo:
|
267
|
+
if inferred_version := run_coro_as_sync(
|
268
|
+
get_inferred_version_info(version_type)
|
269
|
+
):
|
270
|
+
if not self.version or self._version_from_flow:
|
271
|
+
self.version = inferred_version.version # TODO: maybe reconsider
|
272
|
+
|
273
|
+
inferred_version.version = self.version
|
274
|
+
return inferred_version
|
275
|
+
|
276
|
+
return VersionInfo(version=self.version or "", type="prefect:simple")
|
277
|
+
|
244
278
|
@field_validator("name", mode="before")
|
245
279
|
@classmethod
|
246
280
|
def validate_name(cls, value: str) -> str:
|
@@ -387,7 +421,7 @@ class RunnerDeployment(BaseModel):
|
|
387
421
|
update_payload = self.model_dump(
|
388
422
|
mode="json",
|
389
423
|
exclude_unset=True,
|
390
|
-
exclude={"storage", "name", "flow_name", "triggers"},
|
424
|
+
exclude={"storage", "name", "flow_name", "triggers", "version_type"},
|
391
425
|
)
|
392
426
|
|
393
427
|
if self.storage:
|
@@ -444,7 +478,7 @@ class RunnerDeployment(BaseModel):
|
|
444
478
|
self,
|
445
479
|
work_pool_name: Optional[str] = None,
|
446
480
|
image: Optional[str] = None,
|
447
|
-
version_info: VersionInfo
|
481
|
+
version_info: Optional[VersionInfo] = None,
|
448
482
|
) -> UUID:
|
449
483
|
"""
|
450
484
|
Registers this deployment with the API and returns the deployment's ID.
|
@@ -455,11 +489,15 @@ class RunnerDeployment(BaseModel):
|
|
455
489
|
image: The registry, name, and tag of the Docker image to
|
456
490
|
use for this deployment. Only used when the deployment is
|
457
491
|
deployed to a work pool.
|
458
|
-
version_info:
|
492
|
+
version_info: The version information to use for the deployment.
|
459
493
|
Returns:
|
460
494
|
The ID of the created deployment.
|
461
495
|
"""
|
462
496
|
|
497
|
+
version_info = version_info or self._get_deployment_version_info(
|
498
|
+
self.version_type
|
499
|
+
)
|
500
|
+
|
463
501
|
async with get_client() as client:
|
464
502
|
try:
|
465
503
|
deployment = await client.read_deployment_by_name(self.full_name)
|
@@ -570,6 +608,7 @@ class RunnerDeployment(BaseModel):
|
|
570
608
|
|
571
609
|
if not self.version:
|
572
610
|
self.version = flow.version
|
611
|
+
self._version_from_flow = True
|
573
612
|
if not self.description:
|
574
613
|
self.description = flow.description
|
575
614
|
|
@@ -592,6 +631,7 @@ class RunnerDeployment(BaseModel):
|
|
592
631
|
description: Optional[str] = None,
|
593
632
|
tags: Optional[List[str]] = None,
|
594
633
|
version: Optional[str] = None,
|
634
|
+
version_type: Optional[VersionType] = None,
|
595
635
|
enforce_parameter_schema: bool = True,
|
596
636
|
work_pool_name: Optional[str] = None,
|
597
637
|
work_queue_name: Optional[str] = None,
|
@@ -622,6 +662,7 @@ class RunnerDeployment(BaseModel):
|
|
622
662
|
tags: A list of tags to associate with the created deployment for organizational
|
623
663
|
purposes.
|
624
664
|
version: A version for the created deployment. Defaults to the flow's version.
|
665
|
+
version_type: The type of version information to use for the deployment.
|
625
666
|
enforce_parameter_schema: Whether or not the Prefect API should enforce the
|
626
667
|
parameter schema for this deployment.
|
627
668
|
work_pool_name: The name of the work pool to use for this deployment.
|
@@ -662,6 +703,7 @@ class RunnerDeployment(BaseModel):
|
|
662
703
|
parameters=parameters or {},
|
663
704
|
description=description,
|
664
705
|
version=version,
|
706
|
+
version_type=version_type,
|
665
707
|
enforce_parameter_schema=enforce_parameter_schema,
|
666
708
|
work_pool_name=work_pool_name,
|
667
709
|
work_queue_name=work_queue_name,
|
@@ -837,6 +879,7 @@ class RunnerDeployment(BaseModel):
|
|
837
879
|
description: Optional[str] = None,
|
838
880
|
tags: Optional[List[str]] = None,
|
839
881
|
version: Optional[str] = None,
|
882
|
+
version_type: Optional[VersionType] = None,
|
840
883
|
enforce_parameter_schema: bool = True,
|
841
884
|
work_pool_name: Optional[str] = None,
|
842
885
|
work_queue_name: Optional[str] = None,
|
@@ -870,6 +913,8 @@ class RunnerDeployment(BaseModel):
|
|
870
913
|
tags: A list of tags to associate with the created deployment for organizational
|
871
914
|
purposes.
|
872
915
|
version: A version for the created deployment. Defaults to the flow's version.
|
916
|
+
version_type: The type of version information to use for the deployment. The version type
|
917
|
+
will be inferred if not provided.
|
873
918
|
enforce_parameter_schema: Whether or not the Prefect API should enforce the
|
874
919
|
parameter schema for this deployment.
|
875
920
|
work_pool_name: The name of the work pool to use for this deployment.
|
@@ -921,6 +966,7 @@ class RunnerDeployment(BaseModel):
|
|
921
966
|
parameters=parameters or {},
|
922
967
|
description=description,
|
923
968
|
version=version,
|
969
|
+
version_type=version_type,
|
924
970
|
entrypoint=entrypoint,
|
925
971
|
enforce_parameter_schema=enforce_parameter_schema,
|
926
972
|
storage=storage,
|
@@ -959,6 +1005,7 @@ class RunnerDeployment(BaseModel):
|
|
959
1005
|
description: Optional[str] = None,
|
960
1006
|
tags: Optional[List[str]] = None,
|
961
1007
|
version: Optional[str] = None,
|
1008
|
+
version_type: Optional[VersionType] = None,
|
962
1009
|
enforce_parameter_schema: bool = True,
|
963
1010
|
work_pool_name: Optional[str] = None,
|
964
1011
|
work_queue_name: Optional[str] = None,
|
@@ -992,6 +1039,8 @@ class RunnerDeployment(BaseModel):
|
|
992
1039
|
tags: A list of tags to associate with the created deployment for organizational
|
993
1040
|
purposes.
|
994
1041
|
version: A version for the created deployment. Defaults to the flow's version.
|
1042
|
+
version_type: The type of version information to use for the deployment. The version type
|
1043
|
+
will be inferred if not provided.
|
995
1044
|
enforce_parameter_schema: Whether or not the Prefect API should enforce the
|
996
1045
|
parameter schema for this deployment.
|
997
1046
|
work_pool_name: The name of the work pool to use for this deployment.
|
@@ -1041,6 +1090,7 @@ class RunnerDeployment(BaseModel):
|
|
1041
1090
|
parameters=parameters or {},
|
1042
1091
|
description=description,
|
1043
1092
|
version=version,
|
1093
|
+
version_type=version_type,
|
1044
1094
|
entrypoint=entrypoint,
|
1045
1095
|
enforce_parameter_schema=enforce_parameter_schema,
|
1046
1096
|
storage=storage,
|
@@ -49,6 +49,7 @@ from typing_extensions import Literal, ParamSpec
|
|
49
49
|
|
50
50
|
from prefect._experimental.sla.objects import SlaTypes
|
51
51
|
from prefect._internal.concurrency.api import create_call, from_async
|
52
|
+
from prefect._versioning import VersionType
|
52
53
|
from prefect.blocks.core import Block
|
53
54
|
from prefect.client.schemas.filters import WorkerFilter, WorkerFilterStatus
|
54
55
|
from prefect.client.schemas.objects import ConcurrencyLimitConfig, FlowRun
|
@@ -704,6 +705,7 @@ class Flow(Generic[P, R]):
|
|
704
705
|
description: Optional[str] = None,
|
705
706
|
tags: Optional[list[str]] = None,
|
706
707
|
version: Optional[str] = None,
|
708
|
+
version_type: Optional[VersionType] = None,
|
707
709
|
enforce_parameter_schema: bool = True,
|
708
710
|
work_pool_name: Optional[str] = None,
|
709
711
|
work_queue_name: Optional[str] = None,
|
@@ -733,6 +735,8 @@ class Flow(Generic[P, R]):
|
|
733
735
|
tags: A list of tags to associate with the created deployment for organizational
|
734
736
|
purposes.
|
735
737
|
version: A version for the created deployment. Defaults to the flow's version.
|
738
|
+
version_type: The type of version to use for the created deployment. The version type
|
739
|
+
will be inferred if not provided.
|
736
740
|
enforce_parameter_schema: Whether or not the Prefect API should enforce the
|
737
741
|
parameter schema for the created deployment.
|
738
742
|
work_pool_name: The name of the work pool to use for this deployment.
|
@@ -787,6 +791,7 @@ class Flow(Generic[P, R]):
|
|
787
791
|
parameters=parameters or {},
|
788
792
|
description=description,
|
789
793
|
version=version,
|
794
|
+
version_type=version_type,
|
790
795
|
enforce_parameter_schema=enforce_parameter_schema,
|
791
796
|
work_pool_name=work_pool_name,
|
792
797
|
work_queue_name=work_queue_name,
|
@@ -809,6 +814,7 @@ class Flow(Generic[P, R]):
|
|
809
814
|
parameters=parameters or {},
|
810
815
|
description=description,
|
811
816
|
version=version,
|
817
|
+
version_type=version_type,
|
812
818
|
enforce_parameter_schema=enforce_parameter_schema,
|
813
819
|
work_pool_name=work_pool_name,
|
814
820
|
work_queue_name=work_queue_name,
|
@@ -840,6 +846,7 @@ class Flow(Generic[P, R]):
|
|
840
846
|
description: Optional[str] = None,
|
841
847
|
tags: Optional[list[str]] = None,
|
842
848
|
version: Optional[str] = None,
|
849
|
+
version_type: Optional[VersionType] = None,
|
843
850
|
enforce_parameter_schema: bool = True,
|
844
851
|
work_pool_name: Optional[str] = None,
|
845
852
|
work_queue_name: Optional[str] = None,
|
@@ -869,6 +876,8 @@ class Flow(Generic[P, R]):
|
|
869
876
|
tags: A list of tags to associate with the created deployment for organizational
|
870
877
|
purposes.
|
871
878
|
version: A version for the created deployment. Defaults to the flow's version.
|
879
|
+
version_type: The type of version to use for the created deployment. The version type
|
880
|
+
will be inferred if not provided.
|
872
881
|
enforce_parameter_schema: Whether or not the Prefect API should enforce the
|
873
882
|
parameter schema for the created deployment.
|
874
883
|
work_pool_name: The name of the work pool to use for this deployment.
|
@@ -925,6 +934,7 @@ class Flow(Generic[P, R]):
|
|
925
934
|
parameters=parameters or {},
|
926
935
|
description=description,
|
927
936
|
version=version,
|
937
|
+
version_type=version_type,
|
928
938
|
enforce_parameter_schema=enforce_parameter_schema,
|
929
939
|
work_pool_name=work_pool_name,
|
930
940
|
work_queue_name=work_queue_name,
|
@@ -949,6 +959,7 @@ class Flow(Generic[P, R]):
|
|
949
959
|
parameters=parameters or {},
|
950
960
|
description=description,
|
951
961
|
version=version,
|
962
|
+
version_type=version_type,
|
952
963
|
enforce_parameter_schema=enforce_parameter_schema,
|
953
964
|
work_pool_name=work_pool_name,
|
954
965
|
work_queue_name=work_queue_name,
|
@@ -1375,6 +1386,7 @@ class Flow(Generic[P, R]):
|
|
1375
1386
|
description: Optional[str] = None,
|
1376
1387
|
tags: Optional[list[str]] = None,
|
1377
1388
|
version: Optional[str] = None,
|
1389
|
+
version_type: Optional[VersionType] = None,
|
1378
1390
|
enforce_parameter_schema: bool = True,
|
1379
1391
|
entrypoint_type: EntrypointType = EntrypointType.FILE_PATH,
|
1380
1392
|
print_next_steps: bool = True,
|
@@ -1426,6 +1438,8 @@ class Flow(Generic[P, R]):
|
|
1426
1438
|
tags: A list of tags to associate with the created deployment for organizational
|
1427
1439
|
purposes.
|
1428
1440
|
version: A version for the created deployment. Defaults to the flow's version.
|
1441
|
+
version_type: The type of version to use for the created deployment. The version type
|
1442
|
+
will be inferred if not provided.
|
1429
1443
|
enforce_parameter_schema: Whether or not the Prefect API should enforce the
|
1430
1444
|
parameter schema for the created deployment.
|
1431
1445
|
entrypoint_type: Type of entrypoint to use for the deployment. When using a module path
|
@@ -1510,6 +1524,7 @@ class Flow(Generic[P, R]):
|
|
1510
1524
|
description=description,
|
1511
1525
|
tags=tags,
|
1512
1526
|
version=version,
|
1527
|
+
version_type=version_type,
|
1513
1528
|
enforce_parameter_schema=enforce_parameter_schema,
|
1514
1529
|
work_queue_name=work_queue_name,
|
1515
1530
|
job_variables=job_variables,
|
@@ -14,7 +14,7 @@ from typing_extensions import NamedTuple, Self, TypeVar
|
|
14
14
|
from prefect._waiters import FlowRunWaiter
|
15
15
|
from prefect.client.orchestration import get_client
|
16
16
|
from prefect.exceptions import ObjectNotFound
|
17
|
-
from prefect.logging.loggers import get_logger
|
17
|
+
from prefect.logging.loggers import get_logger
|
18
18
|
from prefect.states import Pending, State
|
19
19
|
from prefect.task_runs import TaskRunWaiter
|
20
20
|
from prefect.utilities.annotations import quote
|
@@ -224,19 +224,6 @@ class PrefectConcurrentFuture(PrefectWrappedFuture[R, concurrent.futures.Future[
|
|
224
224
|
)
|
225
225
|
return _result
|
226
226
|
|
227
|
-
def __del__(self) -> None:
|
228
|
-
if self._final_state or self._wrapped_future.done():
|
229
|
-
return
|
230
|
-
try:
|
231
|
-
local_logger = get_run_logger()
|
232
|
-
except Exception:
|
233
|
-
local_logger = logger
|
234
|
-
local_logger.warning(
|
235
|
-
"A future was garbage collected before it resolved."
|
236
|
-
" Please call `.wait()` or `.result()` on futures to ensure they resolve."
|
237
|
-
"\nSee https://docs.prefect.io/latest/develop/task-runners for more details.",
|
238
|
-
)
|
239
|
-
|
240
227
|
|
241
228
|
class PrefectDistributedFuture(PrefectTaskRunFuture[R]):
|
242
229
|
"""
|
@@ -133,6 +133,7 @@ class CloudRunPushProvisioner:
|
|
133
133
|
await self._run_command(
|
134
134
|
f"gcloud iam service-accounts create {self._service_account_name}"
|
135
135
|
' --display-name "Prefect Cloud Run Service Account"'
|
136
|
+
f" --project={self._project}"
|
136
137
|
)
|
137
138
|
except subprocess.CalledProcessError as e:
|
138
139
|
if "already exists" not in e.output.decode("utf-8"):
|
@@ -1301,7 +1301,7 @@ class Runner:
|
|
1301
1301
|
except anyio.WouldBlock:
|
1302
1302
|
if TYPE_CHECKING:
|
1303
1303
|
assert self._limiter is not None
|
1304
|
-
self._logger.
|
1304
|
+
self._logger.debug(
|
1305
1305
|
f"Flow run limit reached; {self._limiter.borrowed_tokens} flow runs"
|
1306
1306
|
" in progress. You can control this limit by adjusting the "
|
1307
1307
|
"PREFECT_RUNNER_PROCESS_LIMIT setting."
|
@@ -62,6 +62,19 @@ from prefect.settings import (
|
|
62
62
|
)
|
63
63
|
from prefect.utilities.hashing import hash_objects
|
64
64
|
|
65
|
+
if os.environ.get("PREFECT_LOGFIRE_ENABLED"):
|
66
|
+
import logfire # pyright: ignore
|
67
|
+
|
68
|
+
token: str | None = os.environ.get("PREFECT_LOGFIRE_WRITE_TOKEN")
|
69
|
+
if token is None:
|
70
|
+
raise ValueError(
|
71
|
+
"PREFECT_LOGFIRE_WRITE_TOKEN must be set when PREFECT_LOGFIRE_ENABLED is true"
|
72
|
+
)
|
73
|
+
|
74
|
+
logfire.configure(token=token) # pyright: ignore
|
75
|
+
else:
|
76
|
+
logfire = None
|
77
|
+
|
65
78
|
if TYPE_CHECKING:
|
66
79
|
import logging
|
67
80
|
|
@@ -250,7 +263,7 @@ def copy_directory(directory: str, path: str) -> None:
|
|
250
263
|
shutil.rmtree(destination)
|
251
264
|
shutil.copytree(source, destination, symlinks=True)
|
252
265
|
# ensure copied files are writeable
|
253
|
-
for root,
|
266
|
+
for root, _, files in os.walk(destination):
|
254
267
|
for f in files:
|
255
268
|
os.chmod(os.path.join(root, f), 0o700)
|
256
269
|
else:
|
@@ -329,6 +342,10 @@ def create_api_app(
|
|
329
342
|
|
330
343
|
fast_api_app_kwargs = fast_api_app_kwargs or {}
|
331
344
|
api_app = FastAPI(title=API_TITLE, **fast_api_app_kwargs)
|
345
|
+
|
346
|
+
if logfire:
|
347
|
+
logfire.instrument_fastapi(api_app) # pyright: ignore
|
348
|
+
|
332
349
|
api_app.add_middleware(GZipMiddleware)
|
333
350
|
|
334
351
|
@api_app.get(health_check_path, tags=["Root"])
|
@@ -14,6 +14,7 @@ from fastapi import (
|
|
14
14
|
Path,
|
15
15
|
status,
|
16
16
|
)
|
17
|
+
from packaging.version import Version
|
17
18
|
from sqlalchemy.ext.asyncio import AsyncSession
|
18
19
|
|
19
20
|
import prefect.server.api.dependencies as dependencies
|
@@ -157,6 +158,9 @@ class WorkerLookups:
|
|
157
158
|
async def create_work_pool(
|
158
159
|
work_pool: schemas.actions.WorkPoolCreate,
|
159
160
|
db: PrefectDBInterface = Depends(provide_database_interface),
|
161
|
+
prefect_client_version: Optional[str] = Depends(
|
162
|
+
dependencies.get_prefect_client_version
|
163
|
+
),
|
160
164
|
) -> schemas.core.WorkPool:
|
161
165
|
"""
|
162
166
|
Creates a new work pool. If a work pool with the same
|
@@ -186,7 +190,14 @@ async def create_work_pool(
|
|
186
190
|
work_pool=model,
|
187
191
|
)
|
188
192
|
|
189
|
-
|
193
|
+
ret = schemas.core.WorkPool.model_validate(model, from_attributes=True)
|
194
|
+
if prefect_client_version and Version(prefect_client_version) <= Version(
|
195
|
+
"3.3.7"
|
196
|
+
):
|
197
|
+
# Client versions 3.3.7 and below do not support the default_result_storage_block_id field and will error
|
198
|
+
# when receiving it.
|
199
|
+
del ret.storage_configuration.default_result_storage_block_id
|
200
|
+
return ret
|
190
201
|
|
191
202
|
except sa.exc.IntegrityError:
|
192
203
|
raise HTTPException(
|
@@ -200,6 +211,9 @@ async def read_work_pool(
|
|
200
211
|
work_pool_name: str = Path(..., description="The work pool name", alias="name"),
|
201
212
|
worker_lookups: WorkerLookups = Depends(WorkerLookups),
|
202
213
|
db: PrefectDBInterface = Depends(provide_database_interface),
|
214
|
+
prefect_client_version: Optional[str] = Depends(
|
215
|
+
dependencies.get_prefect_client_version
|
216
|
+
),
|
203
217
|
) -> schemas.core.WorkPool:
|
204
218
|
"""
|
205
219
|
Read a work pool by name
|
@@ -212,7 +226,18 @@ async def read_work_pool(
|
|
212
226
|
orm_work_pool = await models.workers.read_work_pool(
|
213
227
|
session=session, work_pool_id=work_pool_id
|
214
228
|
)
|
215
|
-
|
229
|
+
work_pool = schemas.core.WorkPool.model_validate(
|
230
|
+
orm_work_pool, from_attributes=True
|
231
|
+
)
|
232
|
+
|
233
|
+
if prefect_client_version and Version(prefect_client_version) <= Version(
|
234
|
+
"3.3.7"
|
235
|
+
):
|
236
|
+
# Client versions 3.3.7 and below do not support the default_result_storage_block_id field and will error
|
237
|
+
# when receiving it.
|
238
|
+
del work_pool.storage_configuration.default_result_storage_block_id
|
239
|
+
|
240
|
+
return work_pool
|
216
241
|
|
217
242
|
|
218
243
|
@router.post("/filter")
|
@@ -220,8 +245,10 @@ async def read_work_pools(
|
|
220
245
|
work_pools: Optional[schemas.filters.WorkPoolFilter] = None,
|
221
246
|
limit: int = dependencies.LimitBody(),
|
222
247
|
offset: int = Body(0, ge=0),
|
223
|
-
worker_lookups: WorkerLookups = Depends(WorkerLookups),
|
224
248
|
db: PrefectDBInterface = Depends(provide_database_interface),
|
249
|
+
prefect_client_version: Optional[str] = Depends(
|
250
|
+
dependencies.get_prefect_client_version
|
251
|
+
),
|
225
252
|
) -> List[schemas.core.WorkPool]:
|
226
253
|
"""
|
227
254
|
Read multiple work pools
|
@@ -233,10 +260,18 @@ async def read_work_pools(
|
|
233
260
|
offset=offset,
|
234
261
|
limit=limit,
|
235
262
|
)
|
236
|
-
|
263
|
+
ret = [
|
237
264
|
schemas.core.WorkPool.model_validate(w, from_attributes=True)
|
238
265
|
for w in orm_work_pools
|
239
266
|
]
|
267
|
+
if prefect_client_version and Version(prefect_client_version) <= Version(
|
268
|
+
"3.3.7"
|
269
|
+
):
|
270
|
+
# Client versions 3.3.7 and below do not support the default_result_storage_block_id field and will error
|
271
|
+
# when receiving it.
|
272
|
+
for work_pool in ret:
|
273
|
+
del work_pool.storage_configuration.default_result_storage_block_id
|
274
|
+
return ret
|
240
275
|
|
241
276
|
|
242
277
|
@router.post("/count")
|
@@ -2,7 +2,7 @@ from __future__ import annotations
|
|
2
2
|
|
3
3
|
import inspect
|
4
4
|
from functools import partial
|
5
|
-
from typing import Any
|
5
|
+
from typing import Any
|
6
6
|
|
7
7
|
from pydantic import (
|
8
8
|
AliasChoices,
|
@@ -32,12 +32,12 @@ class PrefectBaseSettings(BaseSettings):
|
|
32
32
|
@classmethod
|
33
33
|
def settings_customise_sources(
|
34
34
|
cls,
|
35
|
-
settings_cls:
|
35
|
+
settings_cls: type[BaseSettings],
|
36
36
|
init_settings: PydanticBaseSettingsSource,
|
37
37
|
env_settings: PydanticBaseSettingsSource,
|
38
38
|
dotenv_settings: PydanticBaseSettingsSource,
|
39
39
|
file_secret_settings: PydanticBaseSettingsSource,
|
40
|
-
) ->
|
40
|
+
) -> tuple[PydanticBaseSettingsSource, ...]:
|
41
41
|
"""
|
42
42
|
Define an order for Prefect settings sources.
|
43
43
|
|
@@ -93,9 +93,9 @@ class PrefectBaseSettings(BaseSettings):
|
|
93
93
|
exclude_unset: bool = False,
|
94
94
|
include_secrets: bool = True,
|
95
95
|
include_aliases: bool = False,
|
96
|
-
) ->
|
96
|
+
) -> dict[str, str]:
|
97
97
|
"""Convert the settings object to a dictionary of environment variables."""
|
98
|
-
env:
|
98
|
+
env: dict[str, Any] = self.model_dump(
|
99
99
|
exclude_unset=exclude_unset,
|
100
100
|
mode="json",
|
101
101
|
context={"include_secrets": include_secrets},
|
@@ -192,7 +192,7 @@ class PrefectSettingsConfigDict(SettingsConfigDict, total=False):
|
|
192
192
|
|
193
193
|
|
194
194
|
def _add_environment_variables(
|
195
|
-
schema:
|
195
|
+
schema: dict[str, Any], model: type[PrefectBaseSettings]
|
196
196
|
) -> None:
|
197
197
|
for property in schema["properties"]:
|
198
198
|
env_vars: list[str] = []
|
@@ -212,7 +212,7 @@ def _add_environment_variables(
|
|
212
212
|
|
213
213
|
|
214
214
|
def build_settings_config(
|
215
|
-
path:
|
215
|
+
path: tuple[str, ...] = tuple(), frozen: bool = False
|
216
216
|
) -> PrefectSettingsConfigDict:
|
217
217
|
env_prefix = f"PREFECT_{'_'.join(path).upper()}_" if path else "PREFECT_"
|
218
218
|
return PrefectSettingsConfigDict(
|