Skip to content

[OPIK-8175] [BE] perf: skip the dataset item-count scan when a version supplies items_total - #8075

Merged
JetoPistola merged 7 commits into
mainfrom
danield/OPIK-8175-skip-dataset-item-count-scan
Sep 4, 2026
Merged

[OPIK-8175] [BE] perf: skip the dataset item-count scan when a version supplies items_total#8075
JetoPistola merged 7 commits into
mainfrom
danield/OPIK-8175-skip-dataset-item-count-scan

Conversation

@JetoPistola

@JetoPistola JetoPistola commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Details

image

enrichDatasetWithAdditionalInformation ran a count(DISTINCT id) over dataset_items unconditionally, then discarded the result whenever dataset versioning supplied itemsTotal. The count is O(N) in the dataset's item count — the sort-key prefix prunes to the right dataset, but every id in that range still has to be read and hashed, since duplicates pending merge must be collapsed. This resolves the item-count source from the latest version first, and issues the dataset_items query only for the datasets that actually need the legacy fallback.

  • The count query is narrowed to the subset whose version cannot supply a total, and is skipped entirely when that subset is empty — a fully-versioned workspace issues no count(DISTINCT id) against dataset_items at all.
  • Batch (list) call sites stay batched: one narrowed query per page, never one query per dataset.
  • All four enrichment call sites (findById, findByNameDetailed, and both list paths) funnel through this single method, so the dataset list page and the SDK get_or_create_dataset path are both covered.
  • The ITEMS_TOTAL_NOT_MIGRATED (-1) sentinel written by migration 000046 is treated as unavailable rather than as an authoritative count, so an un-backfilled dataset falls back to the legacy count instead of reporting -1. That hole pre-dated this branch, but narrowing the fallback would have made -1 the only reachable answer rather than merely a wasted query.

Interaction with the concurrent-enrichment change. OPIK_8176 landed on main first and zips the four enrichment lookups together, which requires the dataset_items count to be issued unconditionally. This branch keeps both properties: the two version-independent ClickHouse lookups and the version lookup stay concurrent in the Mono.zip, while the item count is chained off the version result via flatMap — so it is still narrowed and still skippable. fetchDatasetItemSummaries returns a Mono rather than blocking via toStream(), so it composes inside the reactive chain, and main's thread-safety discipline is preserved (workspace/user resolved on the request thread; getOrDefault rather than computeIfAbsent on the shared maps).

Counts are otherwise unchanged. The previous code selected the version total when flag && version != null && itemsTotal != null and fell back to the DAO count otherwise; versionItemsTotal returns non-null under exactly that condition (plus the new sentinel guard), and the fallback fires precisely when it returns null. Datasets omitted from the query are, by construction, those whose count comes from their version, so the omitted row would have been discarded anyway. A dataset in the fallback subset with no dataset_items rows still resolves to 0.

Change checklist

  • User facing
  • Documentation update

Issues

  • Resolves #
  • OPIK-8175

AI-WATERMARK

AI-WATERMARK: yes

  • Tools: Claude Code
  • Model(s): Claude Opus 5
  • Scope: assisted — implementation reordering, sentinel guard, unit test coverage, and merge-conflict resolution against the concurrent-enrichment change
  • Human verification: code review + local test run

Testing

DatasetServiceEnrichmentTest now holds 21 cases: the 11 concurrency/defaulting cases from the enrichment change already on main, plus 10 covering item-count source selection and its scheduling.

Item-count source selection:

  • Fully-versioned batch — asserts findDatasetItemSummaryByDatasetIds is never called, and counts come from the versions.
  • Versioning flag disabled — falls back to the dataset_items count.
  • No latest version for the dataset — falls back to the count.
  • Latest version present with a null itemsTotal — falls back to the count.
  • Latest version holding the ITEMS_TOTAL_NOT_MIGRATED (-1) sentinel — falls back to the count rather than reporting -1.
  • No version and no items — reports 0.
  • Mixed batch (versioned + no-version + null-total) — asserts the query receives exactly the fallback id subset and every dataset gets the right count in one call.
  • Single-dataset retrieve path (findById) — skips the query for a versioned dataset.

Scheduling:

  • Ordering — asserts the narrowed item-count query is not issued until the version lookup has resolved.
  • Non-blocking — holds the experiment and optimization summaries open and asserts the item count is still issued while they are pending, so the count depends on the versions alone and not on the whole zip.

The concurrency test inherited from main was updated: it gated on all three ClickHouse lookups subscribing before any completed, which this change makes structurally impossible, since the item count now runs after the version lookup by design. It gates on the two version-independent lookups instead, and the two scheduling tests above cover what it no longer can.

Commands run, from apps/opik-backend:

mvn compile -DskipTests                        # BUILD SUCCESS
mvn test -Dtest=DatasetServiceEnrichmentTest   # tests=21 errors=0 failures=0
mvn spotless:check                             # BUILD SUCCESS

Each behaviour was checked to be genuinely pinned rather than merely passing, by reverting the production change and confirming the matching test fails: the sentinel guard, the unconditional zip (fails exactly the four ordering/skip/narrowing tests), and chaining the count off the whole zip instead of the version lookup (fails only the non-blocking test).

Not run locally: the DatasetsResourceTest and DatasetVersionResourceTest integration suites, which need containers. They already cover both count sources end-to-end through the public resource layer — DatasetVersionResourceTest asserts the list API takes the count from the latest version (flag on, real containers), and DatasetsResourceTest asserts the legacy count on unversioned datasets across findByIdentifier, findById, and list — so they are the meaningful end-to-end gate for this change in CI.

Documentation

N/A — internal query-path optimization with no user-facing or API surface change.

…n supplies items_total

enrichDatasetWithAdditionalInformation ran an O(N) count(DISTINCT id) over
dataset_items unconditionally, then discarded the result whenever dataset
versioning supplied itemsTotal. Move the latest-version lookup ahead of the
count and narrow the count query to the datasets that actually need the
legacy fallback, skipping it entirely when none do.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added java Pull requests that update Java code Backend tests Including test files, or tests related like configuration. 🟠 size/L labels Aug 31, 2026
@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

⏱️ pre-commit per-hook timing

Hook Description Result Duration
☕ spotless — java backend Format Java code 4.58s
🛡️ semgrep — java backend sql Block SQL injection-prone string formatting 1.87s
Total (2 ran) 6.45s
⏭️ 42 skipped (no matching files changed)
Hook Description Result
🐍 trim trailing whitespace — python sdk Strip trailing whitespace ⏭️
🐍 fix end of files — python sdk Ensure files end in a newline ⏭️
🐍 ruff — python sdk Lint + autofix Python (ruff) ⏭️
🐍 ruff-format — python sdk Format Python code (ruff) ⏭️
🐍 mypy — python sdk Static type check ⏭️
🤖 trim trailing whitespace — optimizer Strip trailing whitespace ⏭️
🤖 fix end of files — optimizer Ensure files end in a newline ⏭️
🤖 check yaml — optimizer Validate YAML syntax ⏭️
🤖 check json — optimizer Validate JSON syntax ⏭️
🤖 check toml — optimizer Validate TOML syntax ⏭️
🤖 check for added large files — optimizer Block large files (>1MB) ⏭️
🔐 detect private key — optimizer Block committed private keys ⏭️
🤖 check for merge conflicts — optimizer Block merge-conflict markers ⏭️
🤖 check for case conflicts — optimizer Block case-only name clashes ⏭️
🤖 pyupgrade — optimizer Modernize Python syntax ⏭️
🤖 ruff — optimizer Lint + autofix Python (ruff) ⏭️
🤖 ruff-format — optimizer Format Python code (ruff) ⏭️
🤖 mypy — optimizer Static type check ⏭️
📓 nbstripout — optimizer notebooks Strip notebook output ⏭️
📝 markdownlint — optimizer Lint Markdown ⏭️
🔤 codespell — optimizer Fix common misspellings ⏭️
📊 radon cc — optimizer Cyclomatic-complexity gate ⏭️
📊 radon raw — optimizer Raw size metrics gate ⏭️
📊 xenon — optimizer Fail on complexity thresholds ⏭️
📊 lizard — optimizer Cyclomatic-complexity gate ⏭️
🧹 vulture — optimizer Find dead code ⏭️
🛡️ trim trailing whitespace — guardrails Strip trailing whitespace ⏭️
🛡️ fix end of files — guardrails Ensure files end in a newline ⏭️
🛡️ ruff — guardrails Lint + autofix Python (ruff) ⏭️
🛡️ ruff-format — guardrails Format Python code (ruff) ⏭️
🛡️ mypy — guardrails Static type check ⏭️
⚓ helm-docs Regenerate Helm chart README ⏭️
block non-public FE plugins Block non-public FE plugins ⏭️
🧪 pre-commit wrapper smoke tests Self-test the wrapper scripts ⏭️
🧪 rebaseline script tests Self-test the changelog re-baseline script ⏭️
🌐 eslint — frontend Lint + autofix JS/TS ⏭️
🌐 typecheck — frontend Whole-project tsc type check ⏭️
📘 eslint — typescript sdk Lint + autofix JS/TS ⏭️
📘 typecheck — typescript sdk Whole-project tsc type check ⏭️
⚙️ actionlint — github workflows Lint GitHub Actions workflows ⏭️
🐳 hadolint — dockerfiles Lint Dockerfiles ⏭️
🌈 zizmor — github workflows security Security-scan GitHub Actions workflows ⏭️

Comment thread apps/opik-backend/src/main/java/com/comet/opik/domain/DatasetService.java Outdated
Comment thread apps/opik-backend/src/main/java/com/comet/opik/domain/DatasetService.java Outdated
… count

versionItemsTotal accepted any non-null itemsTotal as authoritative, including
the ITEMS_TOTAL_NOT_MIGRATED (-1) sentinel written by migration 000046 for
versions awaiting backfill. main had the same hole, but narrowing the fallback
made it reachable: the dataset was excluded from the count query entirely, so
-1 became the only possible answer instead of merely a wasted query.

Also drop the eager DatasetItemSummary.empty allocation that getOrDefault
evaluated on every dataset regardless of whether the map had a match.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@JetoPistola
JetoPistola marked this pull request as ready for review August 31, 2026 06:01
@JetoPistola
JetoPistola requested a review from a team as a code owner August 31, 2026 06:01
@JetoPistola JetoPistola added the test-environment Deploy Opik adhoc environment label Aug 31, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔄 Test environment deployment process has started

Phase 1: Deploying base version 2.2.45-6495 (from main branch) if environment doesn't exist
Phase 2: Building new images from PR branch danield/OPIK-8175-skip-dataset-item-count-scan
Phase 3: Will deploy newly built version after build completes

You can monitor the progress here.

@CometActions

CometActions commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

This change looks worth a test.

The item-count scan is now narrowed to the datasets that actually fall back, which is value-neutral by design — but dataset_items_count is the number the Datasets list renders as Item count (and the Test suites list, same enrichment via DatasetType.TEST_SUITE), and nothing in the e2e estate asserts it. dataset-crud-smoke.spec.ts only checks the row is visible and then counts rendered rows on the items page; dataset-version-counters.spec.ts asserts items_total/added/modified off GET /v1/private/datasets/{id}/versions and the Version history tab, which is a different field from a different query. Your DatasetServiceEnrichmentTest covers the narrowing thoroughly at the mock level; what is missing is the end-to-end number on a mixed page — a versioned dataset next to one with no version row — where a wrong subset shows 0 items and flips the items page into its empty state (DatasetItemsPage keys that off dataset_items_count === 0).

Would target datasets.list-datasets, datasets.view-items.

What it would check
  1. Seed one dataset with N items through the SDK and create a second, empty dataset through the UI, so a single page mixes the version-supplied path and the legacy-count fallback
  2. Check GET /v1/private/datasets returns dataset_items_count = N and 0 for the two, and that GET /v1/private/datasets/{id} agrees with the list value for each
  3. Confirm the Datasets list Item count column renders those numbers, and that the empty dataset's items page shows the empty state rather than a zero-row table
  4. Add and delete items through the UI, commit, and confirm the list count follows the new version's items_total instead of going stale
  5. Repeat the first two steps for a TEST_SUITE-typed dataset and confirm the Test suites list Item count matches

Deploying a test environment for this PR and exploring it — results will follow in a comment.

Not testable yet. The second change is behavioural, not perf: versionItemsTotal now treats DatasetVersionDAO.ITEMS_TOTAL_NOT_MIGRATED (-1) as non-authoritative and falls back to the dataset_items count, where the old code used any non-null itemsTotal. That is a real user-visible fix — the Datasets list would otherwise show -1 as Item count — but a fresh OSS install never holds a sentinel row: Liquibase 000046 only seeds -1 for datasets that existed before versioning, and DatasetVersionItemsTotalMigrationJob backfills them ~30s after startup (DATASET_VERSION_ITEMS_TOTAL_MIGRATION_ENABLED defaults to true, lazy migration defaults to false). So it is not reachable on the estate as it stands, not untested-and-fine.

also touches Backend (Java API / internal)

Run

Advisory, from the QA test radar. Nothing here blocks this PR, and anything it proposes is a draft for review.

Re-checked after a push on 04 Sep 09:32 UTC.

@CometActions

Copy link
Copy Markdown
Collaborator

Test environment is now available!

To configure additional Environment variables for your environment, run [Deploy Opik AdHoc Environment workflow] (https://github.com/comet-ml/comet-deployment/actions/workflows/deploy_opik_adhoc_env.yaml)

Access Information

The deployment has completed successfully and the version has been verified.

@CometActions

Copy link
Copy Markdown
Collaborator

🌙 Nightly cleanup: The test environment for this PR (pr-8075) has been cleaned up to free cluster resources. PVCs are preserved — re-deploy to restore the environment.

@CometActions CometActions removed the test-environment Deploy Opik adhoc environment label Sep 1, 2026
@JetoPistola JetoPistola added the test-environment Deploy Opik adhoc environment label Sep 1, 2026
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

🔄 Test environment deployment process has started

Phase 1: Deploying base version 2.2.45-6495 (from main branch) if environment doesn't exist
Phase 2: Building new images from PR branch danield/OPIK-8175-skip-dataset-item-count-scan
Phase 3: Will deploy newly built version after build completes

You can monitor the progress here.

@CometActions

Copy link
Copy Markdown
Collaborator

Test environment is now available!

To configure additional Environment variables for your environment, run [Deploy Opik AdHoc Environment workflow] (https://github.com/comet-ml/comet-deployment/actions/workflows/deploy_opik_adhoc_env.yaml)

Access Information

The deployment has completed successfully and the version has been verified.

@amebaleon

Copy link
Copy Markdown

Minor PR-description cleanup I noticed while reviewing the current head:

DatasetServiceEnrichmentTest now contains 8 @test methods, while the description still says 7 cases / tests=7.
The description also still says “Performance only — no behavioural change.” Since the current head explicitly handles ITEMS_TOTAL_NOT_MIGRATED (-1) by falling back to the legacy item count, that wording seems a little too strong now.

I saw the sentinel case was already caught and addressed in the review thread, so this is mainly about keeping the PR description aligned with the final implementation.

@CometActions

Copy link
Copy Markdown
Collaborator

🌙 Nightly cleanup: The test environment for this PR (pr-8075) has been cleaned up to free cluster resources. PVCs are preserved — re-deploy to restore the environment.

@CometActions CometActions removed the test-environment Deploy Opik adhoc environment label Sep 2, 2026
@JetoPistola
JetoPistola marked this pull request as draft September 2, 2026 17:08
OPIK_8176 landed on main and parallelised the four enrichment queries into a
single Mono.zip, which requires the dataset_items count to be issued
unconditionally -- the query this branch removes. Resolution keeps both:

- The two version-independent ClickHouse lookups and the version lookup stay
  concurrent in the zip. The dataset_items count is chained off the version
  result via flatMap, so it is still narrowed to the fallback subset and still
  skipped entirely when that subset is empty.
- fetchDatasetItemSummaries now returns Mono<Map<...>> instead of blocking, so
  it composes inside the reactive chain rather than calling toStream().
- Adopted main's thread-safety discipline: workspaceId/userName resolved on the
  request thread, and getOrDefault instead of computeIfAbsent on shared maps.

Test files were an add/add conflict; both suites are kept. Main's concurrency
test now gates on the two version-independent lookups rather than three, since
the item count is deliberately no longer among them, and a new test pins that
the count is not issued until versions have resolved.
…solution

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Comment thread apps/opik-backend/src/main/java/com/comet/opik/domain/DatasetService.java Outdated
… alone

Chaining fetchDatasetItemSummaries off the whole Mono.zip made it wait on the
experiment and optimization summaries, which it has no dependency on: the zip
only emits once all three sources complete, so a fallback-heavy page serialized
a ClickHouse round trip that could have overlapped.

cache() the version lookup so one execution feeds both the zip and the count
chain, then zip the chain alongside the other two lookups. The count is issued
as soon as the versions resolve, and the narrowed id set is unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@JetoPistola

Copy link
Copy Markdown
Contributor Author

Thanks @amebaleon — both points were valid when you wrote them, and both are now resolved in the description.

  • Test count: the description was refreshed after the merge with main and now says 21 cases (tests=21), matching the suite. It grew past the 8 you saw because merging OPIK_8176 brought its own enrichment suite into the same file, so the two were unioned; the count then went 20 → 21 with a scheduling test added just now.
  • "Performance only — no behavioural change": agreed that was too strong once the -1 sentinel handling landed. That wording is gone. The Details section now carries an explicit bullet for the sentinel fallback and closes with the narrower claim that counts are otherwise unchanged, with the equivalence argument scoped to the version-vs-legacy selection rather than to the whole change.

Worth flagging one thing that landed after your review: the merge resolution had the fallback count chained off the whole Mono.zip, which made it wait on the experiment and optimization summaries it doesn't depend on. That's fixed in 1e4b884 and pinned by a test.

🤖 Reply posted via /address-github-pr-comments

The Mockito answer fires when findDatasetItemSummaryByDatasetIds is invoked,
not when the returned Flux is subscribed, so itemCountSubscribed overstated the
synchronization point. Rename to itemCountQueryIssued and spell out in the
comment that invocation -- the point the narrowed id set is handed over -- is
the property under test.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Backend Tests - Integration Group 1

 26 files  ± 0   26 suites  ±0   3m 36s ⏱️ - 8m 25s
437 tests ± 0  437 ✅ ± 0  0 💤 ±0  0 ❌ ±0 
364 runs   - 73  364 ✅  - 73  0 💤 ±0  0 ❌ ±0 

Results for commit e30a82b. ± Comparison against base commit 0b904ae.

♻️ This comment has been updated with latest results.

@JetoPistola
JetoPistola marked this pull request as ready for review September 3, 2026 14:03
andrescrz
andrescrz previously approved these changes Sep 4, 2026

@andrescrz andrescrz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No blockers.

…dination

Hand-rolled CountDownLatch waiting had to get the deadline and interrupt
handling right itself, and a missed expectation left a worker parked on a bare
await() -- the failure mode that turns into a hung CI job. Awaitility now owns
every wait in the non-blocking test: untilTrue for the assertion, and the same
for the gate holding the unrelated summaries, so awaitQuietly is gone.

A timeout now reports the named condition instead of a bare assertion failure.
Also import AtomicBoolean rather than spelling it fully qualified.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Backend Tests - Integration Group 14

 51 files  + 8   51 suites  +8   3m 25s ⏱️ -49s
349 tests +10  347 ✅ +10  2 💤 ±0  0 ❌ ±0 
339 runs  +10  337 ✅ +10  2 💤 ±0  0 ❌ ±0 

Results for commit 5528323. ± Comparison against base commit 0b904ae.

This pull request removes 31 and adds 41 tests. Note that renamed tests count towards both.
com.comet.opik.api.resources.v1.priv.DatasetsResourceCreateFromSpansTest ‑ createDatasetItemsFromSpans__success
com.comet.opik.api.resources.v1.priv.DatasetsResourceCreateFromSpansTest ‑ createDatasetItemsFromSpans__whenDatasetNotFound__thenReturn404
com.comet.opik.api.resources.v1.priv.DatasetsResourceCreateFromSpansTest ‑ createDatasetItemsFromSpans__whenSpanIdsAreEmpty__thenReturn422
com.comet.opik.api.resources.v1.priv.DatasetsResourceCreateFromSpansTest ‑ createDatasetItemsFromSpans__withAllEnrichmentOptionsButNoData__success
com.comet.opik.api.resources.v1.priv.DatasetsResourceCreateFromSpansTest ‑ createDatasetItemsFromSpans__withEvaluators(ExecutionPolicy, String)[1]
com.comet.opik.api.resources.v1.priv.DatasetsResourceCreateFromSpansTest ‑ createDatasetItemsFromSpans__withEvaluators(ExecutionPolicy, String)[2]
com.comet.opik.api.resources.v1.priv.DatasetsResourceCreateFromSpansTest ‑ createDatasetItemsFromSpans__withNoEnrichmentOptions__success
com.comet.opik.api.resources.v1.priv.PairingResourceRateLimitTest ‑ createSessionReturns429WhenLimitExceeded
com.comet.opik.db.TracesSchemaParityPreCutoverTest ‑ allowlistedColumnDriftingOnTracesIsCaught
com.comet.opik.db.TracesSchemaParityPreCutoverTest ‑ allowlistedColumnLeavingItsDocumentedTypeIsCaught
…
com.comet.opik.api.resources.v1.events.BaseRedisSubscriberTest$FailureTests ‑ shouldAckAndRemoveNonRetryableFailures(String, RuntimeException)[1]
com.comet.opik.api.resources.v1.events.BaseRedisSubscriberTest$FailureTests ‑ shouldAckAndRemoveNonRetryableFailures(String, RuntimeException)[2]
com.comet.opik.api.resources.v1.events.BaseRedisSubscriberTest$FailureTests ‑ shouldAckAndRemoveNonRetryableFailures(String, RuntimeException)[3]
com.comet.opik.api.resources.v1.events.BaseRedisSubscriberTest$FailureTests ‑ shouldAckAndRemoveNonRetryableFailures(String, RuntimeException)[4]
com.comet.opik.api.resources.v1.events.BaseRedisSubscriberTest$FailureTests ‑ shouldContinueProcessingAfterFailedMessages
com.comet.opik.api.resources.v1.events.BaseRedisSubscriberTest$FailureTests ‑ shouldRecoverFromNoGroupOnReadAndContinueProcessing
com.comet.opik.api.resources.v1.events.BaseRedisSubscriberTest$LifecycleTests ‑ shouldHandleExistingConsumerGroup
com.comet.opik.api.resources.v1.events.BaseRedisSubscriberTest$LifecycleTests ‑ shouldRemoveConsumerOnStop
com.comet.opik.api.resources.v1.events.BaseRedisSubscriberTest$RetryTests ‑ shouldAckAndRemoveAfterMaxRetries
com.comet.opik.api.resources.v1.events.BaseRedisSubscriberTest$RetryTests ‑ shouldHandleMixedSuccessRetryableAndNonRetryableMessagesInSameBatch
…

♻️ This comment has been updated with latest results.

@CometActions CometActions added the test-environment Deploy Opik adhoc environment label Sep 4, 2026
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

🔄 Test environment deployment process has started

Phase 1: Deploying base version 2.2.49-6519 (from main branch) if environment doesn't exist
Phase 2: Building new images from PR branch danield/OPIK-8175-skip-dataset-item-count-scan
Phase 3: Will deploy newly built version after build completes

You can monitor the progress here.

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

TS SDK E2E Tests - Node 18

317 tests  ±0   315 ✅ ±0   17m 44s ⏱️ - 3m 7s
 38 suites ±0     2 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 5528323. ± Comparison against base commit 0b904ae.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

TS SDK E2E Tests - Node 22

317 tests  ±0   315 ✅ ±0   16m 40s ⏱️ - 2m 44s
 38 suites ±0     2 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 5528323. ± Comparison against base commit 0b904ae.

♻️ This comment has been updated with latest results.

@CometActions

Copy link
Copy Markdown
Collaborator

Test environment is now available!

To configure additional Environment variables for your environment, run [Deploy Opik AdHoc Environment workflow] (https://github.com/comet-ml/comet-deployment/actions/workflows/deploy_opik_adhoc_env.yaml)

Access Information

The deployment has completed successfully and the version has been verified.

@CometActions

Copy link
Copy Markdown
Collaborator

Explored this PR on its own test environment.

Worked through all 5 items on the triage explore list. 5 work, 0 suspicious, 0 blocked. One deferred item stayed unreachable, as triage predicted.

Per-item results
# Item Verdict What I saw
1 Mixed page: SDK-seeded dataset + UI-created empty dataset (8075 · OPIK-8175) works One page holding a versioned dataset (v1, 5 items) and two version-less empty ones. Version-supplied and fallback rows both correct side by side
2 dataset_items_count across GET /datasets, GET /datasets/{id}, POST /datasets/retrieve works All three agree per dataset (5 / 0), and agree with GET /datasets/{id}/items total
3 Datasets list Item count column + empty dataset's items page works Column renders 5 and 0; empty dataset shows the "No records yet" empty state, not a zero-row table
4 UI add → commit → UI delete → commit; does the list count follow the new version? works v1=5 → v2=6 → v3=4, and the list Item count tracked 5 → 6 → 4. 6 items still exist in storage, so the legacy scan would have said 6 — the list said 4
5 TEST_SUITE-typed dataset on the Test suites list works Suite with 7 items reads 7, empty suite reads 0, both on one Test suites page
10-row alternating mixed page, page sizes 3 / 5 / 100 works Every row on every page correct; no page-boundary effect
ITEMS_TOTAL_NOT_MIGRATED (-1) sentinel fallback not reached Confirmed unreachable on this estate (see below)

2 flows look worth a permanent test:

  • datasets.list-datasets — Datasets list Item count follows the committed version, not the whole-dataset item scan
  • datasets.list-datasets — Item count is correct per row on a page mixing version-supplied and fallback datasets

Writing the spec now; a draft PR will follow.

Test env · Run

Advisory, from the QA test radar. Nothing here blocks this PR, and anything it proposes is a draft for review.

@JetoPistola
JetoPistola merged commit 9f7ba31 into main Sep 4, 2026
114 of 119 checks passed
@JetoPistola
JetoPistola deleted the danield/OPIK-8175-skip-dataset-item-count-scan branch September 4, 2026 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backend java Pull requests that update Java code 🟠 size/L test-environment Deploy Opik adhoc environment tests Including test files, or tests related like configuration.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants