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

Helm mirror command does not push changes #773

Open
thecooldrop opened this issue Jun 5, 2021 · 0 comments
Open

Helm mirror command does not push changes #773

thecooldrop opened this issue Jun 5, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@thecooldrop
Copy link
Contributor

Currently in the source code of gitops helm mirror command there seems to be inconsistent behavior near the end of function. Namely the inputs and comments indicate that git push should be executed, but this does not seem to be the case in the code.

In mirror.go following block of code is present after the repositories have been mirrored:

	changes, err := gitclient.AddAndCommitFiles(o.GitClient, gitDir, o.CommitMessage)
	if err != nil {
		return errors.Wrapf(err, "failed to add and commit files")
	}
	if !changes {
		log.Logger().Infof("no changes")
		return nil
	}
	if o.NoPush {
		return nil
	}
	err = gitclient.Pull(o.GitClient, gitDir)
	if err != nil {
		return errors.Wrapf(err, "failed to push changes")
	}

	log.Logger().Infof("pushed changes to %s in branch %s", info(o.GitURL), info(o.Branch))
	return nil

The comments indicate that there should be a push, but actually executed is git pull. This does not seem correct and should be fixed, since this command may be crucial for people looking to migrate the whole version stream into private repositories

@msvticket msvticket added the bug Something isn't working label Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants