Hide Forgot
Description of problem: On create app from image page, when env or label name is empty, user still could perform create action, but fianlly it will fail. It's better to disable the creation when env or label name is empty Version-Release number of selected component (if applicable): openshift v1.3.0-alpha.3+7f59726 kubernetes v1.3.0+52492b4 etcd 2.3.0+git How reproducible: Always Steps to Reproduce: 1.Login to openshift web console and create a new project 2.Add to project -> select one image 3.Fill Name and Git Repository URL 4.In Build Configuration part, only set env value to "bc-env-value-1" In Deployment Configuration part, only set env value to "dc-env-value-1" In Labels part, only set Labels value to "label-value-1" 5.Click "Create" Actual results: 5. Could create but fianlly failed, errors indicating cannot create <resource> is shown on next step page Cannot create route "php". Route "php" is invalid: [metadata.labels: Invalid value: "": name part must be non-empty, metadata.labels: Invalid value: "": name part must match the regex ([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9] (e.g. 'MyName' or 'my.name' or '123-abc')]. Cannot create build config "php". BuildConfig "php" is invalid: [metadata.labels: Invalid value: "": name part must be non-empty, metadata.labels: Invalid value: "": name part must match the regex ([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9] (e.g. 'MyName' or 'my.name' or '123-abc'), spec.strategy.sourceStrategy.env[0].name: Required value]. Cannot create deployment config "php". DeploymentConfig "php" is invalid: [metadata.labels: Invalid value: "": name part must be non-empty, metadata.labels: Invalid value: "": name part must match the regex ([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9] (e.g. 'MyName' or 'my.name' or '123-abc'), spec.template.labels: Invalid value: "": name part must be non-empty, spec.template.labels: Invalid value: "": name part must match the regex ([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9] (e.g. 'MyName' or 'my.name' or '123-abc'), spec.template.spec.containers[0].env[0].name: Required value]. Cannot create image stream "php". ImageStream "php" is invalid: [metadata.labels: Invalid value: "": name part must be non-empty, metadata.labels: Invalid value: "": name part must match the regex ([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9] (e.g. 'MyName' or 'my.name' or '123-abc')]. Cannot create service "php". Service "php" is invalid: [metadata.labels: Invalid value: "": name part must be non-empty, metadata.labels: Invalid value: "": name part must match the regex ([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9] (e.g. 'MyName' or 'my.name' or '123-abc')]. Expected results: 5. When env or label name is empty, should prevent user from creating Additional info:
PR open to address this issue: https://github.com/openshift/origin-web-console/pull/584
PR merged into origin-web-console, not yet vendored back to origin.
After tested against the pr, found that there will be error showing "Key is required" if set env/label's value but key is empty, and the "Create" button is disabled. Then remove the env/label's value, the error is still there with "Create" button disabled. Pls refer to the attachment. This should be fixed.
Created attachment 1204708 [details] errorinfo.png
Looking into this
At present, here is the behavior: - pressing the "x" control to trigger the clear row fn will eliminate the warning - pressing the "delete" key to delete the values will eliminate the warning - using ctrl + x to "cut" the value will not eliminate the warning. This does not trigger the keyup event (oddly)
PR to the underlying editor: https://github.com/openshift/angular-key-value-editor/pull/117 will PR the web console once that merges.
Checked against v3.4.0.18+ada983f 1. Type only env/label value, error info will prompt "Key is required" and Create button is disabled 2. Using ctrl + x to cut the env/label value, the error will not be eliminated, and Create button still disabled 3. Clear value using backspace, the error will not be eliminated, and Create button still disabled 4. Clicking "x" control will eliminate the warning and Create button got enabled Move to VERIFIED