-
Notifications
You must be signed in to change notification settings - Fork 1.6k
ISSUE #2032-CLT: Entity History Endpoint #25410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…for a specific entity type
openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/CollectionDAO.java
Show resolved
Hide resolved
openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/CollectionDAO.java
Show resolved
Hide resolved
openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/CollectionDAO.java
Show resolved
Hide resolved
openmetadata-service/src/main/java/org/openmetadata/service/resources/EntityResource.java
Show resolved
Hide resolved
| private static final LoadingCache<String, Integer> COUNT_CACHE = | ||
| CacheBuilder.newBuilder() | ||
| .maximumSize(500) | ||
| .expireAfterWrite(1, TimeUnit.MINUTES) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.expireAfterAccess(5, TimeUnit.MINUTES) lets use this instead 1 min expiry. The data is minimal we can keep it slightly longer
openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/CollectionDAO.java
Show resolved
Hide resolved
openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/CollectionDAO.java
Show resolved
Hide resolved
🔍 CI failure analysis for 24a5a8e: Five CI job failures (92 total tests): (1) Python lineage - Elasticsearch infrastructure failure, (2-3) Playwright - timing/timeout issues with 13 flaky tests, (4-5) Maven postgresql & sonarcloud - IDENTICAL 46 bulk loading field fetcher failures proving systematic pre-existing bug. All unrelated to PR #25410's entity history endpoint.IssueFive separate CI job failures occurred: 1. py-run-tests (3.11) - 10 Test FailuresThe Python ingestion tests failed with lineage-related test failures where lineage queries return empty source tables. Root Cause: Elasticsearch infrastructure failure in the test environment. Evidence:
2. playwright-ci-postgresql (4, 6) - 2 Test Failures + 8 Flaky TestsPlaywright E2E tests had failures in domain rename tests. Failures:
Error Pattern: Both tests expected 3 assets in domain count but received 2. Root Cause: Test flakiness/timing issue where domain rename operations complete asynchronously. Additional Context: 8 other tests were flaky but passed on retry. 3. playwright-ci-postgresql (2, 6) - 2 Test Failures + 5 Flaky TestsPlaywright E2E tests had browser crash failures in Test Case Import/Export tests. Failures:
Error Pattern: Browser crash after 3-minute timeout: Root Cause: Browser/page crash during long-running operations. Additional Context: 5 other tests were flaky but passed on retry. 4. maven-postgresql-ci - 46 Test FailuresJava integration tests failed with bulk loading efficiency issues. Failure Pattern:
Error Pattern: All failures show: Root Cause: Bulk entity listing not populating the 5. maven-sonarcloud-ci - 46 Test Failures (DUPLICATE)Java integration tests with SonarCloud analysis - IDENTICAL failures to maven-postgresql-ci. Failure Pattern: Exactly the same 46 test failures:
Analysis: This is the same CI job as maven-postgresql-ci but with SonarCloud static analysis added. Both run the full test suite, and both encounter the identical bulk loading regression. This confirms the issue is NOT database-specific but affects the test environment uniformly. DetailsWhy all five failures are unrelated to PR #25410:
Why Maven failures are pre-existing/environmental:
Root Cause SummaryAll five CI job failures (92 total test failures) stem from test environment issues and pre-existing bugs, not from code changes in this PR:
Recommended ActionsFor Python tests: Retry the job to confirm Elasticsearch infrastructure issue is transient. For Playwright tests (domain rename): Improve test reliability by adding explicit waits and retry logic. For Playwright tests (import/export): Increase timeout and add intermediate checkpoints. For Maven tests (bulk loading - affects both postgresql and sonarcloud jobs): The solution is to:
These issues should be tracked separately. None are blockers for this PR as all failures are unrelated to the entity history endpoint implementation. The PR's changes are isolated to a new code path ( Code Review 👍 Approved with suggestions 7 resolved / 10 findingsWell-implemented history endpoint with minor documentation inconsistency. The UNION semantics issue from previous review has been fixed.
|
| Auto-apply | Compact |
|
|
Was this helpful? React with 👍 / 👎 | This comment will update automatically (Docs)
openmetadata-service/src/main/java/org/openmetadata/service/resources/EntityResource.java
Show resolved
Hide resolved
|



Describe your changes:
Summary
Description
This PR introduces a new API endpoint that allows clients to retrieve all entity versions (both current entities and their historical versions from
entity_extension) within a specified timestamp range. This is useful for auditing, change tracking, and data synchronization use cases.
Key Changes
New Endpoint: GET /v1/{entityType}/history
Repository Layer (EntityRepository.java):
DAO Layer (CollectionDAO.java):
Database Migrations:
Caching Strategy
Count queries are cached using Guava LoadingCache with:
Type of change:
Checklist:
Fixes <issue-number>: <short explanation>New feature
or decision-making process is reflected in the issue.