Bug 1792176

Summary: Add Pipeline Resources on Pipelines Resources tab don't work [openshift-4.4]
Product: OpenShift Container Platform Reporter: Yadan Pei <yapei>
Component: Dev ConsoleAssignee: Karthik Jeeyar <kjeeyar>
Status: CLOSED ERRATA QA Contact: Ruchir Garg <rgarg>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.3.0CC: aos-bugs, bpeterse, jokerman, kjeeyar, nmukherj, scuppett, yapei
Target Milestone: ---   
Target Release: 4.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Validation needs to be fixed inorder to add more parameters/reosources. Consequence: Parameters/Resources submit button was disabled when the user removes the existing fields whereas the new changes detected section shows correctly. Fix: Validation and formik usage is modified to validate the form correctly. Result: When new changes detected section is shown, then submit button is enabled to allow the user to submit the values to the backend.
Story Points: ---
Clone Of:
: 1804852 1807088 1807089 (view as bug list) Environment:
Last Closed: 2020-05-04 11:24:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1804852, 1807088, 1807089    

Description Yadan Pei 2020-01-17 08:27:36 UTC
Description of problem:
When user click 'Add Pipeline Resources' button on Pipelines -> Resources tab, the changes can't be saved 

Version-Release number of selected component (if applicable):
    4.3.0-0.nightly-2020-01-15-025207

How reproducible:
Always

Steps to Reproduce:
1. admin user install OpenShift Pipeline operator and create project 'pipeline-tutorial'
2. Create a Pipeline example via Pipelines -> Pipelines -> Create Pipeline button
3. Check Pipelines -> new-pipeline -> Resources tab, click 'Add Pipeline Resources' button, set name 'test-image' and choose resource type 'Image'
4. Create a pipeline from pipeline-tutorial repo
$ oc create -f https://raw.githubusercontent.com/openshift/pipelines-tutorial/master/pipeline/pipeline.yaml
5. Check Pipelines -> build-and-deploy -> Resources tab, click 'Add Pipeline Resources' button, set set name 'test-image' and choose resource type 'Image'

Actual results:
3. Console says:
You made changes to this page.
Click Save to save changes or Reload to cancel.
But Save button is always disabled although everything is filled correctly
5. This time Save button is enabled, saving the change will report error
An error occurred
admission webhook "webhook.tekton.dev" denied the request: mutation failed: invalid value: Pipeline declared resources didn't match usage in Tasks: Provided extra values: [test-image]: spec.resources

Expected results:
3. When resource name and resource type are set correctly, Save button should be enabled and user can save the changes
5. From the error message, it looks like spec.resources must be used/referenced in spec.tasks, if that's the truth, it looks like user can't simply add resources via Pipelines Resources tab

Additional info:

Comment 1 Stephen Cuppett 2020-01-17 12:26:47 UTC
Setting target release to the active development branch (4.4). For fixes (if any) required/requested on earlier versions, BZ clones will be created.

Comment 2 Andrew Ballantyne 2020-01-29 20:21:16 UTC
Appears broken in 4.4 and 4.3... will need a fix and backport. Thanks for the log!

Logged in our backlog: https://issues.redhat.com/browse/ODC-2881

Comment 5 Yadan Pei 2020-02-19 03:49:52 UTC
Steps to verify:
1. admin user install OpenShift Pipeline operator and create project 'pipeline-tutorial'
2. Create a Pipeline example via Pipelines -> Pipelines -> Create Pipeline button -> Edit YAML -> Create
3. Check Pipelines -> new-pipeline -> Resources tab, click 'Add Pipeline Resources' button, set name 'test-image' and choose resource type 'Image'


Now the Save button on Resources tab is enabled after everything is filled correctly, also on Parameters tab Save button is enabled when all required fields are filled correctly


Verified on     4.4.0-0.nightly-2020-02-18-164016

Comment 7 errata-xmlrpc 2020-05-04 11:24:53 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-2020:0581