mikebridge commented on code in PR #44094:
URL: https://github.com/apache/superset/pull/44094#discussion_r4007324458
##########
superset/mcp_service/dashboard/tool/manage_dashboard_certification.py:
##########
@@ -92,6 +92,25 @@ def manage_dashboard_certification(
warnings=["No fields provided; dashboard unchanged."],
)
+ # Externally managed dashboards refuse certification CHANGES (the
+ # no-field inspect path above still returns current values): their
+ # source of truth lives outside Superset, so a badge set here would be
+ # overwritten (or drift from the certifying system) on the next
+ # external sync. This tool writes by direct attribute assignment +
+ # commit rather than through a command, so no command-layer check can
+ # protect it — the refusal must live in the tool itself, after the
+ # editorship check, where a caller with no edit rights keeps getting
+ # the plain editorship denial.
+ if dashboard.is_managed_externally:
Review Comment:
T2/T3 fixed in 905e68a823 (distinct `managed_externally` flag on the shared
base with do-not-retry guidance; `permission_denied` narrowed back to ACL-only;
tool docstring now advertises the refusal). On THIS thread — the sibling
coverage (owners/roles/update_dashboard) — agreed the write path is identical
and unguarded; that's a governance-policy decision already queued with the
campaign owner, so I'm leaving this thread open until it's ratified rather than
silently extending the gate's scope in a review round. The shared-base flag
added here is deliberately sibling-ready for that hoist.
##########
superset/mcp_service/dashboard/tool/manage_dashboard_certification.py:
##########
@@ -92,6 +92,25 @@ def manage_dashboard_certification(
warnings=["No fields provided; dashboard unchanged."],
)
+ # Externally managed dashboards refuse certification CHANGES (the
+ # no-field inspect path above still returns current values): their
+ # source of truth lives outside Superset, so a badge set here would be
+ # overwritten (or drift from the certifying system) on the next
+ # external sync. This tool writes by direct attribute assignment +
+ # commit rather than through a command, so no command-layer check can
+ # protect it — the refusal must live in the tool itself, after the
+ # editorship check, where a caller with no edit rights keeps getting
+ # the plain editorship denial.
+ if dashboard.is_managed_externally:
+ return ManageDashboardCertificationResponse(
+ permission_denied=True,
Review Comment:
Fixed in 905e68a823 — distinct `managed_externally: true` on the shared
`DashboardMutationErrorFields` base (so a future sibling hoist inherits it),
with the description carrying the do-not-retry guidance; `permission_denied` is
no longer set for the structural refusal and its description narrows back to
ACL-only. Both directions pinned in the tool tests.
##########
superset/mcp_service/dashboard/tool/manage_dashboard_certification.py:
##########
@@ -92,6 +92,25 @@ def manage_dashboard_certification(
warnings=["No fields provided; dashboard unchanged."],
)
+ # Externally managed dashboards refuse certification CHANGES (the
+ # no-field inspect path above still returns current values): their
+ # source of truth lives outside Superset, so a badge set here would be
+ # overwritten (or drift from the certifying system) on the next
+ # external sync. This tool writes by direct attribute assignment +
+ # commit rather than through a command, so no command-layer check can
+ # protect it — the refusal must live in the tool itself, after the
+ # editorship check, where a caller with no edit rights keeps getting
+ # the plain editorship denial.
+ if dashboard.is_managed_externally:
+ return ManageDashboardCertificationResponse(
+ permission_denied=True,
+ error=(
+ f"Dashboard '{dashboard.dashboard_title}' (ID: {dashboard.id})
"
+ "is managed externally; its certification is owned by the "
Review Comment:
Fixed in 905e68a823 — the tool docstring now states the refusal (structural,
`managed_externally=True`, no retry) and that the no-field inspect call still
works on managed dashboards.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]