kpt-backstage-plugins
kpt-backstage-plugins copied to clipboard
Viewing yaml for a resource logs two warnings to the developer console
Expected Behavior
Viewing a resource's yaml should not log any warnings to the developer console.
Current Behavior
Currently, two warnings are logged to the developer console when a resource yaml is viewed:
Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq
You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker
Steps to Reproduce
The easiest way to reproduce this is by viewing a package resource's yaml:
- Open the
simplens
team blueprint created by Namespace Provisioning Guide - Click on any resource within in the team blueprint to bring up the resource viewer dialog
- With the developer console open, click on the 'Show YAML View' button in the dialog, and the two warnings are written to the console
Possible Solution
A possible solution is to implement the web worker being requested by the editor.
Context
The Monaco Editor is used in the Resource Editors and Viewers in the Config as Data UI to give us a rich editor experience with syntax highlighting. These warnings do not seem to impact the user experience however we should see these warnings can be resolved.