Skip to content
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

x/build/cmd/gitmirror: doesn't start mirroring empty repositories (until restart) #39597

dmitshur opened this issue Jun 15, 2020 · 1 comment


Copy link

@dmitshur dmitshur commented Jun 15, 2020

gitmirror starts a goroutine for each repository it needs to mirror at startup:

gerritRepos, err := gerritMetaMap()
if err != nil {
	return fmt.Errorf("gerritMetaMap: %v", err)
for name := range gerritRepos {
	go startRepo(name)

(Source: gitmirror.go#L157-L163.)

The way it's done now makes it so that an empty repository doesn't get included, because it has no branches, and gerritMetaMap skips it. So the go startRepo(name) goroutine is never started.

As a consequence, it becomes necessary to restart gitmirror to get it to start mirroring an empty repository after there is initial content pushed to it.

Filing for tracking purposes.

/cc @andybons @cagedmantis @toothrot @julieqiu

@dmitshur dmitshur added this to the Backlog milestone Jun 15, 2020
Copy link

@gopherbot gopherbot commented Jun 7, 2021

Change mentions this issue: cmd/gitmirror: test that an empty repository can be mirrored

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants