Skip to content

Stabilize ontology data-graph query-budget ITs against one-off cache misses - #36843

Merged
manerow merged 1 commit into
mainfrom
fix/ontology-graph-query-count-flaky
Nov 2, 2026
Merged

manerow merged 1 commit into
mainfrom
fix/ontology-graph-query-count-flaky

Conversation

@sonika-shah

Copy link
Copy Markdown
Collaborator

Describe your changes:

Two ontology data-graph ITs keep knocking PRs out of the merge queue (and fail on main pushes):

  • NativeOntologyDataGraphContextIT.loadedContextReadsDoNotGrowWithConceptsOrAssets (14 commits since Oct 30)
  • NativeOntologyDataGraphIT.statementCountDoesNotGrowWithConceptsOrAssets (8 commits since Oct 30)

Cause: both count every SELECT a graph request runs and assert the wide ontology runs no more than the narrow one. A single read can also pay for a cache miss outside the graph. In a failing CI run (23 → 25), the graph's own queries were identical; the two extra were the reader's ownership lookup (EntityRelationshipDAO.findToRelationshipsForEntityWithCondition, UserDAO.findReferencesByIds).

Fix (tests only): each case now takes the fewest reads over three (NativeOntologyGraphScanProbe.fewestReads, NativeOntologyDataGraphContextIT.fewestPageReads). A real growth in graph queries shows on every read and still fails; a one-off cache miss no longer does.

Tests

Both classes run 3× on MySQL + Elasticsearch and 3× on Postgres + Elasticsearch + Redis: 10/10 passing each run.

Type of change:

  • Improvement (test stability)

…ail the ontology query budget

NativeOntologyDataGraphIT.statementCountDoesNotGrowWithConceptsOrAssets and
NativeOntologyDataGraphContextIT.loadedContextReadsDoNotGrowWithConceptsOrAssets count every
SELECT a request runs. A single read can also pay for a cache miss outside the graph (in a
failing CI run, the reader's ownership lookup added EntityRelationshipDAO and UserDAO reads:
23 -> 25), which failed the merge queue repeatedly. Each case now takes the fewest reads over
three; real growth in graph queries still shows on every read and still fails.
Copilot AI balanced review requested due to automatic review settings November 2, 2026 10:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

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 skip-pr-checks label.

@github-actions github-actions Bot added backend safe to test Add this label to run secure Github workflows on PRs labels Nov 2, 2026
@gitar-bot

gitar-bot Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved

🟢 Low risk · The three-read minimum only adjusts flaky query-budget assertions, leaving application behavior and interfaces unchanged.

Stabilizes two ontology data-graph integration tests by comparing the fewest SELECT reads over three runs instead of a single count, so a one-off cache miss no longer fails the query-budget assertion while real graph query growth still does. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@sonika-shah
sonika-shah added this pull request to the merge queue Nov 2, 2026
@manerow
manerow removed this pull request from the merge queue due to a manual request Nov 2, 2026
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

🚦 Removed from the merge queue — manual (2026-11-02T12:08:30Z)

The entry left the queue before it was built, so no checks ran against it.

@manerow
manerow merged commit ff380fc into main Nov 2, 2026
67 of 68 checks passed
@manerow
manerow deleted the fix/ontology-graph-query-count-flaky branch November 2, 2026 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants