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: Updating of document via cli #3474

Merged

Conversation

islamaliev
Copy link
Contributor

Relevant issue(s)

Resolves #3470

Description

Make client collection update always expect --updater parameter.
Change filter expectation from { "_gte": { "points": 100 } } to '{ "points": { "_gte": 100 } }
Make db expect filter param as map[string]any.

@islamaliev islamaliev added the bug Something isn't working label Feb 20, 2025
@islamaliev islamaliev requested a review from nasdf February 20, 2025 16:10
@islamaliev islamaliev self-assigned this Feb 20, 2025
Copy link

codecov bot commented Feb 20, 2025

Codecov Report

Attention: Patch coverage is 50.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 78.40%. Comparing base (816e550) to head (218c7b5).
Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
cli/collection_update.go 50.00% 2 Missing and 2 partials ⚠️
cli/errors.go 0.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #3474      +/-   ##
===========================================
+ Coverage    78.31%   78.40%   +0.09%     
===========================================
  Files          397      397              
  Lines        37571    37574       +3     
===========================================
+ Hits         29423    29459      +36     
+ Misses        6439     6416      -23     
+ Partials      1709     1699      -10     
Flag Coverage Δ
all-tests 78.40% <50.00%> (+0.09%) ⬆️

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

Files with missing lines Coverage Δ
internal/db/collection_update.go 75.19% <100.00%> (+0.39%) ⬆️
cli/errors.go 8.33% <0.00%> (-0.76%) ⬇️
cli/collection_update.go 66.10% <50.00%> (-5.56%) ⬇️

... and 13 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 816e550...218c7b5. Read the comment docs.

@islamaliev islamaliev force-pushed the fix/update-document-cli-command branch from 8e5665f to 54c679e Compare February 20, 2025 22:24
@islamaliev islamaliev requested a review from a team February 20, 2025 22:25
Copy link
Contributor

@AndrewSisley AndrewSisley left a comment

Choose a reason for hiding this comment

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

LGTM, thanks Islam!

SupportedClientTypes: immutable.Some(
[]testUtils.ClientType{testUtils.HTTPClientType, testUtils.CLIClientType}),
Actions: []any{
testUtils.UpdateWithFilter{
Copy link
Contributor

Choose a reason for hiding this comment

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

praise: I forgot we had this, thanks for using it and not doing whatever I suggested in the standup 😁 Thanks for the comment too, it explains it nicely.

@islamaliev islamaliev merged commit 2dd5537 into sourcenetwork:develop Feb 21, 2025
42 of 44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Updating a document via cli command doesn't work
2 participants