-
Notifications
You must be signed in to change notification settings - Fork 110
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
RSDK-8598 - Replace cache after sync #4343
Merged
Merged
Changes from 21 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
9bcade1
chages
cheukt a4b7971
Merge branch 'main' into replace-cache-later
cheukt 7d7b3b5
Merge branch 'main' into replace-cache-later
cheukt c75c474
some initial changes
cheukt e9a5d8e
pr comment
cheukt e984c89
comment
cheukt d8c478f
Merge branch 'main' into replace-cache-later
cheukt 63f812b
revert some changes
cheukt c4ff5de
remove unused lock
cheukt 3c3786f
lint
cheukt 995c925
lint
cheukt 7f87e29
fix tests
cheukt cf5a6d2
fix
cheukt c9aad45
add
cheukt 3b08396
make SetUnprocessedConfig public
cheukt 5892f14
fix tests
cheukt 9105fd2
add locks
cheukt 43f4756
marshal earlier
cheukt b022e92
move revision up
cheukt b219be0
pr comments
cheukt f61dfcb
update error
cheukt ebc3f8b
lint
cheukt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
[minor] this method is public to accommodate it's usage in
config/watcher_test.go
right? or are we planning to use it other packages as well? If the former, I suggest we make this method private and define a public version of it inconfig/export_test.go
. This seems to be a common pattern that the golang standard library uses to export test-only functions that are used across different packages and_test
modules.(This is a general pattern we can use around our code-base to if we like it)
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 being public here is fine -- even if for the sake of testing. Data tried playing games with keeping things private, but publishing selective things for testing and it became a huge mess.
I think if we want to be aggressive about making things private and paying a code complexity/readability cost elsewhere, we should start making tangible measurements for when a public method creates a problem .
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.
will leave as is for now
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.
What made it a mess? Was it unclear what methods were actually public vs public for testing only? If so, I think we can clarify that with some simple sign-posts like requiring any test-only method to take a
testing.TB
interface or something like that. But in any case I don't feel too strongly about this. Happy to leave as is.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.
No, worse. The indirection resulted in a bunch of interfaces. And finding out which method was getting called (in testing and* in production) was impossible without knowing how the magic worked.
If I wanted to pick a single file as the starting point, I'd say it's this file.
What is a DMService? What is a ManagerConstructor? Following the ManagerConstructor definition, what is a datasync.Manager? Is the
*datamanger.builtin.builtin
type adatamanager.internal.DMService
? Is it a DMService if testing is not enabled? Does that even matter?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.
woah, that file adds a test-only global? that's a bit confusing...