orchestrator-core 2.9.1rc1__py3-none-any.whl → 2.9.2rc2__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/api/api_v1/endpoints/processes.py +1 -1
- orchestrator/api/api_v1/endpoints/subscription_customer_descriptions.py +9 -2
- orchestrator/db/filters/subscription.py +1 -0
- orchestrator/db/models.py +2 -0
- orchestrator/devtools/populator.py +18 -5
- orchestrator/domain/base.py +6 -0
- orchestrator/domain/customer_description.py +9 -1
- orchestrator/graphql/mutations/customer_description.py +7 -4
- orchestrator/graphql/schemas/subscription.py +1 -0
- orchestrator/migrations/versions/schema/2025-01-08_4c5859620539_add_version_column_to_subscription.py +64 -0
- orchestrator/migrations/versions/schema/2025-10-19_4fjdn13f83ga_add_validate_product_type_task.py +41 -0
- orchestrator/schedules/validate_subscriptions.py +16 -23
- orchestrator/schemas/subscription.py +1 -0
- orchestrator/schemas/subscription_descriptions.py +8 -0
- orchestrator/services/subscriptions.py +10 -0
- orchestrator/services/workflows.py +47 -1
- orchestrator/utils/enrich_process.py +1 -0
- orchestrator/utils/errors.py +8 -0
- orchestrator/utils/validate_data_version.py +2 -0
- orchestrator/workflows/__init__.py +1 -0
- orchestrator/workflows/tasks/validate_product_type.py +92 -0
- orchestrator/workflows/translations/en-GB.json +4 -1
- orchestrator/workflows/utils.py +15 -3
- {orchestrator_core-2.9.1rc1.dist-info → orchestrator_core-2.9.2rc2.dist-info}/METADATA +1 -1
- {orchestrator_core-2.9.1rc1.dist-info → orchestrator_core-2.9.2rc2.dist-info}/RECORD +28 -24
- {orchestrator_core-2.9.1rc1.dist-info → orchestrator_core-2.9.2rc2.dist-info}/LICENSE +0 -0
- {orchestrator_core-2.9.1rc1.dist-info → orchestrator_core-2.9.2rc2.dist-info}/WHEEL +0 -0
orchestrator/__init__.py
CHANGED
|
@@ -133,7 +133,7 @@ def delete(process_id: UUID) -> None:
|
|
|
133
133
|
status_code=HTTPStatus.CREATED,
|
|
134
134
|
dependencies=[Depends(check_global_lock, use_cache=False)],
|
|
135
135
|
)
|
|
136
|
-
def new_process(
|
|
136
|
+
async def new_process(
|
|
137
137
|
workflow_key: str,
|
|
138
138
|
request: Request,
|
|
139
139
|
json_data: list[dict[str, Any]] | None = Body(...),
|
|
@@ -26,6 +26,8 @@ from orchestrator.domain.customer_description import (
|
|
|
26
26
|
update_subscription_customer_description,
|
|
27
27
|
)
|
|
28
28
|
from orchestrator.schemas import SubscriptionDescriptionBaseSchema, SubscriptionDescriptionSchema
|
|
29
|
+
from orchestrator.schemas.subscription_descriptions import UpdateSubscriptionDescriptionSchema
|
|
30
|
+
from orchestrator.utils.errors import StaleDataError
|
|
29
31
|
from orchestrator.utils.redis import delete_from_redis
|
|
30
32
|
|
|
31
33
|
router = APIRouter()
|
|
@@ -37,10 +39,15 @@ async def save_subscription_customer_description_endpoint(data: SubscriptionDesc
|
|
|
37
39
|
|
|
38
40
|
|
|
39
41
|
@router.put("/", response_model=None, status_code=HTTPStatus.NO_CONTENT)
|
|
40
|
-
async def update_subscription_customer_description_endpoint(
|
|
42
|
+
async def update_subscription_customer_description_endpoint(
|
|
43
|
+
data: UpdateSubscriptionDescriptionSchema = Body(...),
|
|
44
|
+
) -> None:
|
|
41
45
|
description = get_customer_description_by_customer_subscription(data.customer_id, data.subscription_id)
|
|
42
46
|
if description:
|
|
43
|
-
|
|
47
|
+
try:
|
|
48
|
+
await update_subscription_customer_description(description, data.description, data.created_at, data.version)
|
|
49
|
+
except StaleDataError as error:
|
|
50
|
+
raise_status(HTTPStatus.BAD_REQUEST, str(error))
|
|
44
51
|
|
|
45
52
|
|
|
46
53
|
@router.delete("/{_id}", response_model=None, status_code=HTTPStatus.NO_CONTENT)
|
|
@@ -24,6 +24,7 @@ logger = structlog.get_logger(__name__)
|
|
|
24
24
|
SUBSCRIPTION_TABLE_COLUMN_CLAUSES = default_inferred_column_clauses(SubscriptionTable) | {
|
|
25
25
|
"product": inferred_filter(ProductTable.name),
|
|
26
26
|
"tag": filter_exact(ProductTable.tag),
|
|
27
|
+
"type": filter_exact(ProductTable.product_type),
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
subscription_filter_fields = create_memoized_field_list(SUBSCRIPTION_TABLE_COLUMN_CLAUSES)
|
orchestrator/db/models.py
CHANGED
|
@@ -554,6 +554,7 @@ class SubscriptionCustomerDescriptionTable(BaseModel):
|
|
|
554
554
|
customer_id = mapped_column(String, nullable=False, index=True)
|
|
555
555
|
description = mapped_column(Text(), nullable=False)
|
|
556
556
|
created_at = mapped_column(UtcTimestamp, nullable=False, server_default=text("current_timestamp()"))
|
|
557
|
+
version = mapped_column(Integer, nullable=False, server_default="1")
|
|
557
558
|
|
|
558
559
|
subscription = relationship("SubscriptionTable", back_populates="customer_descriptions")
|
|
559
560
|
|
|
@@ -572,6 +573,7 @@ class SubscriptionTable(BaseModel):
|
|
|
572
573
|
start_date = mapped_column(UtcTimestamp, nullable=True)
|
|
573
574
|
end_date = mapped_column(UtcTimestamp)
|
|
574
575
|
note = mapped_column(Text())
|
|
576
|
+
version = mapped_column(Integer, nullable=False, server_default="1")
|
|
575
577
|
|
|
576
578
|
product = relationship("ProductTable", foreign_keys=[product_id])
|
|
577
579
|
instances = relationship(
|
|
@@ -435,16 +435,29 @@ class Populator:
|
|
|
435
435
|
self.log.info("Providing user input.")
|
|
436
436
|
|
|
437
437
|
user_inputs: list[State] = [self.get_form_data(form)] if form else []
|
|
438
|
+
# Keep submitting the form until it has been successfully submitted
|
|
438
439
|
while True:
|
|
439
440
|
self.log.info("Submitting user input", data=user_inputs)
|
|
440
441
|
response = self.session.request(method, url, json=user_inputs)
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
442
|
+
self.log.debug("Response", response=response.content)
|
|
443
|
+
|
|
444
|
+
# Return the response if the form has been successfully submitted
|
|
444
445
|
if response.status_code != HTTPStatus.NOT_EXTENDED:
|
|
445
446
|
return response
|
|
446
|
-
|
|
447
|
-
|
|
447
|
+
|
|
448
|
+
response_json = response.json()
|
|
449
|
+
meta = response_json.get("meta", {}) or {}
|
|
450
|
+
no_next = meta.get("hasNext") is False
|
|
451
|
+
is_summary_form = response_json.get("form", {}).get("title", "").endswith("Summary")
|
|
452
|
+
|
|
453
|
+
# If there are no next pages and a summary form is expected then append an empty form/dict
|
|
454
|
+
if no_next and is_summary_form:
|
|
455
|
+
self.log.info("Append empty form", response=response_json)
|
|
456
|
+
user_inputs.append({})
|
|
457
|
+
# Otherwise resolve the values for the input fields on the form
|
|
458
|
+
else:
|
|
459
|
+
input_fields = response_json["form"]
|
|
460
|
+
user_inputs.append(self.get_form_data(input_fields))
|
|
448
461
|
|
|
449
462
|
def reset(self) -> None:
|
|
450
463
|
"""Reset internal state."""
|
orchestrator/domain/base.py
CHANGED
|
@@ -1017,6 +1017,7 @@ class SubscriptionModel(DomainModel):
|
|
|
1017
1017
|
start_date: datetime | None = None # pragma: no mutate
|
|
1018
1018
|
end_date: datetime | None = None # pragma: no mutate
|
|
1019
1019
|
note: str | None = None # pragma: no mutate
|
|
1020
|
+
version: int = 1 # pragma: no mutate
|
|
1020
1021
|
|
|
1021
1022
|
def __new__(cls, *args: Any, status: SubscriptionLifecycle | None = None, **kwargs: Any) -> "SubscriptionModel":
|
|
1022
1023
|
# status can be none if created during change_lifecycle
|
|
@@ -1108,6 +1109,7 @@ class SubscriptionModel(DomainModel):
|
|
|
1108
1109
|
start_date: datetime | None = None,
|
|
1109
1110
|
end_date: datetime | None = None,
|
|
1110
1111
|
note: str | None = None,
|
|
1112
|
+
version: int = 1,
|
|
1111
1113
|
) -> S:
|
|
1112
1114
|
"""Use product_id (and customer_id) to return required fields of a new empty subscription."""
|
|
1113
1115
|
# Caller wants a new instance and provided a product_id and customer_id
|
|
@@ -1140,6 +1142,7 @@ class SubscriptionModel(DomainModel):
|
|
|
1140
1142
|
start_date=start_date,
|
|
1141
1143
|
end_date=end_date,
|
|
1142
1144
|
note=note,
|
|
1145
|
+
version=version,
|
|
1143
1146
|
)
|
|
1144
1147
|
db.session.add(subscription)
|
|
1145
1148
|
|
|
@@ -1156,6 +1159,7 @@ class SubscriptionModel(DomainModel):
|
|
|
1156
1159
|
start_date=start_date,
|
|
1157
1160
|
end_date=end_date,
|
|
1158
1161
|
note=note,
|
|
1162
|
+
version=version,
|
|
1159
1163
|
**fixed_inputs,
|
|
1160
1164
|
**instances,
|
|
1161
1165
|
)
|
|
@@ -1270,6 +1274,7 @@ class SubscriptionModel(DomainModel):
|
|
|
1270
1274
|
start_date=subscription.start_date,
|
|
1271
1275
|
end_date=subscription.end_date,
|
|
1272
1276
|
note=subscription.note,
|
|
1277
|
+
version=subscription.version,
|
|
1273
1278
|
**fixed_inputs,
|
|
1274
1279
|
**instances,
|
|
1275
1280
|
)
|
|
@@ -1320,6 +1325,7 @@ class SubscriptionModel(DomainModel):
|
|
|
1320
1325
|
start_date=subscription.start_date,
|
|
1321
1326
|
end_date=subscription.end_date,
|
|
1322
1327
|
note=subscription.note,
|
|
1328
|
+
version=subscription.version,
|
|
1323
1329
|
**fixed_inputs,
|
|
1324
1330
|
**instances,
|
|
1325
1331
|
)
|
|
@@ -20,7 +20,9 @@ from sqlalchemy import select
|
|
|
20
20
|
|
|
21
21
|
from orchestrator.api.models import delete
|
|
22
22
|
from orchestrator.db import SubscriptionCustomerDescriptionTable, db
|
|
23
|
+
from orchestrator.utils.errors import StaleDataError
|
|
23
24
|
from orchestrator.utils.redis import delete_subscription_from_redis
|
|
25
|
+
from orchestrator.utils.validate_data_version import validate_data_version
|
|
24
26
|
from orchestrator.websocket import invalidate_subscription_cache
|
|
25
27
|
|
|
26
28
|
router = APIRouter()
|
|
@@ -53,8 +55,14 @@ async def create_subscription_customer_description(
|
|
|
53
55
|
|
|
54
56
|
@delete_subscription_from_redis()
|
|
55
57
|
async def update_subscription_customer_description(
|
|
56
|
-
customer_description: SubscriptionCustomerDescriptionTable,
|
|
58
|
+
customer_description: SubscriptionCustomerDescriptionTable,
|
|
59
|
+
description: str,
|
|
60
|
+
created_at: datetime | None = None,
|
|
61
|
+
version: int | None = None,
|
|
57
62
|
) -> SubscriptionCustomerDescriptionTable:
|
|
63
|
+
if not validate_data_version(customer_description.version, version):
|
|
64
|
+
raise StaleDataError(customer_description.version, version)
|
|
65
|
+
|
|
58
66
|
customer_description.description = description
|
|
59
67
|
customer_description.created_at = created_at if created_at else datetime.now(tz=timezone("UTC"))
|
|
60
68
|
db.session.commit()
|
|
@@ -25,25 +25,28 @@ from orchestrator.domain.customer_description import (
|
|
|
25
25
|
)
|
|
26
26
|
from orchestrator.graphql.schemas.customer_description import CustomerDescription
|
|
27
27
|
from orchestrator.graphql.types import MutationError, NotFoundError
|
|
28
|
+
from orchestrator.utils.errors import StaleDataError
|
|
28
29
|
|
|
29
30
|
logger = structlog.get_logger(__name__)
|
|
30
31
|
|
|
31
32
|
|
|
32
33
|
async def upsert_customer_description(
|
|
33
|
-
customer_id: str, subscription_id: UUID, description: str
|
|
34
|
+
customer_id: str, subscription_id: UUID, description: str, version: int | None
|
|
34
35
|
) -> SubscriptionCustomerDescriptionTable | NotFoundError:
|
|
35
36
|
current_description = get_customer_description_by_customer_subscription(customer_id, subscription_id)
|
|
36
37
|
|
|
37
38
|
if current_description:
|
|
38
|
-
return await update_subscription_customer_description(current_description, description)
|
|
39
|
+
return await update_subscription_customer_description(current_description, description, version=version)
|
|
39
40
|
return await create_subscription_customer_description(customer_id, subscription_id, description)
|
|
40
41
|
|
|
41
42
|
|
|
42
43
|
async def resolve_upsert_customer_description(
|
|
43
|
-
customer_id: str, subscription_id: UUID, description: str
|
|
44
|
+
customer_id: str, subscription_id: UUID, description: str, version: int | None = None
|
|
44
45
|
) -> CustomerDescription | NotFoundError | MutationError:
|
|
45
46
|
try:
|
|
46
|
-
customer_description = await upsert_customer_description(customer_id, subscription_id, description)
|
|
47
|
+
customer_description = await upsert_customer_description(customer_id, subscription_id, description, version)
|
|
48
|
+
except StaleDataError as error:
|
|
49
|
+
return MutationError(message=str(error))
|
|
47
50
|
except Exception:
|
|
48
51
|
return NotFoundError(message="Subscription not found")
|
|
49
52
|
return CustomerDescription.from_pydantic(customer_description) # type: ignore
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"""Add version column to subscription and subscription customer descriptions.
|
|
2
|
+
|
|
3
|
+
Revision ID: 4c5859620539
|
|
4
|
+
Revises: 460ec6748e37
|
|
5
|
+
Create Date: 2025-01-08 15:07:41.957937
|
|
6
|
+
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
import sqlalchemy as sa
|
|
10
|
+
from alembic import op
|
|
11
|
+
|
|
12
|
+
# revision identifiers, used by Alembic.
|
|
13
|
+
revision = "4c5859620539"
|
|
14
|
+
down_revision = "460ec6748e37"
|
|
15
|
+
branch_labels = None
|
|
16
|
+
depends_on = None
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def upgrade() -> None:
|
|
20
|
+
conn = op.get_bind()
|
|
21
|
+
op.add_column(
|
|
22
|
+
"subscription_customer_descriptions", sa.Column("version", sa.Integer(), server_default="1", nullable=False)
|
|
23
|
+
)
|
|
24
|
+
op.add_column("subscriptions", sa.Column("version", sa.Integer(), server_default="1", nullable=False))
|
|
25
|
+
|
|
26
|
+
conn.execute(
|
|
27
|
+
sa.text(
|
|
28
|
+
"""
|
|
29
|
+
CREATE OR REPLACE FUNCTION increment_version()
|
|
30
|
+
RETURNS TRIGGER AS $$
|
|
31
|
+
BEGIN
|
|
32
|
+
NEW.version := OLD.version + 1;
|
|
33
|
+
RETURN NEW;
|
|
34
|
+
END;
|
|
35
|
+
$$ LANGUAGE plpgsql;
|
|
36
|
+
|
|
37
|
+
CREATE TRIGGER subscriptions_increment_version_trigger
|
|
38
|
+
BEFORE UPDATE ON subscriptions
|
|
39
|
+
FOR EACH ROW
|
|
40
|
+
EXECUTE FUNCTION increment_version();
|
|
41
|
+
|
|
42
|
+
CREATE TRIGGER subscription_customer_descriptions_increment_version_trigger
|
|
43
|
+
BEFORE UPDATE ON subscription_customer_descriptions
|
|
44
|
+
FOR EACH ROW
|
|
45
|
+
EXECUTE FUNCTION increment_version();
|
|
46
|
+
"""
|
|
47
|
+
)
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def downgrade() -> None:
|
|
52
|
+
conn = op.get_bind()
|
|
53
|
+
op.drop_column("subscriptions", "version")
|
|
54
|
+
op.drop_column("subscription_customer_descriptions", "version")
|
|
55
|
+
|
|
56
|
+
conn.execute(
|
|
57
|
+
sa.text(
|
|
58
|
+
"""
|
|
59
|
+
DROP TRIGGER IF EXISTS subscriptions_increment_version_trigger on subscriptions;
|
|
60
|
+
DROP TRIGGER IF EXISTS subscription_customer_descriptions_increment_version_trigger on subscription_customer_descriptions;
|
|
61
|
+
DROP FUNCTION IF EXISTS increment_version;
|
|
62
|
+
"""
|
|
63
|
+
)
|
|
64
|
+
)
|
orchestrator/migrations/versions/schema/2025-10-19_4fjdn13f83ga_add_validate_product_type_task.py
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"""Validate Product Type.
|
|
2
|
+
|
|
3
|
+
Revision ID: 4fjdn13f83ga
|
|
4
|
+
Revises: 2c7e8a43d4f9
|
|
5
|
+
Create Date: 2025-10-13 16:21:43.956814
|
|
6
|
+
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from uuid import uuid4
|
|
10
|
+
|
|
11
|
+
import sqlalchemy as sa
|
|
12
|
+
from alembic import op
|
|
13
|
+
|
|
14
|
+
# revision identifiers, used by Alembic.
|
|
15
|
+
revision = "4fjdn13f83ga"
|
|
16
|
+
down_revision = "4c5859620539"
|
|
17
|
+
branch_labels = None
|
|
18
|
+
depends_on = None
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
workflow = {
|
|
22
|
+
"name": "task_validate_product_type",
|
|
23
|
+
"target": "SYSTEM",
|
|
24
|
+
"description": "Validate all subscriptions of Product Type",
|
|
25
|
+
"workflow_id": uuid4(),
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def upgrade() -> None:
|
|
30
|
+
conn = op.get_bind()
|
|
31
|
+
conn.execute(
|
|
32
|
+
sa.text(
|
|
33
|
+
"INSERT INTO workflows VALUES (:workflow_id, :name, :target, :description, now()) ON CONFLICT DO NOTHING"
|
|
34
|
+
),
|
|
35
|
+
workflow,
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def downgrade() -> None:
|
|
40
|
+
conn = op.get_bind()
|
|
41
|
+
conn.execute(sa.text("DELETE FROM workflows WHERE name = :name"), {"name": workflow["name"]})
|
|
@@ -15,14 +15,17 @@
|
|
|
15
15
|
from threading import BoundedSemaphore
|
|
16
16
|
|
|
17
17
|
import structlog
|
|
18
|
-
from sqlalchemy import select
|
|
19
18
|
|
|
20
|
-
from orchestrator.db import ProductTable, SubscriptionTable, db
|
|
21
19
|
from orchestrator.schedules.scheduling import scheduler
|
|
22
|
-
from orchestrator.services.
|
|
23
|
-
|
|
20
|
+
from orchestrator.services.subscriptions import (
|
|
21
|
+
get_subscriptions_on_product_table,
|
|
22
|
+
get_subscriptions_on_product_table_in_sync,
|
|
23
|
+
)
|
|
24
|
+
from orchestrator.services.workflows import (
|
|
25
|
+
get_system_product_workflows_for_subscription,
|
|
26
|
+
start_validation_workflow_for_workflows,
|
|
27
|
+
)
|
|
24
28
|
from orchestrator.settings import app_settings
|
|
25
|
-
from orchestrator.targets import Target
|
|
26
29
|
|
|
27
30
|
logger = structlog.get_logger(__name__)
|
|
28
31
|
|
|
@@ -34,29 +37,19 @@ task_semaphore = BoundedSemaphore(value=2)
|
|
|
34
37
|
def validate_subscriptions() -> None:
|
|
35
38
|
if app_settings.VALIDATE_OUT_OF_SYNC_SUBSCRIPTIONS:
|
|
36
39
|
# Automatically re-validate out-of-sync subscriptions. This is not recommended for production.
|
|
37
|
-
|
|
40
|
+
subscriptions = get_subscriptions_on_product_table()
|
|
38
41
|
else:
|
|
39
|
-
|
|
40
|
-
subscriptions = db.session.scalars(select_query)
|
|
41
|
-
for subscription in subscriptions:
|
|
42
|
-
validation_workflow = None
|
|
43
|
-
|
|
44
|
-
for workflow in subscription.product.workflows:
|
|
45
|
-
if workflow.target == Target.SYSTEM:
|
|
46
|
-
validation_workflow = workflow.name
|
|
47
|
-
|
|
48
|
-
if validation_workflow:
|
|
49
|
-
default = TARGET_DEFAULT_USABLE_MAP[Target.SYSTEM]
|
|
50
|
-
usable_when = WF_USABLE_MAP.get(validation_workflow, default)
|
|
42
|
+
subscriptions = get_subscriptions_on_product_table_in_sync()
|
|
51
43
|
|
|
52
|
-
|
|
53
|
-
|
|
44
|
+
for subscription in subscriptions:
|
|
45
|
+
system_product_workflows = get_system_product_workflows_for_subscription(subscription)
|
|
54
46
|
|
|
55
|
-
|
|
56
|
-
validate_func(validation_workflow, json=json)
|
|
57
|
-
else:
|
|
47
|
+
if not system_product_workflows:
|
|
58
48
|
logger.warning(
|
|
59
49
|
"SubscriptionTable has no validation workflow",
|
|
60
50
|
subscription=subscription,
|
|
61
51
|
product=subscription.product.name,
|
|
62
52
|
)
|
|
53
|
+
break
|
|
54
|
+
|
|
55
|
+
start_validation_workflow_for_workflows(subscription=subscription, workflows=system_product_workflows)
|
|
@@ -84,6 +84,7 @@ class SubscriptionSchema(SubscriptionBaseSchema):
|
|
|
84
84
|
product: ProductBaseSchema | None = None
|
|
85
85
|
customer_descriptions: list[SubscriptionDescriptionSchema] | None = None
|
|
86
86
|
tag: str | None = None
|
|
87
|
+
version: int
|
|
87
88
|
model_config = ConfigDict(from_attributes=True)
|
|
88
89
|
|
|
89
90
|
|
|
@@ -28,4 +28,12 @@ class SubscriptionDescriptionBaseSchema(OrchestratorBaseModel):
|
|
|
28
28
|
class SubscriptionDescriptionSchema(SubscriptionDescriptionBaseSchema):
|
|
29
29
|
id: UUID
|
|
30
30
|
created_at: datetime | None = None
|
|
31
|
+
version: int
|
|
32
|
+
model_config = ConfigDict(from_attributes=True)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class UpdateSubscriptionDescriptionSchema(SubscriptionDescriptionBaseSchema):
|
|
36
|
+
id: UUID
|
|
37
|
+
created_at: datetime | None = None
|
|
38
|
+
version: int | None = None
|
|
31
39
|
model_config = ConfigDict(from_attributes=True)
|
|
@@ -670,3 +670,13 @@ def format_extended_domain_model(subscription: dict, filter_owner_relations: boo
|
|
|
670
670
|
filter_instance_ids_on_subscription()
|
|
671
671
|
|
|
672
672
|
return subscription
|
|
673
|
+
|
|
674
|
+
|
|
675
|
+
def get_subscriptions_on_product_table() -> list[SubscriptionTable]:
|
|
676
|
+
select_query = select(SubscriptionTable).join(ProductTable)
|
|
677
|
+
return list(db.session.scalars(select_query))
|
|
678
|
+
|
|
679
|
+
|
|
680
|
+
def get_subscriptions_on_product_table_in_sync(in_sync: bool = True) -> list[SubscriptionTable]:
|
|
681
|
+
select_query = select(SubscriptionTable).join(ProductTable).filter(SubscriptionTable.insync.is_(in_sync))
|
|
682
|
+
return list(db.session.scalars(select_query))
|
|
@@ -2,8 +2,14 @@ from collections.abc import Iterable
|
|
|
2
2
|
|
|
3
3
|
from sqlalchemy import Select, select
|
|
4
4
|
|
|
5
|
-
from orchestrator.db import
|
|
5
|
+
from orchestrator.db import (
|
|
6
|
+
SubscriptionTable,
|
|
7
|
+
WorkflowTable,
|
|
8
|
+
db,
|
|
9
|
+
)
|
|
6
10
|
from orchestrator.schemas import StepSchema, WorkflowSchema
|
|
11
|
+
from orchestrator.services.subscriptions import TARGET_DEFAULT_USABLE_MAP, WF_USABLE_MAP
|
|
12
|
+
from orchestrator.targets import Target
|
|
7
13
|
from orchestrator.workflows import get_workflow
|
|
8
14
|
|
|
9
15
|
|
|
@@ -42,3 +48,43 @@ def get_workflows(
|
|
|
42
48
|
|
|
43
49
|
def get_workflow_by_name(workflow_name: str) -> WorkflowTable | None:
|
|
44
50
|
return db.session.scalar(select(WorkflowTable).where(WorkflowTable.name == workflow_name))
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def get_system_product_workflows_for_subscription(
|
|
54
|
+
subscription: SubscriptionTable,
|
|
55
|
+
) -> list:
|
|
56
|
+
return [workflow.name for workflow in subscription.product.workflows if workflow.target == Target.SYSTEM]
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def start_validation_workflow_for_workflows(
|
|
60
|
+
subscription: SubscriptionTable,
|
|
61
|
+
workflows: list,
|
|
62
|
+
product_type_filter: str | None = None,
|
|
63
|
+
) -> list:
|
|
64
|
+
"""Start validation workflows for a subscription."""
|
|
65
|
+
result = []
|
|
66
|
+
|
|
67
|
+
for workflow_name in workflows:
|
|
68
|
+
default = TARGET_DEFAULT_USABLE_MAP[Target.SYSTEM]
|
|
69
|
+
usable_when = WF_USABLE_MAP.get(workflow_name, default)
|
|
70
|
+
|
|
71
|
+
if subscription.status in usable_when and (
|
|
72
|
+
product_type_filter is None or subscription.product.product_type == product_type_filter
|
|
73
|
+
):
|
|
74
|
+
json = [{"subscription_id": str(subscription.subscription_id)}]
|
|
75
|
+
|
|
76
|
+
# against circular import
|
|
77
|
+
from orchestrator.services.processes import get_execution_context
|
|
78
|
+
|
|
79
|
+
validate_func = get_execution_context()["validate"]
|
|
80
|
+
validate_func(workflow_name, json=json)
|
|
81
|
+
|
|
82
|
+
result.append(
|
|
83
|
+
{
|
|
84
|
+
"workflow_name": workflow_name,
|
|
85
|
+
"subscription_id": subscription.subscription_id,
|
|
86
|
+
"product_type": subscription.product.product_type,
|
|
87
|
+
}
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
return result
|
|
@@ -33,6 +33,7 @@ def format_subscription(subscription: SubscriptionTable) -> dict:
|
|
|
33
33
|
"note": subscription.note,
|
|
34
34
|
"start_date": subscription.start_date if subscription.start_date else None,
|
|
35
35
|
"end_date": subscription.end_date if subscription.end_date else None,
|
|
36
|
+
"version": subscription.version,
|
|
36
37
|
"product": {
|
|
37
38
|
"product_id": prod.product_id,
|
|
38
39
|
"description": prod.description,
|
orchestrator/utils/errors.py
CHANGED
|
@@ -74,6 +74,14 @@ class InconsistentDataError(ProcessFailureError):
|
|
|
74
74
|
pass
|
|
75
75
|
|
|
76
76
|
|
|
77
|
+
class StaleDataError(ValueError):
|
|
78
|
+
"""The version of the update payload does not match the version in the database."""
|
|
79
|
+
|
|
80
|
+
def __init__(self, current_version: int, new_version: int | None = None) -> None:
|
|
81
|
+
message = f"Stale data: given version ({new_version}) does not match the current version ({current_version})"
|
|
82
|
+
super().__init__(message)
|
|
83
|
+
|
|
84
|
+
|
|
77
85
|
def is_api_exception(ex: Exception) -> bool:
|
|
78
86
|
"""Test for swagger-codegen ApiException.
|
|
79
87
|
|
|
@@ -110,5 +110,6 @@ LazyWorkflowInstance(".modify_note", "modify_note")
|
|
|
110
110
|
LazyWorkflowInstance(".tasks.cleanup_tasks_log", "task_clean_up_tasks")
|
|
111
111
|
LazyWorkflowInstance(".tasks.resume_workflows", "task_resume_workflows")
|
|
112
112
|
LazyWorkflowInstance(".tasks.validate_products", "task_validate_products")
|
|
113
|
+
LazyWorkflowInstance(".tasks.validate_product_type", "task_validate_product_type")
|
|
113
114
|
|
|
114
115
|
__doc__ = make_workflow_index_doc(ALL_WORKFLOWS)
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Copyright 2019-2024 SURF.
|
|
2
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
# you may not use this file except in compliance with the License.
|
|
4
|
+
# You may obtain a copy of the License at
|
|
5
|
+
#
|
|
6
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
#
|
|
8
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
# See the License for the specific language governing permissions and
|
|
12
|
+
# limitations under the License.
|
|
13
|
+
from functools import cache
|
|
14
|
+
from typing import Any
|
|
15
|
+
|
|
16
|
+
import structlog
|
|
17
|
+
|
|
18
|
+
from orchestrator.db import ProductTable
|
|
19
|
+
from orchestrator.forms import FormPage
|
|
20
|
+
from orchestrator.forms.validators import Choice
|
|
21
|
+
from orchestrator.services.subscriptions import (
|
|
22
|
+
get_subscriptions_on_product_table_in_sync,
|
|
23
|
+
)
|
|
24
|
+
from orchestrator.services.workflows import (
|
|
25
|
+
get_system_product_workflows_for_subscription,
|
|
26
|
+
start_validation_workflow_for_workflows,
|
|
27
|
+
)
|
|
28
|
+
from orchestrator.targets import Target
|
|
29
|
+
from orchestrator.types import FormGenerator, State
|
|
30
|
+
from orchestrator.workflow import StepList, done, init, step, workflow
|
|
31
|
+
|
|
32
|
+
logger = structlog.get_logger(__name__)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def create_select_product_type_form() -> type[FormPage]:
|
|
36
|
+
"""Get and create the choices form for the product type."""
|
|
37
|
+
|
|
38
|
+
@cache
|
|
39
|
+
def get_product_type_choices() -> dict[Any, Any]:
|
|
40
|
+
return {product.product_type: product.product_type for product in ProductTable.query.all()}
|
|
41
|
+
|
|
42
|
+
ProductTypeChoices = Choice.__call__("Product Type", get_product_type_choices())
|
|
43
|
+
|
|
44
|
+
class SelectProductTypeForm(FormPage):
|
|
45
|
+
product_type: ProductTypeChoices # type: ignore
|
|
46
|
+
|
|
47
|
+
return SelectProductTypeForm
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def initial_input_form_generator() -> FormGenerator:
|
|
51
|
+
"""Generate the form."""
|
|
52
|
+
|
|
53
|
+
init_input = yield create_select_product_type_form()
|
|
54
|
+
user_input_data = init_input.model_dump()
|
|
55
|
+
|
|
56
|
+
return user_input_data
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
@step("Validate Product Type")
|
|
60
|
+
def validate_product_type(product_type: str) -> State:
|
|
61
|
+
result = []
|
|
62
|
+
subscriptions = get_subscriptions_on_product_table_in_sync()
|
|
63
|
+
|
|
64
|
+
for subscription in subscriptions:
|
|
65
|
+
system_product_workflows = get_system_product_workflows_for_subscription(
|
|
66
|
+
subscription=subscription,
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
if not system_product_workflows:
|
|
70
|
+
logger.warning(
|
|
71
|
+
"SubscriptionTable has no validation workflow",
|
|
72
|
+
subscription=subscription,
|
|
73
|
+
product=subscription.product.name,
|
|
74
|
+
)
|
|
75
|
+
continue
|
|
76
|
+
|
|
77
|
+
validation_result = start_validation_workflow_for_workflows(
|
|
78
|
+
subscription=subscription,
|
|
79
|
+
workflows=system_product_workflows,
|
|
80
|
+
product_type_filter=product_type,
|
|
81
|
+
)
|
|
82
|
+
if len(validation_result) > 0:
|
|
83
|
+
result.append({"total_workflows_validated": len(validation_result), "workflows": validation_result})
|
|
84
|
+
|
|
85
|
+
return {"result": result}
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
@workflow(
|
|
89
|
+
"Validate all subscriptions of Product Type", target=Target.SYSTEM, initial_input_form=initial_input_form_generator
|
|
90
|
+
)
|
|
91
|
+
def task_validate_product_type() -> StepList:
|
|
92
|
+
return init >> validate_product_type >> done
|
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
"note": "Notes",
|
|
5
5
|
"note_info": "Notes, reminders and feedback about this description.",
|
|
6
6
|
"subscription_id": "Subscription",
|
|
7
|
-
"
|
|
7
|
+
"version": "Version",
|
|
8
|
+
"subscription_id_info": "The subscription for this action",
|
|
9
|
+
"product_type": "Product Type"
|
|
8
10
|
}
|
|
9
11
|
},
|
|
10
12
|
"workflow": {
|
|
@@ -12,6 +14,7 @@
|
|
|
12
14
|
"task_clean_up_tasks": "Clean up old tasks",
|
|
13
15
|
"task_resume_workflows": "Resume all workflows that are stuck on tasks with the status 'waiting'",
|
|
14
16
|
"task_validate_products": "Validate Products and Subscriptions",
|
|
17
|
+
"task_validate_product_type": "Validate all subscriptions of Product Type",
|
|
15
18
|
"reset_subscription_description": "Reset description of a subscription to default"
|
|
16
19
|
}
|
|
17
20
|
}
|
orchestrator/workflows/utils.py
CHANGED
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
|
|
14
14
|
from collections.abc import Callable
|
|
15
15
|
from inspect import isgeneratorfunction
|
|
16
|
-
from typing import cast
|
|
16
|
+
from typing import Self, cast
|
|
17
17
|
from uuid import UUID
|
|
18
18
|
|
|
19
19
|
from more_itertools import first_true
|
|
20
|
-
from pydantic import field_validator
|
|
20
|
+
from pydantic import field_validator, model_validator
|
|
21
21
|
from sqlalchemy import select
|
|
22
22
|
|
|
23
23
|
from orchestrator.db import ProductTable, SubscriptionTable, db
|
|
@@ -26,8 +26,10 @@ from orchestrator.services import subscriptions
|
|
|
26
26
|
from orchestrator.settings import app_settings
|
|
27
27
|
from orchestrator.targets import Target
|
|
28
28
|
from orchestrator.types import State, SubscriptionLifecycle
|
|
29
|
+
from orchestrator.utils.errors import StaleDataError
|
|
29
30
|
from orchestrator.utils.redis import caching_models_enabled
|
|
30
31
|
from orchestrator.utils.state import form_inject_args
|
|
32
|
+
from orchestrator.utils.validate_data_version import validate_data_version
|
|
31
33
|
from orchestrator.workflow import StepList, Workflow, conditional, done, init, make_workflow, step
|
|
32
34
|
from orchestrator.workflows.steps import (
|
|
33
35
|
cache_domain_models,
|
|
@@ -116,6 +118,7 @@ def _generate_modify_form(workflow_target: str, workflow_name: str) -> InputForm
|
|
|
116
118
|
# We use UUID instead of SubscriptionId here because we don't want the allowed_status check and
|
|
117
119
|
# we do our own validation here.
|
|
118
120
|
subscription_id: UUID
|
|
121
|
+
version: int | None = None
|
|
119
122
|
|
|
120
123
|
@field_validator("subscription_id")
|
|
121
124
|
@classmethod
|
|
@@ -140,6 +143,15 @@ def _generate_modify_form(workflow_target: str, workflow_name: str) -> InputForm
|
|
|
140
143
|
|
|
141
144
|
return subscription_id
|
|
142
145
|
|
|
146
|
+
@model_validator(mode="after")
|
|
147
|
+
def version_validator(self) -> Self:
|
|
148
|
+
current_version = db.session.scalars(
|
|
149
|
+
select(SubscriptionTable.version).where(SubscriptionTable.subscription_id == self.subscription_id)
|
|
150
|
+
).one()
|
|
151
|
+
if not validate_data_version(current_version, self.version):
|
|
152
|
+
raise StaleDataError(current_version, self.version)
|
|
153
|
+
return self
|
|
154
|
+
|
|
143
155
|
return ModifySubscriptionPage
|
|
144
156
|
|
|
145
157
|
|
|
@@ -157,11 +169,11 @@ def wrap_modify_initial_input_form(initial_input_form: InputStepFunc | None) ->
|
|
|
157
169
|
user_input = yield _generate_modify_form(workflow_target, workflow_name)
|
|
158
170
|
|
|
159
171
|
subscription = SubscriptionTable.query.get(user_input.subscription_id)
|
|
160
|
-
|
|
161
172
|
begin_state = {
|
|
162
173
|
"subscription_id": str(subscription.subscription_id),
|
|
163
174
|
"product": str(subscription.product_id),
|
|
164
175
|
"customer_id": subscription.customer_id,
|
|
176
|
+
"version": subscription.version,
|
|
165
177
|
}
|
|
166
178
|
|
|
167
179
|
if initial_input_form is None:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
orchestrator/__init__.py,sha256=
|
|
1
|
+
orchestrator/__init__.py,sha256=Si6jkyprNLow9W0WKRVqn6elJdlthYCP0gV7K5RQXvw,1058
|
|
2
2
|
orchestrator/app.py,sha256=_2e3JMYgH_egOScokFVpFuTlJWGGwH0KYgZajDdm--0,11563
|
|
3
3
|
orchestrator/exception_handlers.py,sha256=UsW3dw8q0QQlNLcV359bIotah8DYjMsj2Ts1LfX4ClY,1268
|
|
4
4
|
orchestrator/log_config.py,sha256=1tPRX5q65e57a6a_zEii_PFK8SzWT0mnA5w2sKg4hh8,1853
|
|
@@ -17,10 +17,10 @@ orchestrator/api/api_v1/__init__.py,sha256=GyHNfEFCGKQwRiN6rQmvSRH2iYX7npjMZn97n
|
|
|
17
17
|
orchestrator/api/api_v1/api.py,sha256=zGPSCX-nCebZXN2OT9QA_ChAtpsK53hpxZ7F2x_0gjI,2332
|
|
18
18
|
orchestrator/api/api_v1/endpoints/__init__.py,sha256=GyHNfEFCGKQwRiN6rQmvSRH2iYX7npjMZn97n8XzmLU,571
|
|
19
19
|
orchestrator/api/api_v1/endpoints/health.py,sha256=iaxs1XX1_250_gKNsspuULCV2GEMBjbtjsmfQTOvMAI,1284
|
|
20
|
-
orchestrator/api/api_v1/endpoints/processes.py,sha256=
|
|
20
|
+
orchestrator/api/api_v1/endpoints/processes.py,sha256=bsS8CqpfE3q5uIYZeZYiKjlbwHYSliFJQu130ov8cL8,12716
|
|
21
21
|
orchestrator/api/api_v1/endpoints/products.py,sha256=Qyj9OzlfWfgsWe9Homd60LFco91VaJ1gkgXxn0AmP6Q,2143
|
|
22
22
|
orchestrator/api/api_v1/endpoints/settings.py,sha256=QiSih8zOUombxXk5Hd7MACq5BC5Y9w-BrmgBdTPRIDg,6141
|
|
23
|
-
orchestrator/api/api_v1/endpoints/subscription_customer_descriptions.py,sha256=
|
|
23
|
+
orchestrator/api/api_v1/endpoints/subscription_customer_descriptions.py,sha256=Elu4DVJoNtUFq_b3pG1Ws8StrUIo_jTViff2TJqe6ZU,3398
|
|
24
24
|
orchestrator/api/api_v1/endpoints/subscriptions.py,sha256=s0nzWY1n8J1Ep-f6LuhRj_LX3shfCq7PsMmHf0_Rzsw,8716
|
|
25
25
|
orchestrator/api/api_v1/endpoints/translations.py,sha256=dIWh_fCnZZUxJoGiNeJ49DK_xpf75IpR_0EIMSvzIvY,963
|
|
26
26
|
orchestrator/api/api_v1/endpoints/user.py,sha256=RyI32EXVu6I-IxWjz0XB5zQWzzLL60zKXLgLqLH02xU,1827
|
|
@@ -102,14 +102,14 @@ orchestrator/db/database.py,sha256=MU_w_e95ho2dVb2JDnt_KFYholx___XDkiQXbc8wCkI,1
|
|
|
102
102
|
orchestrator/db/helpers.py,sha256=L8kEdnSSNGnUpZhdeGx2arCodakWN8vSpKdfjoLuHdY,831
|
|
103
103
|
orchestrator/db/listeners.py,sha256=UBPYcH0FE3a7aZQu_D0O_JMXpXIRYXC0gjSAvlv5GZo,1142
|
|
104
104
|
orchestrator/db/loaders.py,sha256=escBOUNf5bHmjIuNH37fGgNSeZLzMiJvQgQFy4r4MYY,6244
|
|
105
|
-
orchestrator/db/models.py,sha256=
|
|
105
|
+
orchestrator/db/models.py,sha256=weG4oVgFzetaQQe3dCULiV62nwrbMnCpx7oNGQzIHjw,26079
|
|
106
106
|
orchestrator/db/filters/__init__.py,sha256=RUj6P0XxEBhYj0SN5wH5-Vf_Wt_ilZR_n9DSar5m9oM,371
|
|
107
107
|
orchestrator/db/filters/filters.py,sha256=55RtpQwM2rhrk4A6CCSeSXoo-BT9GnQoNTryA8CtLEg,5020
|
|
108
108
|
orchestrator/db/filters/process.py,sha256=xvGhyfo_MZ1xhLvFC6yULjcT4mJk0fKc1glJIYgsWLE,4018
|
|
109
109
|
orchestrator/db/filters/product.py,sha256=ZsoZZ8ExpmP22T_8Zg1ZVxs3DbC2_n4-dBgIlxrw_Q0,899
|
|
110
110
|
orchestrator/db/filters/product_block.py,sha256=CYym-QIkkgJ2rEsUPVoe-lcEphHb0xFBbA2cOCF2eLU,1089
|
|
111
111
|
orchestrator/db/filters/resource_type.py,sha256=7aH4_n8vPpsySFnnN8SefN8h964glmEiw_SYip1lc8I,889
|
|
112
|
-
orchestrator/db/filters/subscription.py,sha256=
|
|
112
|
+
orchestrator/db/filters/subscription.py,sha256=IV7ur7yyKFNUQRx0gZPelcMLHjuUPU0Rx4oZ6Shbn6A,1519
|
|
113
113
|
orchestrator/db/filters/workflow.py,sha256=osyyEmOFuev6q5lizHeUvgxf1Nji3fZtlbf2_lzSNao,1276
|
|
114
114
|
orchestrator/db/filters/search_filters/__init__.py,sha256=a7yfEAA-qpD_PHZH5LeqSjrLeGAvQrDsJp7mzVwDMwo,562
|
|
115
115
|
orchestrator/db/filters/search_filters/inferred_filter.py,sha256=B3WuA6yi3AFhkgbr8yK0UnqiZNUZ1h1aNFQCtNqaP7I,5591
|
|
@@ -124,7 +124,7 @@ orchestrator/db/sorting/sorting.py,sha256=WpwImCDRKiOp4Tr54vovWpHkoJIov8SNQNPods
|
|
|
124
124
|
orchestrator/db/sorting/subscription.py,sha256=uepBMyfRFLZz5yoYK4VK3mdRBvO1Gc-6jSQXQ41fR-8,1441
|
|
125
125
|
orchestrator/db/sorting/workflow.py,sha256=6-JceMyB99M994Re58E0MX5uhlpnTW5OJCxmXopEfRU,576
|
|
126
126
|
orchestrator/devtools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
127
|
-
orchestrator/devtools/populator.py,sha256=
|
|
127
|
+
orchestrator/devtools/populator.py,sha256=gCw-U4gDAdCQ1P-YOG_NgDducql8he1Vdjw_P8L6okA,19678
|
|
128
128
|
orchestrator/devtools/scripts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
129
129
|
orchestrator/devtools/scripts/migrate_20.py,sha256=WiDyOjeYh7sPufrbrc33BBmJRYWwxPqJOqhHApjuBoI,8359
|
|
130
130
|
orchestrator/distlock/__init__.py,sha256=0uCW-4efWGbU4RXSb7t3U1yA2T8z77OGgb9SDNebdmA,2491
|
|
@@ -133,8 +133,8 @@ orchestrator/distlock/managers/__init__.py,sha256=ImIkNsrXcyE7-NgRWqEhUXUuUzda9K
|
|
|
133
133
|
orchestrator/distlock/managers/memory_distlock_manager.py,sha256=HWQafcVKBF-Cka_wukZZ1GM69AWPVOpJPje3quIebQ8,3114
|
|
134
134
|
orchestrator/distlock/managers/redis_distlock_manager.py,sha256=Lk0Krw7dQD58uleAz3Eancc4La-xSCFHxB8ymg3qWf0,3271
|
|
135
135
|
orchestrator/domain/__init__.py,sha256=Rnt9XXHasAgieQiLT0JhUFRrysa9EIubvzcd5kk3Gvc,894
|
|
136
|
-
orchestrator/domain/base.py,sha256=
|
|
137
|
-
orchestrator/domain/customer_description.py,sha256=
|
|
136
|
+
orchestrator/domain/base.py,sha256=8iiz1IP6CSrr5pz_0oqRNj5MoHY4PR9E30hx8Zrlrq4,61928
|
|
137
|
+
orchestrator/domain/customer_description.py,sha256=v7o6TTN4oc6bWHZU-jCT-fUYvkeYahbpXOwlKXofuI8,3360
|
|
138
138
|
orchestrator/domain/helpers.py,sha256=2j2j_7J8qvniHxxpdoEQsoVpC-llkn0tbww2eCA0K1A,989
|
|
139
139
|
orchestrator/domain/lifecycle.py,sha256=ROYJ5t6JFy5PwE9nmApS54NIEw0dwk-2iZC-OzW18-U,2882
|
|
140
140
|
orchestrator/forms/__init__.py,sha256=bw_1238HKy_T0gvfA5oEjJFwkALzvWU4O_VJ0xE8UyU,1168
|
|
@@ -153,7 +153,7 @@ orchestrator/graphql/extensions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm
|
|
|
153
153
|
orchestrator/graphql/extensions/stats.py,sha256=pGhEBQg45XvqZhRobcrCSGwt5AGmR3gflsm1dYiIg5g,2018
|
|
154
154
|
orchestrator/graphql/loaders/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
155
155
|
orchestrator/graphql/loaders/subscriptions.py,sha256=31zE2WC7z-tPIUmVpU1QWOJvNbLvF7sYgY7JAQ6OPJg,1856
|
|
156
|
-
orchestrator/graphql/mutations/customer_description.py,sha256=
|
|
156
|
+
orchestrator/graphql/mutations/customer_description.py,sha256=37yX92fE1Sc51O9i-gP8JfD3HdsvpR3TtbgYqKtGC-w,3343
|
|
157
157
|
orchestrator/graphql/mutations/start_process.py,sha256=8vLVvmBwL1ujbZJoI_8YE3VAgI-J2RTzgrTZJC8THZ4,1576
|
|
158
158
|
orchestrator/graphql/resolvers/__init__.py,sha256=v6G9OboMuqEdZAB4RfCNjQZhJyXcvuZ_gC7RN9gTSrU,941
|
|
159
159
|
orchestrator/graphql/resolvers/customer.py,sha256=tq06MtMoaqFwqn3YQvSv0VmROW7QJZRJp1ykO4tUhck,934
|
|
@@ -177,7 +177,7 @@ orchestrator/graphql/schemas/product_block.py,sha256=Qk9cbA6vm7ZPrhdgPHatKRuy6Ty
|
|
|
177
177
|
orchestrator/graphql/schemas/resource_type.py,sha256=s5d_FwQXL2-Sc-IDUxTJun5qFQ4zOP4-XcHF9ql-t1g,898
|
|
178
178
|
orchestrator/graphql/schemas/settings.py,sha256=drhm5VcLmUbiYAk6WUSJcyJqjNM96E6GvpxVdPAobnA,999
|
|
179
179
|
orchestrator/graphql/schemas/strawberry_pydantic_patch.py,sha256=CjNUhTKdYmLiaem-WY_mzw4HASIeaZitxGF8pPocqVw,1602
|
|
180
|
-
orchestrator/graphql/schemas/subscription.py,sha256=
|
|
180
|
+
orchestrator/graphql/schemas/subscription.py,sha256=_ra7MG9P2w7_WMiMx-zTOaAMinGlTKN4gwE9vej-5V8,9573
|
|
181
181
|
orchestrator/graphql/schemas/workflow.py,sha256=0UWU0HGTiAC_5Wzh16clBd74JoYHrr38YIGV86q-si0,1276
|
|
182
182
|
orchestrator/graphql/utils/__init__.py,sha256=1JvenzEVW1CBa1sGVI9I8IWnnoXIkb1hneDqph9EEZY,524
|
|
183
183
|
orchestrator/graphql/utils/create_resolver_error_handler.py,sha256=PpQMVwGrE9t0nZ12TwoxPxksXxEwQM7lSNPeh7qW3vk,1233
|
|
@@ -214,12 +214,14 @@ orchestrator/migrations/versions/schema/2023-09-25_da5c9f4cce1c_add_subscription
|
|
|
214
214
|
orchestrator/migrations/versions/schema/2023-12-06_048219045729_add_workflow_id_to_processes_table.py,sha256=nCeZKWdb856ob8bE_glpNyIDzKkh9hwq7hY5FXB1TP8,2246
|
|
215
215
|
orchestrator/migrations/versions/schema/2024-09-27_460ec6748e37_add_uuid_search_workaround.py,sha256=GzHBzOwOc6FaO1kYwoSNIhb8sKstXo8Cfxdqy3Rmeg4,972
|
|
216
216
|
orchestrator/migrations/versions/schema/2024-09-27_460ec6748e37_add_uuid_search_workaround.sql,sha256=mhPnqjG5H3W8_BD7w5tYzXUQSxFOM7Rahn_MudEPTIE,5383
|
|
217
|
+
orchestrator/migrations/versions/schema/2025-01-08_4c5859620539_add_version_column_to_subscription.py,sha256=xAhe74U0ZiVRo9Z8Uq7491RBbATMMUnYpTBjbG-BYL0,1690
|
|
218
|
+
orchestrator/migrations/versions/schema/2025-10-19_4fjdn13f83ga_add_validate_product_type_task.py,sha256=O0GfCISIDnyohGf3Ot_2HKedGRbMqLVox6t7Wd3PMvo,894
|
|
217
219
|
orchestrator/schedules/__init__.py,sha256=JnnaglfK1qYUBKI6Dd9taV-tCZIPlAdAkHtnkJDMXxY,1066
|
|
218
220
|
orchestrator/schedules/resume_workflows.py,sha256=kSotzTAXjX7p9fpSYiGOpuxuTQfv54eRFAe0YSG0DHc,832
|
|
219
221
|
orchestrator/schedules/scheduling.py,sha256=ehtwgpbvMOk1jhn-hHgVzg_9wLJkI6l3mRY3DcO9ZVY,1526
|
|
220
222
|
orchestrator/schedules/task_vacuum.py,sha256=eovnuKimU8SFRw1IF62MsAVFSdgeeV1u57kapUbz8As,821
|
|
221
223
|
orchestrator/schedules/validate_products.py,sha256=YMr7ASSqdXM6pd6oZu0kr8mfmH8If16MzprrsHdN_ZU,1234
|
|
222
|
-
orchestrator/schedules/validate_subscriptions.py,sha256=
|
|
224
|
+
orchestrator/schedules/validate_subscriptions.py,sha256=YYcU2iGf8Ga_s577kgpKdhQV4p7wCEHGYvUf8FCvBvQ,2022
|
|
223
225
|
orchestrator/schemas/__init__.py,sha256=YDyZ0YBvzB4ML9oDBCBPGnBvf680zFFgUzg7X0tYBRY,2326
|
|
224
226
|
orchestrator/schemas/base.py,sha256=Vc444LetsINLRhG2SxW9Bq01hOzChPOhQWCImQTr-As,930
|
|
225
227
|
orchestrator/schemas/engine_settings.py,sha256=BOyFNOn7AqHVdUxXyqmPk5aVdFY5A0cCOZ4bAwxQsgo,1286
|
|
@@ -229,8 +231,8 @@ orchestrator/schemas/process.py,sha256=NgS1eBRtO2GUCRNsvbvYyjNkR2aBdH-kwcsR_y8Df
|
|
|
229
231
|
orchestrator/schemas/product.py,sha256=bIgeLGIsrRiQZ7J36S2Bym8CkV-xhPjn8QoHhZkEBa0,1484
|
|
230
232
|
orchestrator/schemas/product_block.py,sha256=mKX9FwQ5TGo9SrrAtDJOhB_nji1LHJ3-mKBrEEoQ-No,1428
|
|
231
233
|
orchestrator/schemas/resource_type.py,sha256=z1UQTaW79UlLDzVQtstNo0trXQVT8-GDisxieJPUeYo,973
|
|
232
|
-
orchestrator/schemas/subscription.py,sha256=
|
|
233
|
-
orchestrator/schemas/subscription_descriptions.py,sha256=
|
|
234
|
+
orchestrator/schemas/subscription.py,sha256=zNy7bb-ww-MEN4QW9xIwxzcNSyFPEgjt5tt1T4Ah0hQ,3383
|
|
235
|
+
orchestrator/schemas/subscription_descriptions.py,sha256=Ft_jw1U0bf9Z0U8O4OWfLlcl0mXCVT_qYVagBP3GbIQ,1262
|
|
234
236
|
orchestrator/schemas/workflow.py,sha256=YvjidAaYz1MsqVsA7DynOlW4kChBO-47M-JCkpSOro4,1890
|
|
235
237
|
orchestrator/services/__init__.py,sha256=GyHNfEFCGKQwRiN6rQmvSRH2iYX7npjMZn97n8XzmLU,571
|
|
236
238
|
orchestrator/services/celery.py,sha256=uvXSKuq_XHcF4BgEpt2QgGUfUnpopApF74FsgAQdnFY,4634
|
|
@@ -241,17 +243,17 @@ orchestrator/services/products.py,sha256=5lKxnfDw80YkF3jOvV1v8c8FtR6allVk3MwpRSD
|
|
|
241
243
|
orchestrator/services/resource_types.py,sha256=_QBy_JOW_X3aSTqH0CuLrq4zBJL0p7Q-UDJUcuK2_qc,884
|
|
242
244
|
orchestrator/services/settings.py,sha256=u-834F4KWloXS8zi7R9mp-D3cjl-rbVjKJRU35IqhXo,2723
|
|
243
245
|
orchestrator/services/subscription_relations.py,sha256=9C126TUfFvyBe7y4x007kH_dvxJ9pZ1zSnaWeH6HC5k,12261
|
|
244
|
-
orchestrator/services/subscriptions.py,sha256=
|
|
246
|
+
orchestrator/services/subscriptions.py,sha256=AEuh0p2pmVLDXWE-ylJMD32NQUuqw1_jbaPAYvx_wvA,26177
|
|
245
247
|
orchestrator/services/tasks.py,sha256=f3045Hn9uWIXcRvIPN6qdznH_0u-rsIGM9hHalc_BvE,6286
|
|
246
248
|
orchestrator/services/translations.py,sha256=GyP8soUFGej8AS8uulBsk10CCK6Kwfjv9AHMFm3ElQY,1713
|
|
247
|
-
orchestrator/services/workflows.py,sha256=
|
|
249
|
+
orchestrator/services/workflows.py,sha256=DStBiQQdPV3zEg1EgPDlk85T6kkBc9AKbiEpxrQG6dI,3170
|
|
248
250
|
orchestrator/utils/__init__.py,sha256=GyHNfEFCGKQwRiN6rQmvSRH2iYX7npjMZn97n8XzmLU,571
|
|
249
251
|
orchestrator/utils/crypt.py,sha256=18eNamYWMllPkxyRtWIde3FDr3rSF74R5SAL6WsCj9Y,5584
|
|
250
252
|
orchestrator/utils/datetime.py,sha256=a1WQ_yvu7MA0TiaRpC5avwbOSFdrj4eMrV4a7I2sD5Q,1477
|
|
251
253
|
orchestrator/utils/deprecation_logger.py,sha256=oqju7ecJcB_r7cMnldaOAA79QUZYS_h69IkDrFV9nAg,875
|
|
252
254
|
orchestrator/utils/docs.py,sha256=GbyD61oKn1yVYaphUKHCBvrWEWJDTQfRc_VEbVb-zgU,6172
|
|
253
|
-
orchestrator/utils/enrich_process.py,sha256=
|
|
254
|
-
orchestrator/utils/errors.py,sha256=
|
|
255
|
+
orchestrator/utils/enrich_process.py,sha256=o_QSy5Q4wn1SMHhzVOw6bp7uhDXr7GhAIWRDDMWUVO4,4699
|
|
256
|
+
orchestrator/utils/errors.py,sha256=LCYn2OEBCxQBWCYIbJeO8vv6IjK1Dp4195TulD5nJzU,4613
|
|
255
257
|
orchestrator/utils/fixed_inputs.py,sha256=pnL6I_19VMp_Bny8SYjSzVFNvTFDyeCxFFOWGhTnDiQ,2665
|
|
256
258
|
orchestrator/utils/functional.py,sha256=w_iqB8zppLMnUaioyRjsZAAYC4y5kLw3zih5NKkEFoM,8063
|
|
257
259
|
orchestrator/utils/get_subscription_dict.py,sha256=fkgDM54hn5YGUP9_2MOcJApJK1Z6c_Rl6sJERsrOy6M,686
|
|
@@ -262,21 +264,23 @@ orchestrator/utils/redis.py,sha256=WZiTjjQIO5TZIRllm-a6cQbndKE7hAxxj6mus_gToOs,7
|
|
|
262
264
|
orchestrator/utils/search_query.py,sha256=ncJlynwtW-qwL0RcNq4DuAUx9KUMI6llwGAEwLO2QCA,17097
|
|
263
265
|
orchestrator/utils/state.py,sha256=gPYHOWDxPvoYZ83WwKPCpeBAsNWOTlkwZz5kAZcM9rw,13011
|
|
264
266
|
orchestrator/utils/strings.py,sha256=N0gWjmQaMjE9_99VtRvRaU8IBLTKMgBKSXcTZ9TpWAg,1077
|
|
267
|
+
orchestrator/utils/validate_data_version.py,sha256=3Eioy2wE2EWKSgkyMKcEKrkCAfUIAq-eb73iRcpgppw,184
|
|
265
268
|
orchestrator/websocket/__init__.py,sha256=V79jskk1z3uPIYgu0Gt6JLzuqr7NGfNeAZ-hbBqoUv4,5745
|
|
266
269
|
orchestrator/websocket/websocket_manager.py,sha256=Vw5GW67rP_RYoPUhfPp9Fi8_M9E9SoHOHmCQVibkSWc,2755
|
|
267
270
|
orchestrator/websocket/managers/broadcast_websocket_manager.py,sha256=fwoSgTjkHJ2GmsLTU9dqQpAA9i8b1McPu7gLNzxtfG4,5401
|
|
268
271
|
orchestrator/websocket/managers/memory_websocket_manager.py,sha256=lF5EEx1iFMCGEkTbItTDr88NENMSaSeG1QrJ7teoPkY,3324
|
|
269
|
-
orchestrator/workflows/__init__.py,sha256=
|
|
272
|
+
orchestrator/workflows/__init__.py,sha256=NzIGGI-8SNAwCk2YqH6sHhEWbgAY457ntDwjO15N8v4,4131
|
|
270
273
|
orchestrator/workflows/modify_note.py,sha256=OkouKVZDinjWSN3J3_0gbvOMScvcKlWvPCkban45HxE,2438
|
|
271
274
|
orchestrator/workflows/removed_workflow.py,sha256=V0Da5TEdfLdZZKD38ig-MTp3_IuE7VGqzHHzvPYQmLI,909
|
|
272
275
|
orchestrator/workflows/steps.py,sha256=8dnB4HlqBWZ4JlP1eQVnHdinzoM0ZlgFL0KYn_3k8x4,9762
|
|
273
|
-
orchestrator/workflows/utils.py,sha256=
|
|
276
|
+
orchestrator/workflows/utils.py,sha256=inWbR-44B0jj8YZMFBxndpcsfk5IC0MnlCnGB2dy5BU,13525
|
|
274
277
|
orchestrator/workflows/tasks/__init__.py,sha256=GyHNfEFCGKQwRiN6rQmvSRH2iYX7npjMZn97n8XzmLU,571
|
|
275
278
|
orchestrator/workflows/tasks/cleanup_tasks_log.py,sha256=JNx2lCIxdhTPD33EgwQUsQjoLeyKH2RKZR_e5eh80Ls,1614
|
|
276
279
|
orchestrator/workflows/tasks/resume_workflows.py,sha256=wZGNHHQYL7wociSTmoNdDdh5CJkVOkvu3kCUg9uY_88,2349
|
|
280
|
+
orchestrator/workflows/tasks/validate_product_type.py,sha256=kVuN94hGWcmBNphgpAlGTSiyO2dEhFwgIq87SYjArns,3174
|
|
277
281
|
orchestrator/workflows/tasks/validate_products.py,sha256=j_aOyxcH8DymlGupSS6XRwQdWx2Ab-c8f8iUvAXBTes,8511
|
|
278
|
-
orchestrator/workflows/translations/en-GB.json,sha256=
|
|
279
|
-
orchestrator_core-2.9.
|
|
280
|
-
orchestrator_core-2.9.
|
|
281
|
-
orchestrator_core-2.9.
|
|
282
|
-
orchestrator_core-2.9.
|
|
282
|
+
orchestrator/workflows/translations/en-GB.json,sha256=ST53HxkphFLTMjFHonykDBOZ7-P_KxksktZU3GbxLt0,846
|
|
283
|
+
orchestrator_core-2.9.2rc2.dist-info/LICENSE,sha256=b-aA5OZQuuBATmLKo_mln8CQrDPPhg3ghLzjPjLn4Tg,11409
|
|
284
|
+
orchestrator_core-2.9.2rc2.dist-info/WHEEL,sha256=CpUCUxeHQbRN5UGRQHYRJorO5Af-Qy_fHMctcQ8DSGI,82
|
|
285
|
+
orchestrator_core-2.9.2rc2.dist-info/METADATA,sha256=s7QCKcWwbLKBl9Wbb_HTUXhEwVoN3ZaQyFyFKbwThgU,4924
|
|
286
|
+
orchestrator_core-2.9.2rc2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|