orchestrator-core 3.0.0__py3-none-any.whl → 3.1.0__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/cli/generator/generator/migration.py +5 -2
- orchestrator/migrations/helpers.py +5 -5
- orchestrator/settings.py +22 -1
- {orchestrator_core-3.0.0.dist-info → orchestrator_core-3.1.0.dist-info}/METADATA +6 -6
- {orchestrator_core-3.0.0.dist-info → orchestrator_core-3.1.0.dist-info}/RECORD +8 -8
- {orchestrator_core-3.0.0.dist-info → orchestrator_core-3.1.0.dist-info}/WHEEL +0 -0
- {orchestrator_core-3.0.0.dist-info → orchestrator_core-3.1.0.dist-info}/licenses/LICENSE +0 -0
orchestrator/__init__.py
CHANGED
|
@@ -31,13 +31,16 @@ from orchestrator.cli.generator.generator.helpers import (
|
|
|
31
31
|
sort_product_blocks_by_dependencies,
|
|
32
32
|
)
|
|
33
33
|
from orchestrator.cli.generator.generator.settings import product_generator_settings as settings
|
|
34
|
+
from orchestrator.settings import convert_database_uri
|
|
34
35
|
|
|
35
36
|
logger = structlog.getLogger(__name__)
|
|
36
37
|
|
|
37
38
|
|
|
38
39
|
def create_migration_file(message: str, head: str) -> Path | None:
|
|
39
|
-
if
|
|
40
|
-
environ.update({"DATABASE_URI": "
|
|
40
|
+
if environ.get("DATABASE_URI"):
|
|
41
|
+
environ.update({"DATABASE_URI": convert_database_uri(environ["DATABASE_URI"])})
|
|
42
|
+
else:
|
|
43
|
+
environ.update({"DATABASE_URI": "postgresql+psycopg://nwa:nwa@localhost/orchestrator-core"})
|
|
41
44
|
if not environ.get("PYTHONPATH"):
|
|
42
45
|
environ.update({"PYTHONPATH": "."})
|
|
43
46
|
logger.info(
|
|
@@ -880,10 +880,10 @@ def delete_product(conn: sa.engine.Connection, name: str) -> None:
|
|
|
880
880
|
RETURNING product_id
|
|
881
881
|
),
|
|
882
882
|
deleted_p_pb AS (
|
|
883
|
-
DELETE FROM product_product_blocks WHERE product_id
|
|
883
|
+
DELETE FROM product_product_blocks WHERE product_id = ANY(SELECT product_id FROM deleted_p)
|
|
884
884
|
),
|
|
885
885
|
deleted_pb_rt AS (
|
|
886
|
-
DELETE FROM products_workflows WHERE product_id
|
|
886
|
+
DELETE FROM products_workflows WHERE product_id = ANY(SELECT product_id FROM deleted_p)
|
|
887
887
|
)
|
|
888
888
|
SELECT * from deleted_p;
|
|
889
889
|
"""
|
|
@@ -911,10 +911,10 @@ def delete_product_block(conn: sa.engine.Connection, name: str) -> None:
|
|
|
911
911
|
RETURNING product_block_id
|
|
912
912
|
),
|
|
913
913
|
deleted_p_pb AS (
|
|
914
|
-
DELETE FROM product_product_blocks WHERE product_block_id
|
|
914
|
+
DELETE FROM product_product_blocks WHERE product_block_id =ANY(SELECT product_block_id FROM deleted_pb)
|
|
915
915
|
),
|
|
916
916
|
deleted_pb_rt AS (
|
|
917
|
-
DELETE FROM product_block_resource_types WHERE product_block_id
|
|
917
|
+
DELETE FROM product_block_resource_types WHERE product_block_id =ANY(SELECT product_block_id FROM deleted_pb)
|
|
918
918
|
)
|
|
919
919
|
SELECT * from deleted_pb;
|
|
920
920
|
"""
|
|
@@ -968,7 +968,7 @@ def delete_resource_type(conn: sa.engine.Connection, resource_type: str) -> None
|
|
|
968
968
|
RETURNING resource_type_id
|
|
969
969
|
),
|
|
970
970
|
deleted_pb_rt AS (
|
|
971
|
-
DELETE FROM product_block_resource_types WHERE resource_type_id
|
|
971
|
+
DELETE FROM product_block_resource_types WHERE resource_type_id =ANY(SELECT resource_type_id FROM deleted_pb)
|
|
972
972
|
)
|
|
973
973
|
SELECT * from deleted_pb;
|
|
974
974
|
"""
|
orchestrator/settings.py
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
import secrets
|
|
15
15
|
import string
|
|
16
|
+
import warnings
|
|
16
17
|
from pathlib import Path
|
|
17
18
|
from typing import Literal
|
|
18
19
|
|
|
@@ -23,6 +24,10 @@ from oauth2_lib.settings import oauth2lib_settings
|
|
|
23
24
|
from pydantic_forms.types import strEnum
|
|
24
25
|
|
|
25
26
|
|
|
27
|
+
class OrchestratorDeprecationWarning(DeprecationWarning):
|
|
28
|
+
pass
|
|
29
|
+
|
|
30
|
+
|
|
26
31
|
class ExecutorType(strEnum):
|
|
27
32
|
WORKER = "celery"
|
|
28
33
|
THREADPOOL = "threadpool"
|
|
@@ -49,7 +54,7 @@ class AppSettings(BaseSettings):
|
|
|
49
54
|
EXECUTOR: str = ExecutorType.THREADPOOL
|
|
50
55
|
WORKFLOWS_SWAGGER_HOST: str = "localhost"
|
|
51
56
|
WORKFLOWS_GUI_URI: str = "http://localhost:3000"
|
|
52
|
-
DATABASE_URI: PostgresDsn = "postgresql://nwa:nwa@localhost/orchestrator-core" # type: ignore
|
|
57
|
+
DATABASE_URI: PostgresDsn = "postgresql+psycopg://nwa:nwa@localhost/orchestrator-core" # type: ignore
|
|
53
58
|
MAX_WORKERS: int = 5
|
|
54
59
|
MAIL_SERVER: str = "localhost"
|
|
55
60
|
MAIL_PORT: int = 25
|
|
@@ -88,6 +93,22 @@ class AppSettings(BaseSettings):
|
|
|
88
93
|
VALIDATE_OUT_OF_SYNC_SUBSCRIPTIONS: bool = False
|
|
89
94
|
FILTER_BY_MODE: Literal["partial", "exact"] = "exact"
|
|
90
95
|
|
|
96
|
+
def __init__(self) -> None:
|
|
97
|
+
super(AppSettings, self).__init__()
|
|
98
|
+
self.DATABASE_URI = PostgresDsn(convert_database_uri(str(self.DATABASE_URI)))
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
def convert_database_uri(db_uri: str) -> str:
|
|
102
|
+
if db_uri.startswith(("postgresql://", "postgresql+psycopg2://")):
|
|
103
|
+
db_uri = "postgresql+psycopg" + db_uri[db_uri.find("://") :]
|
|
104
|
+
warnings.filterwarnings("always", category=OrchestratorDeprecationWarning)
|
|
105
|
+
warnings.warn(
|
|
106
|
+
"DATABASE_URI converted to postgresql+psycopg:// format, please update your enviroment variable",
|
|
107
|
+
OrchestratorDeprecationWarning,
|
|
108
|
+
stacklevel=2,
|
|
109
|
+
)
|
|
110
|
+
return db_uri
|
|
111
|
+
|
|
91
112
|
|
|
92
113
|
app_settings = AppSettings()
|
|
93
114
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: orchestrator-core
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.1.0
|
|
4
4
|
Summary: This is the orchestrator workflow engine.
|
|
5
5
|
Requires-Python: >=3.11,<3.14
|
|
6
6
|
Classifier: Intended Audience :: Information Technology
|
|
@@ -39,8 +39,8 @@ Requires-Dist: more-itertools~=10.6.0
|
|
|
39
39
|
Requires-Dist: itsdangerous
|
|
40
40
|
Requires-Dist: Jinja2==3.1.5
|
|
41
41
|
Requires-Dist: orjson==3.10.15
|
|
42
|
-
Requires-Dist:
|
|
43
|
-
Requires-Dist: pydantic[email]~=2.
|
|
42
|
+
Requires-Dist: psycopg[binary]==3.2.5
|
|
43
|
+
Requires-Dist: pydantic[email]~=2.9.2
|
|
44
44
|
Requires-Dist: pydantic-settings~=2.8.0
|
|
45
45
|
Requires-Dist: python-dateutil==2.8.2
|
|
46
46
|
Requires-Dist: python-rapidjson>=1.18,<1.21
|
|
@@ -51,8 +51,8 @@ Requires-Dist: sentry-sdk[fastapi]~=2.22.0
|
|
|
51
51
|
Requires-Dist: SQLAlchemy==2.0.38
|
|
52
52
|
Requires-Dist: SQLAlchemy-Utils==0.41.2
|
|
53
53
|
Requires-Dist: structlog
|
|
54
|
-
Requires-Dist: typer==0.15.
|
|
55
|
-
Requires-Dist: uvicorn[standard]~=0.
|
|
54
|
+
Requires-Dist: typer==0.15.2
|
|
55
|
+
Requires-Dist: uvicorn[standard]~=0.34.0
|
|
56
56
|
Requires-Dist: nwa-stdlib~=1.9.0
|
|
57
57
|
Requires-Dist: oauth2-lib~=2.4.0
|
|
58
58
|
Requires-Dist: tabulate==0.9.0
|
|
@@ -82,7 +82,7 @@ Requires-Dist: dirty-equals ; extra == "test"
|
|
|
82
82
|
Requires-Dist: jsonref ; extra == "test"
|
|
83
83
|
Requires-Dist: mypy==1.9 ; extra == "test"
|
|
84
84
|
Requires-Dist: pyinstrument ; extra == "test"
|
|
85
|
-
Requires-Dist: pytest==8.3.
|
|
85
|
+
Requires-Dist: pytest==8.3.5 ; extra == "test"
|
|
86
86
|
Requires-Dist: pytest-asyncio==0.21.2 ; extra == "test"
|
|
87
87
|
Requires-Dist: pytest-codspeed ; extra == "test"
|
|
88
88
|
Requires-Dist: pytest-cov ; extra == "test"
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
orchestrator/__init__.py,sha256=
|
|
1
|
+
orchestrator/__init__.py,sha256=qB_4AZNU7tt_qwHPlzfMbTfHhLb-zrdNQDOZhud9UsQ,1055
|
|
2
2
|
orchestrator/app.py,sha256=8GMzoHjdR0bkgRBCejiG8nIUjeo43f12I3WNNZ89pKE,11659
|
|
3
3
|
orchestrator/exception_handlers.py,sha256=UsW3dw8q0QQlNLcV359bIotah8DYjMsj2Ts1LfX4ClY,1268
|
|
4
4
|
orchestrator/log_config.py,sha256=1tPRX5q65e57a6a_zEii_PFK8SzWT0mnA5w2sKg4hh8,1853
|
|
5
5
|
orchestrator/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
6
|
orchestrator/security.py,sha256=_W_wFkjmlwVwwHRsql69iMoqRvDCiaA63i5rvRHSrZ0,2414
|
|
7
|
-
orchestrator/settings.py,sha256=
|
|
7
|
+
orchestrator/settings.py,sha256=lrNKPtJMxZtbEZcUZ1MDGEpIDCJv_swWVoVJvwcooCY,4614
|
|
8
8
|
orchestrator/targets.py,sha256=q_IMCdVUUYWcyKHqyls38fJPveJDBNfSzMKj_U2hLsk,768
|
|
9
9
|
orchestrator/types.py,sha256=4vDeL5teRnugXoet3O2dMv8WwTsEyimrIfzagx9jQRo,15451
|
|
10
10
|
orchestrator/version.py,sha256=b58e08lxs47wUNXv0jXFO_ykpksmytuzEXD4La4W-NQ,1366
|
|
@@ -58,7 +58,7 @@ orchestrator/cli/generator/custom_templates/additional_terminate_steps.j2,sha256
|
|
|
58
58
|
orchestrator/cli/generator/generator/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
59
59
|
orchestrator/cli/generator/generator/enums.py,sha256=ztGxHzpq7l4HDSZswH8UDJlf2374tj_-Rzf8t-sub1s,2007
|
|
60
60
|
orchestrator/cli/generator/generator/helpers.py,sha256=IoHXacEebef7MhUseTVkj05fRryyGMDH94Ai0nGq-nw,9838
|
|
61
|
-
orchestrator/cli/generator/generator/migration.py,sha256=
|
|
61
|
+
orchestrator/cli/generator/generator/migration.py,sha256=zWSZk42AayXj65mPIYKczRKVlPSXTsTM-pBf7lis2F8,7202
|
|
62
62
|
orchestrator/cli/generator/generator/product.py,sha256=W930c-9C8k0kW7I8_SC4mWf045neYcfFpkck5SwHeNQ,2079
|
|
63
63
|
orchestrator/cli/generator/generator/product_block.py,sha256=h552YZTuehtaux6PKw5GKWAmBQ6cStOSY4TbaJ1Kcq8,4802
|
|
64
64
|
orchestrator/cli/generator/generator/settings.py,sha256=_IhRnQ7bpGjqYtFo-OiLky25IKCibdghC6pkHmPIPoI,1379
|
|
@@ -199,7 +199,7 @@ orchestrator/graphql/utils/to_graphql_result_page.py,sha256=8ObkJP8reVf-TQOQVPKv
|
|
|
199
199
|
orchestrator/migrations/README,sha256=heMzebYwlGhnE8_4CWJ4LS74WoEZjBy-S-mIJRxAEKI,39
|
|
200
200
|
orchestrator/migrations/alembic.ini,sha256=kMoADqhGeubU8xanILNaqm4oixLy9m4ngYtdGpZcc7I,873
|
|
201
201
|
orchestrator/migrations/env.py,sha256=AwlgBPYbV2hr5rHNwlOPJ5rs-vRyfmzcWyxae0btpZ4,3382
|
|
202
|
-
orchestrator/migrations/helpers.py,sha256=
|
|
202
|
+
orchestrator/migrations/helpers.py,sha256=U-b64Gp6VBq5sTDN0fqrG8mbXcpncCFVgYObW9y7ffs,43778
|
|
203
203
|
orchestrator/migrations/script.py.mako,sha256=607Zrgp-Z-m9WGLt4wewN1QDOmHeifxcePUdADkSZyM,510
|
|
204
204
|
orchestrator/migrations/templates/alembic.ini.j2,sha256=jA-QykVparwWSNt5XDP0Zk7epLOhK7D87Af-i2shJV4,905
|
|
205
205
|
orchestrator/migrations/templates/env.py.j2,sha256=RfLAQItZ56Jlzwi6LJfBo92m1-th_bdfkFKD1mwTZIE,2821
|
|
@@ -291,7 +291,7 @@ orchestrator/workflows/tasks/resume_workflows.py,sha256=R0I3jxGToiqDr5mF3YjDd6dN
|
|
|
291
291
|
orchestrator/workflows/tasks/validate_product_type.py,sha256=5FwhRQyMNgtys5DM846EIIY0uXKvnSYy3Orf7lOg0DA,3176
|
|
292
292
|
orchestrator/workflows/tasks/validate_products.py,sha256=5uXX7MXMDDP13cXRvfLDNvvCp4nG7zLQBm_IYdf8BSs,8513
|
|
293
293
|
orchestrator/workflows/translations/en-GB.json,sha256=ST53HxkphFLTMjFHonykDBOZ7-P_KxksktZU3GbxLt0,846
|
|
294
|
-
orchestrator_core-3.
|
|
295
|
-
orchestrator_core-3.
|
|
296
|
-
orchestrator_core-3.
|
|
297
|
-
orchestrator_core-3.
|
|
294
|
+
orchestrator_core-3.1.0.dist-info/licenses/LICENSE,sha256=b-aA5OZQuuBATmLKo_mln8CQrDPPhg3ghLzjPjLn4Tg,11409
|
|
295
|
+
orchestrator_core-3.1.0.dist-info/WHEEL,sha256=_2ozNFCLWc93bK4WKHCO-eDUENDlo-dgc9cU3qokYO4,82
|
|
296
|
+
orchestrator_core-3.1.0.dist-info/METADATA,sha256=07M_NsM4wK8pd90OZvY2pGN-ohvMNOoGP330i4witaw,4990
|
|
297
|
+
orchestrator_core-3.1.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|