prefect-client 3.3.5.dev3__tar.gz → 3.3.6__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.5.dev3 → prefect_client-3.3.6}/PKG-INFO +2 -2
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/pyproject.toml +1 -1
- prefect_client-3.3.6/src/prefect/_build_info.py +5 -0
- prefect_client-3.3.5.dev3/src/prefect/_experimental/bundles.py → prefect_client-3.3.6/src/prefect/_experimental/bundles/__init__.py +39 -11
- prefect_client-3.3.6/src/prefect/_experimental/bundles/execute.py +34 -0
- prefect_client-3.3.6/src/prefect/_versioning.py +180 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/cache_policies.py +4 -4
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/client/orchestration/_deployments/client.py +49 -22
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/concurrency/context.py +3 -1
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/context.py +1 -3
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/deployments/runner.py +22 -6
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/events/clients.py +1 -1
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/flows.py +240 -1
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/futures.py +54 -21
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/runner/runner.py +8 -3
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/server/api/deployments.py +41 -3
- prefect_client-3.3.6/src/prefect/utilities/_ast.py +117 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/workers/base.py +193 -7
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/workers/process.py +60 -3
- prefect_client-3.3.5.dev3/src/prefect/_build_info.py +0 -5
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/.gitignore +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/LICENSE +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/README.md +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/.prefectignore +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/__main__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/_experimental/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/_experimental/lineage.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/_experimental/sla/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/_experimental/sla/client.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/_experimental/sla/objects.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/_internal/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/_internal/_logging.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/_internal/compatibility/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/_internal/compatibility/async_dispatch.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/_internal/compatibility/deprecated.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/_internal/compatibility/migration.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/_internal/concurrency/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/_internal/concurrency/api.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/_internal/concurrency/calls.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/_internal/concurrency/cancellation.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/_internal/concurrency/event_loop.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/_internal/concurrency/inspection.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/_internal/concurrency/primitives.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/_internal/concurrency/services.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/_internal/concurrency/threads.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/_internal/concurrency/waiters.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/_internal/integrations.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/_internal/pydantic/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/_internal/pydantic/schemas.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/_internal/pydantic/v1_schema.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/_internal/pydantic/v2_schema.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/_internal/pydantic/v2_validated_func.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/_internal/pytz.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/_internal/retries.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/_internal/schemas/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/_internal/schemas/bases.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/_internal/schemas/fields.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/_internal/schemas/serializers.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/_internal/schemas/validators.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/_result_records.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/_vendor/croniter/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/_vendor/croniter/croniter.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/_waiters.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/agent.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/artifacts.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/automations.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/blocks/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/blocks/abstract.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/blocks/core.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/blocks/fields.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/blocks/notifications.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/blocks/redis.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/blocks/system.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/blocks/webhook.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/client/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/client/base.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/client/cloud.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/client/collections.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/client/constants.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/client/orchestration/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/client/orchestration/_artifacts/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/client/orchestration/_artifacts/client.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/client/orchestration/_automations/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/client/orchestration/_automations/client.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/client/orchestration/_blocks_documents/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/client/orchestration/_blocks_documents/client.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/client/orchestration/_blocks_schemas/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/client/orchestration/_blocks_schemas/client.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/client/orchestration/_blocks_types/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/client/orchestration/_blocks_types/client.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/client/orchestration/_concurrency_limits/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/client/orchestration/_concurrency_limits/client.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/client/orchestration/_deployments/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/client/orchestration/_flow_runs/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/client/orchestration/_flow_runs/client.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/client/orchestration/_flows/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/client/orchestration/_flows/client.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/client/orchestration/_logs/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/client/orchestration/_logs/client.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/client/orchestration/_variables/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/client/orchestration/_variables/client.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/client/orchestration/_work_pools/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/client/orchestration/_work_pools/client.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/client/orchestration/base.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/client/orchestration/routes.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/client/schemas/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/client/schemas/actions.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/client/schemas/filters.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/client/schemas/objects.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/client/schemas/responses.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/client/schemas/schedules.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/client/schemas/sorting.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/client/subscriptions.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/client/types/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/client/types/flexible_schedule_list.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/client/utilities.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/concurrency/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/concurrency/_asyncio.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/concurrency/_events.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/concurrency/asyncio.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/concurrency/services.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/concurrency/sync.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/concurrency/v1/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/concurrency/v1/_asyncio.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/concurrency/v1/_events.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/concurrency/v1/asyncio.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/concurrency/v1/context.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/concurrency/v1/services.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/concurrency/v1/sync.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/deployments/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/deployments/base.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/deployments/deployments.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/deployments/flow_runs.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/deployments/schedules.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/deployments/steps/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/deployments/steps/core.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/deployments/steps/pull.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/deployments/steps/utility.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/docker/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/docker/docker_image.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/engine.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/events/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/events/actions.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/events/cli/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/events/cli/automations.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/events/filters.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/events/related.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/events/schemas/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/events/schemas/automations.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/events/schemas/deployment_triggers.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/events/schemas/events.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/events/schemas/labelling.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/events/utilities.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/events/worker.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/exceptions.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/filesystems.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/flow_engine.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/flow_runs.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/infrastructure/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/infrastructure/base.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/infrastructure/provisioners/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/infrastructure/provisioners/cloud_run.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/infrastructure/provisioners/coiled.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/infrastructure/provisioners/container_instance.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/infrastructure/provisioners/ecs.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/infrastructure/provisioners/modal.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/input/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/input/actions.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/input/run_input.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/locking/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/locking/filesystem.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/locking/memory.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/locking/protocol.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/logging/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/logging/configuration.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/logging/filters.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/logging/formatters.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/logging/handlers.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/logging/highlighters.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/logging/loggers.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/logging/logging.yml +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/main.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/plugins.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/py.typed +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/results.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/runner/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/runner/server.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/runner/storage.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/runner/submit.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/runner/utils.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/runtime/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/runtime/deployment.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/runtime/flow_run.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/runtime/task_run.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/schedules.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/serializers.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/server/api/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/server/api/admin.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/server/api/artifacts.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/server/api/automations.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/server/api/block_capabilities.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/server/api/block_documents.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/server/api/block_schemas.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/server/api/block_types.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/server/api/clients.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/server/api/collections.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/server/api/collections_data/views/aggregate-worker-metadata.json +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/server/api/concurrency_limits.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/server/api/concurrency_limits_v2.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/server/api/csrf_token.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/server/api/dependencies.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/server/api/events.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/server/api/flow_run_notification_policies.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/server/api/flow_run_states.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/server/api/flow_runs.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/server/api/flows.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/server/api/logs.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/server/api/middleware.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/server/api/root.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/server/api/run_history.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/server/api/saved_searches.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/server/api/server.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/server/api/static/prefect-logo-mark-gradient.png +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/server/api/task_run_states.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/server/api/task_runs.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/server/api/task_workers.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/server/api/templates.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/server/api/ui/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/server/api/ui/flow_runs.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/server/api/ui/flows.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/server/api/ui/schemas.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/server/api/ui/task_runs.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/server/api/validation.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/server/api/variables.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/server/api/work_queues.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/server/api/workers.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/settings/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/settings/base.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/settings/constants.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/settings/context.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/settings/legacy.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/settings/models/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/settings/models/api.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/settings/models/cli.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/settings/models/client.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/settings/models/cloud.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/settings/models/deployments.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/settings/models/experiments.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/settings/models/flows.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/settings/models/internal.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/settings/models/logging.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/settings/models/results.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/settings/models/root.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/settings/models/runner.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/settings/models/server/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/settings/models/server/api.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/settings/models/server/database.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/settings/models/server/deployments.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/settings/models/server/ephemeral.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/settings/models/server/events.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/settings/models/server/flow_run_graph.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/settings/models/server/root.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/settings/models/server/services.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/settings/models/server/tasks.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/settings/models/server/ui.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/settings/models/tasks.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/settings/models/testing.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/settings/models/worker.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/settings/profiles.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/settings/profiles.toml +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/settings/sources.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/states.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/task_engine.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/task_runners.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/task_runs.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/task_worker.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/tasks.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/telemetry/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/telemetry/bootstrap.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/telemetry/instrumentation.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/telemetry/logging.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/telemetry/processors.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/telemetry/run_telemetry.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/telemetry/services.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/transactions.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/types/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/types/_datetime.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/types/entrypoint.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/utilities/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/utilities/_deprecated.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/utilities/_engine.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/utilities/_git.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/utilities/annotations.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/utilities/asyncutils.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/utilities/callables.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/utilities/collections.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/utilities/compat.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/utilities/context.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/utilities/dispatch.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/utilities/dockerutils.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/utilities/engine.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/utilities/filesystem.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/utilities/generics.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/utilities/hashing.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/utilities/importtools.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/utilities/math.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/utilities/names.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/utilities/processutils.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/utilities/pydantic.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/utilities/render_swagger.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/utilities/schema_tools/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/utilities/schema_tools/hydration.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/utilities/schema_tools/validation.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/utilities/services.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/utilities/slugify.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/utilities/templating.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/utilities/text.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/utilities/timeout.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/utilities/urls.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/utilities/visualization.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/variables.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/workers/__init__.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/workers/block.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/workers/cloud.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/src/prefect/workers/server.py +0 -0
- {prefect_client-3.3.5.dev3 → prefect_client-3.3.6}/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.
|
3
|
+
Version: 3.3.6
|
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
|
@@ -47,7 +47,7 @@ Requires-Dist: prometheus-client>=0.20.0
|
|
47
47
|
Requires-Dist: pydantic!=2.10.0,<3.0.0,>=2.9
|
48
48
|
Requires-Dist: pydantic-core<3.0.0,>=2.12.0
|
49
49
|
Requires-Dist: pydantic-extra-types<3.0.0,>=2.8.2
|
50
|
-
Requires-Dist: pydantic-settings
|
50
|
+
Requires-Dist: pydantic-settings!=2.9.0,<3.0.0,>2.2.1
|
51
51
|
Requires-Dist: python-dateutil<3.0.0,>=2.8.2
|
52
52
|
Requires-Dist: python-slugify<9.0,>=5.0
|
53
53
|
Requires-Dist: python-socks[asyncio]<3.0,>=2.5.3
|
@@ -51,7 +51,7 @@ dependencies = [
|
|
51
51
|
"pydantic>=2.9,<3.0.0,!=2.10.0",
|
52
52
|
"pydantic_core>=2.12.0,<3.0.0",
|
53
53
|
"pydantic_extra_types>=2.8.2,<3.0.0",
|
54
|
-
"pydantic_settings>2.2.1",
|
54
|
+
"pydantic_settings>2.2.1,<3.0.0,!=2.9.0",
|
55
55
|
"python-dateutil>=2.8.2,<3.0.0",
|
56
56
|
"python-slugify>=5.0,<9.0",
|
57
57
|
"python-socks[asyncio]>=2.5.3,<3.0",
|
@@ -8,9 +8,10 @@ import multiprocessing.context
|
|
8
8
|
import os
|
9
9
|
import subprocess
|
10
10
|
import sys
|
11
|
+
from pathlib import Path
|
11
12
|
from typing import Any, TypedDict
|
12
13
|
|
13
|
-
import cloudpickle
|
14
|
+
import cloudpickle # pyright: ignore[reportMissingTypeStubs]
|
14
15
|
|
15
16
|
from prefect.client.schemas.objects import FlowRun
|
16
17
|
from prefect.context import SettingsContext, get_settings_context, serialize_context
|
@@ -21,12 +22,18 @@ from prefect.settings.context import get_current_settings
|
|
21
22
|
from prefect.settings.models.root import Settings
|
22
23
|
from prefect.utilities.slugify import slugify
|
23
24
|
|
24
|
-
|
25
|
-
import uv
|
25
|
+
from .execute import execute_bundle_from_file
|
26
26
|
|
27
|
-
|
28
|
-
|
29
|
-
|
27
|
+
|
28
|
+
def _get_uv_path() -> str:
|
29
|
+
try:
|
30
|
+
import uv
|
31
|
+
|
32
|
+
uv_path = uv.find_uv_bin()
|
33
|
+
except (ImportError, ModuleNotFoundError):
|
34
|
+
uv_path = "uv"
|
35
|
+
|
36
|
+
return uv_path
|
30
37
|
|
31
38
|
|
32
39
|
class SerializedBundle(TypedDict):
|
@@ -45,7 +52,7 @@ def _serialize_bundle_object(obj: Any) -> str:
|
|
45
52
|
"""
|
46
53
|
Serializes an object to a string.
|
47
54
|
"""
|
48
|
-
return base64.b64encode(gzip.compress(cloudpickle.dumps(obj))).decode()
|
55
|
+
return base64.b64encode(gzip.compress(cloudpickle.dumps(obj))).decode() # pyright: ignore[reportUnknownMemberType]
|
49
56
|
|
50
57
|
|
51
58
|
def _deserialize_bundle_object(serialized_obj: str) -> Any:
|
@@ -79,7 +86,7 @@ def create_bundle_for_flow_run(
|
|
79
86
|
"flow_run": flow_run.model_dump(mode="json"),
|
80
87
|
"dependencies": subprocess.check_output(
|
81
88
|
[
|
82
|
-
|
89
|
+
_get_uv_path(),
|
83
90
|
"pip",
|
84
91
|
"freeze",
|
85
92
|
# Exclude editable installs because we won't be able to install them in the execution environment
|
@@ -99,7 +106,9 @@ def extract_flow_from_bundle(bundle: SerializedBundle) -> Flow[Any, Any]:
|
|
99
106
|
|
100
107
|
|
101
108
|
def _extract_and_run_flow(
|
102
|
-
bundle: SerializedBundle,
|
109
|
+
bundle: SerializedBundle,
|
110
|
+
cwd: Path | str | None = None,
|
111
|
+
env: dict[str, Any] | None = None,
|
103
112
|
) -> None:
|
104
113
|
"""
|
105
114
|
Extracts a flow from a bundle and runs it.
|
@@ -108,6 +117,7 @@ def _extract_and_run_flow(
|
|
108
117
|
|
109
118
|
Args:
|
110
119
|
bundle: The bundle to extract and run.
|
120
|
+
cwd: The working directory to use when running the flow.
|
111
121
|
env: The environment to use when running the flow.
|
112
122
|
"""
|
113
123
|
|
@@ -120,6 +130,9 @@ def _extract_and_run_flow(
|
|
120
130
|
context = _deserialize_bundle_object(bundle["context"])
|
121
131
|
flow_run = FlowRun.model_validate(bundle["flow_run"])
|
122
132
|
|
133
|
+
if cwd:
|
134
|
+
os.chdir(cwd)
|
135
|
+
|
123
136
|
with SettingsContext(
|
124
137
|
profile=settings_context.profile,
|
125
138
|
settings=Settings(),
|
@@ -138,6 +151,8 @@ def _extract_and_run_flow(
|
|
138
151
|
|
139
152
|
def execute_bundle_in_subprocess(
|
140
153
|
bundle: SerializedBundle,
|
154
|
+
env: dict[str, Any] | None = None,
|
155
|
+
cwd: Path | str | None = None,
|
141
156
|
) -> multiprocessing.context.SpawnProcess:
|
142
157
|
"""
|
143
158
|
Executes a bundle in a subprocess.
|
@@ -150,11 +165,12 @@ def execute_bundle_in_subprocess(
|
|
150
165
|
"""
|
151
166
|
|
152
167
|
ctx = multiprocessing.get_context("spawn")
|
168
|
+
env = env or {}
|
153
169
|
|
154
170
|
# Install dependencies if necessary
|
155
171
|
if dependencies := bundle.get("dependencies"):
|
156
172
|
subprocess.check_call(
|
157
|
-
[
|
173
|
+
[_get_uv_path(), "pip", "install", *dependencies.split("\n")],
|
158
174
|
# Copy the current environment to ensure we install into the correct venv
|
159
175
|
env=os.environ,
|
160
176
|
)
|
@@ -164,7 +180,9 @@ def execute_bundle_in_subprocess(
|
|
164
180
|
kwargs={
|
165
181
|
"bundle": bundle,
|
166
182
|
"env": get_current_settings().to_environment_variables(exclude_unset=True)
|
167
|
-
| os.environ
|
183
|
+
| os.environ
|
184
|
+
| env,
|
185
|
+
"cwd": cwd,
|
168
186
|
},
|
169
187
|
)
|
170
188
|
|
@@ -226,3 +244,13 @@ def convert_step_to_command(
|
|
226
244
|
command.extend(["--key", key])
|
227
245
|
|
228
246
|
return command
|
247
|
+
|
248
|
+
|
249
|
+
__all__ = [
|
250
|
+
"execute_bundle_from_file",
|
251
|
+
"convert_step_to_command",
|
252
|
+
"create_bundle_for_flow_run",
|
253
|
+
"extract_flow_from_bundle",
|
254
|
+
"execute_bundle_in_subprocess",
|
255
|
+
"SerializedBundle",
|
256
|
+
]
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import json
|
2
|
+
|
3
|
+
import typer
|
4
|
+
|
5
|
+
from prefect.utilities.asyncutils import run_coro_as_sync
|
6
|
+
|
7
|
+
|
8
|
+
def execute_bundle_from_file(key: str):
|
9
|
+
"""
|
10
|
+
Loads a bundle from a file and executes it.
|
11
|
+
|
12
|
+
Args:
|
13
|
+
key: The key of the bundle to execute.
|
14
|
+
"""
|
15
|
+
with open(key, "r") as f:
|
16
|
+
bundle = json.load(f)
|
17
|
+
|
18
|
+
from prefect.runner.runner import Runner
|
19
|
+
|
20
|
+
run_coro_as_sync(Runner().execute_bundle(bundle))
|
21
|
+
|
22
|
+
|
23
|
+
def _execute_bundle_from_file(key: str = typer.Option(...)):
|
24
|
+
"""
|
25
|
+
Loads a bundle from a file and executes it.
|
26
|
+
|
27
|
+
Args:
|
28
|
+
key: The key of the bundle to execute.
|
29
|
+
"""
|
30
|
+
execute_bundle_from_file(key)
|
31
|
+
|
32
|
+
|
33
|
+
if __name__ == "__main__":
|
34
|
+
typer.run(_execute_bundle_from_file)
|
@@ -0,0 +1,180 @@
|
|
1
|
+
from __future__ import annotations
|
2
|
+
|
3
|
+
import os
|
4
|
+
from enum import Enum
|
5
|
+
from typing import Any, Callable, Coroutine, Dict, Literal, Optional
|
6
|
+
from urllib.parse import urlparse
|
7
|
+
|
8
|
+
from anyio import run_process
|
9
|
+
from pydantic import Field, model_validator
|
10
|
+
|
11
|
+
from prefect.client.schemas.objects import VersionInfo
|
12
|
+
|
13
|
+
|
14
|
+
class SimpleVersionInfo(VersionInfo):
|
15
|
+
type: Literal["prefect:simple"] = "prefect:simple"
|
16
|
+
version: str = Field(default="")
|
17
|
+
branch: Optional[str] = Field(default=None)
|
18
|
+
url: Optional[str] = Field(default=None)
|
19
|
+
|
20
|
+
|
21
|
+
class GithubVersionInfo(VersionInfo):
|
22
|
+
type: Literal["vcs:github"] = "vcs:github"
|
23
|
+
version: str
|
24
|
+
branch: str
|
25
|
+
url: str
|
26
|
+
repository: str
|
27
|
+
|
28
|
+
@model_validator(mode="after")
|
29
|
+
def validate_branch(self):
|
30
|
+
if not self.branch:
|
31
|
+
raise ValueError("branch is required when type is 'vcs:github'")
|
32
|
+
return self
|
33
|
+
|
34
|
+
|
35
|
+
class GitVersionInfo(VersionInfo):
|
36
|
+
type: Literal["vcs:git"] = "vcs:git"
|
37
|
+
version: str
|
38
|
+
branch: str
|
39
|
+
url: str
|
40
|
+
repository: str
|
41
|
+
|
42
|
+
|
43
|
+
async def get_github_version_info(
|
44
|
+
version: Optional[str] = None,
|
45
|
+
branch: Optional[str] = None,
|
46
|
+
repository: Optional[str] = None,
|
47
|
+
url: Optional[str] = None,
|
48
|
+
) -> GithubVersionInfo:
|
49
|
+
"""Create a GithubVersionInfo object from provided values or environment variables.
|
50
|
+
|
51
|
+
Args:
|
52
|
+
version: The commit SHA, falls back to GITHUB_SHA env var
|
53
|
+
branch: The git branch, falls back to GITHUB_REF_NAME env var
|
54
|
+
repository: The repository name, falls back to GITHUB_REPOSITORY env var
|
55
|
+
url: The repository URL, constructed from GITHUB_SERVER_URL/GITHUB_REPOSITORY if not provided
|
56
|
+
|
57
|
+
Returns:
|
58
|
+
A GithubVersionInfo
|
59
|
+
|
60
|
+
Raises:
|
61
|
+
ValueError: If any required fields cannot be determined
|
62
|
+
"""
|
63
|
+
version = version or os.getenv("GITHUB_SHA")
|
64
|
+
branch = branch or os.getenv("GITHUB_REF_NAME")
|
65
|
+
repository = repository or os.getenv("GITHUB_REPOSITORY")
|
66
|
+
url = url or f"{os.getenv('GITHUB_SERVER_URL')}/{repository}"
|
67
|
+
|
68
|
+
if not version:
|
69
|
+
raise ValueError("version is required - must be provided or set in GITHUB_SHA")
|
70
|
+
if not branch:
|
71
|
+
raise ValueError(
|
72
|
+
"branch is required - must be provided or set in GITHUB_REF_NAME"
|
73
|
+
)
|
74
|
+
if not repository:
|
75
|
+
raise ValueError(
|
76
|
+
"repository is required - must be provided or set in GITHUB_REPOSITORY"
|
77
|
+
)
|
78
|
+
|
79
|
+
return GithubVersionInfo(
|
80
|
+
type="vcs:github",
|
81
|
+
version=version,
|
82
|
+
branch=branch,
|
83
|
+
repository=repository,
|
84
|
+
url=url,
|
85
|
+
)
|
86
|
+
|
87
|
+
|
88
|
+
async def get_git_version_info(
|
89
|
+
version: Optional[str] = None,
|
90
|
+
branch: Optional[str] = None,
|
91
|
+
url: Optional[str] = None,
|
92
|
+
repository: Optional[str] = None,
|
93
|
+
) -> GitVersionInfo:
|
94
|
+
try:
|
95
|
+
if not version:
|
96
|
+
# Run git command and get stdout
|
97
|
+
result = await run_process(["git", "rev-parse", "HEAD"])
|
98
|
+
# Decode bytes to string and strip whitespace
|
99
|
+
version = result.stdout.decode().strip()
|
100
|
+
|
101
|
+
if not branch:
|
102
|
+
result = await run_process(["git", "rev-parse", "--abbrev-ref", "HEAD"])
|
103
|
+
branch = result.stdout.decode().strip()
|
104
|
+
|
105
|
+
if not repository:
|
106
|
+
result = await run_process(["git", "config", "--get", "remote.origin.url"])
|
107
|
+
remote_url = result.stdout.decode().strip()
|
108
|
+
|
109
|
+
# Extract just the repository name (last part of the path)
|
110
|
+
repo_url = urlparse(remote_url)
|
111
|
+
repository = repo_url.path.strip("/")
|
112
|
+
if repository.endswith(".git"):
|
113
|
+
repository = repository[:-4]
|
114
|
+
|
115
|
+
if not url and repository:
|
116
|
+
# Use the full remote URL as the URL
|
117
|
+
result = await run_process(["git", "config", "--get", "remote.origin.url"])
|
118
|
+
url = result.stdout.decode().strip()
|
119
|
+
except Exception as e:
|
120
|
+
raise ValueError(
|
121
|
+
f"Error getting git version info: {e}. You may not be in a git repository."
|
122
|
+
)
|
123
|
+
|
124
|
+
if not url:
|
125
|
+
raise ValueError("Could not determine git repository URL")
|
126
|
+
|
127
|
+
return GitVersionInfo(
|
128
|
+
type="vcs:git", version=version, branch=branch, url=url, repository=repository
|
129
|
+
)
|
130
|
+
|
131
|
+
|
132
|
+
class VersionType(str, Enum):
|
133
|
+
SIMPLE = "prefect:simple"
|
134
|
+
GITHUB = "vcs:github"
|
135
|
+
GIT = "vcs:git"
|
136
|
+
DOCKER = "container:docker"
|
137
|
+
|
138
|
+
|
139
|
+
async def get_inferred_version_info(
|
140
|
+
version_type: Optional[str] = None,
|
141
|
+
) -> VersionInfo | None:
|
142
|
+
"""
|
143
|
+
Attempts to infer version information from the environment.
|
144
|
+
|
145
|
+
Args:
|
146
|
+
version_type: Optional type of version info to get. If provided, only that
|
147
|
+
type will be attempted.
|
148
|
+
|
149
|
+
Returns:
|
150
|
+
VersionInfo: The inferred version information
|
151
|
+
|
152
|
+
Raises:
|
153
|
+
ValueError: If unable to infer version info from any source
|
154
|
+
"""
|
155
|
+
# Map version types to their getter functions
|
156
|
+
type_to_getter: Dict[str, Callable[..., Coroutine[Any, Any, Any]]] = {
|
157
|
+
VersionType.GITHUB: get_github_version_info,
|
158
|
+
VersionType.GIT: get_git_version_info,
|
159
|
+
}
|
160
|
+
|
161
|
+
# Default order of getters to try
|
162
|
+
default_getters = [
|
163
|
+
get_github_version_info,
|
164
|
+
get_git_version_info,
|
165
|
+
]
|
166
|
+
|
167
|
+
if version_type:
|
168
|
+
if version_type not in type_to_getter:
|
169
|
+
raise ValueError(f"Unknown version type: {version_type}")
|
170
|
+
getters = [type_to_getter[version_type]]
|
171
|
+
else:
|
172
|
+
getters = default_getters
|
173
|
+
|
174
|
+
for getter in getters:
|
175
|
+
try:
|
176
|
+
return await getter()
|
177
|
+
except ValueError:
|
178
|
+
continue
|
179
|
+
|
180
|
+
return None
|
@@ -33,9 +33,9 @@ def _register_stable_transforms() -> None:
|
|
33
33
|
so that cache keys that utilize them are deterministic across invocations.
|
34
34
|
"""
|
35
35
|
try:
|
36
|
-
import pandas as pd
|
36
|
+
import pandas as pd # pyright: ignore
|
37
37
|
|
38
|
-
STABLE_TRANSFORMS[pd.DataFrame] = lambda df: [
|
38
|
+
STABLE_TRANSFORMS[pd.DataFrame] = lambda df: [ # pyright: ignore
|
39
39
|
df[col] for col in sorted(df.columns)
|
40
40
|
]
|
41
41
|
except (ImportError, ModuleNotFoundError):
|
@@ -183,7 +183,7 @@ class CompoundCachePolicy(CachePolicy):
|
|
183
183
|
Any keys that return `None` will be ignored.
|
184
184
|
"""
|
185
185
|
|
186
|
-
policies: list[CachePolicy] = field(default_factory=
|
186
|
+
policies: list[CachePolicy] = field(default_factory=lambda: [])
|
187
187
|
|
188
188
|
def __post_init__(self) -> None:
|
189
189
|
# flatten any CompoundCachePolicies
|
@@ -349,7 +349,7 @@ class Inputs(CachePolicy):
|
|
349
349
|
Policy that computes a cache key based on a hash of the runtime inputs provided to the task..
|
350
350
|
"""
|
351
351
|
|
352
|
-
exclude: list[str] = field(default_factory=
|
352
|
+
exclude: list[str] = field(default_factory=lambda: [])
|
353
353
|
|
354
354
|
def compute_key(
|
355
355
|
self,
|
@@ -153,13 +153,14 @@ class DeploymentClient(BaseClient):
|
|
153
153
|
if getattr(deployment_create, field) is None:
|
154
154
|
exclude.add(field)
|
155
155
|
|
156
|
-
|
156
|
+
payload = deployment_create.model_dump(mode="json", exclude=exclude)
|
157
|
+
if deployment_create.version_info:
|
158
|
+
payload["version_info"] = deployment_create.version_info.model_dump(
|
159
|
+
mode="json"
|
160
|
+
)
|
161
|
+
|
162
|
+
response = self.request("POST", "/deployments/", json=payload)
|
157
163
|
|
158
|
-
response = self.request(
|
159
|
-
"POST",
|
160
|
-
"/deployments/",
|
161
|
-
json=json,
|
162
|
-
)
|
163
164
|
deployment_id = response.json().get("id")
|
164
165
|
if not deployment_id:
|
165
166
|
raise RequestError(f"Malformed response: {response}")
|
@@ -179,15 +180,28 @@ class DeploymentClient(BaseClient):
|
|
179
180
|
deployment_id: UUID,
|
180
181
|
deployment: "DeploymentUpdate",
|
181
182
|
) -> None:
|
183
|
+
exclude_if_none = [
|
184
|
+
"version_info",
|
185
|
+
]
|
186
|
+
|
187
|
+
exclude = {"name", "flow_name", "triggers"}
|
188
|
+
for field in exclude_if_none:
|
189
|
+
if getattr(deployment, field) is None:
|
190
|
+
exclude.add(field)
|
191
|
+
|
192
|
+
payload = deployment.model_dump(
|
193
|
+
mode="json",
|
194
|
+
exclude_unset=True,
|
195
|
+
exclude=exclude,
|
196
|
+
)
|
197
|
+
if deployment.version_info:
|
198
|
+
payload["version_info"] = deployment.version_info.model_dump(mode="json")
|
199
|
+
|
182
200
|
self.request(
|
183
201
|
"PATCH",
|
184
202
|
"/deployments/{id}",
|
185
203
|
path_params={"id": deployment_id},
|
186
|
-
json=
|
187
|
-
mode="json",
|
188
|
-
exclude_unset=True,
|
189
|
-
exclude={"name", "flow_name", "triggers"},
|
190
|
-
),
|
204
|
+
json=payload,
|
191
205
|
)
|
192
206
|
|
193
207
|
def _create_deployment_from_schema(self, schema: "DeploymentCreate") -> UUID:
|
@@ -733,13 +747,13 @@ class DeploymentAsyncClient(BaseAsyncClient):
|
|
733
747
|
if getattr(deployment_create, field) is None:
|
734
748
|
exclude.add(field)
|
735
749
|
|
736
|
-
|
750
|
+
payload = deployment_create.model_dump(mode="json", exclude=exclude)
|
751
|
+
if deployment_create.version_info:
|
752
|
+
payload["version_info"] = deployment_create.version_info.model_dump(
|
753
|
+
mode="json"
|
754
|
+
)
|
737
755
|
|
738
|
-
response = await self.request(
|
739
|
-
"POST",
|
740
|
-
"/deployments/",
|
741
|
-
json=json,
|
742
|
-
)
|
756
|
+
response = await self.request("POST", "/deployments/", json=payload)
|
743
757
|
deployment_id = response.json().get("id")
|
744
758
|
if not deployment_id:
|
745
759
|
raise RequestError(f"Malformed response: {response}")
|
@@ -761,15 +775,28 @@ class DeploymentAsyncClient(BaseAsyncClient):
|
|
761
775
|
deployment_id: UUID,
|
762
776
|
deployment: "DeploymentUpdate",
|
763
777
|
) -> None:
|
778
|
+
exclude_if_none = [
|
779
|
+
"version_info",
|
780
|
+
]
|
781
|
+
|
782
|
+
exclude = {"name", "flow_name", "triggers"}
|
783
|
+
for field in exclude_if_none:
|
784
|
+
if getattr(deployment, field) is None:
|
785
|
+
exclude.add(field)
|
786
|
+
|
787
|
+
payload = deployment.model_dump(
|
788
|
+
mode="json",
|
789
|
+
exclude_unset=True,
|
790
|
+
exclude=exclude,
|
791
|
+
)
|
792
|
+
if deployment.version_info:
|
793
|
+
payload["version_info"] = deployment.version_info.model_dump(mode="json")
|
794
|
+
|
764
795
|
await self.request(
|
765
796
|
"PATCH",
|
766
797
|
"/deployments/{id}",
|
767
798
|
path_params={"id": deployment_id},
|
768
|
-
json=
|
769
|
-
mode="json",
|
770
|
-
exclude_unset=True,
|
771
|
-
exclude={"name", "flow_name", "triggers"},
|
772
|
-
),
|
799
|
+
json=payload,
|
773
800
|
)
|
774
801
|
|
775
802
|
async def _create_deployment_from_schema(self, schema: "DeploymentCreate") -> UUID:
|
@@ -13,7 +13,9 @@ class ConcurrencyContext(ContextModel):
|
|
13
13
|
# Track the slots that have been acquired but were not able to be released
|
14
14
|
# due to cancellation or some other error. These slots are released when
|
15
15
|
# the context manager exits.
|
16
|
-
cleanup_slots: list[tuple[list[str], int, float]] = Field(
|
16
|
+
cleanup_slots: list[tuple[list[str], int, float]] = Field(
|
17
|
+
default_factory=lambda: []
|
18
|
+
)
|
17
19
|
|
18
20
|
def __exit__(self, *exc_info: Any) -> None:
|
19
21
|
if self.cleanup_slots:
|
@@ -18,8 +18,6 @@ from typing import TYPE_CHECKING, Any, Callable, ClassVar, Optional, TypeVar, Un
|
|
18
18
|
from pydantic import BaseModel, ConfigDict, Field, PrivateAttr
|
19
19
|
from typing_extensions import Self
|
20
20
|
|
21
|
-
import prefect.logging
|
22
|
-
import prefect.logging.configuration
|
23
21
|
import prefect.settings
|
24
22
|
import prefect.types._datetime
|
25
23
|
from prefect._internal.compatibility.migration import getattr_migration
|
@@ -128,7 +126,7 @@ class ContextModel(BaseModel):
|
|
128
126
|
def __init__(self, **kwargs: Any) -> None: ...
|
129
127
|
|
130
128
|
# The context variable for storing data must be defined by the child class
|
131
|
-
__var__: ClassVar[ContextVar[
|
129
|
+
__var__: ClassVar[ContextVar[Any]]
|
132
130
|
_token: Optional[Token[Self]] = PrivateAttr(None)
|
133
131
|
model_config: ClassVar[ConfigDict] = ConfigDict(
|
134
132
|
arbitrary_types_allowed=True,
|
@@ -29,6 +29,8 @@ Example:
|
|
29
29
|
|
30
30
|
"""
|
31
31
|
|
32
|
+
from __future__ import annotations
|
33
|
+
|
32
34
|
import importlib
|
33
35
|
import tempfile
|
34
36
|
from datetime import datetime, timedelta
|
@@ -63,6 +65,7 @@ from prefect.client.schemas.filters import WorkerFilter, WorkerFilterStatus
|
|
63
65
|
from prefect.client.schemas.objects import (
|
64
66
|
ConcurrencyLimitConfig,
|
65
67
|
ConcurrencyOptions,
|
68
|
+
VersionInfo,
|
66
69
|
)
|
67
70
|
from prefect.client.schemas.schedules import (
|
68
71
|
SCHEDULE_TYPES,
|
@@ -281,7 +284,10 @@ class RunnerDeployment(BaseModel):
|
|
281
284
|
return reconcile_schedules_runner(values)
|
282
285
|
|
283
286
|
async def _create(
|
284
|
-
self,
|
287
|
+
self,
|
288
|
+
work_pool_name: Optional[str] = None,
|
289
|
+
image: Optional[str] = None,
|
290
|
+
version_info: VersionInfo | None = None,
|
285
291
|
) -> UUID:
|
286
292
|
work_pool_name = work_pool_name or self.work_pool_name
|
287
293
|
|
@@ -312,6 +318,7 @@ class RunnerDeployment(BaseModel):
|
|
312
318
|
work_queue_name=self.work_queue_name,
|
313
319
|
work_pool_name=work_pool_name,
|
314
320
|
version=self.version,
|
321
|
+
version_info=version_info,
|
315
322
|
paused=self.paused,
|
316
323
|
schedules=self.schedules,
|
317
324
|
concurrency_limit=self.concurrency_limit,
|
@@ -367,7 +374,12 @@ class RunnerDeployment(BaseModel):
|
|
367
374
|
|
368
375
|
return deployment_id
|
369
376
|
|
370
|
-
async def _update(
|
377
|
+
async def _update(
|
378
|
+
self,
|
379
|
+
deployment_id: UUID,
|
380
|
+
client: PrefectClient,
|
381
|
+
version_info: VersionInfo | None,
|
382
|
+
):
|
371
383
|
parameter_openapi_schema = self._parameter_openapi_schema.model_dump(
|
372
384
|
exclude_unset=True
|
373
385
|
)
|
@@ -388,6 +400,7 @@ class RunnerDeployment(BaseModel):
|
|
388
400
|
deployment_id,
|
389
401
|
deployment=DeploymentUpdate(
|
390
402
|
**update_payload,
|
403
|
+
version_info=version_info,
|
391
404
|
parameter_openapi_schema=parameter_openapi_schema,
|
392
405
|
),
|
393
406
|
)
|
@@ -428,7 +441,10 @@ class RunnerDeployment(BaseModel):
|
|
428
441
|
|
429
442
|
@sync_compatible
|
430
443
|
async def apply(
|
431
|
-
self,
|
444
|
+
self,
|
445
|
+
work_pool_name: Optional[str] = None,
|
446
|
+
image: Optional[str] = None,
|
447
|
+
version_info: VersionInfo | None = None,
|
432
448
|
) -> UUID:
|
433
449
|
"""
|
434
450
|
Registers this deployment with the API and returns the deployment's ID.
|
@@ -439,7 +455,7 @@ class RunnerDeployment(BaseModel):
|
|
439
455
|
image: The registry, name, and tag of the Docker image to
|
440
456
|
use for this deployment. Only used when the deployment is
|
441
457
|
deployed to a work pool.
|
442
|
-
|
458
|
+
version_info: Version information for the deployment.
|
443
459
|
Returns:
|
444
460
|
The ID of the created deployment.
|
445
461
|
"""
|
@@ -448,13 +464,13 @@ class RunnerDeployment(BaseModel):
|
|
448
464
|
try:
|
449
465
|
deployment = await client.read_deployment_by_name(self.full_name)
|
450
466
|
except ObjectNotFound:
|
451
|
-
return await self._create(work_pool_name, image)
|
467
|
+
return await self._create(work_pool_name, image, version_info)
|
452
468
|
else:
|
453
469
|
if image:
|
454
470
|
self.job_variables["image"] = image
|
455
471
|
if work_pool_name:
|
456
472
|
self.work_pool_name = work_pool_name
|
457
|
-
return await self._update(deployment.id, client)
|
473
|
+
return await self._update(deployment.id, client, version_info)
|
458
474
|
|
459
475
|
async def _create_slas(self, deployment_id: UUID, client: PrefectClient):
|
460
476
|
if not isinstance(self._sla, list):
|