prefect-client 2.14.8__tar.gz → 2.14.10__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.
Files changed (219) hide show
  1. {prefect-client-2.14.8 → prefect-client-2.14.10}/PKG-INFO +1 -1
  2. {prefect-client-2.14.8 → prefect-client-2.14.10}/requirements-client.txt +2 -1
  3. {prefect-client-2.14.8 → prefect-client-2.14.10}/requirements-dev.txt +1 -1
  4. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/__init__.py +4 -1
  5. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/client/orchestration.py +1 -2
  6. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/deployments/runner.py +5 -1
  7. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/deployments/steps/core.py +2 -4
  8. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/engine.py +176 -11
  9. prefect-client-2.14.10/src/prefect/events/clients.py +408 -0
  10. prefect-client-2.14.10/src/prefect/events/filters.py +214 -0
  11. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/exceptions.py +4 -0
  12. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/infrastructure/base.py +106 -1
  13. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/infrastructure/container.py +52 -0
  14. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/infrastructure/process.py +38 -0
  15. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/infrastructure/provisioners/__init__.py +6 -2
  16. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/infrastructure/provisioners/cloud_run.py +7 -1
  17. prefect-client-2.14.10/src/prefect/infrastructure/provisioners/container_instance.py +797 -0
  18. prefect-client-2.14.10/src/prefect/infrastructure/provisioners/ecs.py +907 -0
  19. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/runner/runner.py +14 -0
  20. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/runner/storage.py +12 -2
  21. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/states.py +26 -3
  22. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/utilities/services.py +10 -0
  23. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/workers/__init__.py +1 -0
  24. prefect-client-2.14.10/src/prefect/workers/block.py +226 -0
  25. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/workers/utilities.py +2 -1
  26. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect_client.egg-info/PKG-INFO +1 -1
  27. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect_client.egg-info/SOURCES.txt +4 -0
  28. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect_client.egg-info/requires.txt +1 -0
  29. prefect-client-2.14.8/src/prefect/events/clients.py +0 -197
  30. {prefect-client-2.14.8 → prefect-client-2.14.10}/LICENSE +0 -0
  31. {prefect-client-2.14.8 → prefect-client-2.14.10}/MANIFEST.in +0 -0
  32. {prefect-client-2.14.8 → prefect-client-2.14.10}/README.md +0 -0
  33. {prefect-client-2.14.8 → prefect-client-2.14.10}/requirements.txt +0 -0
  34. {prefect-client-2.14.8 → prefect-client-2.14.10}/setup.cfg +0 -0
  35. {prefect-client-2.14.8 → prefect-client-2.14.10}/setup.py +0 -0
  36. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/.prefectignore +0 -0
  37. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_internal/__init__.py +0 -0
  38. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_internal/_logging.py +0 -0
  39. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_internal/compatibility/__init__.py +0 -0
  40. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_internal/compatibility/deprecated.py +0 -0
  41. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_internal/compatibility/experimental.py +0 -0
  42. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_internal/concurrency/__init__.py +0 -0
  43. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_internal/concurrency/api.py +0 -0
  44. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_internal/concurrency/calls.py +0 -0
  45. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_internal/concurrency/cancellation.py +0 -0
  46. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_internal/concurrency/event_loop.py +0 -0
  47. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_internal/concurrency/inspection.py +0 -0
  48. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_internal/concurrency/primitives.py +0 -0
  49. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_internal/concurrency/services.py +0 -0
  50. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_internal/concurrency/threads.py +0 -0
  51. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_internal/concurrency/waiters.py +0 -0
  52. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_internal/pydantic/__init__.py +0 -0
  53. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_internal/pydantic/annotations/__init__.py +0 -0
  54. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_internal/pydantic/annotations/pendulum.py +0 -0
  55. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_internal/pydantic/schemas.py +0 -0
  56. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_internal/pydantic/v2_schema.py +0 -0
  57. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_internal/pydantic/v2_validated_func.py +0 -0
  58. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_internal/pytz.py +0 -0
  59. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_internal/schemas/__init__.py +0 -0
  60. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_internal/schemas/bases.py +0 -0
  61. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_internal/schemas/fields.py +0 -0
  62. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_internal/schemas/serializers.py +0 -0
  63. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_internal/schemas/transformations.py +0 -0
  64. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_internal/schemas/validators.py +0 -0
  65. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_vendor/__init__.py +0 -0
  66. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_vendor/fastapi/__init__.py +0 -0
  67. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_vendor/fastapi/applications.py +0 -0
  68. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_vendor/fastapi/background.py +0 -0
  69. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_vendor/fastapi/concurrency.py +0 -0
  70. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_vendor/fastapi/datastructures.py +0 -0
  71. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_vendor/fastapi/dependencies/__init__.py +0 -0
  72. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_vendor/fastapi/dependencies/models.py +0 -0
  73. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_vendor/fastapi/dependencies/utils.py +0 -0
  74. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_vendor/fastapi/encoders.py +0 -0
  75. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_vendor/fastapi/exception_handlers.py +0 -0
  76. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_vendor/fastapi/exceptions.py +0 -0
  77. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_vendor/fastapi/logger.py +0 -0
  78. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_vendor/fastapi/middleware/__init__.py +0 -0
  79. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_vendor/fastapi/middleware/asyncexitstack.py +0 -0
  80. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_vendor/fastapi/middleware/cors.py +0 -0
  81. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_vendor/fastapi/middleware/gzip.py +0 -0
  82. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_vendor/fastapi/middleware/httpsredirect.py +0 -0
  83. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_vendor/fastapi/middleware/trustedhost.py +0 -0
  84. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_vendor/fastapi/middleware/wsgi.py +0 -0
  85. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_vendor/fastapi/openapi/__init__.py +0 -0
  86. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_vendor/fastapi/openapi/constants.py +0 -0
  87. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_vendor/fastapi/openapi/docs.py +0 -0
  88. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_vendor/fastapi/openapi/models.py +0 -0
  89. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_vendor/fastapi/openapi/utils.py +0 -0
  90. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_vendor/fastapi/param_functions.py +0 -0
  91. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_vendor/fastapi/params.py +0 -0
  92. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_vendor/fastapi/requests.py +0 -0
  93. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_vendor/fastapi/responses.py +0 -0
  94. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_vendor/fastapi/routing.py +0 -0
  95. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_vendor/fastapi/security/__init__.py +0 -0
  96. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_vendor/fastapi/security/api_key.py +0 -0
  97. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_vendor/fastapi/security/base.py +0 -0
  98. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_vendor/fastapi/security/http.py +0 -0
  99. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_vendor/fastapi/security/oauth2.py +0 -0
  100. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_vendor/fastapi/security/open_id_connect_url.py +0 -0
  101. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_vendor/fastapi/security/utils.py +0 -0
  102. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_vendor/fastapi/staticfiles.py +0 -0
  103. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_vendor/fastapi/templating.py +0 -0
  104. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_vendor/fastapi/testclient.py +0 -0
  105. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_vendor/fastapi/types.py +0 -0
  106. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_vendor/fastapi/utils.py +0 -0
  107. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_vendor/fastapi/websockets.py +0 -0
  108. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/_version.py +0 -0
  109. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/agent.py +0 -0
  110. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/blocks/__init__.py +0 -0
  111. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/blocks/abstract.py +0 -0
  112. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/blocks/core.py +0 -0
  113. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/blocks/fields.py +0 -0
  114. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/blocks/kubernetes.py +0 -0
  115. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/blocks/notifications.py +0 -0
  116. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/blocks/system.py +0 -0
  117. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/blocks/webhook.py +0 -0
  118. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/client/__init__.py +0 -0
  119. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/client/base.py +0 -0
  120. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/client/cloud.py +0 -0
  121. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/client/collections.py +0 -0
  122. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/client/constants.py +0 -0
  123. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/client/schemas/__init__.py +0 -0
  124. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/client/schemas/actions.py +0 -0
  125. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/client/schemas/filters.py +0 -0
  126. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/client/schemas/objects.py +0 -0
  127. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/client/schemas/responses.py +0 -0
  128. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/client/schemas/schedules.py +0 -0
  129. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/client/schemas/sorting.py +0 -0
  130. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/client/utilities.py +0 -0
  131. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/concurrency/__init__.py +0 -0
  132. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/concurrency/asyncio.py +0 -0
  133. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/concurrency/common.py +0 -0
  134. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/concurrency/events.py +0 -0
  135. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/concurrency/services.py +0 -0
  136. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/concurrency/sync.py +0 -0
  137. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/context.py +0 -0
  138. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/deployments/__init__.py +0 -0
  139. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/deployments/base.py +0 -0
  140. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/deployments/deployments.py +0 -0
  141. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/deployments/steps/__init__.py +0 -0
  142. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/deployments/steps/pull.py +0 -0
  143. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/deployments/steps/utility.py +0 -0
  144. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/deprecated/__init__.py +0 -0
  145. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/deprecated/data_documents.py +0 -0
  146. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/events/__init__.py +0 -0
  147. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/events/actions.py +0 -0
  148. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/events/instrument.py +0 -0
  149. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/events/related.py +0 -0
  150. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/events/schemas.py +0 -0
  151. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/events/utilities.py +0 -0
  152. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/events/worker.py +0 -0
  153. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/filesystems.py +0 -0
  154. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/flows.py +0 -0
  155. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/futures.py +0 -0
  156. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/infrastructure/__init__.py +0 -0
  157. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/infrastructure/kubernetes.py +0 -0
  158. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/logging/__init__.py +0 -0
  159. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/logging/configuration.py +0 -0
  160. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/logging/formatters.py +0 -0
  161. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/logging/handlers.py +0 -0
  162. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/logging/highlighters.py +0 -0
  163. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/logging/loggers.py +0 -0
  164. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/logging/logging.yml +0 -0
  165. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/manifests.py +0 -0
  166. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/packaging/__init__.py +0 -0
  167. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/packaging/base.py +0 -0
  168. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/packaging/docker.py +0 -0
  169. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/packaging/file.py +0 -0
  170. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/packaging/orion.py +0 -0
  171. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/packaging/serializers.py +0 -0
  172. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/plugins.py +0 -0
  173. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/profiles.toml +0 -0
  174. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/py.typed +0 -0
  175. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/results.py +0 -0
  176. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/runner/__init__.py +0 -0
  177. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/runner/server.py +0 -0
  178. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/runtime/__init__.py +0 -0
  179. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/runtime/deployment.py +0 -0
  180. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/runtime/flow_run.py +0 -0
  181. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/runtime/task_run.py +0 -0
  182. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/serializers.py +0 -0
  183. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/server/api/static/prefect-logo-mark-gradient.png +0 -0
  184. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/settings.py +0 -0
  185. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/software/__init__.py +0 -0
  186. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/software/base.py +0 -0
  187. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/software/conda.py +0 -0
  188. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/software/pip.py +0 -0
  189. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/software/python.py +0 -0
  190. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/task_runners.py +0 -0
  191. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/tasks.py +0 -0
  192. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/utilities/__init__.py +0 -0
  193. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/utilities/annotations.py +0 -0
  194. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/utilities/asyncutils.py +0 -0
  195. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/utilities/callables.py +0 -0
  196. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/utilities/collections.py +0 -0
  197. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/utilities/compat.py +0 -0
  198. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/utilities/context.py +0 -0
  199. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/utilities/dispatch.py +0 -0
  200. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/utilities/dockerutils.py +0 -0
  201. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/utilities/filesystem.py +0 -0
  202. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/utilities/hashing.py +0 -0
  203. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/utilities/importtools.py +0 -0
  204. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/utilities/math.py +0 -0
  205. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/utilities/names.py +0 -0
  206. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/utilities/processutils.py +0 -0
  207. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/utilities/pydantic.py +0 -0
  208. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/utilities/render_swagger.py +0 -0
  209. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/utilities/slugify.py +0 -0
  210. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/utilities/templating.py +0 -0
  211. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/utilities/text.py +0 -0
  212. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/utilities/visualization.py +0 -0
  213. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/variables.py +0 -0
  214. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/workers/base.py +0 -0
  215. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/workers/process.py +0 -0
  216. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect/workers/server.py +0 -0
  217. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect_client.egg-info/dependency_links.txt +0 -0
  218. {prefect-client-2.14.8 → prefect-client-2.14.10}/src/prefect_client.egg-info/top_level.txt +0 -0
  219. {prefect-client-2.14.8 → prefect-client-2.14.10}/versioneer.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: prefect-client
3
- Version: 2.14.8
3
+ Version: 2.14.10
4
4
  Summary: Workflow orchestration and management.
5
5
  Home-page: https://www.prefect.io
6
6
  Author: Prefect Technologies, Inc.
@@ -1,5 +1,6 @@
1
1
  anyio >= 3.7.1, < 4.0.0
2
2
  asgi-lifespan >= 1.0, < 3.0
3
+ cachetools >= 5.3, < 6.0
3
4
  cloudpickle >= 2.0, < 4.0
4
5
  coolname >= 1.0.4, < 3.0.0
5
6
  croniter >= 1.0.12, < 3.0.0
@@ -28,4 +29,4 @@ toml >= 0.10.0
28
29
  typing_extensions >= 4.5.0, < 5.0.0
29
30
  ujson >= 5.8.0, < 6.0.0
30
31
  uvicorn >= 0.14.0
31
- websockets >= 10.4, < 13.0
32
+ websockets >= 10.4, < 13.0
@@ -19,7 +19,7 @@ numpy
19
19
  pillow
20
20
  pre-commit
21
21
  pytest > 7
22
- pytest-asyncio >= 0.18.2, != 0.22.0
22
+ pytest-asyncio >= 0.18.2, != 0.22.0, < 0.23.0 # Cannot override event loop in 0.23.0. See https://github.com/pytest-dev/pytest-asyncio/issues/706 for more details.
23
23
  pytest-cov
24
24
  pytest-benchmark
25
25
  pytest-env
@@ -44,7 +44,7 @@ from prefect.context import tags
44
44
  from prefect.manifests import Manifest
45
45
  from prefect.utilities.annotations import unmapped, allow_failure
46
46
  from prefect.results import BaseResult
47
- from prefect.engine import pause_flow_run, resume_flow_run
47
+ from prefect.engine import pause_flow_run, resume_flow_run, suspend_flow_run
48
48
  from prefect.client.orchestration import get_client, PrefectClient
49
49
  from prefect.client.cloud import get_cloud_client, CloudClient
50
50
  import prefect.variables
@@ -172,4 +172,7 @@ __all__ = [
172
172
  "Runner",
173
173
  "serve",
174
174
  "deploy",
175
+ "pause_flow_run",
176
+ "resume_flow_run",
177
+ "suspend_flow_run",
175
178
  ]
@@ -2181,7 +2181,7 @@ class PrefectClient:
2181
2181
  limit: int = None,
2182
2182
  offset: int = None,
2183
2183
  sort: LogSort = LogSort.TIMESTAMP_ASC,
2184
- ) -> None:
2184
+ ) -> List[Log]:
2185
2185
  """
2186
2186
  Read flow and task run logs.
2187
2187
  """
@@ -2491,7 +2491,6 @@ class PrefectClient:
2491
2491
  f"/work_pools/{work_pool_name}/get_scheduled_flow_runs",
2492
2492
  json=body,
2493
2493
  )
2494
-
2495
2494
  return pydantic.parse_obj_as(List[WorkerFlowRunResponse], response.json())
2496
2495
 
2497
2496
  async def create_artifact(
@@ -774,7 +774,11 @@ async def deploy(
774
774
  is_docker_based_work_pool = get_from_dict(
775
775
  work_pool.base_job_template, "variables.properties.image", False
776
776
  )
777
- if not is_docker_based_work_pool:
777
+ is_block_based_work_pool = get_from_dict(
778
+ work_pool.base_job_template, "variables.properties.block", False
779
+ )
780
+ # carve out an exception for block based work pools that only have a block in their base job template
781
+ if not is_docker_based_work_pool and not is_block_based_work_pool:
778
782
  raise ValueError(
779
783
  f"Work pool {work_pool_name!r} does not support custom Docker images. "
780
784
  "Please use a work pool with an `image` variable in its base job template."
@@ -13,6 +13,7 @@ Whenever a step is run, the following actions are taken:
13
13
  import os
14
14
  import re
15
15
  import subprocess
16
+ import sys
16
17
  import warnings
17
18
  from copy import deepcopy
18
19
  from importlib import import_module
@@ -23,7 +24,6 @@ from prefect._internal.concurrency.api import Call, from_async
23
24
  from prefect.logging.loggers import get_logger
24
25
  from prefect.settings import PREFECT_DEBUG_MODE
25
26
  from prefect.utilities.importtools import import_object
26
- from prefect.utilities.processutils import get_sys_executable
27
27
  from prefect.utilities.templating import (
28
28
  apply_values,
29
29
  resolve_block_document_references,
@@ -83,9 +83,7 @@ def _get_function_for_step(
83
83
  raise
84
84
 
85
85
  try:
86
- subprocess.check_call(
87
- [get_sys_executable(), "-m", "pip", "install", *packages],
88
- )
86
+ subprocess.check_call([sys.executable, "-m", "pip", "install", *packages])
89
87
  except subprocess.CalledProcessError:
90
88
  get_logger("deployments.steps.core").warning(
91
89
  "Unable to install required packages for %s", fully_qualified_name
@@ -84,6 +84,7 @@ import asyncio
84
84
  import contextlib
85
85
  import logging
86
86
  import os
87
+ import random
87
88
  import signal
88
89
  import sys
89
90
  import threading
@@ -112,6 +113,7 @@ from typing_extensions import Literal
112
113
  import prefect
113
114
  import prefect.context
114
115
  import prefect.plugins
116
+ from prefect._internal.compatibility.deprecated import deprecated_parameter
115
117
  from prefect._internal.concurrency.api import create_call, from_async, from_sync
116
118
  from prefect._internal.concurrency.calls import get_current_call
117
119
  from prefect._internal.concurrency.cancellation import CancelledError, get_deadline
@@ -172,6 +174,7 @@ from prefect.states import (
172
174
  Pending,
173
175
  Running,
174
176
  State,
177
+ Suspended,
175
178
  exception_to_crashed_state,
176
179
  exception_to_failed_state,
177
180
  get_state_exception,
@@ -941,6 +944,15 @@ async def orchestrate_flow_run(
941
944
 
942
945
 
943
946
  @sync_compatible
947
+ @deprecated_parameter(
948
+ "flow_run_id", start_date="Dec 2023", help="Use `suspend_flow_run` instead."
949
+ )
950
+ @deprecated_parameter(
951
+ "reschedule",
952
+ start_date="Dec 2023",
953
+ when=lambda p: p is True,
954
+ help="Use `suspend_flow_run` instead.",
955
+ )
944
956
  async def pause_flow_run(
945
957
  flow_run_id: UUID = None,
946
958
  timeout: int = 300,
@@ -949,7 +961,7 @@ async def pause_flow_run(
949
961
  key: str = None,
950
962
  ):
951
963
  """
952
- Pauses the current flow run by stopping execution until resumed.
964
+ Pauses the current flow run by blocking execution until resumed.
953
965
 
954
966
  When called within a flow run, execution will block and no downstream tasks will
955
967
  run until the flow is resumed. Task runs that have already started will continue
@@ -1038,7 +1050,7 @@ async def _in_process_pause(
1038
1050
 
1039
1051
  if reschedule:
1040
1052
  # If a rescheduled pause, exit this process so the run can be resubmitted later
1041
- raise Pause()
1053
+ raise Pause(state=state)
1042
1054
 
1043
1055
  # Otherwise, block and check for completion on an interval
1044
1056
  with anyio.move_on_after(timeout):
@@ -1088,6 +1100,90 @@ async def _out_of_process_pause(
1088
1100
  raise RuntimeError(response.details.reason)
1089
1101
 
1090
1102
 
1103
+ @sync_compatible
1104
+ @inject_client
1105
+ async def suspend_flow_run(
1106
+ flow_run_id: Optional[UUID] = None,
1107
+ timeout: Optional[int] = 300,
1108
+ key: Optional[str] = None,
1109
+ client: PrefectClient = None,
1110
+ ):
1111
+ """
1112
+ Suspends a flow run by stopping code execution until resumed.
1113
+
1114
+ When suspended, the flow run will continue execution until the NEXT task is
1115
+ orchestrated, at which point the flow will exit. Any tasks that have
1116
+ already started will run until completion. When resumed, the flow run will
1117
+ be rescheduled to finish execution. In order suspend a flow run in this
1118
+ way, the flow needs to have an associated deployment and results need to be
1119
+ configured with the `persist_results` option.
1120
+
1121
+ Args:
1122
+ flow_run_id: a flow run id. If supplied, this function will attempt to
1123
+ suspend the specified flow run. If not supplied will attempt to
1124
+ suspend the current flow run.
1125
+ timeout: the number of seconds to wait for the flow to be resumed before
1126
+ failing. Defaults to 5 minutes (300 seconds). If the pause timeout
1127
+ exceeds any configured flow-level timeout, the flow might fail even
1128
+ after resuming.
1129
+ key: An optional key to prevent calling suspend more than once. This
1130
+ defaults to a random string and prevents suspends from running the
1131
+ same suspend twice. A custom key can be supplied for custom
1132
+ suspending behavior.
1133
+ """
1134
+ context = FlowRunContext.get()
1135
+
1136
+ if flow_run_id is None:
1137
+ if TaskRunContext.get():
1138
+ raise RuntimeError("Cannot suspend task runs.")
1139
+
1140
+ if context is None or context.flow_run is None:
1141
+ raise RuntimeError(
1142
+ "Flow runs can only be suspended from within a flow run."
1143
+ )
1144
+
1145
+ logger = get_run_logger(context=context)
1146
+ logger.info(
1147
+ "Suspending flow run, execution will be rescheduled when this flow run is"
1148
+ " resumed."
1149
+ )
1150
+ flow_run_id = context.flow_run.id
1151
+ suspending_current_flow_run = True
1152
+ pause_counter = _observed_flow_pauses(context)
1153
+ pause_key = key or str(pause_counter)
1154
+ else:
1155
+ # Since we're suspending another flow run we need to generate a pause
1156
+ # key that won't conflict with whatever suspends/pauses that flow may
1157
+ # have. Since this method won't be called during that flow run it's
1158
+ # okay that this is non-deterministic.
1159
+ suspending_current_flow_run = False
1160
+ pause_key = key or str(uuid4())
1161
+
1162
+ try:
1163
+ state = await propose_state(
1164
+ client=client,
1165
+ state=Suspended(timeout_seconds=timeout, pause_key=pause_key),
1166
+ flow_run_id=flow_run_id,
1167
+ )
1168
+ except Abort as exc:
1169
+ # Aborted requests mean the suspension is not allowed
1170
+ raise RuntimeError(f"Flow run cannot be suspended: {exc}")
1171
+
1172
+ if state.is_running():
1173
+ # The orchestrator requests that this suspend be ignored
1174
+ return
1175
+
1176
+ if not state.is_paused():
1177
+ # If we receive anything but a PAUSED state, we are unable to continue
1178
+ raise RuntimeError(
1179
+ f"Flow run cannot be suspended. Received unexpected state from API: {state}"
1180
+ )
1181
+
1182
+ if suspending_current_flow_run:
1183
+ # Exit this process so the run can be resubmitted later
1184
+ raise Pause()
1185
+
1186
+
1091
1187
  @sync_compatible
1092
1188
  async def resume_flow_run(flow_run_id):
1093
1189
  """
@@ -1585,10 +1681,18 @@ async def begin_task_run(
1585
1681
  state = task_run.state
1586
1682
 
1587
1683
  except Pause:
1684
+ # A pause signal here should mean the flow run suspended, so we
1685
+ # should do the same. We'll look up the flow run's pause state to
1686
+ # try and reuse it, so we capture any data like timeouts.
1687
+ flow_run = await client.read_flow_run(task_run.flow_run_id)
1688
+ if flow_run.state and flow_run.state.is_paused():
1689
+ state = flow_run.state
1690
+ else:
1691
+ state = Suspended()
1692
+
1588
1693
  task_run_logger(task_run).info(
1589
1694
  "Task run encountered a pause signal during orchestration."
1590
1695
  )
1591
- state = Paused()
1592
1696
 
1593
1697
  return state
1594
1698
 
@@ -1702,13 +1806,74 @@ async def orchestrate_task_run(
1702
1806
  last_state = task_run.state
1703
1807
 
1704
1808
  # Transition from `PENDING` -> `RUNNING`
1705
- state = await propose_state(
1706
- client,
1707
- Running(
1708
- state_details=StateDetails(cache_key=cache_key, refresh_cache=refresh_cache)
1709
- ),
1710
- task_run_id=task_run.id,
1711
- )
1809
+ try:
1810
+ state = await propose_state(
1811
+ client,
1812
+ Running(
1813
+ state_details=StateDetails(
1814
+ cache_key=cache_key, refresh_cache=refresh_cache
1815
+ )
1816
+ ),
1817
+ task_run_id=task_run.id,
1818
+ )
1819
+ except Pause as exc:
1820
+ # We shouldn't get a pause signal without a state, but if this happens,
1821
+ # just use a Paused state to assume an in-process pause.
1822
+ state = exc.state if exc.state else Paused()
1823
+
1824
+ # If a flow submits tasks and then pauses, we may reach this point due
1825
+ # to concurrency timing because the tasks will try to transition after
1826
+ # the flow run has paused. Orchestration will send back a Paused state
1827
+ # for the task runs.
1828
+ if state.state_details.pause_reschedule:
1829
+ # If we're being asked to pause and reschedule, we should exit the
1830
+ # task and expect to be resumed later.
1831
+ raise
1832
+
1833
+ if state.is_paused():
1834
+ BACKOFF_MAX = 10 # Seconds
1835
+ backoff_count = 0
1836
+
1837
+ async def tick():
1838
+ nonlocal backoff_count
1839
+ if backoff_count < BACKOFF_MAX:
1840
+ backoff_count += 1
1841
+ interval = 1 + backoff_count + random.random() * backoff_count
1842
+ await anyio.sleep(interval)
1843
+
1844
+ # Enter a loop to wait for the task run to be resumed, i.e.
1845
+ # become Pending, and then propose a Running state again.
1846
+ while True:
1847
+ await tick()
1848
+
1849
+ # Propose a Running state again. We do this instead of reading the
1850
+ # task run because if the flow run times out, this lets
1851
+ # orchestration fail the task run.
1852
+ try:
1853
+ state = await propose_state(
1854
+ client,
1855
+ Running(
1856
+ state_details=StateDetails(
1857
+ cache_key=cache_key, refresh_cache=refresh_cache
1858
+ )
1859
+ ),
1860
+ task_run_id=task_run.id,
1861
+ )
1862
+ except Pause as exc:
1863
+ if not exc.state:
1864
+ continue
1865
+
1866
+ if exc.state.state_details.pause_reschedule:
1867
+ # If the pause state includes pause_reschedule, we should exit the
1868
+ # task and expect to be resumed later. We've already checked for this
1869
+ # above, but we check again here in case the state changed; e.g. the
1870
+ # flow run suspended.
1871
+ raise
1872
+ else:
1873
+ # Propose a Running state again.
1874
+ continue
1875
+ else:
1876
+ break
1712
1877
 
1713
1878
  # Emit an event to capture the result of proposing a `RUNNING` state.
1714
1879
  last_event = _emit_task_run_state_change_event(
@@ -2207,7 +2372,7 @@ async def propose_state(
2207
2372
 
2208
2373
  elif response.status == SetStateStatus.REJECT:
2209
2374
  if response.state.is_paused():
2210
- raise Pause(response.details.reason)
2375
+ raise Pause(response.details.reason, state=response.state)
2211
2376
  return response.state
2212
2377
 
2213
2378
  else: