Bug 1118597 - The assemble/run/save-artifacts scripts can not combine to work when they come from different url
Summary: The assemble/run/save-artifacts scripts can not combine to work when they com...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Containers
Version: 3.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Maciej Szulik
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-11 07:07 UTC by chunchen
Modified: 2016-09-30 02:15 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-18 16:49:21 UTC


Attachments (Terms of Use)

Description chunchen 2014-07-11 07:07:42 UTC
Description of problem:
the assemble/run/save-artifacts scripts can not combine to work when they come from different url.

Version-Release number of selected component (if applicable):
fedora20_x86_64
latest gear built(gear version alpha3, build a91156f)

How reproducible:
always

Steps to Reproduce:
1. Make assemble/run/save-artifacts scripts come from different url
eg:
app source only contains assemble script;
user specified remote url only contains run script;
save-artifacts script comes from the default image url.

2. Do gear build
gear build git://github.com/chunyunchen/sinatra-app-example openshift/ruby-19-centos testapp1 -s https://raw.githubusercontent.com/chunyunchen/shell-ruby/master/scripts

Actual results:
ERROR: Reading error while downloading https://raw.githubusercontent.com/chunyunchen/shell-ruby/master/scripts/assemble (Failed to retrieve https://raw.githubusercontent.com/chunyunchen/shell-ruby/master/scripts/assemble, response code 404)
ERROR: Reading error while downloading https://raw.githubusercontent.com/chunyunchen/shell-ruby/master/scripts/save-artifacts (Failed to retrieve https://raw.githubusercontent.com/chunyunchen/shell-ruby/master/scripts/save-artifacts, response code 404)
An error occured: Scripts download failed

Expected results:
The assemble/run/save-artifacts scripts should combine to work well when they come from different url.

Additional info:

Comment 1 Michal Fojtik 2014-07-11 10:47:35 UTC
https://github.com/openshift/geard/pull/241

Comment 2 chunchen 2014-12-18 06:35:55 UTC
The new logs:

[fedora@ip-10-81-156-41 ~]$ sti build git://github.com/chunyunchen/sinatra-app-example chunyunchen/ruby-20-centos ccyapp -s https://raw.githubusercontent.com/chunyunchen/shell-ruby/master/scripts --loglevel=1
I1218 06:29:07.316324 17786 docker.go:118] Pulling image chunyunchen/ruby-20-centos
W1218 06:29:07.916907 17786 download.go:117] Unable to download https://raw.githubusercontent.com/chunyunchen/shell-ruby/master/scripts/assemble (failed to retrieve https://raw.githubusercontent.com/chunyunchen/shell-ruby/master/scripts/assemble, response code 404)
W1218 06:29:07.964480 17786 download.go:117] Unable to download https://raw.githubusercontent.com/chunyunchen/shell-ruby/master/scripts/save-artifacts (failed to retrieve https://raw.githubusercontent.com/chunyunchen/shell-ruby/master/scripts/save-artifacts, response code 404)
I1218 06:29:07.967313 17786 build.go:82] Clean build will be performed
I1218 06:29:07.967338 17786 build.go:197] Downloading git://github.com/chunyunchen/sinatra-app-example to directory /tmp/sti602577611/upload/src
Cloning into '/tmp/sti602577611/upload/src'...
remote: Counting objects: 95, done.
remote: Compressing objects: 100% (56/56), done.
remote: Total 95 (delta 23), reused 91 (delta 23)
Receiving objects: 100% (95/95), 10.25 KiB | 0 bytes/s, done.
Resolving deltas: 100% (23/23), done.
Checking connectivity... done.
/opt/ruby/bin/sti-helper: line 12: /opt/ruby/bin/assemble: No such file or directory
F1218 06:29:10.471922 17786 main.go:146] An error occurred: non-zero (1) exit code from 

fyi, I have put the 'assemble' script under .sti/bin directory of app source repository when testing, seams sti build did not use the scripts from app source according to the logs like "/opt/ruby/bin/sti-helper: line 12: /opt/ruby/bin/assemble: No such file or directory".

Thanks!

Comment 3 Maciej Szulik 2014-12-22 17:08:58 UTC
The PR with fix:

https://github.com/openshift/source-to-image/pull/102

Comment 4 chunchen 2014-12-24 03:15:09 UTC
It's fixed, verified with the latest built sti(version 0.1, build 48cf2e9), please refer to the following results:

$ sti build git://github.com/chunyunchen/sinatra-app-example chunyunchen/ruby-20-centos ccyapp -s https://raw.githubusercontent.com/chunyunchen/shell-ruby/master/scripts --loglevel=1
I1224 03:05:06.744477 01957 docker.go:118] Pulling image chunyunchen/ruby-20-centos

I1224 03:06:22.830409 01957 executor.go:156] Downloading git://github.com/chunyunchen/sinatra-app-example to directory /tmp/sti590809755/upload/src
Cloning into '/tmp/sti590809755/upload/src'...
remote: Counting objects: 95, done.
remote: Compressing objects: 100% (56/56), done.
remote: Total 95 (delta 23), reused 95 (delta 23)
Receiving objects: 100% (95/95), 10.25 KiB | 0 bytes/s, done.
Resolving deltas: 100% (23/23), done.
Checking connectivity... done.
W1224 03:06:23.238123 01957 download.go:117] Unable to download https://raw.githubusercontent.com/chunyunchen/shell-ruby/master/scripts/assemble (failed to retrieve https://raw.githubusercontent.com/chunyunchen/shell-ruby/master/scripts/assemble, response code 404)
W1224 03:06:23.273221 01957 download.go:117] Unable to download https://raw.githubusercontent.com/chunyunchen/shell-ruby/master/scripts/save-artifacts (failed to retrieve https://raw.githubusercontent.com/chunyunchen/shell-ruby/master/scripts/save-artifacts, response code 404)
I1224 03:06:23.277682 01957 build.go:79] Clean build will be performed
Assemble file comes from app source
---> Installing application source
---> Building your Ruby application from source
---> Running 'bundle install --deployment'
Fetching gem metadata from https://rubygems.org/..........
Installing rack (1.5.2) 
Installing puma (2.8.1) 
Installing rack-protection (1.5.2) 
Installing tilt (1.4.1) 
Installing sinatra (1.4.4) 
Using bundler (1.3.1) 
Your bundle is complete! It was installed into /opt/ruby/bundle
---> Cleaning up unused ruby gems
Assemble file comes from app source
I1224 03:06:40.921254 01957 build.go:120] Tagged 72a5bc16974b1f8436357ffa7a0fb2bb6587281294026583d4d4a08893af2c2c as ccyapp
I1224 03:06:40.921286 01957 build.go:134] Successfully built ccyapp


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