-
Notifications
You must be signed in to change notification settings - Fork 123
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
Don't skip repos for remotes table with more than 1 URL #789
Conversation
remotes_test.go
Outdated
@@ -151,5 +151,5 @@ func TestRemotesIndexIterClosed(t *testing.T) { | |||
} | |||
|
|||
func TestRemotesIterClosed(t *testing.T) { | |||
testTableIterClosed(t, new(remotesTable)) | |||
testTableIndexIterRows(t, new(remotesTable), 11) |
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.
Actually here I should compare results with non index iterator!
Signed-off-by: kuba-- <kuba@sourced.tech>
@src-d/data-processing could you review my PR changes, again. I've added some fixes not only for index iterator (but also for |
remotes.go
Outdated
@@ -177,13 +174,23 @@ func (i *remotesRowIter) Close() error { | |||
} | |||
|
|||
func remoteToRow(repoID string, config *config.RemoteConfig, pos int) sql.Row { | |||
url := "" |
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.
If no URL, it should be nil
, right?
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.
hmm, URLs are strings
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.
yep, I meant at SQL table level. If there is no value, we should return NULL instead of empty string.
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.
OK, done.
Signed-off-by: kuba-- <kuba@sourced.tech>
Signed-off-by: kuba-- <kuba@sourced.tech>
Signed-off-by: kuba-- kuba@sourced.tech
Fixes #788
For remotes with more than 1 URL,
remotesIndexKeyValueIter
skip repos.