-
Notifications
You must be signed in to change notification settings - Fork 567
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
[PFS 227] nil out entire branch #9944
Merged
Merged
Changes from all commits
Commits
Show all changes
64 commits
Select commit
Hold shift + click to select a range
2e8772f
fix branch name can be nil
Zhang-Muyang c54dc18
Add interface and implement
Zhang-Muyang 291a0d3
Add error stack
Zhang-Muyang ad28dd6
ignore branch name for tests
Zhang-Muyang 9ddfd6b
solve import cycle
Zhang-Muyang d0e4fd9
check not nil before niling out branch
Zhang-Muyang 7448e66
add bazel file
Zhang-Muyang 489adfb
fix python tests
Zhang-Muyang 4753361
fix testBatchTransaction
Zhang-Muyang 9145524
fix s3 test
Zhang-Muyang 6954fad
fix test. remove if clause
Zhang-Muyang 580d758
fix parent commit name
Zhang-Muyang 7e61828
ignoring branch name in server test
Zhang-Muyang 7c9e165
add bazel
Zhang-Muyang 0b86897
typo
Zhang-Muyang d39d104
remove debug code
Zhang-Muyang 82f5ca6
fix rpc. But why??
Zhang-Muyang 87cbe26
fix testMountCommit
Zhang-Muyang 6c51bfe
add comment, remove comment
Zhang-Muyang f7e02f1
clean debugging code; Add comment
Zhang-Muyang 363bf6d
fix test
Zhang-Muyang 9aa1b9d
resolve review suggestion: optimize code
Zhang-Muyang a09d4a4
remove extra line
Zhang-Muyang 3dd8c2d
change interface and impl
Zhang-Muyang 983bdc3
fix test
Zhang-Muyang 65ed583
fix stream and unary
Zhang-Muyang 1e94c1d
fix simple tests
Zhang-Muyang e251043
fix simple tests
Zhang-Muyang 1fb58c5
fix simple tests
Zhang-Muyang 586c56f
fix simple tests
Zhang-Muyang 83ba0d0
fix simple tests
Zhang-Muyang 8eab411
fix simple tests and renaming
Zhang-Muyang ea8bec0
fix simple tests
Zhang-Muyang 5a70c6b
fix simple tests
Zhang-Muyang b542307
fix simple tests
Zhang-Muyang 6c707c7
fix remaining simple tests in server_test
Zhang-Muyang bf6a421
fix simple tests
Zhang-Muyang be107d7
fix testPutFileBranchCommitId
Zhang-Muyang 9210ae4
fix a simple test
Zhang-Muyang 7d625c6
fix pretty-print
Zhang-Muyang ca4a7be
fix python tests
Zhang-Muyang 453b269
fix simple integration tests
Zhang-Muyang 3026fb6
delete all the remaining branch.
Zhang-Muyang 03a30e4
fix simple integration tests
Zhang-Muyang bc9ba2c
nil out branch in commitSetInfo
Zhang-Muyang 36b5e43
revert changes in TestBucketNameToCommit
Zhang-Muyang 8589f21
tentative changes
Zhang-Muyang dfcdc74
tentative change in pretty.go
Zhang-Muyang 3369102
This need to be reverted: set debug level in ci
Zhang-Muyang 3055012
fix testMountCommit
Zhang-Muyang d233a6b
fix cmd tests
Zhang-Muyang 797616f
tentative change in golang template
Zhang-Muyang 33afe3d
branch fix in validate
Zhang-Muyang d8527e1
fix a s3 test
Zhang-Muyang 702d4fd
fix s3 test
Zhang-Muyang 404bc73
Need to revert : debug info printed out ci
Zhang-Muyang 57ae9c6
fix symlink test
Zhang-Muyang 2448dba
Might need to revert: test python workaround
Zhang-Muyang 3a345fa
attempt to fix python test
Zhang-Muyang 4fd7e72
revert changes in pachyderm test
Zhang-Muyang d968ea0
fix typo in python test
Zhang-Muyang 951a8c2
add FindCommitsResponse
Zhang-Muyang ac7f129
revert debug context
Zhang-Muyang 766c55e
add bazel file
Zhang-Muyang File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,18 @@ import ( | |
"google.golang.org/protobuf/testing/protocmp" | ||
) | ||
|
||
func TestCommit_NilBranch(t *testing.T) { | ||
var b1 = &Branch{Name: "dummy"} | ||
var c1 = &Commit{Branch: b1} | ||
c1.NilBranch() | ||
require.Nil(t, c1.Branch) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A better test would |
||
|
||
var b2 = &Branch{Name: ""} | ||
var c2 = &Commit{Branch: b2} | ||
c2.NilBranch() | ||
require.Nil(t, c2.Branch) | ||
} | ||
|
||
func TestProject_ValidateName(t *testing.T) { | ||
var p = &Project{Name: "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"} | ||
err := p.ValidateName() | ||
|
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.
It would be nice if a non-nil branch logged at level dpanic instead. This would make tests that return non-nil branches fail, and we could fix everything at the source.
It would also be nice if we called ValidateAll on the way out, and implemented the nil branch requirement through validation rules. (Validation failure on output should just be a log.DPanic.)