-
Notifications
You must be signed in to change notification settings - Fork 324
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
add precommit #3660
add precommit #3660
Conversation
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Codecov Report
@@ Coverage Diff @@
## master #3660 +/- ##
==========================================
- Coverage 74.95% 74.63% -0.33%
==========================================
Files 269 266 -3
Lines 23819 23782 -37
==========================================
- Hits 17854 17750 -104
- Misses 5039 5104 +65
- Partials 926 928 +2
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
return clone | ||
} | ||
|
||
func (cb *candBase) Commit(change *candChange) (int, error) { |
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.
all funcs of candBase
are private now, let's use commit()
to be consistent?
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.
do not understand why a private struct needs to have private functions
@@ -435,7 +439,27 @@ func (cb *candBase) all() CandidateList { | |||
return list | |||
} | |||
|
|||
func (cb *candBase) commit(change *candChange) (int, error) { | |||
func (cb *candBase) Clone() *candBase { |
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.
same here, use clone
if err := ws.store.Commit(); err != nil { | ||
return err | ||
} | ||
if err := protocolCommit(ctx, ws); err != nil { | ||
// TODO (zhi): wrap the error and eventually panic it in caller side |
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.
could you pls file an issue? can be fixed in next hard-fork
this code has been integrated into (#3661), so close it |
Add an interface PreCommitter. Protocols which are PreCommitter will be called before a workingset commit.
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Test Configuration:
Checklist: