Skip to content

[293] Implement FlatPostgresCollection#upsertAndReturn#300

Merged
suddendust merged 4 commits intomainfrom
feat/293
May 4, 2026
Merged

[293] Implement FlatPostgresCollection#upsertAndReturn#300
suddendust merged 4 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.73%. Comparing base (11223f7) to head (6e7eb4a).
⚠️ Report is 1 commits behind head on main.

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.77%   81.73%   -0.05%     
  Complexity     1532     1532              
============================================
  Files           241      241              
  Lines          7409     7413       +4     
  Branches        716      717       +1     
============================================
  Hits           6059     6059              
- Misses          905      908       +3     
- Partials        445      446       +1     
Flag Coverage Δ
integration 81.73% <20.00%> (-0.05%) ⬇️
unit 55.79% <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

  122 files  ±0    122 suites  ±0   38s ⏱️ +2s
  829 tests +5    828 ✅ +5  1 💤 ±0  0 ❌ ±0 
1 166 runs  +5  1 165 ✅ +5  1 💤 ±0  0 ❌ ±0 

Results for commit 6e7eb4a. ± Comparison against base commit 11223f7.

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
@suddendust suddendust merged commit daf5ccb into main May 4, 2026
5 of 7 checks passed
@suddendust suddendust deleted the feat/293 branch May 4, 2026 11:13
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