Bug 1256549 - incremental builds fail for a number of reasons
incremental builds fail for a number of reasons
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Build (Show other bugs)
3.x
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Ben Parees
Wenjing Zheng
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-24 18:49 EDT by Ben Parees
Modified: 2015-09-08 16:14 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-09-08 16:14:07 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ben Parees 2015-08-24 18:49:53 EDT
Description of problem:
see: https://github.com/openshift/origin/issues/4127

The net result is that if you define a buildconfig as type "incremental" you will not get incremental behavior because the previous image will never be available to the builder.


How reproducible:
Define an incremental s2i type buildconfig using this repo:
https://github.com/bparees/incremental-app

build the application twice, accessing it in between each build.

On the first access, it should report "clean build"
on the second access, it should report "artifacts exist" 


This has been fixed as of a few days ago but I wanted to bring it to QEs attention so test cases can be developed.
Comment 1 DeShuai Ma 2015-08-24 23:27:25 EDT
Steps:
1.Edit application-template-stibuild.json like below:
--------BuildConfig----------

        "source": {
          "type": "Git",
          "git": {
            "uri": "https://github.com/bparees/incremental-app.git"
          }
        },
        "strategy": {
          "type": "Source",
          "sourceStrategy": {
            "from": {
              "kind": "ImageStreamTag",
              "name": "ruby-20-centos7:latest"
            },
            "incremental": true
          }
        }

--------BuildConfig----------

2.Create an application from above json
$ oc new-app application-template-stibuild.json -n dma

3.Check the build log
$ oc build-logs ruby-sample-build-1 -n dma

4.After build-1 complete start another build
$ oc start-build ruby-sample-build -n dma

5.Check the build-2 log
$  oc build-logs ruby-sample-build-2 -n dma

result:
3.The build do a clean build.
some log like:
I0825 03:12:44.931739       1 docker.go:228] Pulling image 172.30.78.66:5000/dma/origin-ruby-sample:latest
I0825 03:12:45.352390       1 docker.go:231] An error was received from the PullImage call: Error: image dma/origin-ruby-sample:latest not found
I0825 03:12:45.352437       1 sti.go:131] Clean build will be performed
I0825 03:12:45.352505       1 sti.go:134] Performing source build from https://github.com/bparees/incremental-app.git

5.The build do incremental build
some log like:
I0825 03:15:28.028209       1 sti.go:129] Existing image for tag 172.30.78.66:5000/dma/origin-ruby-sample:latest detected for incremental build
I0825 03:15:28.028222       1 sti.go:134] Performing source build from https://github.com/bparees/incremental-app.git
I0825 03:15:28.028296       1 sti.go:316] Saving build artifacts from image 172.30.78.66:5000/dma/origin-ruby-sample:latest to path /tmp/sti499236999/upload/artifacts

logs:
build-1: http://fpaste.org/258780/47322114/
build-2: http://fpaste.org/258779/44047317/

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