-
Notifications
You must be signed in to change notification settings - Fork 278
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
Change CheckSyncedGitCommits
to IsGitCommitSynced
#2561
Change CheckSyncedGitCommits
to IsGitCommitSynced
#2561
Conversation
We never passed more than one hash in.
return true, nil | ||
} | ||
} | ||
// not in the cache, request BSR check | ||
syncedModuleCommits, err := s.handler.CheckSyncedGitCommits(ctx, moduleIdentity, map[string]struct{}{commitHash: {}}) |
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.
We only ever passed in one hash.
} | ||
return syncedHashes, nil | ||
return len(res.Msg.Labels) == 1, nil |
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.
May be make sure that the returned label is actually the one requested?
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 thought about this, but this is going away soon anyway, to be replaced by GetReferenceByName{ Ref: git.Hash() }
, so I didn't bother.
// IsGitCommitSynced is invoked when syncing branches to know if a Git commit is already synced. | ||
// If an error is returned, sync will abort. | ||
IsGitCommitSynced( |
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.
Yeah I remember when doing this I was imagining paging many git hashes in a single request, but with multi module directories that became increasingly difficult and right now we just do it one by one. I'm good with this change!
This reverts commit d6484f2.
We never passed more than one hash in.