Bug 1413749 - Openshift Developer Preview doesn't clone the latest commit from Github repo [NEEDINFO]
Summary: Openshift Developer Preview doesn't clone the latest commit from Github repo
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: OKD
Classification: Red Hat
Component: Build
Version: 3.x
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Corey Daley
QA Contact: Wang Haoran
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-16 21:15 UTC by Filip Klimeš
Modified: 2020-07-16 12:15 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-25 06:00:49 UTC
Target Upstream Version:
bparees: needinfo? (klimesf)
bparees: needinfo? (neil.price)


Attachments (Terms of Use)

Description Filip Klimeš 2017-01-16 21:15:25 UTC
Description of problem: Openshift Developer Preview doesn't clone the latest commit from Github repo.


Version-Release number of selected component (if applicable): N/A, Wildfly 10.1 container


Additional info: When you repeatedly manually run build in Openshift console, it sometimes stucks on a commit and doesn't clone the latest commit from Github repo.

Comment 1 Ben Parees 2017-01-17 16:04:30 UTC
Can you please provide more details?  Does it happen every time? Or intermittently?

1) steps to recreate

2) oc get builds -o yaml  so we can see the yaml from each build

3) oc get bc -o yaml so we can see your buildconfig definition

Unless you've explicitly setup your buildconfig to clone a particular commit, it always clones from master.

Comment 2 Ben Parees 2017-01-20 15:59:17 UTC
Corey, please see if you can recreate this.  If not, let's close it since we haven't gotten more information from the originator.

Comment 3 Filip Klimeš 2017-01-20 16:26:05 UTC
I'm sorry I haven't responded earlier.

I'm not quite sure how to recreate this.

Because I couldn't find solution, I have already deleted the project and created a new one, which worked fine for a while, until it got stuck again, so I deleted and created new again.

It happened on this project https://github.com/dejvidecz/j2ee.

Comment 4 Corey Daley 2017-01-20 17:14:49 UTC
Can you please verify if this is the issue that you are experiencing?

1.)  Create new application using git repo
2.)  Make a new commit to the git repo (on the master branch)
3.)  Trigger a new build (multiple times)
4.)  OpenShift clones an older commit instead of the newest one

If this is not the case, could you please provide more details about the procedure that you are following that is having an issue?

Comment 5 Filip Klimeš 2017-01-20 17:51:55 UTC
Yes, exactly this issue.

Comment 6 Corey Daley 2017-01-20 18:45:30 UTC
I am unable to replicate this issue.  Are there any other logs or screenshots showing that it is building the incorrect git ref?

Also, dev preview is running very slowly for me, is it possible that you are looking at an old(er) set of logs or build config because the new one hasn't started yet?

How are you verifying that the wrong git ref was built?  Do you see the wrong ref referenced in the logs or are you verifying by the incorrect content being displayed within your application?

Comment 7 Corey Daley 2017-01-24 18:25:57 UTC
Filip, 
Do you have any other information as asked for in the previous entry?

Comment 8 Filip Klimeš 2017-01-24 20:23:09 UTC
I manually started the builds, but in the logs, the "git clone" command printed out an old revision (commit) while cloning. The logs showed the same revision each time I ran the build after it got stuck. After deleting & creating new project, the issue solved itself.

My developer preview has just ended, so I am not able to replicate the issue anymore. Sadly, I was in a hurry when the issue happened, so I don't have any screenshots :(

Comment 9 Corey Daley 2017-01-25 06:00:49 UTC
I am unable to reproduce the issue on dev preview.  If this happens again and you are able to provide more information, including a copy of your buildconfig, please submit a new issue and reference this one.

Comment 10 nprice 2020-07-16 10:09:13 UTC
I am seeing this issue, cloning from a GitHub organisation, via a yaml build config in OpenShift.

As far as I can see this occurs after a build is triggered via the OpenShift API, where the YAML source ref gets updated to the git SHA that's the current HEAD.  Further builds then no-longer clone the HEAD of the intended branch

Comment 11 Ben Parees 2020-07-16 12:15:52 UTC
Neil, can you explicitly list the steps/actions you're taking and provide all related yaml:

1) buildconfig yaml
2) build yaml
3) build pod yaml

as well as the build logs (with build-loglevel=5 preferably)

We also need to know your OCP version.  

Note that this bug was originally filed against the publicly hosted openshift developer preview on OCP 3.11.  You might be better served by opening a new bug w/ the information i've requested, and mentioning this bug as a reference.


Note You need to log in before you can comment on or make changes to this bug.