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

What is the difference between the load and sync commands? #69

Open
gotjosh opened this issue Jul 10, 2020 · 2 comments
Open

What is the difference between the load and sync commands? #69

gotjosh opened this issue Jul 10, 2020 · 2 comments
Labels
question Further information is requested

Comments

@gotjosh
Copy link
Collaborator

gotjosh commented Jul 10, 2020

At the moment, it is unclear what is the exact difference between both commands. From a quick peek at the code it seems like load is more of a "only uploaded if the rule group does not exist under that namespace" while sync is more of a replace everything but tell me about it.

I'd be good to make clear how do we support each of the following use cases:

  • Create or update a namespace/group/rule only if it doesn't exist
  • Create or update a namespace/group/rule (regardless of its status)
  • Find the difference (at each of namespace/group/rules) between the input file and what already exists on the server. Then delete or create whatever is missing.
@jtlisi jtlisi added the question Further information is requested label Jul 10, 2020
@jtlisi
Copy link
Contributor

jtlisi commented Jul 10, 2020

Load is meant to create the rules provided if they don’t exist. Sync takes a set of rules files and ensures that the state of what is running in the ruler matches those files exactly

@coderalex
Copy link

This needs to be documented. Neither rules sync nor rules diff is mentioned in README.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants