Skip to content

[293] Implement FlatPostgresCollection#upsertAndReturn#300

Open
suddendust wants to merge 2 commits intomainfrom
feat/293
Open

[293] Implement FlatPostgresCollection#upsertAndReturn#300
suddendust wants to merge 2 commits intomainfrom
feat/293

Conversation

@suddendust
Copy link
Copy Markdown
Contributor

@suddendust suddendust commented Apr 28, 2026

Description

This implements FlatPostgresCollection#upsertAndReturn

Testing

Added integration tests.

Documentation

The approach is similar to what we're doing today for PostgresCollection#upsertAndReturn.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

Codecov Report

❌ Patch coverage is 20.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.40%. Comparing base (4b29369) to head (22797f7).

Files with missing lines Patch % Lines
...documentstore/postgres/FlatPostgresCollection.java 20.00% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #300      +/-   ##
============================================
- Coverage     81.44%   81.40%   -0.05%     
  Complexity     1526     1526              
============================================
  Files           241      241              
  Lines          7380     7384       +4     
  Branches        714      715       +1     
============================================
  Hits           6011     6011              
- Misses          924      927       +3     
- Partials        445      446       +1     
Flag Coverage Δ
integration 81.40% <20.00%> (-0.05%) ⬇️
unit 55.80% <0.00%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 28, 2026

Test Results

  121 files  ±0    121 suites  ±0   39s ⏱️ ±0s
  817 tests +5    816 ✅ +5  1 💤 ±0  0 ❌ ±0 
1 154 runs  +5  1 153 ✅ +5  1 💤 ±0  0 ❌ ±0 

Results for commit 22797f7. ± Comparison against base commit 4b29369.

This pull request removes 1 and adds 6 tests. Note that renamed tests count towards both.
org.hypertrace.core.documentstore.FlatCollectionWriteTest$UpsertTests ‑ Should throw UnsupportedOperationException for upsertAndReturn
org.hypertrace.core.documentstore.FlatCollectionWriteTest$UpsertTests ‑ Should upsert existing document and return it
org.hypertrace.core.documentstore.FlatCollectionWriteTest$UpsertTests ‑ Should upsert new document and return it
org.hypertrace.core.documentstore.MongoPostgresWriteConsistencyTest$UpsertConsistencyTests ‑ Mongo: upsertAndReturn existing document
org.hypertrace.core.documentstore.MongoPostgresWriteConsistencyTest$UpsertConsistencyTests ‑ Mongo: upsertAndReturn new document
org.hypertrace.core.documentstore.MongoPostgresWriteConsistencyTest$UpsertConsistencyTests ‑ PostgresFlat: upsertAndReturn existing document
org.hypertrace.core.documentstore.MongoPostgresWriteConsistencyTest$UpsertConsistencyTests ‑ PostgresFlat: upsertAndReturn new document

♻️ This comment has been updated with latest results.

@suddendust suddendust changed the title Implement FlatPostgresCollection#upsertAndReturn [293] Implement FlatPostgresCollection#upsertAndReturn Apr 28, 2026
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.

2 participants