prefect-client 3.1.1__tar.gz → 3.1.2__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.1.1/src/prefect_client.egg-info → prefect-client-3.1.2}/PKG-INFO +1 -1
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/_version.py +3 -3
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/client/cloud.py +21 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/client/orchestration.py +1 -1
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/client/schemas/objects.py +5 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/settings/base.py +22 -3
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/settings/sources.py +79 -8
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/states.py +5 -2
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/utilities/urls.py +18 -3
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/workers/base.py +34 -6
- {prefect-client-3.1.1 → prefect-client-3.1.2/src/prefect_client.egg-info}/PKG-INFO +1 -1
- {prefect-client-3.1.1 → prefect-client-3.1.2}/LICENSE +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/MANIFEST.in +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/README.md +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/requirements-client.txt +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/requirements-dev.txt +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/requirements.txt +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/setup.cfg +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/setup.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/.prefectignore +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/__init__.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/_internal/__init__.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/_internal/_logging.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/_internal/compatibility/__init__.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/_internal/compatibility/async_dispatch.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/_internal/compatibility/deprecated.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/_internal/compatibility/migration.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/_internal/concurrency/__init__.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/_internal/concurrency/api.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/_internal/concurrency/calls.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/_internal/concurrency/cancellation.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/_internal/concurrency/event_loop.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/_internal/concurrency/inspection.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/_internal/concurrency/primitives.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/_internal/concurrency/services.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/_internal/concurrency/threads.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/_internal/concurrency/waiters.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/_internal/integrations.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/_internal/pydantic/__init__.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/_internal/pydantic/annotations/__init__.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/_internal/pydantic/annotations/pendulum.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/_internal/pydantic/schemas.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/_internal/pydantic/v1_schema.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/_internal/pydantic/v2_schema.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/_internal/pydantic/v2_validated_func.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/_internal/pytz.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/_internal/retries.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/_internal/schemas/__init__.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/_internal/schemas/bases.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/_internal/schemas/fields.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/_internal/schemas/serializers.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/_internal/schemas/validators.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/agent.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/artifacts.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/automations.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/blocks/__init__.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/blocks/abstract.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/blocks/core.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/blocks/fields.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/blocks/notifications.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/blocks/redis.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/blocks/system.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/blocks/webhook.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/cache_policies.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/client/__init__.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/client/base.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/client/collections.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/client/constants.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/client/schemas/__init__.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/client/schemas/actions.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/client/schemas/filters.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/client/schemas/responses.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/client/schemas/schedules.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/client/schemas/sorting.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/client/subscriptions.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/client/types/__init__.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/client/types/flexible_schedule_list.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/client/utilities.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/concurrency/__init__.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/concurrency/asyncio.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/concurrency/context.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/concurrency/events.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/concurrency/services.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/concurrency/sync.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/concurrency/v1/__init__.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/concurrency/v1/asyncio.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/concurrency/v1/context.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/concurrency/v1/events.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/concurrency/v1/services.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/concurrency/v1/sync.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/context.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/deployments/__init__.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/deployments/base.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/deployments/deployments.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/deployments/flow_runs.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/deployments/runner.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/deployments/schedules.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/deployments/steps/__init__.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/deployments/steps/core.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/deployments/steps/pull.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/deployments/steps/utility.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/docker/__init__.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/docker/docker_image.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/engine.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/events/__init__.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/events/actions.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/events/cli/__init__.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/events/cli/automations.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/events/clients.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/events/filters.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/events/related.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/events/schemas/__init__.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/events/schemas/automations.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/events/schemas/deployment_triggers.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/events/schemas/events.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/events/schemas/labelling.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/events/utilities.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/events/worker.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/exceptions.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/filesystems.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/flow_engine.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/flow_runs.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/flows.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/futures.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/infrastructure/__init__.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/infrastructure/base.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/infrastructure/provisioners/__init__.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/infrastructure/provisioners/cloud_run.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/infrastructure/provisioners/container_instance.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/infrastructure/provisioners/ecs.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/infrastructure/provisioners/modal.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/input/__init__.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/input/actions.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/input/run_input.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/locking/__init__.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/locking/filesystem.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/locking/memory.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/locking/protocol.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/logging/__init__.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/logging/configuration.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/logging/filters.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/logging/formatters.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/logging/handlers.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/logging/highlighters.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/logging/loggers.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/logging/logging.yml +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/main.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/plugins.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/py.typed +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/records/__init__.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/records/base.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/records/filesystem.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/records/memory.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/records/result_store.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/results.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/runner/__init__.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/runner/runner.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/runner/server.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/runner/storage.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/runner/submit.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/runner/utils.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/runtime/__init__.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/runtime/deployment.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/runtime/flow_run.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/runtime/task_run.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/serializers.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/server/api/collections_data/views/aggregate-worker-metadata.json +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/server/api/static/prefect-logo-mark-gradient.png +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/settings/__init__.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/settings/constants.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/settings/context.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/settings/legacy.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/settings/models/__init__.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/settings/models/api.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/settings/models/cli.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/settings/models/client.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/settings/models/cloud.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/settings/models/deployments.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/settings/models/experiments.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/settings/models/flows.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/settings/models/internal.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/settings/models/logging.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/settings/models/results.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/settings/models/root.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/settings/models/runner.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/settings/models/server/__init__.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/settings/models/server/api.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/settings/models/server/database.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/settings/models/server/deployments.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/settings/models/server/ephemeral.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/settings/models/server/events.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/settings/models/server/flow_run_graph.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/settings/models/server/root.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/settings/models/server/services.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/settings/models/server/tasks.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/settings/models/server/ui.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/settings/models/tasks.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/settings/models/testing.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/settings/models/worker.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/settings/profiles.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/settings/profiles.toml +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/task_engine.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/task_runners.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/task_runs.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/task_worker.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/tasks.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/telemetry/__init__.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/telemetry/bootstrap.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/telemetry/instrumentation.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/telemetry/logging.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/telemetry/processors.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/transactions.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/types/__init__.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/types/entrypoint.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/utilities/__init__.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/utilities/annotations.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/utilities/asyncutils.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/utilities/callables.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/utilities/collections.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/utilities/compat.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/utilities/context.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/utilities/dispatch.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/utilities/dockerutils.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/utilities/engine.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/utilities/filesystem.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/utilities/hashing.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/utilities/importtools.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/utilities/math.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/utilities/names.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/utilities/processutils.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/utilities/pydantic.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/utilities/render_swagger.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/utilities/schema_tools/__init__.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/utilities/schema_tools/hydration.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/utilities/schema_tools/validation.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/utilities/services.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/utilities/slugify.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/utilities/templating.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/utilities/text.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/utilities/timeout.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/utilities/visualization.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/variables.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/workers/__init__.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/workers/block.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/workers/cloud.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/workers/process.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/workers/server.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/workers/utilities.py +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect_client.egg-info/SOURCES.txt +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect_client.egg-info/dependency_links.txt +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect_client.egg-info/requires.txt +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect_client.egg-info/top_level.txt +0 -0
- {prefect-client-3.1.1 → prefect-client-3.1.2}/versioneer.py +0 -0
@@ -8,11 +8,11 @@ import json
|
|
8
8
|
|
9
9
|
version_json = '''
|
10
10
|
{
|
11
|
-
"date": "2024-11-
|
11
|
+
"date": "2024-11-12T13:38:45-0800",
|
12
12
|
"dirty": true,
|
13
13
|
"error": null,
|
14
|
-
"full-revisionid": "
|
15
|
-
"version": "3.1.
|
14
|
+
"full-revisionid": "02b99f0a756f0395e4292952dcb2d963fc839750",
|
15
|
+
"version": "3.1.2"
|
16
16
|
}
|
17
17
|
''' # END VERSION_JSON
|
18
18
|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import re
|
2
2
|
from typing import Any, Dict, List, Optional, cast
|
3
|
+
from uuid import UUID
|
3
4
|
|
4
5
|
import anyio
|
5
6
|
import httpx
|
@@ -12,6 +13,7 @@ from prefect.client.base import PrefectHttpxAsyncClient
|
|
12
13
|
from prefect.client.schemas.objects import (
|
13
14
|
IPAllowlist,
|
14
15
|
IPAllowlistMyAccessResponse,
|
16
|
+
KeyValueLabels,
|
15
17
|
Workspace,
|
16
18
|
)
|
17
19
|
from prefect.exceptions import ObjectNotFound, PrefectException
|
@@ -151,6 +153,25 @@ class CloudClient:
|
|
151
153
|
response = await self.get(f"{self.account_base_url}/ip_allowlist/my_access")
|
152
154
|
return IPAllowlistMyAccessResponse.model_validate(response)
|
153
155
|
|
156
|
+
async def update_flow_run_labels(
|
157
|
+
self, flow_run_id: UUID, labels: KeyValueLabels
|
158
|
+
) -> httpx.Response:
|
159
|
+
"""
|
160
|
+
Update the labels for a flow run.
|
161
|
+
|
162
|
+
Args:
|
163
|
+
flow_run_id: The identifier for the flow run to update.
|
164
|
+
labels: A dictionary of labels to update for the flow run.
|
165
|
+
|
166
|
+
Returns:
|
167
|
+
an `httpx.Response` object from the PATCH request
|
168
|
+
"""
|
169
|
+
|
170
|
+
return await self._client.patch(
|
171
|
+
f"{self.workspace_base_url}/flow_runs/{flow_run_id}/labels",
|
172
|
+
json=labels,
|
173
|
+
)
|
174
|
+
|
154
175
|
async def __aenter__(self):
|
155
176
|
await self._client.__aenter__()
|
156
177
|
return self
|
@@ -2613,7 +2613,7 @@ class PrefectClient:
|
|
2613
2613
|
"heartbeat_interval_seconds": heartbeat_interval_seconds,
|
2614
2614
|
}
|
2615
2615
|
if worker_metadata:
|
2616
|
-
params["
|
2616
|
+
params["metadata"] = worker_metadata.model_dump(mode="json")
|
2617
2617
|
if get_worker_id:
|
2618
2618
|
params["return_id"] = get_worker_id
|
2619
2619
|
|
@@ -23,6 +23,9 @@ from pydantic import (
|
|
23
23
|
HttpUrl,
|
24
24
|
IPvAnyNetwork,
|
25
25
|
SerializationInfo,
|
26
|
+
StrictBool,
|
27
|
+
StrictFloat,
|
28
|
+
StrictInt,
|
26
29
|
Tag,
|
27
30
|
field_validator,
|
28
31
|
model_serializer,
|
@@ -68,6 +71,8 @@ if TYPE_CHECKING:
|
|
68
71
|
|
69
72
|
R = TypeVar("R", default=Any)
|
70
73
|
|
74
|
+
KeyValueLabels = dict[str, Union[StrictBool, StrictInt, StrictFloat, str]]
|
75
|
+
|
71
76
|
|
72
77
|
DEFAULT_BLOCK_SCHEMA_VERSION = "non-versioned"
|
73
78
|
DEFAULT_AGENT_WORK_POOL_NAME = "default-agent-pool"
|
@@ -17,6 +17,7 @@ from pydantic_settings import (
|
|
17
17
|
|
18
18
|
from prefect.settings.sources import (
|
19
19
|
EnvFilterSettingsSource,
|
20
|
+
FilteredDotEnvSettingsSource,
|
20
21
|
PrefectTomlConfigSettingsSource,
|
21
22
|
ProfileSettingsTomlLoader,
|
22
23
|
PyprojectTomlConfigSettingsSource,
|
@@ -43,13 +44,14 @@ class PrefectBaseSettings(BaseSettings):
|
|
43
44
|
See https://docs.pydantic.dev/latest/concepts/pydantic_settings/#customise-settings-sources
|
44
45
|
"""
|
45
46
|
env_filter = set()
|
46
|
-
for field in settings_cls.model_fields.
|
47
|
+
for field_name, field in settings_cls.model_fields.items():
|
47
48
|
if field.validation_alias is not None and isinstance(
|
48
49
|
field.validation_alias, AliasChoices
|
49
50
|
):
|
50
51
|
for alias in field.validation_alias.choices:
|
51
52
|
if isinstance(alias, AliasPath) and len(alias.path) > 0:
|
52
53
|
env_filter.add(alias.path[0])
|
54
|
+
env_filter.add(field_name)
|
53
55
|
return (
|
54
56
|
init_settings,
|
55
57
|
EnvFilterSettingsSource(
|
@@ -62,7 +64,18 @@ class PrefectBaseSettings(BaseSettings):
|
|
62
64
|
env_parse_enums=cls.model_config.get("env_parse_enums"),
|
63
65
|
env_filter=list(env_filter),
|
64
66
|
),
|
65
|
-
|
67
|
+
FilteredDotEnvSettingsSource(
|
68
|
+
settings_cls,
|
69
|
+
env_file=cls.model_config.get("env_file"),
|
70
|
+
env_file_encoding=cls.model_config.get("env_file_encoding"),
|
71
|
+
case_sensitive=cls.model_config.get("case_sensitive"),
|
72
|
+
env_prefix=cls.model_config.get("env_prefix"),
|
73
|
+
env_nested_delimiter=cls.model_config.get("env_nested_delimiter"),
|
74
|
+
env_ignore_empty=cls.model_config.get("env_ignore_empty"),
|
75
|
+
env_parse_none_str=cls.model_config.get("env_parse_none_str"),
|
76
|
+
env_parse_enums=cls.model_config.get("env_parse_enums"),
|
77
|
+
env_blacklist=list(env_filter),
|
78
|
+
),
|
66
79
|
file_secret_settings,
|
67
80
|
PrefectTomlConfigSettingsSource(settings_cls),
|
68
81
|
PyprojectTomlConfigSettingsSource(settings_cls),
|
@@ -92,7 +105,7 @@ class PrefectBaseSettings(BaseSettings):
|
|
92
105
|
elif (value := env.get(key)) is not None:
|
93
106
|
env_variables[
|
94
107
|
f"{self.model_config.get('env_prefix')}{key.upper()}"
|
95
|
-
] =
|
108
|
+
] = _to_environment_variable_value(value)
|
96
109
|
return env_variables
|
97
110
|
|
98
111
|
@model_serializer(
|
@@ -191,3 +204,9 @@ def _build_settings_config(
|
|
191
204
|
pyproject_toml_table_header=("tool", "prefect", *path),
|
192
205
|
json_schema_extra=_add_environment_variables,
|
193
206
|
)
|
207
|
+
|
208
|
+
|
209
|
+
def _to_environment_variable_value(value: Any) -> str:
|
210
|
+
if isinstance(value, (list, set, tuple)):
|
211
|
+
return ",".join(str(v) for v in value)
|
212
|
+
return str(value)
|
@@ -10,10 +10,15 @@ from pydantic import AliasChoices
|
|
10
10
|
from pydantic.fields import FieldInfo
|
11
11
|
from pydantic_settings import (
|
12
12
|
BaseSettings,
|
13
|
+
DotEnvSettingsSource,
|
13
14
|
EnvSettingsSource,
|
14
15
|
PydanticBaseSettingsSource,
|
15
16
|
)
|
16
|
-
from pydantic_settings.sources import
|
17
|
+
from pydantic_settings.sources import (
|
18
|
+
ENV_FILE_SENTINEL,
|
19
|
+
ConfigFileSourceMixin,
|
20
|
+
DotenvType,
|
21
|
+
)
|
17
22
|
|
18
23
|
from prefect.settings.constants import DEFAULT_PREFECT_HOME, DEFAULT_PROFILES_PATH
|
19
24
|
from prefect.utilities.collections import get_from_dict
|
@@ -61,6 +66,44 @@ class EnvFilterSettingsSource(EnvSettingsSource):
|
|
61
66
|
}
|
62
67
|
|
63
68
|
|
69
|
+
class FilteredDotEnvSettingsSource(DotEnvSettingsSource):
|
70
|
+
def __init__(
|
71
|
+
self,
|
72
|
+
settings_cls: type[BaseSettings],
|
73
|
+
env_file: Optional[DotenvType] = ENV_FILE_SENTINEL,
|
74
|
+
env_file_encoding: Optional[str] = None,
|
75
|
+
case_sensitive: Optional[bool] = None,
|
76
|
+
env_prefix: Optional[str] = None,
|
77
|
+
env_nested_delimiter: Optional[str] = None,
|
78
|
+
env_ignore_empty: Optional[bool] = None,
|
79
|
+
env_parse_none_str: Optional[str] = None,
|
80
|
+
env_parse_enums: Optional[bool] = None,
|
81
|
+
env_blacklist: Optional[List[str]] = None,
|
82
|
+
) -> None:
|
83
|
+
super().__init__(
|
84
|
+
settings_cls,
|
85
|
+
env_file,
|
86
|
+
env_file_encoding,
|
87
|
+
case_sensitive,
|
88
|
+
env_prefix,
|
89
|
+
env_nested_delimiter,
|
90
|
+
env_ignore_empty,
|
91
|
+
env_parse_none_str,
|
92
|
+
env_parse_enums,
|
93
|
+
)
|
94
|
+
self.env_blacklist = env_blacklist
|
95
|
+
if self.env_blacklist:
|
96
|
+
if isinstance(self.env_vars, dict):
|
97
|
+
for key in self.env_blacklist:
|
98
|
+
self.env_vars.pop(key, None)
|
99
|
+
else:
|
100
|
+
self.env_vars = {
|
101
|
+
key: value
|
102
|
+
for key, value in self.env_vars.items() # type: ignore
|
103
|
+
if key.lower() not in env_blacklist
|
104
|
+
}
|
105
|
+
|
106
|
+
|
64
107
|
class ProfileSettingsTomlLoader(PydanticBaseSettingsSource):
|
65
108
|
"""
|
66
109
|
Custom pydantic settings source to load profile settings from a toml file.
|
@@ -111,21 +154,34 @@ class ProfileSettingsTomlLoader(PydanticBaseSettingsSource):
|
|
111
154
|
) -> Tuple[Any, str, bool]:
|
112
155
|
"""Concrete implementation to get the field value from the profile settings"""
|
113
156
|
if field.validation_alias:
|
157
|
+
# Use validation alias as the key to ensure profile value does not
|
158
|
+
# higher priority sources. Lower priority sources that use the
|
159
|
+
# field name can override higher priority sources that use the
|
160
|
+
# validation alias as seen in https://github.com/PrefectHQ/prefect/issues/15981
|
114
161
|
if isinstance(field.validation_alias, str):
|
115
162
|
value = self.profile_settings.get(field.validation_alias.upper())
|
116
163
|
if value is not None:
|
117
|
-
return value,
|
164
|
+
return value, field.validation_alias, self.field_is_complex(field)
|
118
165
|
elif isinstance(field.validation_alias, AliasChoices):
|
166
|
+
value = None
|
167
|
+
lowest_priority_alias = next(
|
168
|
+
choice
|
169
|
+
for choice in reversed(field.validation_alias.choices)
|
170
|
+
if isinstance(choice, str)
|
171
|
+
)
|
119
172
|
for alias in field.validation_alias.choices:
|
120
173
|
if not isinstance(alias, str):
|
121
174
|
continue
|
122
175
|
value = self.profile_settings.get(alias.upper())
|
123
176
|
if value is not None:
|
124
|
-
return
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
177
|
+
return (
|
178
|
+
value,
|
179
|
+
lowest_priority_alias,
|
180
|
+
self.field_is_complex(field),
|
181
|
+
)
|
182
|
+
|
183
|
+
name = f"{self.config.get('env_prefix','')}{field_name.upper()}"
|
184
|
+
value = self.profile_settings.get(name)
|
129
185
|
return value, field_name, self.field_is_complex(field)
|
130
186
|
|
131
187
|
def __call__(self) -> Dict[str, Any]:
|
@@ -164,7 +220,22 @@ class TomlConfigSettingsSourceBase(PydanticBaseSettingsSource, ConfigFileSourceM
|
|
164
220
|
# if the value is a dict, it is likely a nested settings object and a nested
|
165
221
|
# source will handle it
|
166
222
|
value = None
|
167
|
-
|
223
|
+
name = field_name
|
224
|
+
# Use validation alias as the key to ensure profile value does not
|
225
|
+
# higher priority sources. Lower priority sources that use the
|
226
|
+
# field name can override higher priority sources that use the
|
227
|
+
# validation alias as seen in https://github.com/PrefectHQ/prefect/issues/15981
|
228
|
+
if value is not None:
|
229
|
+
if field.validation_alias and isinstance(field.validation_alias, str):
|
230
|
+
name = field.validation_alias
|
231
|
+
elif field.validation_alias and isinstance(
|
232
|
+
field.validation_alias, AliasChoices
|
233
|
+
):
|
234
|
+
for alias in reversed(field.validation_alias.choices):
|
235
|
+
if isinstance(alias, str):
|
236
|
+
name = alias
|
237
|
+
break
|
238
|
+
return value, name, self.field_is_complex(field)
|
168
239
|
|
169
240
|
def __call__(self) -> Dict[str, Any]:
|
170
241
|
"""Called by pydantic to get the settings from our custom source"""
|
@@ -2,6 +2,7 @@ import asyncio
|
|
2
2
|
import datetime
|
3
3
|
import sys
|
4
4
|
import traceback
|
5
|
+
import uuid
|
5
6
|
import warnings
|
6
7
|
from collections import Counter
|
7
8
|
from types import GeneratorType, TracebackType
|
@@ -220,7 +221,8 @@ async def exception_to_crashed_state(
|
|
220
221
|
)
|
221
222
|
|
222
223
|
if result_store:
|
223
|
-
|
224
|
+
key = uuid.uuid4().hex
|
225
|
+
data = result_store.create_result_record(exc, key=key)
|
224
226
|
else:
|
225
227
|
# Attach the exception for local usage, will not be available when retrieved
|
226
228
|
# from the API
|
@@ -253,7 +255,8 @@ async def exception_to_failed_state(
|
|
253
255
|
pass
|
254
256
|
|
255
257
|
if result_store:
|
256
|
-
|
258
|
+
key = uuid.uuid4().hex
|
259
|
+
data = result_store.create_result_record(exc, key=key)
|
257
260
|
if write_result:
|
258
261
|
try:
|
259
262
|
await result_store.apersist_result_record(data)
|
@@ -2,7 +2,8 @@ import inspect
|
|
2
2
|
import ipaddress
|
3
3
|
import socket
|
4
4
|
import urllib.parse
|
5
|
-
from
|
5
|
+
from string import Formatter
|
6
|
+
from typing import TYPE_CHECKING, Any, Dict, Literal, Optional, Union
|
6
7
|
from urllib.parse import urlparse
|
7
8
|
from uuid import UUID
|
8
9
|
|
@@ -22,7 +23,6 @@ logger = get_logger("utilities.urls")
|
|
22
23
|
|
23
24
|
# The following objects are excluded from UI URL generation because we lack a
|
24
25
|
# directly-addressable URL:
|
25
|
-
# worker
|
26
26
|
# artifact
|
27
27
|
# variable
|
28
28
|
# saved-search
|
@@ -38,6 +38,7 @@ UI_URL_FORMATS = {
|
|
38
38
|
"deployment": "deployments/deployment/{obj_id}",
|
39
39
|
"automation": "automations/automation/{obj_id}",
|
40
40
|
"received-event": "events/event/{occurred}/{obj_id}",
|
41
|
+
"worker": "work-pools/work-pool/{work_pool_name}/worker/{obj_id}",
|
41
42
|
}
|
42
43
|
|
43
44
|
# The following objects are excluded from API URL generation because we lack a
|
@@ -134,6 +135,7 @@ def url_for(
|
|
134
135
|
obj_id: Optional[Union[str, UUID]] = None,
|
135
136
|
url_type: URLType = "ui",
|
136
137
|
default_base_url: Optional[str] = None,
|
138
|
+
**additional_format_kwargs: Optional[Dict[str, Any]],
|
137
139
|
) -> Optional[str]:
|
138
140
|
"""
|
139
141
|
Returns the URL for a Prefect object.
|
@@ -149,6 +151,8 @@ def url_for(
|
|
149
151
|
Whether to return the URL for the UI (default) or API.
|
150
152
|
default_base_url (str, optional):
|
151
153
|
The default base URL to use if no URL is configured.
|
154
|
+
additional_format_kwargs (Dict[str, Any], optional):
|
155
|
+
Additional keyword arguments to pass to the URL format.
|
152
156
|
|
153
157
|
Returns:
|
154
158
|
Optional[str]: The URL for the given object or None if the object is not supported.
|
@@ -246,7 +250,18 @@ def url_for(
|
|
246
250
|
occurred=obj.occurred.strftime("%Y-%m-%d"), obj_id=obj_id
|
247
251
|
)
|
248
252
|
else:
|
249
|
-
|
253
|
+
obj_keys = [
|
254
|
+
fname
|
255
|
+
for _, fname, _, _ in Formatter().parse(url_format)
|
256
|
+
if fname is not None and fname != "obj_id"
|
257
|
+
]
|
258
|
+
|
259
|
+
if not all(key in additional_format_kwargs for key in obj_keys):
|
260
|
+
raise ValueError(
|
261
|
+
f"Unable to generate URL for {name} because the following keys are missing: {', '.join(obj_keys)}"
|
262
|
+
)
|
263
|
+
|
264
|
+
url = url_format.format(obj_id=obj_id, **additional_format_kwargs)
|
250
265
|
|
251
266
|
if not base_url.endswith("/"):
|
252
267
|
base_url += "/"
|
@@ -18,6 +18,7 @@ from typing_extensions import Literal
|
|
18
18
|
import prefect
|
19
19
|
from prefect._internal.schemas.validators import return_v_or_none
|
20
20
|
from prefect.client.base import ServerType
|
21
|
+
from prefect.client.cloud import CloudClient, get_cloud_client
|
21
22
|
from prefect.client.orchestration import PrefectClient, get_client
|
22
23
|
from prefect.client.schemas.actions import WorkPoolCreate, WorkPoolUpdate
|
23
24
|
from prefect.client.schemas.objects import (
|
@@ -439,6 +440,7 @@ class BaseWorker(abc.ABC):
|
|
439
440
|
self._exit_stack: AsyncExitStack = AsyncExitStack()
|
440
441
|
self._runs_task_group: Optional[anyio.abc.TaskGroup] = None
|
441
442
|
self._client: Optional[PrefectClient] = None
|
443
|
+
self._cloud_client: Optional[CloudClient] = None
|
442
444
|
self._last_polled_time: pendulum.DateTime = pendulum.now("utc")
|
443
445
|
self._limit = limit
|
444
446
|
self._limiter: Optional[anyio.CapacityLimiter] = None
|
@@ -630,9 +632,14 @@ class BaseWorker(abc.ABC):
|
|
630
632
|
raise ValueError("`PREFECT_API_URL` must be set to start a Worker.")
|
631
633
|
|
632
634
|
self._client = get_client()
|
635
|
+
|
633
636
|
await self._exit_stack.enter_async_context(self._client)
|
634
637
|
await self._exit_stack.enter_async_context(self._runs_task_group)
|
635
638
|
|
639
|
+
if self._client.server_type == ServerType.CLOUD:
|
640
|
+
self._cloud_client = get_cloud_client()
|
641
|
+
await self._exit_stack.enter_async_context(self._cloud_client)
|
642
|
+
|
636
643
|
self.is_setup = True
|
637
644
|
|
638
645
|
async def teardown(self, *exc_info):
|
@@ -740,7 +747,8 @@ class BaseWorker(abc.ABC):
|
|
740
747
|
for dist in distributions()
|
741
748
|
# PyPI packages often use dashes, but Python package names use underscores
|
742
749
|
# because they must be valid identifiers.
|
743
|
-
if dist.metadata.get("Name")
|
750
|
+
if (name := dist.metadata.get("Name"))
|
751
|
+
and (name.replace("-", "_") in installed_integrations)
|
744
752
|
]
|
745
753
|
|
746
754
|
if integration_versions:
|
@@ -877,12 +885,18 @@ class BaseWorker(abc.ABC):
|
|
877
885
|
get_current_settings().experiments.worker_logging_to_api_enabled
|
878
886
|
and self.backend_id
|
879
887
|
):
|
880
|
-
|
881
|
-
|
888
|
+
try:
|
889
|
+
worker_url = url_for(
|
890
|
+
"worker",
|
891
|
+
obj_id=self.backend_id,
|
892
|
+
work_pool_name=self._work_pool_name,
|
893
|
+
)
|
882
894
|
|
883
|
-
|
884
|
-
|
885
|
-
|
895
|
+
run_logger.info(
|
896
|
+
f"Running on worker id: {self.backend_id}. See worker logs here: {worker_url}"
|
897
|
+
)
|
898
|
+
except ValueError as ve:
|
899
|
+
run_logger.warning(f"Failed to generate worker URL: {ve}")
|
886
900
|
|
887
901
|
self._submitting_flow_run_ids.add(flow_run.id)
|
888
902
|
self._runs_task_group.start_soon(
|
@@ -970,6 +984,7 @@ class BaseWorker(abc.ABC):
|
|
970
984
|
try:
|
971
985
|
configuration = await self._get_configuration(flow_run)
|
972
986
|
submitted_event = self._emit_flow_run_submitted_event(configuration)
|
987
|
+
await self._give_worker_labels_to_flow_run(flow_run.id)
|
973
988
|
result = await self.run(
|
974
989
|
flow_run=flow_run,
|
975
990
|
task_status=task_status,
|
@@ -1191,6 +1206,19 @@ class BaseWorker(abc.ABC):
|
|
1191
1206
|
|
1192
1207
|
await self._runs_task_group.start(wrapper)
|
1193
1208
|
|
1209
|
+
async def _give_worker_labels_to_flow_run(self, flow_run_id: UUID):
|
1210
|
+
"""
|
1211
|
+
Give this worker's identifying labels to the specified flow run.
|
1212
|
+
"""
|
1213
|
+
if self._cloud_client:
|
1214
|
+
await self._cloud_client.update_flow_run_labels(
|
1215
|
+
flow_run_id,
|
1216
|
+
{
|
1217
|
+
"prefect.worker.name": self.name,
|
1218
|
+
"prefect.worker.type": self.type,
|
1219
|
+
},
|
1220
|
+
)
|
1221
|
+
|
1194
1222
|
async def __aenter__(self):
|
1195
1223
|
self._logger.debug("Entering worker context...")
|
1196
1224
|
await self.setup()
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/_internal/compatibility/__init__.py
RENAMED
File without changes
|
{prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/_internal/compatibility/async_dispatch.py
RENAMED
File without changes
|
{prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/_internal/compatibility/deprecated.py
RENAMED
File without changes
|
{prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/_internal/compatibility/migration.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/_internal/concurrency/cancellation.py
RENAMED
File without changes
|
{prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/_internal/concurrency/event_loop.py
RENAMED
File without changes
|
{prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/_internal/concurrency/inspection.py
RENAMED
File without changes
|
{prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/_internal/concurrency/primitives.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/_internal/pydantic/annotations/__init__.py
RENAMED
File without changes
|
{prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/_internal/pydantic/annotations/pendulum.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/_internal/pydantic/v2_validated_func.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{prefect-client-3.1.1 → prefect-client-3.1.2}/src/prefect/client/types/flexible_schedule_list.py
RENAMED
File without changes
|