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

Automatic build in loop after rebase of a GIT branch #2110

Closed
jguilloux71 opened this issue Apr 15, 2016 · 3 comments
Closed

Automatic build in loop after rebase of a GIT branch #2110

jguilloux71 opened this issue Apr 15, 2016 · 3 comments
Milestone

Comments

@jguilloux71
Copy link

jguilloux71 commented Apr 15, 2016

Issue Type
  • Bug Report
Summary

This issue is appeared after an update from 15.2 to 16.3.0.

On a pipeline, with a GIT material, for a dedicated branch, if a rebase has been executed (git rebase -i other-branch) on this branch, then the Go server build one time on the new commit and then one time on the old commit (before rebase). And the server does that in loop!

It detects modifications for material but there is no modification!

Environment

Go Server is installed on a Debian Jessie, in version 16.3.0.
With the version 15.2, no issue.
Builds are triggered manually.

Basic environment details
  • Go Version: 16.3.0(3183-60d6fd31f00527da00f2affdd8f7f7732e7be103)
  • JVM version: 1.8.0_77
  • OS Information: Linux 3.2.0-4-amd64*
    Browser vendor and version (if relevant): all browser (IE, Chrome, Firefox, Safari)
@jguilloux71 jguilloux71 changed the title Automatic build on a old GIT commit (after rebase) Automatic build in loop after rebase of a GIT branch Apr 15, 2016
@jguilloux71
Copy link
Author

Up. Go CD is unavailable with this issue :-(

@zabil
Copy link
Contributor

zabil commented Apr 29, 2016

A git bisect tracked the problem to this commit (3981000)

@zabil
Copy link
Contributor

zabil commented Apr 29, 2016

This line
3981000#diff-97dd991971202dc0de417dbb4271aa82R101

Forms a wrong git log command
For e.g
Let's say you make a commit with the sha 1
Our database registers that as the latest commit executes the build and everything's good.
The git log to check for modification ends up as follows

git log origin/master 1..

Which return nothing.
However when you rebase you get a new sha 2 which executes the build.
Now when it checks for modifications it executes

git log origin/master 2..

which returns 1 and then the loop starts

Next time it does

git log origin/master 1..

which returns 2

The fix is to use the right log command i.e

git log 2..origin/master

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