Bug 1300146 - [fork][userinterface_public_576]Wrong prompt message when create from template contains invalid resource type
Summary: [fork][userinterface_public_576]Wrong prompt message when create from templat...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Management Console
Version: 3.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: bpeterse
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-20 03:06 UTC by Yadan Pei
Modified: 2016-05-12 17:12 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-12 17:12:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Yadan Pei 2016-01-20 03:06:43 UTC
Description of problem:
When creating from a template contains invalid resource type, it gives "Cannot create object. Unknown API version v1 for kind Test.", it should give error "Cannot create object. Unrecognized kind Test."

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

How reproducible:
Always

Steps to Reproduce:
1.Create a template "ruby-helloworld-sample" from examples/sample-app/application-template-stibuild.json
2. Change "kind": "Service" to "kind":"Test" for frontend service
3. Create from template on web console

Actual results:
Error "Cannot create object. Unknown API version v1 for kind Test" printed on next step page

Expected results:
Error "Cannot create object. Unrecognized kind Test" should printed

Additional info:

Comment 1 bpeterse 2016-01-20 21:35:44 UTC
Here are some details about APIGroups that may require updating your tests.

- We have a list of v1 resources & can verify before making API calls
- We will not have a list of resources under each API Group.  We simply have to make the request and handle the 403, 404 errors if they happen

So in the template.json,
We can look this up and know if it will succeed or fail:
"kind": "Test",
"apiVersion": "v1", 

But, we will not know if this will succeed or fail:
"kind": "Test",
"apiVersion": "foo/v1", 


I'll have to update the error message to something like this:

- "Kind Test is invalid for API version v1"

And will try to pass up useful messages for 403,404 errors (from API groups) to the UI.

Comment 2 bpeterse 2016-01-22 17:29:45 UTC
For 
"kind": "Test",
"apiVersion": "v1",

Message will be:
- Cannot create object. Kind Test is invalid for v1.

Comment 3 bpeterse 2016-01-22 17:31:25 UTC
Fix will be coming in next fork_ami.  Will update trello card when fork_ami is generated.

Comment 4 Yadan Pei 2016-01-26 02:01:21 UTC
tested on fork_ami_openshift3_userinterface_public_576_193, when create from template includes fakegroup, error info [Cannot create fakegroup.tests. User "yapei" cannot create fakegroup.tests in project "yapei-test".] will be displayed on next step page, works as expected


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