orchestrator-core 4.6.0rc4__py3-none-any.whl → 4.6.1__py3-none-any.whl
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.
- orchestrator/__init__.py +1 -1
- orchestrator/graphql/schema.py +6 -1
- orchestrator/graphql/types.py +4 -1
- orchestrator/migrations/helpers.py +1 -1
- orchestrator/workflow.py +23 -6
- {orchestrator_core-4.6.0rc4.dist-info → orchestrator_core-4.6.1.dist-info}/METADATA +3 -3
- {orchestrator_core-4.6.0rc4.dist-info → orchestrator_core-4.6.1.dist-info}/RECORD +9 -9
- {orchestrator_core-4.6.0rc4.dist-info → orchestrator_core-4.6.1.dist-info}/WHEEL +0 -0
- {orchestrator_core-4.6.0rc4.dist-info → orchestrator_core-4.6.1.dist-info}/licenses/LICENSE +0 -0
orchestrator/__init__.py
CHANGED
orchestrator/graphql/schema.py
CHANGED
|
@@ -63,7 +63,12 @@ from orchestrator.graphql.schemas.settings import StatusType
|
|
|
63
63
|
from orchestrator.graphql.schemas.subscription import SubscriptionInterface
|
|
64
64
|
from orchestrator.graphql.schemas.version import VersionType
|
|
65
65
|
from orchestrator.graphql.schemas.workflow import Workflow
|
|
66
|
-
from orchestrator.graphql.types import
|
|
66
|
+
from orchestrator.graphql.types import (
|
|
67
|
+
SCALAR_OVERRIDES,
|
|
68
|
+
OrchestratorContext,
|
|
69
|
+
ScalarOverrideType,
|
|
70
|
+
StrawberryModelType,
|
|
71
|
+
)
|
|
67
72
|
from orchestrator.services.process_broadcast_thread import ProcessDataBroadcastThread
|
|
68
73
|
from orchestrator.settings import app_settings
|
|
69
74
|
|
orchestrator/graphql/types.py
CHANGED
|
@@ -17,7 +17,7 @@ from ipaddress import IPv4Address, IPv4Interface, IPv6Address, IPv6Interface
|
|
|
17
17
|
from typing import Any, NewType, TypeVar
|
|
18
18
|
|
|
19
19
|
import strawberry
|
|
20
|
-
from graphql import GraphQLError
|
|
20
|
+
from graphql import GraphQLError, GraphQLNamedType
|
|
21
21
|
from strawberry.dataloader import DataLoader
|
|
22
22
|
from strawberry.experimental.pydantic.conversion_types import StrawberryTypeFromPydantic
|
|
23
23
|
from strawberry.scalars import JSON
|
|
@@ -122,6 +122,9 @@ IPv6InterfaceType = strawberry.scalar(
|
|
|
122
122
|
parse_value=lambda v: v,
|
|
123
123
|
)
|
|
124
124
|
|
|
125
|
+
# TODO: Remove Hack to prevent the error: `Redefinition of reserved type 'Int'`
|
|
126
|
+
if hasattr(GraphQLNamedType, "reserved_types"):
|
|
127
|
+
GraphQLNamedType.reserved_types.pop("Int", None)
|
|
125
128
|
IntType = strawberry.scalar(
|
|
126
129
|
NewType("Int", int),
|
|
127
130
|
description="An arbitrary precision integer",
|
|
@@ -237,7 +237,7 @@ def create_task(conn: sa.engine.Connection, task: dict) -> None:
|
|
|
237
237
|
"name": "task_name",
|
|
238
238
|
"description": "task description",
|
|
239
239
|
}
|
|
240
|
-
>>>
|
|
240
|
+
>>> create_task(conn, task)
|
|
241
241
|
"""
|
|
242
242
|
if has_table_column(table_name="workflows", column_name="is_task", conn=conn):
|
|
243
243
|
query = """
|
orchestrator/workflow.py
CHANGED
|
@@ -235,7 +235,10 @@ def make_workflow(
|
|
|
235
235
|
return wrapping_function
|
|
236
236
|
|
|
237
237
|
|
|
238
|
-
def step(
|
|
238
|
+
def step(
|
|
239
|
+
name: str,
|
|
240
|
+
retry_auth_callback: Authorizer | None = None,
|
|
241
|
+
) -> Callable[[StepFunc], Step]:
|
|
239
242
|
"""Mark a function as a workflow step."""
|
|
240
243
|
|
|
241
244
|
def decorator(func: StepFunc) -> Step:
|
|
@@ -255,12 +258,19 @@ def step(name: str) -> Callable[[StepFunc], Step]:
|
|
|
255
258
|
logger.warning("Step failed", exc_info=ex)
|
|
256
259
|
return Failed(ex)
|
|
257
260
|
|
|
258
|
-
return make_step_function(
|
|
261
|
+
return make_step_function(
|
|
262
|
+
wrapper,
|
|
263
|
+
name,
|
|
264
|
+
retry_auth_callback=retry_auth_callback,
|
|
265
|
+
)
|
|
259
266
|
|
|
260
267
|
return decorator
|
|
261
268
|
|
|
262
269
|
|
|
263
|
-
def retrystep(
|
|
270
|
+
def retrystep(
|
|
271
|
+
name: str,
|
|
272
|
+
retry_auth_callback: Authorizer | None = None,
|
|
273
|
+
) -> Callable[[StepFunc], Step]:
|
|
264
274
|
"""Mark a function as a retryable workflow step.
|
|
265
275
|
|
|
266
276
|
If this step fails it goes to `Waiting` were it will be retried periodically. If it `Success` it acts as a normal
|
|
@@ -283,7 +293,11 @@ def retrystep(name: str) -> Callable[[StepFunc], Step]:
|
|
|
283
293
|
except Exception as ex:
|
|
284
294
|
return Waiting(ex)
|
|
285
295
|
|
|
286
|
-
return make_step_function(
|
|
296
|
+
return make_step_function(
|
|
297
|
+
wrapper,
|
|
298
|
+
name,
|
|
299
|
+
retry_auth_callback=retry_auth_callback,
|
|
300
|
+
)
|
|
287
301
|
|
|
288
302
|
return decorator
|
|
289
303
|
|
|
@@ -349,7 +363,9 @@ def _extend_step_group_steps(name: str, steps: StepList) -> StepList:
|
|
|
349
363
|
return enter_step >> steps >> exit_step
|
|
350
364
|
|
|
351
365
|
|
|
352
|
-
def step_group(
|
|
366
|
+
def step_group(
|
|
367
|
+
name: str, steps: StepList, extract_form: bool = True, retry_auth_callback: Authorizer | None = None
|
|
368
|
+
) -> Step:
|
|
353
369
|
"""Add a group of steps to the workflow as a single step.
|
|
354
370
|
|
|
355
371
|
A step group is a sequence of steps that act as a single step.
|
|
@@ -362,6 +378,7 @@ def step_group(name: str, steps: StepList, extract_form: bool = True) -> Step:
|
|
|
362
378
|
name: The name of the step
|
|
363
379
|
steps: The sub steps in the step group
|
|
364
380
|
extract_form: Whether to attach the first form of the sub steps to the step group
|
|
381
|
+
retry_auth_callback: Callback to determine if user is authorized to retry this group on failure
|
|
365
382
|
"""
|
|
366
383
|
|
|
367
384
|
steps = _extend_step_group_steps(name, steps)
|
|
@@ -392,7 +409,7 @@ def step_group(name: str, steps: StepList, extract_form: bool = True) -> Step:
|
|
|
392
409
|
|
|
393
410
|
# Make sure we return a form is a sub step has a form
|
|
394
411
|
form = next((sub_step.form for sub_step in steps if sub_step.form), None) if extract_form else None
|
|
395
|
-
return make_step_function(func, name, form)
|
|
412
|
+
return make_step_function(func, name, form, retry_auth_callback=retry_auth_callback)
|
|
396
413
|
|
|
397
414
|
|
|
398
415
|
def _create_endpoint_step(key: str = DEFAULT_CALLBACK_ROUTE_KEY) -> StepFunc:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: orchestrator-core
|
|
3
|
-
Version: 4.6.
|
|
3
|
+
Version: 4.6.1
|
|
4
4
|
Summary: This is the orchestrator workflow engine.
|
|
5
5
|
Author-email: SURF <automation-beheer@surf.nl>
|
|
6
6
|
Requires-Python: >=3.11,<3.14
|
|
@@ -41,8 +41,8 @@ Requires-Dist: fastapi-etag==0.4.0
|
|
|
41
41
|
Requires-Dist: itsdangerous>=2.2.0
|
|
42
42
|
Requires-Dist: jinja2==3.1.6
|
|
43
43
|
Requires-Dist: more-itertools~=10.7.0
|
|
44
|
-
Requires-Dist: nwa-stdlib~=1.
|
|
45
|
-
Requires-Dist: oauth2-lib
|
|
44
|
+
Requires-Dist: nwa-stdlib~=1.10.3
|
|
45
|
+
Requires-Dist: oauth2-lib>=2.5.0
|
|
46
46
|
Requires-Dist: orjson==3.10.18
|
|
47
47
|
Requires-Dist: pgvector>=0.4.1
|
|
48
48
|
Requires-Dist: prometheus-client==0.22.1
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
orchestrator/__init__.py,sha256=
|
|
1
|
+
orchestrator/__init__.py,sha256=nmpevZN48uSDOt0dNDWo92ZW--o53apq2S5b1q1mUn4,1454
|
|
2
2
|
orchestrator/agentic_app.py,sha256=ouiyyZiS4uS6Lox2DtbGGRnb2njJBMSHpSAGe-T5rX0,3028
|
|
3
3
|
orchestrator/app.py,sha256=w8ubXaaogwjmwLM0TXqZaLkAhmaOTWzVlwiYbi5mHeE,13203
|
|
4
4
|
orchestrator/exception_handlers.py,sha256=UsW3dw8q0QQlNLcV359bIotah8DYjMsj2Ts1LfX4ClY,1268
|
|
@@ -10,7 +10,7 @@ orchestrator/settings.py,sha256=mvs1VhBYth6Zp55HsNroML4DU1jiq5SkVM47_BLgcIo,4662
|
|
|
10
10
|
orchestrator/targets.py,sha256=d7Fyh_mWIWPivA_E7DTNFpZID3xFW_K0JlZ5nksVX7k,830
|
|
11
11
|
orchestrator/types.py,sha256=qzs7xx5AYRmKbpYRyJJP3wuDb0W0bcAzefCN0RWLAco,15459
|
|
12
12
|
orchestrator/version.py,sha256=b58e08lxs47wUNXv0jXFO_ykpksmytuzEXD4La4W-NQ,1366
|
|
13
|
-
orchestrator/workflow.py,sha256=
|
|
13
|
+
orchestrator/workflow.py,sha256=QvAbJ3ySuqUnKrQ_EQ6PQqgkK1TmKZ7COioCCmeABwc,46391
|
|
14
14
|
orchestrator/api/__init__.py,sha256=GyHNfEFCGKQwRiN6rQmvSRH2iYX7npjMZn97n8XzmLU,571
|
|
15
15
|
orchestrator/api/error_handling.py,sha256=YrPCxSa-DSa9KwqIMlXI-KGBGnbGIW5ukOPiikUH9E4,1502
|
|
16
16
|
orchestrator/api/helpers.py,sha256=s0QRHYw8AvEmlkmRhuEzz9xixaZKUF3YuPzUVHkcoXk,6933
|
|
@@ -167,8 +167,8 @@ orchestrator/forms/validators/product_id.py,sha256=u5mURLT0pOhbFLdwvYcy2_2fXMt35
|
|
|
167
167
|
orchestrator/graphql/__init__.py,sha256=avq8Yg3Jr_9pJqh7ClyIAOX7YSg1eM_AWmt5C3FRYUY,1440
|
|
168
168
|
orchestrator/graphql/autoregistration.py,sha256=pF2jbMKG26MvYoMSa6ZpqpHjVks7_NvSRFymHTgmfjs,6342
|
|
169
169
|
orchestrator/graphql/pagination.py,sha256=iqVDn3GPZpiQhEydfwkBJLURY-X8wwUphS8Lkeg0BOc,2413
|
|
170
|
-
orchestrator/graphql/schema.py,sha256=
|
|
171
|
-
orchestrator/graphql/types.py,sha256=
|
|
170
|
+
orchestrator/graphql/schema.py,sha256=hp4fzo5ky58DV4dDDdKWoiKPuRSbo1CJv-OukVeM090,9558
|
|
171
|
+
orchestrator/graphql/types.py,sha256=hfLX6LEHONHXW-VB58d9N1UT5qjHVsgMa5QgT__Ml50,5631
|
|
172
172
|
orchestrator/graphql/extensions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
173
173
|
orchestrator/graphql/extensions/model_cache.py,sha256=1uhMRjBs9eK7zJ1Y6P6BopX06822w2Yh9jliwYvG6yQ,1085
|
|
174
174
|
orchestrator/graphql/extensions/stats.py,sha256=pGhEBQg45XvqZhRobcrCSGwt5AGmR3gflsm1dYiIg5g,2018
|
|
@@ -222,7 +222,7 @@ orchestrator/migrations/README,sha256=heMzebYwlGhnE8_4CWJ4LS74WoEZjBy-S-mIJRxAEK
|
|
|
222
222
|
orchestrator/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
223
223
|
orchestrator/migrations/alembic.ini,sha256=kMoADqhGeubU8xanILNaqm4oixLy9m4ngYtdGpZcc7I,873
|
|
224
224
|
orchestrator/migrations/env.py,sha256=M_cPoAL2axuuup5fvMy8I_WTPHEw0RbPEHkhZ3QEGoE,3740
|
|
225
|
-
orchestrator/migrations/helpers.py,sha256
|
|
225
|
+
orchestrator/migrations/helpers.py,sha256=-Bvsl5Jt4FChtAAG7Lx6uiDVx6_8NyJ8IEWSk1fIQEU,47904
|
|
226
226
|
orchestrator/migrations/script.py.mako,sha256=607Zrgp-Z-m9WGLt4wewN1QDOmHeifxcePUdADkSZyM,510
|
|
227
227
|
orchestrator/migrations/templates/alembic.ini.j2,sha256=8v7UbKvOiWEbEKQa-Au3uONKUuYx6aflulYanZX6r2I,883
|
|
228
228
|
orchestrator/migrations/templates/env.py.j2,sha256=LIt0ildZTZvNEx3imhy4GNzfFi_rPZg-8H7rGgrBOP8,2717
|
|
@@ -373,7 +373,7 @@ orchestrator/workflows/tasks/resume_workflows.py,sha256=T3iobSJjVgiupe0rClD34kUZ
|
|
|
373
373
|
orchestrator/workflows/tasks/validate_product_type.py,sha256=lo2TX_MZOfcOmYFjLyD82FrJ5AAN3HOsE6BhDVFuy9Q,3210
|
|
374
374
|
orchestrator/workflows/tasks/validate_products.py,sha256=GZJBoFF-WMphS7ghMs2-gqvV2iL1F0POhk0uSNt93n0,8510
|
|
375
375
|
orchestrator/workflows/translations/en-GB.json,sha256=ST53HxkphFLTMjFHonykDBOZ7-P_KxksktZU3GbxLt0,846
|
|
376
|
-
orchestrator_core-4.6.
|
|
377
|
-
orchestrator_core-4.6.
|
|
378
|
-
orchestrator_core-4.6.
|
|
379
|
-
orchestrator_core-4.6.
|
|
376
|
+
orchestrator_core-4.6.1.dist-info/licenses/LICENSE,sha256=b-aA5OZQuuBATmLKo_mln8CQrDPPhg3ghLzjPjLn4Tg,11409
|
|
377
|
+
orchestrator_core-4.6.1.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
|
378
|
+
orchestrator_core-4.6.1.dist-info/METADATA,sha256=vD8LAwJ3cF18I_90KA-36bLcJ4jz_LiJOxwMVrb68bM,6351
|
|
379
|
+
orchestrator_core-4.6.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|