Bug 1242312 - Template using Custom BuildConfig causes JavaScript error in Console
Summary: Template using Custom BuildConfig causes JavaScript error in Console
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 3.0.0
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
: ---
Assignee: Samuel Padgett
QA Contact: Yanping Zhang
URL:
Whiteboard:
: 1242313 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-13 02:19 UTC by Andrew Block
Modified: 2015-08-03 20:17 UTC (History)
8 users (show)

Fixed In Version: openshift-3.0.1.0-1.git.388.51e9da7.el7ose
Doc Type: Bug Fix
Doc Text:
The web console previously produced errors when users attempted to create from templates that had a Custom build strategy. The errors obscured the template parameters from being shown or managed. The web console has now been updated to properly handle Custom and Docker build strategies in templates. As a result, the errors no longer occur, and template parameters can be viewed and managed.
Clone Of:
Environment:
Last Closed: 2015-08-03 20:17:38 UTC


Attachments (Terms of Use)
Template with custom buildconfig (10.48 KB, text/plain)
2015-07-13 02:19 UTC, Andrew Block
no flags Details


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1540 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 3.0.1.0 bug fix and enhancement update 2015-08-04 00:17:18 UTC

Description Andrew Block 2015-07-13 02:19:51 UTC
Created attachment 1051271 [details]
Template with custom buildconfig

Description of problem:

If a custom BuildConfig in defined in a template, when attempting to use the template during the creation of an application from a template, an JavaScript error occurs obscuring the template parameters from being displayed or modified.

The following error is shown in the Chrome (43.0.2357.132 64bit) developer console referencing vendor.js (5301)

TypeError: Cannot read property 'namespace' of undefined
    at scripts.js:2557
    at scripts.js:1600
    at Object.f [as forEach] (vendor.js:3208)
    at n (scripts.js:1598)
    at scripts.js:1671
    at i (vendor.js:5547)
    at vendor.js:5555
    at l.$get.l.$eval (vendor.js:5835)
    at l.$get.l.$digest (vendor.js:5792)
    at l.$get.l.$apply (vendor.js:5857)

The template can still be instantiated successfully from the oc CLI tool


Version-Release number of selected component (if applicable):

OpenShift Enterprise 3.0.0


How reproducible:
Always


Steps to Reproduce:
1. Use Template with custom BuildConfig strategy
2. Using web console, create a new application using the template. 
3. JS error occurs where parameters can not be managed

Actual results:
JavaScript error occurs when creating an application from a template with a Custom BuildConfig

Expected results:
Parameters in a template can be viewed and modified in the web console

Additional info:

Comment 2 Jordan Liggitt 2015-07-15 14:48:40 UTC
*** Bug 1242313 has been marked as a duplicate of this bug. ***

Comment 3 Samuel Padgett 2015-07-15 15:06:36 UTC
I can reproduce. Un-minified stack:

TypeError: Cannot read property 'namespace' of undefined
    at resources.js:273
    at newfromtemplate.js:36
    at Object.forEach (angular.js:323)
    at imageItems (newfromtemplate.js:34)
    at newfromtemplate.js:168
    at processQueue (angular.js:13170)
    at angular.js:13186
    at Scope.$eval (angular.js:14383)
    at Scope.$digest (angular.js:14199)
    at Scope.$apply (angular.js:14488)

Comment 4 Samuel Padgett 2015-07-15 15:32:19 UTC
https://github.com/openshift/origin/pull/3719

Comment 7 Yanping Zhang 2015-07-23 04:51:43 UTC
Reproduced the issue on ose3.0.0.1:
1.Create template in project.
$oc create -f origin/example/sample-app/application-template-custombuild.json
templates/ruby-helloworld-sample
2.On web console, open the developer tool, and monitor the console.create app with template ruby-helloworld-sample.
On the creation page, parameters in the template can not be shown and managed, and could see the error in console:
TypeError: Cannot read property 'namespace' of undefined

Verified the bug on ose3.0.1.0 with version v3.0.1.0-388-g51e9da7.
1.Create template in project.
$oc create -f origin/example/sample-app/application-template-custombuild.json
templates/ruby-helloworld-sample
2.On web console, open the developer tool, and monitor the console.create app with template ruby-helloworld-sample.
The parameters in the template can be viewed and managed.
There is no TypeError in console now.

Comment 9 errata-xmlrpc 2015-08-03 20:17:38 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2015:1540


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