-
Notifications
You must be signed in to change notification settings - Fork 15
REP-4790 Exclude all Mongosync internal DBs, including those used by the embedded verifier #19
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
Conversation
This is mostly for my own benefit, since this repo doesn't have any support for installing precious and other tools.
|
I ran the tests locally and they passed. This repo doesn't run PRs in CI :( |
mmcclimon
left a comment
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.
I think this is not quite right, and that we should a) add a test to confirm that it's not right (I suspect right now it's excluding the regex but not admin or something), and b) fix it. Thanks!
internal/verifier/list_namespaces.go
Outdated
| {"name", bson.D{{"$nin", excludedDBs}}}, | ||
| {"name", bson.D{{"$nin", []primitive.Regex{{Pattern: MongosyncMetaDBsPattern}}}}}, |
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.
This is surely wrong, isn't it? You can't provide the name key more than once. I think you want a single $nin []any slice with all of the excludedDBs and also the regex.
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.
It seemed to work, though I realized we weren't actually testing all the excludes. But even adding some more tests, it still seemed to work. But I fixed it anyway.
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.
Weird! I wonder if the driver does something weird here. Oh well, thanks all the same.
mmcclimon
left a comment
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.
LGTM, thanks!
This also includes some linting fixes and some tooling updates.