Repository navigation
Fix MCP entity patch lifecycle handling - #32226
Conversation
✅ PR checks passedThe linked issue has a description and all required Shipping project fields set. Thanks! |
✅ Playwright Results — workflow succeededValidated commit ✅ 555 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky PerformanceBlocking targets: ✅ met · Optimization targets: 🟡 in progress Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting. 🕒 Full workflow signal wall (to summary) 54m 48s ⏱️ Max setup 5m 6s · max shard execution 17m 5s · max shard-job elapsed before upload 20m 6s · reporting 4s 🌐 214.51 requests/attempt · 2.82 app boots/UI scenario · 22.05% common-shard skew Optimization targets still in progress:
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
🚦 Removed from the merge queue —
|
🚦 Removed from the merge queue —
|
🚦 Removed from the merge queue —
|
Code Review ✅ Approved 3 resolved / 3 findingsFixes MCP entity patch lifecycle handling by rejecting entity types whose dedicated resource performs additional authorization, scheduling, or cleanup instead of bypassing that through direct repository patch. Hardcoded lifecycle set and build failure resolved. Guard uses exact-case string match on entityType — normalize it before the membership check to prevent bypass if a caller supplies differently-cased input like "User" instead of "user". ✅ 3 resolved✅ Quality: Hardcoded dedicated-lifecycle set can silently drift
✅ Bug: Entity.METRIC_GROUP does not exist — build will fail
✅ Edge Case: Guard uses exact-case string match on entityType
OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
* fix(mcp): respect entity patch lifecycles * fix(mcp): protect task patch lifecycle * gitarbot feedback: block document, metric, metricGroup patch lifecycles too * reflow lifecycle comment so no entry wraps at the 100-col limit * drop metric and metricGroup entries, reverted upstream by open-metadata#32333
…32342) (#32987) * Fix MCP entity patch lifecycle handling (#32226) * fix(mcp): respect entity patch lifecycles * fix(mcp): protect task patch lifecycle * gitarbot feedback: block document, metric, metricGroup patch lifecycles too * reflow lifecycle comment so no entry wraps at the 100-col limit * drop metric and metricGroup entries, reverted upstream by #32333 (cherry picked from commit ac4a26b) * feat(search): report embedding token usage instead of discarding it (#32552) * feat(search): report embedding token usage instead of discarding it * fix(search): report the text the provider received, not the caller's input (cherry picked from commit 2209bd7) * Fixes 30023: apply the caller's policies to bot searches (#32460) * fix(search): apply the caller's policies to bot searches (#30023) * test: poll for the widened bot's own view in the allow-only role IT * test: probe search RBAC on the asset index, not the domain index * test: prove bot search scoping with a deny rule, not domains * gitarbot feedback: include team ids in the RBAC query cache key (cherry picked from commit dda6a92) * fix(search): embed ElasticSearch semantic search queries as queries, not documents (#32553) (cherry picked from commit ce2a1c1) * fix(ingestion): use HTTP transport for MCP connector (#32342) * fix(ingestion): use HTTP transport for MCP connector * Update generated TypeScript types and dereferenced schemas * chore: prune obsolete G004 baseline entries * fix(ingestion): complete MCP HTTP transport support * style(ingestion): format MCP transport client --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> (cherry picked from commit c45f71a) --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Fixes #32198
Describe your changes:
Follow-up to #32209.
Make
patch_entityauthorize with the same PATCH-aware resource context as REST. Reject entity types whose dedicated resource performs additional authorization, scheduling, cleanup, secret handling, or uses a time-series repository, instead of bypassing that lifecycle through a direct repository patch.Type of change:
Tests:
PatchEntityToolTest: 28 passedopenmetadata-mcpsuite: 542 passedUI screen recording / screenshots:
Not applicable.