Closed agilgur5 closed 3 weeks ago
if swagger ui is removed from each operator's server should there be an entry in breaking changes/upgrading guide?
It is breaking, so we could, although the UI itself tells you what to do and there is no upgrade instruction otherwise. The impacted UI page having a message for a deprecation window for the Archived List UI could have made sense too, i.e. a better option than https://github.com/argoproj/argo-workflows/pull/13371
I'm inclined to agree and note it in this case, although we do want to be careful about making the UI a "breakable" surface area and where to draw boundaries as it's not quite the same as the schema / API / etc "Public API" (also I noticed metrics are missing there) but rather a consumer of those.
Could this be added to docs/upgrading.md
to note the removal of the feature?
Added an upgrading note in https://github.com/argoproj/argo-workflows/pull/13818/commits/d7062396bf6536da49558aea0ed689dd0ab7673c
@agilgur5, could you resolve the conflicts and then we can merge and cut a 3.6.0-rc4 with this in?
@Joibel I can take this over if you'd like, though I don't have access to push to https://github.com/agilgur5/argo-workflows/tree/refactor-remove-swagger-ui (which I'm assuming I'll get when my membership request goes through).
I'm assuming the best way forward is to create a new PR with a branch forked from https://github.com/agilgur5/argo-workflows/tree/refactor-remove-swagger-ui. Does that sound reasonable?
It requires write access on GH to push to PR, or Approver in Argoproj terms.
I just added you as a collaborator to my fork for simplicity
I'm assuming the best way forward is to create a new PR with a branch forked from
Otherwise that would be the general process that has been done in the past and tends to be an easy way to give proper attribution
@agilgur5 Thanks! It works, and I resolved the conflicts
Partial fix for #13410 -- see #13821 for the other half to downgrade
react
that is a pure fix (vs this is a breaking change that is sizeable in its own right) Replaces #13069 to resolve CVEs by just removingswagger-ui-react
entirelyMotivation
Removes the Swagger UI entirely from the UI as it is a gigantic dep (2nd largest only behind Monaco Editor) and often has vulnerable dependencies that are difficult to resolve without affecting other deps. According to #12061, this would shave off ~2MB / 826KB minified / 250KB gzipped from the UI bundle and will also speed up builds and installs as such.
It also no longer necessary to have in the UI as there is a Swagger UI in the docs after https://github.com/argoproj/argo-workflows/pull/10923 and the docs are versioned after https://github.com/argoproj/argo-workflows/issues/11390
Modifications
swagger-ui-react
dep@types/swagger-ui-react
devDep/apidocs
UI page with a few links: download the OpenAPI / Swagger spec, download the JSON schema, and go to the Swagger UI in the versioned documentationZeroState
component same as other pages, namely the Plugins pagetarget='blank'
andrel='noreferrer'
consistent with existing links in the UIDocs update
update and simplify REST API page
main
) and can be versioned now as wellVerification
Manually tested and confirmed the page works as intended. Screenshot of new API docs page:
Future Work
main