prefect-client 2.14.18__tar.gz → 2.14.20__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {prefect-client-2.14.18 → prefect-client-2.14.20}/PKG-INFO +1 -1
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/client/orchestration.py +1 -1
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/client/schemas/filters.py +16 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/client/schemas/objects.py +1 -0
- prefect-client-2.14.20/src/prefect/client/subscriptions.py +82 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/context.py +5 -1
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/engine.py +83 -53
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/filesystems.py +18 -3
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/flows.py +1 -2
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/input/run_input.py +115 -44
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/results.py +24 -1
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/runner/runner.py +3 -2
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/settings.py +12 -0
- prefect-client-2.14.20/src/prefect/task_engine.py +70 -0
- prefect-client-2.14.20/src/prefect/task_server.py +208 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/tasks.py +21 -4
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect_client.egg-info/PKG-INFO +1 -1
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect_client.egg-info/SOURCES.txt +3 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/LICENSE +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/MANIFEST.in +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/README.md +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/requirements-client.txt +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/requirements-dev.txt +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/requirements.txt +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/setup.cfg +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/setup.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/.prefectignore +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/__init__.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_internal/__init__.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_internal/_logging.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_internal/compatibility/__init__.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_internal/compatibility/deprecated.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_internal/compatibility/experimental.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_internal/concurrency/__init__.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_internal/concurrency/api.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_internal/concurrency/calls.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_internal/concurrency/cancellation.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_internal/concurrency/event_loop.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_internal/concurrency/inspection.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_internal/concurrency/primitives.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_internal/concurrency/services.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_internal/concurrency/threads.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_internal/concurrency/waiters.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_internal/pydantic/__init__.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_internal/pydantic/annotations/__init__.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_internal/pydantic/annotations/pendulum.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_internal/pydantic/schemas.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_internal/pydantic/v2_schema.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_internal/pydantic/v2_validated_func.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_internal/pytz.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_internal/schemas/__init__.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_internal/schemas/bases.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_internal/schemas/fields.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_internal/schemas/serializers.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_internal/schemas/transformations.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_internal/schemas/validators.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_vendor/__init__.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_vendor/fastapi/__init__.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_vendor/fastapi/applications.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_vendor/fastapi/background.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_vendor/fastapi/concurrency.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_vendor/fastapi/datastructures.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_vendor/fastapi/dependencies/__init__.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_vendor/fastapi/dependencies/models.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_vendor/fastapi/dependencies/utils.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_vendor/fastapi/encoders.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_vendor/fastapi/exception_handlers.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_vendor/fastapi/exceptions.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_vendor/fastapi/logger.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_vendor/fastapi/middleware/__init__.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_vendor/fastapi/middleware/asyncexitstack.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_vendor/fastapi/middleware/cors.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_vendor/fastapi/middleware/gzip.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_vendor/fastapi/middleware/httpsredirect.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_vendor/fastapi/middleware/trustedhost.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_vendor/fastapi/middleware/wsgi.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_vendor/fastapi/openapi/__init__.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_vendor/fastapi/openapi/constants.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_vendor/fastapi/openapi/docs.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_vendor/fastapi/openapi/models.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_vendor/fastapi/openapi/utils.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_vendor/fastapi/param_functions.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_vendor/fastapi/params.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_vendor/fastapi/requests.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_vendor/fastapi/responses.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_vendor/fastapi/routing.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_vendor/fastapi/security/__init__.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_vendor/fastapi/security/api_key.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_vendor/fastapi/security/base.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_vendor/fastapi/security/http.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_vendor/fastapi/security/oauth2.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_vendor/fastapi/security/open_id_connect_url.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_vendor/fastapi/security/utils.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_vendor/fastapi/staticfiles.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_vendor/fastapi/templating.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_vendor/fastapi/testclient.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_vendor/fastapi/types.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_vendor/fastapi/utils.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_vendor/fastapi/websockets.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/_version.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/agent.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/blocks/__init__.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/blocks/abstract.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/blocks/core.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/blocks/fields.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/blocks/kubernetes.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/blocks/notifications.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/blocks/system.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/blocks/webhook.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/client/__init__.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/client/base.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/client/cloud.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/client/collections.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/client/constants.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/client/schemas/__init__.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/client/schemas/actions.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/client/schemas/responses.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/client/schemas/schedules.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/client/schemas/sorting.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/client/utilities.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/concurrency/__init__.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/concurrency/asyncio.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/concurrency/common.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/concurrency/events.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/concurrency/services.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/concurrency/sync.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/deployments/__init__.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/deployments/base.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/deployments/deployments.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/deployments/runner.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/deployments/steps/__init__.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/deployments/steps/core.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/deployments/steps/pull.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/deployments/steps/utility.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/deprecated/__init__.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/deprecated/data_documents.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/events/__init__.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/events/actions.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/events/clients.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/events/filters.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/events/instrument.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/events/related.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/events/schemas.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/events/utilities.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/events/worker.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/exceptions.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/flow_runs.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/futures.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/infrastructure/__init__.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/infrastructure/base.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/infrastructure/container.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/infrastructure/kubernetes.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/infrastructure/process.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/infrastructure/provisioners/__init__.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/infrastructure/provisioners/cloud_run.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/infrastructure/provisioners/container_instance.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/infrastructure/provisioners/ecs.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/infrastructure/provisioners/modal.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/input/__init__.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/input/actions.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/logging/__init__.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/logging/configuration.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/logging/formatters.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/logging/handlers.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/logging/highlighters.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/logging/loggers.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/logging/logging.yml +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/manifests.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/packaging/__init__.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/packaging/base.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/packaging/docker.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/packaging/file.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/packaging/orion.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/packaging/serializers.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/plugins.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/profiles.toml +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/py.typed +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/runner/__init__.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/runner/server.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/runner/storage.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/runner/submit.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/runner/utils.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/runtime/__init__.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/runtime/deployment.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/runtime/flow_run.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/runtime/task_run.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/serializers.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/server/api/collections_data/views/aggregate-worker-metadata.json +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/server/api/static/prefect-logo-mark-gradient.png +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/software/__init__.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/software/base.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/software/conda.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/software/pip.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/software/python.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/states.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/task_runners.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/utilities/__init__.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/utilities/annotations.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/utilities/asyncutils.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/utilities/callables.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/utilities/collections.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/utilities/compat.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/utilities/context.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/utilities/dispatch.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/utilities/dockerutils.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/utilities/filesystem.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/utilities/hashing.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/utilities/importtools.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/utilities/math.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/utilities/names.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/utilities/processutils.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/utilities/pydantic.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/utilities/render_swagger.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/utilities/services.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/utilities/slugify.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/utilities/templating.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/utilities/text.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/utilities/validation.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/utilities/visualization.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/variables.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/workers/__init__.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/workers/base.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/workers/block.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/workers/process.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/workers/server.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect/workers/utilities.py +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect_client.egg-info/dependency_links.txt +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect_client.egg-info/requires.txt +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/src/prefect_client.egg-info/top_level.txt +0 -0
- {prefect-client-2.14.18 → prefect-client-2.14.20}/versioneer.py +0 -0
@@ -316,6 +316,19 @@ class FlowRunFilter(PrefectBaseModel, OperatorMixin):
|
|
316
316
|
)
|
317
317
|
|
318
318
|
|
319
|
+
class TaskRunFilterFlowRunId(PrefectBaseModel):
|
320
|
+
"""Filter by `TaskRun.flow_run_id`."""
|
321
|
+
|
322
|
+
any_: Optional[List[UUID]] = Field(
|
323
|
+
default=None, description="A list of flow run ids to include"
|
324
|
+
)
|
325
|
+
|
326
|
+
is_null_: bool = Field(
|
327
|
+
default=False,
|
328
|
+
description="If true, only include task runs without a flow run id",
|
329
|
+
)
|
330
|
+
|
331
|
+
|
319
332
|
class TaskRunFilterId(PrefectBaseModel):
|
320
333
|
"""Filter by `TaskRun.id`."""
|
321
334
|
|
@@ -428,6 +441,9 @@ class TaskRunFilter(PrefectBaseModel, OperatorMixin):
|
|
428
441
|
subflow_runs: Optional[TaskRunFilterSubFlowRuns] = Field(
|
429
442
|
default=None, description="Filter criteria for `TaskRun.subflow_run`"
|
430
443
|
)
|
444
|
+
flow_run_id: Optional[TaskRunFilterFlowRunId] = Field(
|
445
|
+
default=None, description="Filter criteria for `TaskRun.flow_run_id`"
|
446
|
+
)
|
431
447
|
|
432
448
|
|
433
449
|
class DeploymentFilterId(PrefectBaseModel):
|
@@ -0,0 +1,82 @@
|
|
1
|
+
import asyncio
|
2
|
+
from typing import Generic, Type, TypeVar
|
3
|
+
|
4
|
+
import orjson
|
5
|
+
import websockets
|
6
|
+
import websockets.exceptions
|
7
|
+
from starlette.status import WS_1008_POLICY_VIOLATION
|
8
|
+
from typing_extensions import Self
|
9
|
+
|
10
|
+
from prefect._internal.schemas.bases import IDBaseModel
|
11
|
+
from prefect.settings import PREFECT_API_KEY, PREFECT_API_URL
|
12
|
+
|
13
|
+
S = TypeVar("S", bound=IDBaseModel)
|
14
|
+
|
15
|
+
|
16
|
+
class Subscription(Generic[S]):
|
17
|
+
def __init__(self, model: Type[S], path: str):
|
18
|
+
self.model = model
|
19
|
+
|
20
|
+
base_url = PREFECT_API_URL.value().replace("http", "ws", 1)
|
21
|
+
self.subscription_url = f"{base_url}{path}"
|
22
|
+
|
23
|
+
self._connect = websockets.connect(
|
24
|
+
self.subscription_url,
|
25
|
+
subprotocols=["prefect"],
|
26
|
+
)
|
27
|
+
self._websocket = None
|
28
|
+
|
29
|
+
def __aiter__(self) -> Self:
|
30
|
+
return self
|
31
|
+
|
32
|
+
async def __anext__(self) -> S:
|
33
|
+
while True:
|
34
|
+
try:
|
35
|
+
await self._ensure_connected()
|
36
|
+
message = await self._websocket.recv()
|
37
|
+
|
38
|
+
message_data = orjson.loads(message)
|
39
|
+
|
40
|
+
if message_data.get("type") == "ping":
|
41
|
+
await self._websocket.send(orjson.dumps({"type": "pong"}).decode())
|
42
|
+
continue
|
43
|
+
|
44
|
+
return self.model.parse_raw(message)
|
45
|
+
except (
|
46
|
+
ConnectionRefusedError,
|
47
|
+
websockets.exceptions.ConnectionClosedError,
|
48
|
+
):
|
49
|
+
self._websocket = None
|
50
|
+
if hasattr(self._connect, "protocol"):
|
51
|
+
await self._connect.__aexit__(None, None, None)
|
52
|
+
await asyncio.sleep(0.5)
|
53
|
+
|
54
|
+
async def _ensure_connected(self):
|
55
|
+
if self._websocket:
|
56
|
+
return
|
57
|
+
|
58
|
+
websocket = await self._connect.__aenter__()
|
59
|
+
|
60
|
+
await websocket.send(
|
61
|
+
orjson.dumps({"type": "auth", "token": PREFECT_API_KEY.value()}).decode()
|
62
|
+
)
|
63
|
+
|
64
|
+
try:
|
65
|
+
auth = orjson.loads(await websocket.recv())
|
66
|
+
assert auth["type"] == "auth_success"
|
67
|
+
except (
|
68
|
+
AssertionError,
|
69
|
+
websockets.exceptions.ConnectionClosedError,
|
70
|
+
) as e:
|
71
|
+
if isinstance(e, AssertionError) or e.code == WS_1008_POLICY_VIOLATION:
|
72
|
+
raise Exception(
|
73
|
+
"Unable to authenticate to the subscription. Please "
|
74
|
+
"ensure the provided `PREFECT_API_KEY` you are using is "
|
75
|
+
"valid for this environment."
|
76
|
+
) from e
|
77
|
+
raise
|
78
|
+
else:
|
79
|
+
self._websocket = websocket
|
80
|
+
|
81
|
+
def __repr__(self) -> str:
|
82
|
+
return f"{type(self).__name__}[{self.model.__name__}]"
|
@@ -214,7 +214,7 @@ class RunContext(ContextModel):
|
|
214
214
|
client: PrefectClient
|
215
215
|
|
216
216
|
|
217
|
-
class
|
217
|
+
class EngineContext(RunContext):
|
218
218
|
"""
|
219
219
|
The context for a flow run. Data in this context is only available from within a
|
220
220
|
flow run function.
|
@@ -233,6 +233,7 @@ class FlowRunContext(RunContext):
|
|
233
233
|
|
234
234
|
flow: Optional["Flow"] = None
|
235
235
|
flow_run: Optional[FlowRun] = None
|
236
|
+
autonomous_task_run: Optional[TaskRun] = None
|
236
237
|
task_runner: BaseTaskRunner
|
237
238
|
log_prints: bool = False
|
238
239
|
parameters: Dict[str, Any]
|
@@ -266,6 +267,9 @@ class FlowRunContext(RunContext):
|
|
266
267
|
__var__ = ContextVar("flow_run")
|
267
268
|
|
268
269
|
|
270
|
+
FlowRunContext = EngineContext # for backwards compatibility
|
271
|
+
|
272
|
+
|
269
273
|
class TaskRunContext(RunContext):
|
270
274
|
"""
|
271
275
|
The context for a task run. Data in this context is only available from within a
|
@@ -155,7 +155,7 @@ from prefect.exceptions import (
|
|
155
155
|
)
|
156
156
|
from prefect.flows import Flow, load_flow_from_entrypoint
|
157
157
|
from prefect.futures import PrefectFuture, call_repr, resolve_futures_to_states
|
158
|
-
from prefect.input import
|
158
|
+
from prefect.input import keyset_from_paused_state
|
159
159
|
from prefect.input.run_input import run_input_subclass_from_type
|
160
160
|
from prefect.logging.configuration import setup_logging
|
161
161
|
from prefect.logging.handlers import APILogHandler
|
@@ -169,6 +169,7 @@ from prefect.logging.loggers import (
|
|
169
169
|
from prefect.results import BaseResult, ResultFactory, UnknownResult
|
170
170
|
from prefect.settings import (
|
171
171
|
PREFECT_DEBUG_MODE,
|
172
|
+
PREFECT_EXPERIMENTAL_ENABLE_TASK_SCHEDULING,
|
172
173
|
PREFECT_LOGGING_LOG_PRINTS,
|
173
174
|
PREFECT_TASK_INTROSPECTION_WARN_THRESHOLD,
|
174
175
|
PREFECT_TASKS_REFRESH_CACHE,
|
@@ -179,6 +180,7 @@ from prefect.states import (
|
|
179
180
|
Paused,
|
180
181
|
Pending,
|
181
182
|
Running,
|
183
|
+
Scheduled,
|
182
184
|
State,
|
183
185
|
Suspended,
|
184
186
|
exception_to_crashed_state,
|
@@ -210,9 +212,10 @@ from prefect.utilities.pydantic import PartialModel
|
|
210
212
|
from prefect.utilities.text import truncated_to
|
211
213
|
|
212
214
|
R = TypeVar("R")
|
213
|
-
T = TypeVar("T"
|
215
|
+
T = TypeVar("T")
|
214
216
|
EngineReturnType = Literal["future", "state", "result"]
|
215
217
|
|
218
|
+
NUM_CHARS_DYNAMIC_KEY = 8
|
216
219
|
|
217
220
|
API_HEALTHCHECKS = {}
|
218
221
|
UNTRACKABLE_TYPES = {bool, type(None), type(...), type(NotImplemented)}
|
@@ -984,18 +987,6 @@ async def pause_flow_run(
|
|
984
987
|
...
|
985
988
|
|
986
989
|
|
987
|
-
@overload
|
988
|
-
async def pause_flow_run(
|
989
|
-
wait_for_input: Type[Any],
|
990
|
-
flow_run_id: UUID = None,
|
991
|
-
timeout: int = 3600,
|
992
|
-
poll_interval: int = 10,
|
993
|
-
reschedule: bool = False,
|
994
|
-
key: str = None,
|
995
|
-
) -> Any:
|
996
|
-
...
|
997
|
-
|
998
|
-
|
999
990
|
@sync_compatible
|
1000
991
|
@deprecated_parameter(
|
1001
992
|
"flow_run_id", start_date="Dec 2023", help="Use `suspend_flow_run` instead."
|
@@ -1010,13 +1001,13 @@ async def pause_flow_run(
|
|
1010
1001
|
"wait_for_input", group="flow_run_input", when=lambda y: y is not None
|
1011
1002
|
)
|
1012
1003
|
async def pause_flow_run(
|
1013
|
-
wait_for_input: Optional[
|
1004
|
+
wait_for_input: Optional[Type[T]] = None,
|
1014
1005
|
flow_run_id: UUID = None,
|
1015
1006
|
timeout: int = 3600,
|
1016
1007
|
poll_interval: int = 10,
|
1017
1008
|
reschedule: bool = False,
|
1018
1009
|
key: str = None,
|
1019
|
-
):
|
1010
|
+
) -> Optional[T]:
|
1020
1011
|
"""
|
1021
1012
|
Pauses the current flow run by blocking execution until resumed.
|
1022
1013
|
|
@@ -1099,8 +1090,8 @@ async def _in_process_pause(
|
|
1099
1090
|
reschedule=False,
|
1100
1091
|
key: str = None,
|
1101
1092
|
client=None,
|
1102
|
-
wait_for_input: Optional[
|
1103
|
-
) -> Optional[
|
1093
|
+
wait_for_input: Optional[T] = None,
|
1094
|
+
) -> Optional[T]:
|
1104
1095
|
if TaskRunContext.get():
|
1105
1096
|
raise RuntimeError("Cannot pause task runs.")
|
1106
1097
|
|
@@ -1231,29 +1222,18 @@ async def suspend_flow_run(
|
|
1231
1222
|
...
|
1232
1223
|
|
1233
1224
|
|
1234
|
-
@overload
|
1235
|
-
async def suspend_flow_run(
|
1236
|
-
wait_for_input: Type[Any],
|
1237
|
-
flow_run_id: Optional[UUID] = None,
|
1238
|
-
timeout: Optional[int] = 3600,
|
1239
|
-
key: Optional[str] = None,
|
1240
|
-
client: PrefectClient = None,
|
1241
|
-
) -> Any:
|
1242
|
-
...
|
1243
|
-
|
1244
|
-
|
1245
1225
|
@sync_compatible
|
1246
1226
|
@inject_client
|
1247
1227
|
@experimental_parameter(
|
1248
1228
|
"wait_for_input", group="flow_run_input", when=lambda y: y is not None
|
1249
1229
|
)
|
1250
1230
|
async def suspend_flow_run(
|
1251
|
-
wait_for_input: Optional[
|
1231
|
+
wait_for_input: Optional[Type[T]] = None,
|
1252
1232
|
flow_run_id: Optional[UUID] = None,
|
1253
1233
|
timeout: Optional[int] = 3600,
|
1254
1234
|
key: Optional[str] = None,
|
1255
1235
|
client: PrefectClient = None,
|
1256
|
-
):
|
1236
|
+
) -> Optional[T]:
|
1257
1237
|
"""
|
1258
1238
|
Suspends a flow run by stopping code execution until resumed.
|
1259
1239
|
|
@@ -1382,16 +1362,19 @@ def enter_task_run_engine(
|
|
1382
1362
|
return_type: EngineReturnType,
|
1383
1363
|
task_runner: Optional[BaseTaskRunner],
|
1384
1364
|
mapped: bool,
|
1385
|
-
) -> Union[PrefectFuture, Awaitable[PrefectFuture]]:
|
1386
|
-
"""
|
1387
|
-
Sync entrypoint for task calls
|
1388
|
-
"""
|
1365
|
+
) -> Union[PrefectFuture, Awaitable[PrefectFuture], TaskRun]:
|
1366
|
+
"""Sync entrypoint for task calls"""
|
1389
1367
|
|
1390
1368
|
flow_run_context = FlowRunContext.get()
|
1369
|
+
|
1391
1370
|
if not flow_run_context:
|
1371
|
+
if PREFECT_EXPERIMENTAL_ENABLE_TASK_SCHEDULING.value():
|
1372
|
+
return _create_autonomous_task_run(task=task, parameters=parameters)
|
1373
|
+
|
1392
1374
|
raise RuntimeError(
|
1393
|
-
"Tasks cannot be run outside of a flow
|
1394
|
-
"
|
1375
|
+
"Tasks cannot be run outside of a flow"
|
1376
|
+
" - if you meant to submit an autonomous task, you need to set"
|
1377
|
+
" `prefect config set PREFECT_EXPERIMENTAL_ENABLE_TASK_SCHEDULING=true`"
|
1395
1378
|
)
|
1396
1379
|
|
1397
1380
|
if TaskRunContext.get():
|
@@ -1603,14 +1586,22 @@ async def create_task_run_future(
|
|
1603
1586
|
|
1604
1587
|
# Generate a name for the future
|
1605
1588
|
dynamic_key = _dynamic_key_for_task_run(flow_run_context, task)
|
1606
|
-
task_run_name =
|
1589
|
+
task_run_name = (
|
1590
|
+
f"{task.name}-{dynamic_key}"
|
1591
|
+
if flow_run_context and flow_run_context.flow_run
|
1592
|
+
else f"{task.name}-{dynamic_key[:NUM_CHARS_DYNAMIC_KEY]}" # autonomous task run
|
1593
|
+
)
|
1607
1594
|
|
1608
1595
|
# Generate a future
|
1609
1596
|
future = PrefectFuture(
|
1610
1597
|
name=task_run_name,
|
1611
1598
|
key=uuid4(),
|
1612
1599
|
task_runner=task_runner,
|
1613
|
-
asynchronous=
|
1600
|
+
asynchronous=(
|
1601
|
+
task.isasync and flow_run_context.flow.isasync
|
1602
|
+
if flow_run_context and flow_run_context.flow
|
1603
|
+
else task.isasync
|
1604
|
+
),
|
1614
1605
|
)
|
1615
1606
|
|
1616
1607
|
# Create and submit the task run in the background
|
@@ -1650,14 +1641,18 @@ async def create_task_run_then_submit(
|
|
1650
1641
|
task_runner: BaseTaskRunner,
|
1651
1642
|
extra_task_inputs: Dict[str, Set[TaskRunInput]],
|
1652
1643
|
) -> None:
|
1653
|
-
task_run =
|
1654
|
-
|
1655
|
-
|
1656
|
-
|
1657
|
-
|
1658
|
-
|
1659
|
-
|
1660
|
-
|
1644
|
+
task_run = (
|
1645
|
+
await create_task_run(
|
1646
|
+
task=task,
|
1647
|
+
name=task_run_name,
|
1648
|
+
flow_run_context=flow_run_context,
|
1649
|
+
parameters=parameters,
|
1650
|
+
dynamic_key=task_run_dynamic_key,
|
1651
|
+
wait_for=wait_for,
|
1652
|
+
extra_task_inputs=extra_task_inputs,
|
1653
|
+
)
|
1654
|
+
if not flow_run_context.autonomous_task_run
|
1655
|
+
else flow_run_context.autonomous_task_run
|
1661
1656
|
)
|
1662
1657
|
|
1663
1658
|
# Attach the task run to the future to support `get_state` operations
|
@@ -1698,7 +1693,7 @@ async def create_task_run(
|
|
1698
1693
|
task_run = await flow_run_context.client.create_task_run(
|
1699
1694
|
task=task,
|
1700
1695
|
name=name,
|
1701
|
-
flow_run_id=flow_run_context.flow_run.id,
|
1696
|
+
flow_run_id=flow_run_context.flow_run.id if flow_run_context.flow_run else None,
|
1702
1697
|
dynamic_key=dynamic_key,
|
1703
1698
|
state=Pending(),
|
1704
1699
|
extra_tags=TagsContext.get().current_tags,
|
@@ -1721,7 +1716,10 @@ async def submit_task_run(
|
|
1721
1716
|
) -> PrefectFuture:
|
1722
1717
|
logger = get_run_logger(flow_run_context)
|
1723
1718
|
|
1724
|
-
if
|
1719
|
+
if (
|
1720
|
+
task_runner.concurrency_type == TaskConcurrencyType.SEQUENTIAL
|
1721
|
+
and not flow_run_context.autonomous_task_run
|
1722
|
+
):
|
1725
1723
|
logger.info(f"Executing {task_run.name!r} immediately...")
|
1726
1724
|
|
1727
1725
|
future = await task_runner.submit(
|
@@ -1799,7 +1797,7 @@ async def begin_task_run(
|
|
1799
1797
|
# worker, the flow run timeout will not be raised in the worker process.
|
1800
1798
|
interruptible = maybe_flow_run_context.timeout_scope is not None
|
1801
1799
|
else:
|
1802
|
-
# Otherwise, retrieve a new
|
1800
|
+
# Otherwise, retrieve a new clien`t
|
1803
1801
|
client = await stack.enter_async_context(get_client())
|
1804
1802
|
interruptible = False
|
1805
1803
|
await stack.enter_async_context(anyio.create_task_group())
|
@@ -2153,7 +2151,6 @@ async def orchestrate_task_run(
|
|
2153
2151
|
await _check_task_failure_retriable(task, task_run, terminal_state)
|
2154
2152
|
)
|
2155
2153
|
state = await propose_state(client, terminal_state, task_run_id=task_run.id)
|
2156
|
-
|
2157
2154
|
last_event = _emit_task_run_state_change_event(
|
2158
2155
|
task_run=task_run,
|
2159
2156
|
initial_state=last_state,
|
@@ -2203,7 +2200,7 @@ async def orchestrate_task_run(
|
|
2203
2200
|
level=logging.INFO if state.is_completed() else logging.ERROR,
|
2204
2201
|
msg=f"Finished in state {display_state}",
|
2205
2202
|
)
|
2206
|
-
|
2203
|
+
logger.warning(f"Task run {task_run.name!r} finished in state {display_state}")
|
2207
2204
|
return state
|
2208
2205
|
|
2209
2206
|
|
@@ -2572,7 +2569,12 @@ async def propose_state(
|
|
2572
2569
|
|
2573
2570
|
|
2574
2571
|
def _dynamic_key_for_task_run(context: FlowRunContext, task: Task) -> int:
|
2575
|
-
if
|
2572
|
+
if context.flow_run is None: # this is an autonomous task run
|
2573
|
+
context.task_run_dynamic_keys[task.task_key] = getattr(
|
2574
|
+
task, "dynamic_key", str(uuid4())
|
2575
|
+
)
|
2576
|
+
|
2577
|
+
elif task.task_key not in context.task_run_dynamic_keys:
|
2576
2578
|
context.task_run_dynamic_keys[task.task_key] = 0
|
2577
2579
|
else:
|
2578
2580
|
context.task_run_dynamic_keys[task.task_key] += 1
|
@@ -2912,6 +2914,34 @@ def _emit_task_run_state_change_event(
|
|
2912
2914
|
)
|
2913
2915
|
|
2914
2916
|
|
2917
|
+
@sync_compatible
|
2918
|
+
async def _create_autonomous_task_run(
|
2919
|
+
task: Task, parameters: Dict[str, Any]
|
2920
|
+
) -> TaskRun:
|
2921
|
+
async with get_client() as client:
|
2922
|
+
scheduled = Scheduled()
|
2923
|
+
if parameters:
|
2924
|
+
parameters_id = uuid4()
|
2925
|
+
scheduled.state_details.task_parameters_id = parameters_id
|
2926
|
+
|
2927
|
+
# TODO: We want to use result storage for parameters, but we'll need
|
2928
|
+
# a better way to use it than this.
|
2929
|
+
task.persist_result = True
|
2930
|
+
factory = await ResultFactory.from_task(task, client=client)
|
2931
|
+
await factory.store_parameters(parameters_id, parameters)
|
2932
|
+
|
2933
|
+
task_run = await client.create_task_run(
|
2934
|
+
task=task,
|
2935
|
+
flow_run_id=None,
|
2936
|
+
dynamic_key=f"{task.task_key}-{str(uuid4())[:NUM_CHARS_DYNAMIC_KEY]}",
|
2937
|
+
state=scheduled,
|
2938
|
+
)
|
2939
|
+
|
2940
|
+
engine_logger.debug(f"Submitted run of task {task.name!r} for execution")
|
2941
|
+
|
2942
|
+
return task_run
|
2943
|
+
|
2944
|
+
|
2915
2945
|
if __name__ == "__main__":
|
2916
2946
|
try:
|
2917
2947
|
flow_run_id = UUID(
|
@@ -683,12 +683,27 @@ class Azure(WritableFileSystem, WritableDeploymentStorage):
|
|
683
683
|
" require ADLFS to use DefaultAzureCredentials."
|
684
684
|
),
|
685
685
|
)
|
686
|
-
|
686
|
+
azure_storage_container: Optional[SecretStr] = Field(
|
687
|
+
default=None,
|
688
|
+
title="Azure storage container",
|
689
|
+
description=(
|
690
|
+
"Blob Container in Azure Storage Account. If set the 'bucket_path' will"
|
691
|
+
" be interpreted using the following URL format:"
|
692
|
+
"'az://<container>@<storage_account>.dfs.core.windows.net/<bucket_path>'."
|
693
|
+
),
|
694
|
+
)
|
687
695
|
_remote_file_system: RemoteFileSystem = None
|
688
696
|
|
689
697
|
@property
|
690
698
|
def basepath(self) -> str:
|
691
|
-
|
699
|
+
if self.azure_storage_container:
|
700
|
+
return (
|
701
|
+
f"az://{self.azure_storage_container.get_secret_value()}"
|
702
|
+
f"@{self.azure_storage_account_name.get_secret_value()}"
|
703
|
+
f".dfs.core.windows.net/{self.bucket_path}"
|
704
|
+
)
|
705
|
+
else:
|
706
|
+
return f"az://{self.bucket_path}"
|
692
707
|
|
693
708
|
@property
|
694
709
|
def filesystem(self) -> RemoteFileSystem:
|
@@ -713,7 +728,7 @@ class Azure(WritableFileSystem, WritableDeploymentStorage):
|
|
713
728
|
)
|
714
729
|
settings["anon"] = self.azure_storage_anon
|
715
730
|
self._remote_file_system = RemoteFileSystem(
|
716
|
-
basepath=
|
731
|
+
basepath=self.basepath, settings=settings
|
717
732
|
)
|
718
733
|
return self._remote_file_system
|
719
734
|
|
@@ -65,7 +65,6 @@ else:
|
|
65
65
|
V2ValidationError = None
|
66
66
|
|
67
67
|
from rich.console import Console
|
68
|
-
from rich.panel import Panel
|
69
68
|
from typing_extensions import Literal, ParamSpec
|
70
69
|
|
71
70
|
from prefect._internal.schemas.validators import raise_on_name_with_banned_characters
|
@@ -785,7 +784,7 @@ class Flow(Generic[P, R]):
|
|
785
784
|
)
|
786
785
|
|
787
786
|
console = Console()
|
788
|
-
console.print(
|
787
|
+
console.print(help_message, soft_wrap=True)
|
789
788
|
await runner.start(webserver=webserver)
|
790
789
|
|
791
790
|
@classmethod
|