Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The latest @patternfly/react-code-editor 5.2.0 has a breaking change that makes downstream E2E fail #772

Open
Tracked by #477
tadayosi opened this issue Feb 9, 2024 · 0 comments
Labels
area/ui dependencies Pull requests that update a dependency file kind/bug Something isn't working

Comments

@tadayosi
Copy link
Member

tadayosi commented Feb 9, 2024

Upgrading Hawtio to @hawtio/react 1.0.4 (hawtio/hawtio#3227) exhibits the issue of incompatibility at @patternfly/react-code-editor.

Essentially, the issue is that the latest @patternfly/react-code-editor tries to load a script from an external CDN, which violates the CSP settings on the Hawtio standalone:

image

index.js:86 Refused to load the script 'https://cdn.jsdelivr.net/npm/monaco-editor@0.43.0/min/vs/loader.js' because it violates the following Content Security Policy directive: "script-src 'self'". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.

This is caused by the breaking change made at @patternfly/react-code-editor:

Actually, @patternfly/react-code-editor 5.x is for PatternFly v5, and hawtio/react is so far based on PatternFly v4 yet, so, for the time being, what we need to do is just downgrade it to 4.x. But when we upgrade PatternFly v5 #477, we'd need to fix this issue too.

@tadayosi tadayosi added kind/bug Something isn't working dependencies Pull requests that update a dependency file area/ui labels Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ui dependencies Pull requests that update a dependency file kind/bug Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

1 participant