Bug 1984242

Summary: Import from YAML breaks console when three dash separator at the end
Product: OpenShift Container Platform Reporter: OpenShift BugZilla Robot <openshift-bugzilla-robot>
Component: Management ConsoleAssignee: Joe Caiani <jcaiani>
Status: CLOSED ERRATA QA Contact: Siva Reddy <schituku>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.8CC: aos-bugs, jokerman, kdoberst, spadgett, yanpzhan, yapei
Target Milestone: ---   
Target Release: 4.8.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-08-16 18:32:12 UTC Type: ---
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: 1983707    
Bug Blocks:    

Description OpenShift BugZilla Robot 2021-07-21 04:07:16 UTC
+++ This bug was initially created as a clone of Bug #1983707 +++

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 3 Yadan Pei 2021-08-10 06:42:18 UTC
PR is verified prior merging, moving to VERIFIED

Comment 5 errata-xmlrpc 2021-08-16 18:32:12 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 (OpenShift Container Platform 4.8.5 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/RHBA-2021:3121