feat: complete production workflow migration

This commit is contained in:
2026-08-06 14:29:57 +08:00
parent 7f215e79c4
commit 8df5266abb
448 changed files with 56937 additions and 14619 deletions
+9 -13
View File
@@ -5,8 +5,6 @@ from pathlib import Path
from gyxx_flow.adapters.native import DeferredModuleCommandStep
from gyxx_flow.catalog import WorkflowCatalog
from gyxx_flow.modules.supply_chain import (
MANUAL_SUPPLY_WORKFLOW_IDS,
SCHEDULED_SUPPLY_WORKFLOW_IDS,
SUPPLY_RESOURCE,
SUPPLY_TIMEOUT_SECONDS,
SUPPLY_WORKFLOW_IDS,
@@ -16,14 +14,13 @@ from gyxx_flow.modules.supply_chain import (
PROJECT_ROOT = Path(__file__).resolve().parents[1]
def test_supply_module_registers_scheduled_and_manual_workflows() -> None:
def test_supply_module_registers_only_scheduled_workflows() -> None:
module = SupplyChainModule.from_catalog(
WorkflowCatalog.load(PROJECT_ROOT / "config")
)
assert tuple(item.workflow_id for item in module.workflow_definitions()) == SUPPLY_WORKFLOW_IDS
assert len(SCHEDULED_SUPPLY_WORKFLOW_IDS) == 3
assert len(MANUAL_SUPPLY_WORKFLOW_IDS) == 1
assert len(SUPPLY_WORKFLOW_IDS) == 3
def test_supply_workflows_use_project_owned_module_commands() -> None:
@@ -32,11 +29,10 @@ def test_supply_workflows_use_project_owned_module_commands() -> None:
)
for definition in module.workflow_definitions():
step = definition.steps[0]
assert step.step_id == "module_supply"
assert isinstance(step.action, DeferredModuleCommandStep)
assert step.timeout_seconds == SUPPLY_TIMEOUT_SECONDS == 2 * 60 * 60
assert step.max_attempts == 1
assert step.resources == (SUPPLY_RESOURCE,) == ("module:supply_chain",)
assert step.production_sink is True
assert definition.steps
for step in definition.steps:
assert isinstance(step.action, DeferredModuleCommandStep)
assert step.timeout_seconds == SUPPLY_TIMEOUT_SECONDS == 2 * 60 * 60
assert step.max_attempts == 1
assert step.resources == (SUPPLY_RESOURCE,) == ("module:supply_chain",)
assert step.production_sink is True