rzo1 opened a new pull request, #8890:
URL: https://github.com/apache/storm/pull/8890

   2.x companion to #8889.
   
   2.x already merged js-yaml 5.2.0 (#8863), which carries a **latent runtime 
bug**: js-yaml 5.x changed `load('')` to throw `YAMLException: expected a 
document, but the input is empty` instead of returning `undefined` (see the 
[v4→v5 migration 
guide](https://github.com/nodeca/js-yaml/blob/master/docs/migrate_v4_to_v5.md)).
   
   The Flux Topology Viewer (`flux.html`) calls `parseAndRender()` on page load 
while the textarea holds only `# YAML Definition`, so `jsyaml.load(input)` now 
throws before the `if (doc == null) return;` guard — the viewer fails to render.
   
   This slipped through on 2.x because `cypress-tests.yml` only triggered on 
`master`, so 2.x PRs never ran the e2e suite that catches it (this is exactly 
what happened with #8863).
   
   ### Fix
   - Wrap `jsyaml.load()` in `try/catch`, treating empty/comment-only/malformed 
input as "no document".
   - Broaden `cypress-tests.yml` to also run on `2.x`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to