Repository navigation
Fixes 37506: Backport exact Data Quality table totals and integration fixes to 2.0 - #37913
Conversation
… `f (open-metadata#37507) taskr run 0181. The scale test now counts the same `deleted:false` scope on both sides, and the planned Jest, ESLint, spotless and compile checks pass. The case-only integration test still needs a live run. (cherry picked from commit 276452a)
* Fix Data Quality table total integration tests * Remove unit tests for Data Quality integration test helper (cherry picked from commit b264507)
❌ 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 |
| public static long tableTotal(String q, String aggregationQuery) { | ||
| DataQualityReport report = dataQualityReport(q, aggregationQuery); |
There was a problem hiding this comment.
Unchanged declarations lack
final
The new Java helpers and tests omit final from parameters and local variables that never change. The repository guide requires it for these declarations. Add final throughout the new Java code before merging.
Context Used: CLAUDE.md (source)
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!
| private static DataQualityReport dataQualityReport(String q, String aggregationQuery) { | ||
| RequestOptions options = | ||
| RequestOptions.builder() | ||
| .queryParam("q", q) |
There was a problem hiding this comment.
Parameter names break naming rules
The new helper uses the single-letter parameter q in tableTotal and dataQualityReport. The repository guide forbids single-letter variables outside short lambdas and loop indices. Rename it to query before merging, while keeping the HTTP parameter name "q" unchanged.
Context Used: CLAUDE.md (source)
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!
| UnsupportedOutcome.class, ODCSQualityRuleMapper.map(List.of(rule), TARGET).getFirst()); | ||
|
|
||
| assertEquals(rule, unsupported.rule()); | ||
| assertTrue(unsupported.reason().contains("zero failures")); |
There was a problem hiding this comment.
Comparison strings lack constants
The new assertions pass raw strings to .contains() here and .equals() in DataContractResourceIT.java. The repository guide requires named constants for strings used in these comparisons. Replace "zero failures" and "Email format" with constants before merging.
Context Used: CLAUDE.md (source)
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!
Code Review ✅ Approved 🟡 Medium riskODCS regex rules with nonzero tolerance now produce no executable test, potentially leaving checks unenforced, while table totals switch to exact document counts. Backports the Data Quality table total fix to 2.0 by switching the aggregation from VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. 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 #37506 on
2.0.Backports both merged fixes, in order:
value_counton #37507 — usevalue_countfor the Data Quality table total so Summary and Test Cases count every table document.BigDecimal.longValueExact()and scope the case-only integration regression by schema UUID.Both commits cherry-picked cleanly. The covered-asset aggregation remains cardinality-based, preserving distinct asset counting across test cases.
Type of change:
High-level design:
Reuse the upstream table-count implementation and regression tests. The CI follow-up also corrects ODCS regex-rule mapping for the capabilities of the 2.0 executor. The existing 2.0 Elasticsearch/OpenSearch aggregation implementations support
value_count, and UI consumers use the unchanged response field. Includes the case-only table-name regression, the nightly scale regression, and UI API/widget/provider tests. No schemas, migrations, or dependencies changed. ODCS regex rules with nonzero failure tolerance are preserved without creating executable test cases; zero-tolerance rules create regex tests with supported parameters.Tests:
Use cases covered
value_countwhile retaining filter/domain behavior.Ordersandorders, filters by schema UUID, and expects value count 2 versus cardinality 1.Unit tests
PASSED: 3 Jest suites, 66 tests.
cd openmetadata-ui/src/main/resources/ui yarn jest src/rest/dataQualityDashboardAPI.test.ts src/components/DataQuality/ChartWidgets/DataAssetsCoveragePieChartWidget/DataAssetsCoveragePieChartWidget.test.tsx src/pages/DataQuality/DataQualityProvider.test.tsx --runInBand --silentThe initial run could not load the generated ANTLR parser and built core-component library in the fresh worktree. After
yarn js-antlrand building the branch's core components, all 66 tests passed. Dependencies were installed from the branch's frozen lockfiles. Coverage percentage was not measured.UI organize-imports, ESLint, and Prettier passed on all four changed UI files and left no diff.
Backend integration tests
BLOCKED — local OpenSearch container startup failed before the regression executed. This PR remains draft.
The reactor compiled through all 534 integration-test sources and started PostgreSQL. The
opensearchproject/opensearch:3.4.0container exited with code 1 during startup:Stopped the test JVM after confirming the container had exited, avoiding repeated startup attempts. No passing live integration result is claimed. Container disk capacity, /tmp permissions, temporary-directory creation, and a direct JVM launch passed isolated diagnostics; the startup cause remains unresolved.
mvn -B spotless:apply -pl openmetadata-integration-testspassed with zero formatting changes. The newer Java planner and impact-map files are absent on 2.0, so the focused search-it command was selected directly from the existing profile.Pending: rerun
TableTotalCountAggregationITsuccessfully on PostgreSQL/OpenSearch. Elasticsearch, the nightlyTableTotalCountScaleIT, and the full integration suite were not run.ODCS regex CI follow-up
Commit
04b95f51de5fixes the regex-threshold mismatch exposed by the data-contract integration tests. The 2.0 regex executor only supports zero failures. Nonzero count/percentage tolerances are now classified as unsupported before test creation, while the original rule remains available for export/re-import. The runnable-test fixture uses zero tolerance; dedicated regression coverage preserves the original 5% case.Validation on PostgreSQL/OpenSearch:
testODCSImportTurnsQualityRulesIntoTestCases,testODCSExportIncludesTheContractsOwnTestCasesOnce,testODCSRegexToleranceSurvivesExportWithoutAnExecutableTest, andtestODCSReimportUpdatesTheSameTestCases.git diff --checkpassed.This is focused verification of the ODCS follow-up. The other reported CI failures are outside this fix; the full integration suite and coverage percentage were not rerun/measured.
Ingestion integration tests
Not applicable — no ingestion changes.
Playwright (UI) tests
Not run for this focused backport. Existing related coverage:
playwright/e2e/Features/DataQuality/DataQualityDashboard.spec.ts. Browser verification remains outstanding.Manual testing performed
No interactive UI test. Manual steps for follow-up: open Data Quality Summary and Test Cases with equivalent filters; verify the table denominator matches the exact table count, including case-only names, and that coverage uses the corrected denominator.
UI screen recording / screenshots:
Not applicable — backport of an existing aggregation bug fix; no new UI feature or layout.
Checklist:
git diff --checkpassed.2b604576325f37d1ba8547f420670849bcdccbe0against REVIEW.md: no blockers.The code changes appear sound, but the outstanding repository style requirements must be satisfied before merging.
Findings
Summary
This PR backports exact Data Quality table totals and adds regression tests.
No runtime tests were run during this review.
Reviews (2) · Last reviewed commit: "Fix ODCS regex rules with unsupported fa..." · Reviewed by Greptile