Bug 1983707 - Import from YAML breaks console when three dash separator at the end
Summary: Import from YAML breaks console when three dash separator at the end
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.8
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.9.0
Assignee: Joe Caiani
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks: 1984242
TreeView+ depends on / blocked
 
Reported: 2021-07-19 14:28 UTC by Christoph Jerolimov
Modified: 2021-10-18 17:40 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-10-18 17:39:54 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 9558 0 None open Bug 1983707: filter null yaml objects before validating to prevent undefined exception 2021-07-20 16:21:04 UTC
Red Hat Product Errata RHSA-2021:3759 0 None None None 2021-10-18 17:40:15 UTC

Description Christoph Jerolimov 2021-07-19 14:28:04 UTC
Description of problem:
When the user imports a YAML which uses three dash separator after each resource and imports this, the complete console breaks.

Version-Release number of selected component (if applicable):
4.8 and 4.9 master (tested with commit 32237741dbab53269d41e844948ae19042958d02)

How reproducible:
Always

Steps to Reproduce:
1. Open console and click on the plus icon on the main navigation
2. Add three dashes and a new line and press create.

Actual results:
Breaks console

  TypeError
  Cannot read property 'apiVersion' of null

  unhandled error: Uncaught TypeError: Cannot read property 'apiVersion' of null TypeError: Cannot read property 'apiVersion' of null
      at EditYAML.validate21ea623cc9a1ae6d00f1.js:467:14)
      at EditYAML.save
      at EditYAML.<anonymous>
  ...
  The above error occurred in the <EditYAML> component:
      at EditYAML
  ...

Expected results:
Don't break console

Additional info:
None

Comment 2 Yadan Pei 2021-07-21 09:45:32 UTC
wait for a newer build than 4.9.0-0.nightly-2021-07-21-021707 to verify the fix

Comment 3 Yadan Pei 2021-07-22 03:34:08 UTC
1. Open console and click on the plus icon(Import YAML) on the main navigation
2. Add three dashes and a new line and press create, nothing happens and no errors
3. Drag and drop multiple test files in the YAML editor, append `---` and a new line and click on 'Create', the resources are created successfully without errors/breaking the console, checked against 4.9.0-0.nightly-2021-07-22-015245

I understand the issue has been fixed, moving to VERIFIED, let me know if I'm wrong

Comment 6 errata-xmlrpc 2021-10-18 17:39:54 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 (Moderate: OpenShift Container Platform 4.9.0 bug fix and security update), 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/RHSA-2021:3759


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