Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Treat explicitly set nil values like omitted values #3101

Merged
merged 4 commits into from
Oct 4, 2024

Conversation

AndrewSisley
Copy link
Contributor

Relevant issue(s)

Resolves #3100

Description

Treat explicitly set nil values like omitted values.

There were a couple of bugs here, I suggest reviewing commit by commit as the old behaviour was documented before being corrected.

Note: This is not desirable :)
These are two different bugs, but they are similar and small, so I am being lazy and sorting them out at the same time.
Field values should not behave differently depending on whether they were ommited from the initial create call.
@AndrewSisley AndrewSisley added bug Something isn't working area/collections Related to the collections system labels Oct 4, 2024
@AndrewSisley AndrewSisley added this to the DefraDB v0.14 milestone Oct 4, 2024
@AndrewSisley AndrewSisley requested a review from a team October 4, 2024 15:11
@AndrewSisley AndrewSisley self-assigned this Oct 4, 2024
Copy link

codecov bot commented Oct 4, 2024

Codecov Report

Attention: Patch coverage is 62.50000% with 9 lines in your changes missing coverage. Please review.

Project coverage is 79.73%. Comparing base (4e5470c) to head (e209fa6).

Files with missing lines Patch % Lines
client/document.go 64.29% 3 Missing and 2 partials ⚠️
internal/core/crdt/lwwreg.go 50.00% 2 Missing and 2 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #3101      +/-   ##
===========================================
- Coverage    79.81%   79.73%   -0.08%     
===========================================
  Files          351      351              
  Lines        27335    27351      +16     
===========================================
- Hits         21816    21808       -8     
- Misses        3982     3998      +16     
- Partials      1537     1545       +8     
Flag Coverage Δ
all-tests 79.73% <62.50%> (-0.08%) ⬇️

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

Files with missing lines Coverage Δ
internal/db/collection.go 74.12% <100.00%> (+0.50%) ⬆️
internal/core/crdt/lwwreg.go 76.27% <50.00%> (-1.51%) ⬇️
client/document.go 70.12% <64.29%> (-0.27%) ⬇️

... and 11 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4e5470c...e209fa6. Read the comment docs.

Copy link
Member

@nasdf nasdf left a comment

Choose a reason for hiding this comment

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

LGTM

@AndrewSisley AndrewSisley merged commit 01030fd into sourcenetwork:develop Oct 4, 2024
43 of 44 checks passed
@AndrewSisley AndrewSisley deleted the 3100-implicit-nil branch October 4, 2024 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/collections Related to the collections system bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setting relation fields to nil breaks one-one creation
2 participants