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

Support force pushing to repositories using the Refspec format #1410

Open
Racer159 opened this issue Mar 2, 2023 · 4 comments · May be fixed by #3023
Open

Support force pushing to repositories using the Refspec format #1410

Racer159 opened this issue Mar 2, 2023 · 4 comments · May be fixed by #3023
Labels
enhancement ✨ New feature or request

Comments

@Racer159
Copy link
Contributor

Racer159 commented Mar 2, 2023

Is your feature request related to a problem? Please describe.

Now that Zarf supports git refspecs we should support the + prefix to allow force push behavior to be specified.

Describe the solution you'd like

Using the + syntax of git refspecs to enable force pushing of git repos in the airgap on Zarf deploy.

The changes should be primarily here: https://github.com/defenseunicorns/zarf/blob/git-kiss/src/internal/packager/git/push.go along with relevant docs: https://github.com/defenseunicorns/zarf/tree/git-kiss/examples/git-data and tests: https://github.com/defenseunicorns/zarf/blob/git-kiss/src/test/e2e/22_git_and_flux_test.go

Describe alternatives you've considered

We could use URI syntax to introduce something like ?force=true but this may be confusing for those familiar with git and may be misleading since that never is passed to an http server.

Additional context

This is a continuation of the work done in #1404

@corang
Copy link
Contributor

corang commented Mar 3, 2023

What's the plan on where force-pushing will be specified? I would argue against putting it in the zarf.yaml as I see this as more of a deploy-time issue. Some end user consuming a package might not know if a repo that's in the package had a force push done to it and if it did they then have to go back across the airgap, build a new package, and carry it across again. I'd prefer a prompt on fast-forward failure or an argument you can pass to zarf when deploying (maybe a zarf.toml thing?). At the very least I think that functionality could be in addition to be able to set it in the zarf.yaml at create time.

@corang
Copy link
Contributor

corang commented Sep 28, 2023

I'm gonna pick this up with the path of adding a deploy time flag that changes the git push strategy

@Jneville0815
Copy link

@corang is this still in the works?

@corang
Copy link
Contributor

corang commented Sep 5, 2024

Not by me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ✨ New feature or request
Projects
Status: Triage
Development

Successfully merging a pull request may close this issue.

3 participants