argoproj / argo-workflows

Workflow Engine for Kubernetes
https://argo-workflows.readthedocs.io/
Apache License 2.0
15.11k stars 3.21k forks source link

fix(ui): switch from `js-yaml` to `yaml`. Fixes #12205 #13750

Closed MasonM closed 1 month ago

MasonM commented 1 month ago

Fixes #12205

Motivation

js-yaml has had no releases in over 3 years. Also, the fact it only supports YAML 1.2 is leading to bugs, since Kubernetes uses YAML 1.1 (see https://github.com/kubernetes/kubernetes/issues/34146).

Modifications

This switches over to yaml, which had a release last month, is licensed under ISC, and supports YAML 1.1. I also added test cases for the parsing/stringifying code.

Verification

Copied the example from https://github.com/argoproj/argo-workflows/issues/12205 over to http://localhost:8080/workflow-templates and verified the mode: 0755 was changed to mode: 493:

https://github.com/user-attachments/assets/54690403-4189-499a-a2c1-65293026ea77