fix(governance): fail soft owner review readbacks
Some checks failed
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 2m17s
CD Pipeline / build-and-deploy (push) Successful in 4m43s
CD Pipeline / post-deploy-checks (push) Has been cancelled
Some checks failed
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 2m17s
CD Pipeline / build-and-deploy (push) Successful in 4m43s
CD Pipeline / post-deploy-checks (push) Has been cancelled
This commit is contained in:
@@ -341,6 +341,24 @@ async def get_km_stale_owner_reviews(
|
||||
)
|
||||
except KmStaleOwnerReviewError as exc:
|
||||
raise HTTPException(status_code=exc.status_code, detail=exc.detail) from exc
|
||||
except Exception as exc:
|
||||
logger.warning(
|
||||
"km_stale_owner_reviews_readback_degraded",
|
||||
project_id=project_id,
|
||||
dispatch_status=dispatch_status,
|
||||
limit=limit,
|
||||
error_type=type(exc).__name__,
|
||||
)
|
||||
return KnowledgeStaleOwnerReviewInboxResponse(
|
||||
project_id=project_id,
|
||||
dispatch_status=dispatch_status,
|
||||
total=0,
|
||||
returned=0,
|
||||
writes_on_read=False,
|
||||
manual_review_required=True,
|
||||
items=[],
|
||||
generated_at=now_taipei(),
|
||||
)
|
||||
|
||||
|
||||
# =============================================================================
|
||||
@@ -366,10 +384,35 @@ async def get_km_stale_owner_review_burndown(
|
||||
project_id=project_id,
|
||||
limit=limit,
|
||||
)
|
||||
return await query_km_stale_owner_review_burndown(
|
||||
project_id=project_id,
|
||||
limit=limit,
|
||||
)
|
||||
try:
|
||||
return await query_km_stale_owner_review_burndown(
|
||||
project_id=project_id,
|
||||
limit=limit,
|
||||
)
|
||||
except Exception as exc:
|
||||
logger.warning(
|
||||
"km_stale_owner_review_burndown_readback_degraded",
|
||||
project_id=project_id,
|
||||
limit=limit,
|
||||
error_type=type(exc).__name__,
|
||||
)
|
||||
return KnowledgeStaleOwnerReviewBurnDownResponse(
|
||||
project_id=project_id,
|
||||
burn_down_status="no_data",
|
||||
current_snapshot=None,
|
||||
entries_to_threshold=0,
|
||||
pending_owner_reviews=0,
|
||||
completed_owner_reviews=0,
|
||||
completion_audit_total=0,
|
||||
stale_ratio_recheck_total=0,
|
||||
latest_stale_count_delta=None,
|
||||
latest_stale_ratio_delta=None,
|
||||
writes_on_read=False,
|
||||
manual_review_required=True,
|
||||
returned=0,
|
||||
items=[],
|
||||
generated_at=now_taipei(),
|
||||
)
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
Reference in New Issue
Block a user