orchestrator-core 4.6.1__py3-none-any.whl → 4.6.2__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 CHANGED
@@ -13,7 +13,7 @@
13
13
 
14
14
  """This is the orchestrator workflow engine."""
15
15
 
16
- __version__ = "4.6.1"
16
+ __version__ = "4.6.2"
17
17
 
18
18
 
19
19
  from structlog import get_logger
@@ -101,7 +101,7 @@ def get_steps_to_evaluate_for_rbac(pstat: ProcessStat) -> StepList:
101
101
  return StepList(past_steps >> first(remaining_steps))
102
102
 
103
103
 
104
- def get_auth_callbacks(steps: StepList, workflow: Workflow) -> tuple[Authorizer | None, Authorizer | None]:
104
+ def get_auth_callbacks(steps: StepList, workflow: Workflow | None) -> tuple[Authorizer | None, Authorizer | None]:
105
105
  """Iterate over workflow and prior steps to determine correct authorization callbacks for the current step.
106
106
 
107
107
  It's safest to always iterate through the steps. We could track these callbacks statefully
@@ -112,6 +112,9 @@ def get_auth_callbacks(steps: StepList, workflow: Workflow) -> tuple[Authorizer
112
112
  - RESUME callback is explicit RESUME callback, else previous START/RESUME callback
113
113
  - RETRY callback is explicit RETRY, else explicit RESUME, else previous RETRY
114
114
  """
115
+ if not workflow:
116
+ return None, None
117
+
115
118
  # Default to workflow start callbacks
116
119
  auth_resume = workflow.authorize_callback
117
120
  # auth_retry defaults to the workflow start callback if not otherwise specified.
@@ -86,11 +86,11 @@ class ProcessType:
86
86
  oidc_user = await info.context.get_current_user
87
87
  workflow = get_workflow(self.workflow_name)
88
88
  process = load_process(db.session.get(ProcessTable, self.process_id)) # type: ignore[arg-type]
89
- auth_resume, auth_retry = get_auth_callbacks(get_steps_to_evaluate_for_rbac(process), workflow) # type: ignore[arg-type]
89
+ auth_resume, auth_retry = get_auth_callbacks(get_steps_to_evaluate_for_rbac(process), workflow)
90
90
 
91
91
  return FormUserPermissionsType(
92
- retryAllowed=auth_retry and auth_retry(oidc_user), # type: ignore[arg-type]
93
- resumeAllowed=auth_resume and auth_resume(oidc_user), # type: ignore[arg-type]
92
+ retryAllowed=bool(auth_retry and auth_retry(oidc_user)),
93
+ resumeAllowed=bool(auth_resume and auth_resume(oidc_user)),
94
94
  )
95
95
 
96
96
  @authenticated_field(description="Returns list of subscriptions of the process") # type: ignore
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: orchestrator-core
3
- Version: 4.6.1
3
+ Version: 4.6.2
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
@@ -1,4 +1,4 @@
1
- orchestrator/__init__.py,sha256=nmpevZN48uSDOt0dNDWo92ZW--o53apq2S5b1q1mUn4,1454
1
+ orchestrator/__init__.py,sha256=GBSQUsDdHmxliqH9rPmCznK2vxTmQpobA4SmVWCg_q4,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
@@ -20,7 +20,7 @@ orchestrator/api/api_v1/api.py,sha256=1qQRsIxKXLW3kcmSV5u3_v1TZk5RcNWb4ZOyLguhTK
20
20
  orchestrator/api/api_v1/endpoints/__init__.py,sha256=GyHNfEFCGKQwRiN6rQmvSRH2iYX7npjMZn97n8XzmLU,571
21
21
  orchestrator/api/api_v1/endpoints/agent.py,sha256=9_s3nchTr9ua_1Sxs0kJl2mH_20o-DlUaaQPmY4vRMk,1732
22
22
  orchestrator/api/api_v1/endpoints/health.py,sha256=iaxs1XX1_250_gKNsspuULCV2GEMBjbtjsmfQTOvMAI,1284
23
- orchestrator/api/api_v1/endpoints/processes.py,sha256=OVbt6FgFnJ4aHaYGIg0cPoim8mxDpdzJ4TGAyfB_kPw,16269
23
+ orchestrator/api/api_v1/endpoints/processes.py,sha256=z_bantT415cCuAw0viVrsi7HquHKMSmdjnuLkk9OZKI,16324
24
24
  orchestrator/api/api_v1/endpoints/product_blocks.py,sha256=kZ6ywIOsS_S2qGq7RvZ4KzjvaS1LmwbGWR37AKRvWOw,2146
25
25
  orchestrator/api/api_v1/endpoints/products.py,sha256=BfFtwu9dZXEQbtKxYj9icc73GKGvAGMR5ytyf41nQlQ,3081
26
26
  orchestrator/api/api_v1/endpoints/resource_types.py,sha256=gGyuaDyOD0TAVoeFGaGmjDGnQ8eQQArOxKrrk4MaDzA,2145
@@ -194,7 +194,7 @@ orchestrator/graphql/schemas/customer_description.py,sha256=fize71IMpkvk_rTzcqCY
194
194
  orchestrator/graphql/schemas/errors.py,sha256=VRl-Zd1FHMnscyozhfxzqeEUZ0ERAWum_Y8YwjGxwmA,203
195
195
  orchestrator/graphql/schemas/fixed_input.py,sha256=1yqYHADQRgHz8OIP7ObYsPFS-gmzfkCvEO0a-KKf7zI,513
196
196
  orchestrator/graphql/schemas/helpers.py,sha256=Kpj4kIbmoKKN35bdgUSwQvGUIbeg7VJAVMEq65YS_ik,346
197
- orchestrator/graphql/schemas/process.py,sha256=wN4pKDuPbPHyyfGYaqFXMXxKTDm_zIwmyCOhSu5H1Iw,4978
197
+ orchestrator/graphql/schemas/process.py,sha256=APARniusSdqHkXann2oHp72PBE-nslQcLTQQaFFLiG4,4912
198
198
  orchestrator/graphql/schemas/product.py,sha256=vUCqcjrKBJj-VKSrMYPKzjmmxLMXL7alKTJ8UdUkhTg,4342
199
199
  orchestrator/graphql/schemas/product_block.py,sha256=Qk9cbA6vm7ZPrhdgPHatKRuy6TytBmxSr97McEOxAu8,2860
200
200
  orchestrator/graphql/schemas/resource_type.py,sha256=s5d_FwQXL2-Sc-IDUxTJun5qFQ4zOP4-XcHF9ql-t1g,898
@@ -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.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,,
376
+ orchestrator_core-4.6.2.dist-info/licenses/LICENSE,sha256=b-aA5OZQuuBATmLKo_mln8CQrDPPhg3ghLzjPjLn4Tg,11409
377
+ orchestrator_core-4.6.2.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
378
+ orchestrator_core-4.6.2.dist-info/METADATA,sha256=UaZQ04AM0BKhwHPTf6YyqG_xkPLPzGLRnPz_REMyC3M,6351
379
+ orchestrator_core-4.6.2.dist-info/RECORD,,