-
Notifications
You must be signed in to change notification settings - Fork 51
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: Only update updated fields via update requests #1817
fix: Only update updated fields via update requests #1817
Conversation
Can you please add an integration test that shows that this will result in the expected DAG state. |
We have them, in the branch linked in the PR description. |
When I click on it I see no new tests. Nonetheless, we should test the changes that we make in the same PR as much as possible. Otherwise reviewers have to manually test the changed behaviour. |
It doesnt add any new tests. It allows all our existing tests to test this for us.
That depends on how much reviewers trust the author to make a one line change, with the existing test gap provably closed in another branch. |
The one line change doesn't obviously demonstrate the behaviour change. If I can't easily see what is happening in the code change, I have to have another way to confirm that the behaviour is as expected. In this case I had to manually run the queries. |
So read the description of the change in the PR header, or read the wip branch linked in it if you have too little faith in the author to trust the description. |
Codecov ReportPatch coverage:
@@ Coverage Diff @@
## develop #1817 +/- ##
===========================================
- Coverage 75.79% 75.76% -0.03%
===========================================
Files 209 209
Lines 22263 22268 +5
===========================================
- Hits 16874 16871 -3
- Misses 4225 4231 +6
- Partials 1164 1166 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 3 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Next time please consider adding the tests with the PR.
We actually don't really have them. I understand the benefit/goals of the linked branch running all mutations via both collection and GQL APIs, which I think is a nice and efficient way to ensure parity between the two APIs. However, the linked branch doesn't add any tests that further gurantee the behavior of the original issue. It relies on the existing set of tests and runs those tests with the GQL mutation API. Unfortuently, the original tests only contain a single small test to check the issue, and its not even necessarily the core focus of the test ( Based on how you've split the work, im very much OK to have the tests in the followup PR, but the tests in that branch need to be expanded to further cement coverage of the issue. cc: @fredcarle |
I believe you are mistaken here. 5 of our existing tests failed because of this bug, it is not just visible via links, but the field level commits. |
## Relevant issue(s) Resolves sourcenetwork#1811 ## Description Only updates updated fields via update requests by returning a clean document from Decode.
Relevant issue(s)
Resolves #1811
Description
Only updates updated fields via update requests by returning a clean document from Decode.
How has this been tested?
I have tested this via #1816 (https://github.com/sourcenetwork/defradb/compare/develop...AndrewSisley:1816-mutation-equivilency?expand=1) however this is a very simple and quite important fix deserving of its own commit/change-log entry in develop, and the test changes are complex and may bog down the merging of the fix.