fix(release): fail closed on malformed WebUI metadata
This commit is contained in:
@@ -154,10 +154,34 @@ def apply_release_webui_bundle_gate(
|
||||
workspace: Path,
|
||||
) -> tuple[ReleasePlanUnit, ...]:
|
||||
issues_by_repo: dict[str, list[ReleaseGateFinding]] = {}
|
||||
for issue in selected_release_webui_bundle_issues(
|
||||
repo_versions={unit.repo: unit.target_version for unit in units},
|
||||
workspace=workspace,
|
||||
):
|
||||
try:
|
||||
issues = selected_release_webui_bundle_issues(
|
||||
repo_versions={unit.repo: unit.target_version for unit in units},
|
||||
workspace=workspace,
|
||||
)
|
||||
except Exception as exc: # noqa: BLE001 - source errors become release findings.
|
||||
for unit in units:
|
||||
issues_by_repo.setdefault(unit.repo, []).append(
|
||||
ReleaseGateFinding(
|
||||
code="release_webui_metadata_unreadable",
|
||||
severity="blocker",
|
||||
message=(
|
||||
"Release WebUI composition metadata could not be read or parsed "
|
||||
f"({type(exc).__name__})."
|
||||
),
|
||||
remediation=(
|
||||
"Repair malformed JSON in the selected module WebUI package or "
|
||||
"Core's release package/lockfile, refresh the repository "
|
||||
"dashboard, then rebuild this plan."
|
||||
),
|
||||
repo=unit.repo,
|
||||
source="release WebUI composition metadata",
|
||||
expected=unit.target_version,
|
||||
actual="unreadable",
|
||||
)
|
||||
)
|
||||
issues = ()
|
||||
for issue in issues:
|
||||
issues_by_repo.setdefault(issue.repo, []).append(
|
||||
ReleaseGateFinding(
|
||||
code="release_webui_composition_alignment",
|
||||
|
||||
Reference in New Issue
Block a user