argoproj / argo-workflows

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

javascript dependency warnings #13410

Open xnox opened 1 month ago

xnox commented 1 month ago

Pre-requisites

What happened? What did you expect to happen?

Building v3.5.0-576-g1239fd022 (main branch)

Invoking make ui/dist/app/index.html prints many javascript dependency warnings:

JOBS=max yarn --cwd ui install
yarn install v1.22.22
[1/5] Validating package.json...
[2/5] Resolving packages...
warning Resolution field "types-ramda@0.29.4" is incompatible with requested version "types-ramda@^0.30.0"
[3/5] Fetching packages...
[4/5] Linking dependencies...
warning " > argo-ui@1.0.0" has incorrect peer dependency "react@^16.9.3".
warning " > argo-ui@1.0.0" has incorrect peer dependency "react-dom@^16.9.3".
warning "argo-ui > foundation-sites@6.8.1" has unmet peer dependency "jquery@>=3.6.0".
warning "argo-ui > foundation-sites@6.8.1" has unmet peer dependency "motion-ui@latest".
warning "argo-ui > foundation-sites@6.8.1" has unmet peer dependency "what-input@>=5.2.10".
warning "argo-ui > react-autocomplete@1.8.1" has incorrect peer dependency "react@^0.14.7 || ^15.0.0-0 || ^16.0.0-0".
warning "argo-ui > react-autocomplete@1.8.1" has incorrect peer dependency "react-dom@^0.14.7 || ^15.0.0-0 || ^16.0.0-0".
warning "argo-ui > react-form@2.16.3" has incorrect peer dependency "react@^15.6.1 || 16".
warning "argo-ui > react-form@2.16.3" has incorrect peer dependency "react-dom@^15.6.1 || 16".
warning "argo-ui > react-form > react-redux@5.1.2" has incorrect peer dependency "react@^0.14.0 || ^15.0.0-0 || ^16.0.0-0".
warning "argo-ui > react-form > redux-thunk@2.4.2" has incorrect peer dependency "redux@^4".
warning " > react-chartjs-2@2.11.2" has incorrect peer dependency "react@^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0".
warning " > react-chartjs-2@2.11.2" has incorrect peer dependency "react-dom@^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0".
warning " > react-monaco-editor@0.50.1" has incorrect peer dependency "@types/react@>=17 <= 18".
warning " > react-monaco-editor@0.50.1" has incorrect peer dependency "monaco-editor@^0.34.0".
warning "swagger-ui-react > swagger-client > ramda-adjunct@5.0.0" has unmet peer dependency "ramda@>= 0.30.0".
[5/5] Building fresh packages...
Done in 59.52s.

Are these important to resolve / upgrade? Or is it mostly harmless

Version(s)

v3.5.0-576-g1239fd022

Paste a minimal workflow that reproduces the issue. We must be able to run the workflow; don't enter a workflows that uses private images.

`make ui/dist/app/index.html`

Logs from the workflow controller

kubectl logs -n argo deploy/workflow-controller | grep ${workflow}

Logs from in your workflow's wait container

kubectl logs -n argo -c wait -l workflows.argoproj.io/workflow=${workflow},workflow.argoproj.io/phase!=Succeeded
xnox commented 1 month ago

Note 3.5 branch also has warnings:

JOBS=max yarn --cwd ui install
yarn install v1.22.22
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
[4/5] Linking dependencies...
warning " > argo-ui@1.0.0" has unmet peer dependency "antd@^4.16.13".
warning " > argo-ui@1.0.0" has unmet peer dependency "rxjs@^7.5.6".
warning "argo-ui > foundation-sites@6.7.5" has unmet peer dependency "jquery@>=3.6.0".
warning "argo-ui > foundation-sites@6.7.5" has unmet peer dependency "motion-ui@latest".
warning "argo-ui > foundation-sites@6.7.5" has unmet peer dependency "what-input@>=5.2.10".
warning " > react-monaco-editor@0.50.1" has incorrect peer dependency "@types/react@>=17 <= 18".
warning " > react-monaco-editor@0.50.1" has incorrect peer dependency "monaco-editor@^0.34.0".
warning " > react-monaco-editor@0.50.1" has incorrect peer dependency "react@>=17 <= 18".
warning " > swagger-ui-react@4.19.1" has incorrect peer dependency "react@>=17.0.0".
warning " > swagger-ui-react@4.19.1" has incorrect peer dependency "react-dom@>=17.0.0".
[5/5] Building fresh packages...
agilgur5 commented 1 month ago

Yea I mentioned these warnings in https://github.com/argoproj/argo-workflows/pull/13069#issuecomment-2159579279 as well. I was planning to revert that PR and make a more targeted change for 3.5 plus remove swagger-ui entirely for 3.6, but it seems to not be causing any errors yet (React 19 might make those warnings into errors), so it's low on the priority list.

That's specifically with regard to the react ones on the main branch. The other ones are in transitive dependencies that seem to have incorrect version numbers for their peerDeps, or in foundation-sites's case, they're optional peerDeps (foundation-sites predates the existence of package.json configuration for optional peerDeps IIRC, which is still non-standard between different clients as well IIRC)

Are these important to resolve / upgrade? Or is it mostly harmless

Afaict they are "harmless" so far as they're all warnings and don't seem to impact any functionality. They can become errors in further updates though, so they are important to keep in mind during dep upgrades/changes