Conversation
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
| table_entities = self._resolve_usage_tables( | ||
| database_name=database, | ||
| database_schema=database_schema, | ||
| table_name=table_column.table, | ||
| resolver=resolver, | ||
| ) |
There was a problem hiding this comment.
Join Failures Abort Enrichment
If one joined-table lookup fails or exceeds the candidate limit, _resolve_usage_tables now raises instead of treating that join as unresolved. The exception reaches get_table_usage_and_joins, marks the entire source table as failed, and prevents its query and lifecycle data from being published. The previous lookup path caught these failures and skipped only the affected join target, so this boundary should preserve that failure isolation.
Knowledge Base Used: Metadata ingestion
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
|
The Python checkstyle failed. Please run You can install the pre-commit hooks with |
✅ Playwright Results — workflow succeededValidated commit ✅ 109 passed · ❌ 0 failed · 🟡 1 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) 50m 26s ⏱️ Max setup 5m 25s · max shard execution 14m 49s · max shard-job elapsed before upload 19m 57s · reporting 6s 🌐 237.98 requests/attempt · 1.81 app boots/UI scenario · 0.00% common-shard skew Optimization targets still in progress:
🟡 1 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
Use cachetools LRUCache with run-owned locking and lifecycle. Inject connector naming through lightweight naming hooks so usage sinks and table resolution remain connector-agnostic. Preserve query and lifecycle publication when an individual join lookup fails. Cover mixed-service naming, CSV usage, wildcard scope and import-layer registration.
Code Review ✅ Approved 1 closed / 1 findings🟡 Medium risk Run-scoped entity resolver for Usage workflows now prevents stale table ID reuse after recreate by hydrating with current IDs within each run. Joins resolution failure that previously suppressed query and lifecycle publication has been resolved. ✅ 1 closed✅ Bug: Join resolution failure suppresses query & lifecycle publish
OptionsDisplay: compact → Counting what did not apply, without listing it. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|



Describe your changes
Fixes #16408
Prevent repeated Usage workflows in the same Python process from publishing usage and queries to a deleted table ID after the same FQN is recreated.
Type of change
High-level design
metadata.entity_resolution.finallywithout closing the borrowed OpenMetadata client.Per-run ownership retains reuse across staged batches without carrying IDs into another workflow. Successful results remain cached within the run until eviction; misses and failures are retried. No schema migration or configuration change is required.
Validation
No backend or UI changes; Java integration tests, Playwright, and screenshots are not applicable. OpenSearch was not exercised.
Checklist
The PR appears safe to merge; the previously reported join-lookup failure isolation issue is fully addressed.
Findings
Summary
This PR replaces process-scoped Usage entity lookup state with a bounded resolver owned by each Usage run.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR S[Usage source] --> T[Staged usage files] T --> B[MetadataUsageBulkSink] B --> R[Run-scoped EntityResolver] R --> E[Exact REST lookup] R --> Q[Candidate search] Q --> H[REST hydration and validation] E --> P[Usage, query, lifecycle, and join publication] H --> P B --> C[Close resolver and clear bounded cache]Reviews (3) · Last reviewed commit: "Refactor usage table naming and resolver..."