Skip to content

fix(tests): scope test_upsert_replaces_record's filter to the record's own id - #2779

Draft
andersfylling wants to merge 2 commits into
masterfrom
fix/records-upsert-test-scope
Draft

fix(tests): scope test_upsert_replaces_record's filter to the record's own id#2779
andersfylling wants to merge 2 commits into
masterfrom
fix/records-upsert-test-scope

Conversation

@andersfylling

@andersfylling andersfylling commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Given we run the test suite in parallel, we need to scope the relevant records to the current test implementation. Otherwise our expects records may not be part of the final result set.

…s own id

The filter matched only on value=99.0, a literal shared by every concurrent
CI run (10-way OS/Python matrix against the same project). Two runs
upserting around the same time would see each other's records and fail
the single-match assertion. Filtering by the record's own space/externalId
(which embeds a per-test uuid) avoids the collision; the value check moves
to asserting on the returned record's properties instead.

Also removes the temporary skip added for this test, since it addresses
the likely root cause.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Aug 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.04%. Comparing base (6e3837d) to head (a6f9c5e).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2779      +/-   ##
==========================================
- Coverage   93.06%   93.04%   -0.02%     
==========================================
  Files         514      514              
  Lines       52988    52990       +2     
==========================================
- Hits        49311    49305       -6     
- Misses       3677     3685       +8     
Files with missing lines Coverage Δ
...ration/test_api/test_data_modeling/test_records.py 98.13% <100.00%> (+6.70%) ⬆️

... and 7 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@andersfylling
andersfylling marked this pull request as ready for review August 21, 2026 11:54
@andersfylling
andersfylling requested review from a team as code owners August 21, 2026 11:54

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request re-enables the test_upsert_replaces_record integration test by removing the temporary skip decorator. Additionally, it refactors the query filter within the test to use an And filter matching on space and externalId instead of an Equals filter, and adds assertions to verify the correctness of the returned record's properties. There are no review comments, and I have no further feedback to provide.

@andersfylling
andersfylling marked this pull request as draft August 21, 2026 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant