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(i): SetReplicator and DeleteReplicator params #3175

Merged
merged 3 commits into from
Oct 23, 2024

Conversation

nasdf
Copy link
Member

@nasdf nasdf commented Oct 23, 2024

Relevant issue(s)

Resolves #3159

Description

This PR fixes an issue where replicator params that are not modifiable were exposed to the client API.

Tasks

  • I made sure the code is well commented, particularly hard-to-understand areas.
  • I made sure the repository-held documentation is changed accordingly.
  • I made sure the pull request title adheres to the conventional commit style (the subset used in the project can be found in tools/configs/chglog/config.yml).
  • I made sure to discuss its limitations such as threats to validity, vulnerability to mistake and misuse, robustness to invalidation of assumptions, resource requirements, ...

How has this been tested?

Existing integration tests.

Specify the platform(s) on which this was tested:

  • (modify the list accordingly)
  • MacOS

@nasdf nasdf added the bug Something isn't working label Oct 23, 2024
@nasdf nasdf added this to the DefraDB v0.15 milestone Oct 23, 2024
@nasdf nasdf self-assigned this Oct 23, 2024
Copy link

codecov bot commented Oct 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.04%. Comparing base (b268c0b) to head (fa9cbb8).
Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #3175      +/-   ##
===========================================
+ Coverage    77.98%   78.04%   +0.05%     
===========================================
  Files          354      354              
  Lines        34669    34672       +3     
===========================================
+ Hits         27036    27057      +21     
+ Misses        6003     5991      -12     
+ Partials      1630     1624       -6     
Flag Coverage Δ
all-tests 78.04% <100.00%> (+0.05%) ⬆️

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

Files with missing lines Coverage Δ
cli/p2p_replicator_delete.go 88.89% <100.00%> (ø)
cli/p2p_replicator_set.go 88.89% <100.00%> (ø)
http/client_p2p.go 52.27% <100.00%> (ø)
http/handler_p2p.go 73.58% <100.00%> (+0.38%) ⬆️
http/openapi.go 97.52% <ø> (ø)
internal/db/p2p_replicator.go 60.95% <100.00%> (ø)

... and 10 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 b268c0b...fa9cbb8. Read the comment docs.

@nasdf nasdf requested a review from a team October 23, 2024 19:13
// Collections is the list of collection names to replicate.
Collections []string
}

// Replicator is a peer that a set of local collections are replicated to.
type Replicator struct {
Info peer.AddrInfo
Copy link
Collaborator

Choose a reason for hiding this comment

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

thought: Might as well change the Schema to Collection to match ReplicatorParams

Copy link
Member Author

@nasdf nasdf Oct 23, 2024

Choose a reason for hiding this comment

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

The Schemas field contains schema roots though not collections.

Copy link
Collaborator

Choose a reason for hiding this comment

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

True. Disregard my thought then. 👍

Copy link
Collaborator

@fredcarle fredcarle left a comment

Choose a reason for hiding this comment

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

LGTM. Just one thougth.

Copy link
Member

@shahzadlone shahzadlone left a comment

Choose a reason for hiding this comment

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

LGTM

@nasdf nasdf merged commit c1fcde0 into sourcenetwork:develop Oct 23, 2024
42 of 43 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.

client.Replicator Status and LastStatusChange appear to be setable but are not
3 participants