fix(webapp): guard Flux viewer against js-yaml 5.x empty-input throw#8889
Merged
rzo1 merged 2 commits intoJul 1, 2026
Merged
Conversation
Bumps `netty-tcnative.version` from 2.0.77.Final to 2.0.80.Final. Updates `io.netty:netty-tcnative` from 2.0.77.Final to 2.0.80.Final - [Release notes](https://github.com/netty/netty-tcnative/releases) - [Commits](netty/netty-tcnative@netty-tcnative-parent-2.0.77.Final...netty-tcnative-parent-2.0.80.Final) Updates `io.netty:netty-tcnative-boringssl-static` from 2.0.77.Final to 2.0.80.Final - [Release notes](https://github.com/netty/netty-tcnative/releases) - [Commits](netty/netty-tcnative@netty-tcnative-parent-2.0.77.Final...netty-tcnative-parent-2.0.80.Final) --- updated-dependencies: - dependency-name: io.netty:netty-tcnative dependency-version: 2.0.80.Final dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: io.netty:netty-tcnative-boringssl-static dependency-version: 2.0.80.Final dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
js-yaml 5.x changed load('') to throw a YAMLException ('expected a
document, but the input is empty') instead of returning undefined (see
js-yaml migrate_v4_to_v5). The Flux Topology Viewer calls
parseAndRender() on page load while the textarea holds only a comment
(# YAML Definition), so jsyaml.load() now throws before the existing
if(doc==null) guard, surfacing as an uncaught exception that fails the
cypress-e2e suite (flux-page.cy.js).
Wrap the load in try/catch and treat empty/comment-only or malformed
input as 'no document'. Also broaden cypress-tests.yml to run on 2.x so
this class of webapp regression is exercised there too (2.x already
shipped js-yaml 5.2.0 and carries the same latent bug).
e2aba7e
into
dependabot/npm_and_yarn/storm-webapp/js-yaml-5.2.0
3 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the
cypress-e2efailure seen on #8855 (js-yaml 4.2.0 → 5.2.0).Root cause
js-yaml 5.x changed
load('')to throwYAMLException: expected a document, but the input is emptyinstead of returningundefined(see the v4→v5 migration guide). A comment-only string counts as empty.The Flux Topology Viewer (
flux.html) callsparseAndRender()on page load while the textarea contains only# YAML Definition, sojsyaml.load(input)now throws before the existingif (doc == null) return;guard. That surfaces as an uncaught application exception, which Cypress turns into a failed test (flux-page.cy.js), failing the whole suite.Fix
jsyaml.load()call intry/catchand treat empty/comment-only (or malformed) input as "no document" — restoring the pre-5.x behavior and also hardening against bad user YAML.cypress-tests.ymlto also trigger on2.x.Note on 2.x
2.x already merged js-yaml 5.2.0 (#8863) and carries the identical latent bug — its
cypress-e2enever ran because the workflow was scoped tomasteronly. A companion PR applies the sameflux.htmlfix to 2.x.Once this lands, #8855 can be rebased to pick up the fix and go green.