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

Fix bug when pushing into different branch #330

Merged
merged 1 commit into from
Mar 23, 2022

Conversation

pjbgf
Copy link
Member

@pjbgf pjbgf commented Mar 23, 2022

Changes replacing go-git with git2go introduced a bug in which pushes into new branches squashes all commits into one.

Relates to: #329

@pjbgf pjbgf marked this pull request as ready for review March 23, 2022 17:11
controllers/imageupdateautomation_controller.go Outdated Show resolved Hide resolved
controllers/imageupdateautomation_controller.go Outdated Show resolved Hide resolved
controllers/imageupdateautomation_controller.go Outdated Show resolved Hide resolved
controllers/imageupdateautomation_controller.go Outdated Show resolved Hide resolved
@hiddeco hiddeco added the bug Something isn't working label Mar 23, 2022
Copy link
Member

@hiddeco hiddeco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @pjbgf 🙇

Changes replacing go-git with git2go introduced a bug
in which pushes into new branches squashes all commits
into one.

xref: fluxcd#324
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
@pjbgf pjbgf changed the title Fix bug when pushing into different branches Fix bug when pushing into different branch Mar 23, 2022
@hiddeco hiddeco merged commit 383b8b5 into fluxcd:main Mar 23, 2022
@pjbgf pjbgf deleted the fix-bug-push-branch branch March 23, 2022 19:40
@pjbgf pjbgf added this to the GA milestone Apr 22, 2022
pjbgf pushed a commit to pjbgf/image-automation-controller that referenced this pull request May 27, 2022
Fixes regression in which IAC will fail to update push branch
when the push branch already exists and checkout branch is
ahead.

The reconciliation errors with: 'cannot push because a reference
that you are trying to update on the remote contains commits
that are not present locally.'

Regression introduced on fluxcd#330.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
stefanprodan pushed a commit to pjbgf/image-automation-controller that referenced this pull request Jun 1, 2022
Fixes regression in which IAC will fail to update push branch
when the push branch already exists and checkout branch is
ahead.

The reconciliation errors with: 'cannot push because a reference
that you are trying to update on the remote contains commits
that are not present locally.'

Regression introduced on fluxcd#330.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
stefanprodan pushed a commit to pjbgf/image-automation-controller that referenced this pull request Jun 1, 2022
Fixes regression in which IAC will fail to update push branch
when the push branch already exists and checkout branch is
ahead.

The reconciliation errors with: 'cannot push because a reference
that you are trying to update on the remote contains commits
that are not present locally.'

Regression introduced on fluxcd#330.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
stefanprodan pushed a commit to pjbgf/image-automation-controller that referenced this pull request Jun 1, 2022
Fixes regression in which IAC will fail to update push branch
when the push branch already exists and checkout branch is
ahead.

The reconciliation errors with: 'cannot push because a reference
that you are trying to update on the remote contains commits
that are not present locally.'

Regression introduced on fluxcd#330.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
aryan9600 pushed a commit to aryan9600/image-automation-controller that referenced this pull request Jun 2, 2022
Fixes regression in which we fail to push to a branch after switching to
a branch, if origin is ahead of local. Fixed by setting the upstream
commit as the local branch target.

Regression introduced in fluxcd#330, and partially addressed in fluxcd#369.

Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
aryan9600 pushed a commit to aryan9600/image-automation-controller that referenced this pull request Jun 2, 2022
Fixes regression in which we fail to push to a branch after switching to
a branch, if origin is ahead of local. Fixed by setting the upstream
commit as the local branch target.

Regression introduced in fluxcd#330, and partially addressed in fluxcd#369.

Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
aryan9600 pushed a commit to aryan9600/image-automation-controller that referenced this pull request Jun 2, 2022
Fixes regression in which we fail to push to a branch after switching to
a branch, if origin is ahead of local. Fixed by setting the upstream
commit as the local branch target.

Regression introduced in fluxcd#330, and partially addressed in fluxcd#369.

Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
aryan9600 pushed a commit to aryan9600/image-automation-controller that referenced this pull request Jun 2, 2022
Fixes regression in which we fail to push to a branch after switching to
a branch, if origin is ahead of local. Fixed by setting the upstream
commit as the local branch target.

Regression introduced in fluxcd#330, and partially addressed in fluxcd#369.

Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
aryan9600 pushed a commit to aryan9600/image-automation-controller that referenced this pull request Jun 2, 2022
Fixes regression in which we fail to push to a branch after switching to
a branch, if origin is ahead of local. Fixed by setting the upstream
commit as the local branch target.

Regression introduced in fluxcd#330, and partially addressed in fluxcd#369.

Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
souleb pushed a commit to souleb/image-automation-controller that referenced this pull request Mar 12, 2024
Fixes regression in which IAC will fail to update push branch
when the push branch already exists and checkout branch is
ahead.

The reconciliation errors with: 'cannot push because a reference
that you are trying to update on the remote contains commits
that are not present locally.'

Regression introduced on fluxcd#330.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
souleb pushed a commit to souleb/image-automation-controller that referenced this pull request Mar 12, 2024
Fixes regression in which we fail to push to a branch after switching to
a branch, if origin is ahead of local. Fixed by setting the upstream
commit as the local branch target.

Regression introduced in fluxcd#330, and partially addressed in fluxcd#369.

Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
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
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants