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

bug: repo branch is changed permanently when an addon does git checkout #26

Open
HarikrishnanBalagopal opened this issue Jan 5, 2023 · 2 comments

Comments

@HarikrishnanBalagopal
Copy link

HarikrishnanBalagopal commented Jan 5, 2023

Bug

When an addon runs on an app, fetches the repo for that app and changes the git branch to a different one, that change is permanent. Future addon runs will use that new branch. Even the Tackle UI shows the new branch instead of the one the user specified.

Steps to reproduce

  1. Create an application in the Tackle 2 Hub with a repo url and a branch main.
  2. Run an addon that fetches the repo and checkouts a different branch or creates a new branch.
  3. Once the addon is finished, go back to the Tackle 2 Hub UI and look at the application. The branch will have changed.

Context

Currently working around this issue in Move2Kube addon by detecting the current branch before checking out a new branch
https://github.com/konveyor/addon-move2kube/blob/main/cmd/utils.go#L114-L126
and then checking out the original branch once the transformation is finished.
https://github.com/konveyor/addon-move2kube/blob/main/cmd/utils.go#L148-L151

@HarikrishnanBalagopal HarikrishnanBalagopal changed the title bug: repo branch is permanently changed when an addon does git checkout bug: repo branch is changed permanently when an addon does git checkout Jan 5, 2023
@djzager
Copy link
Member

djzager commented Jan 6, 2023

cc @jortel

@djzager
Copy link
Member

djzager commented Jan 10, 2023

@HarikrishnanBalagopal I figured running what I had over here would demonstrate the behavior that you were describing, but I didn't see that.

TACKLE HUB UI
image

GitHub UI looking at my tackle-pathfinder fork
image

Did I miss something?

@jortel jortel transferred this issue from konveyor/tackle2-hub Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants