Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove or replace all the @nuxt libraries #11302

Merged
merged 18 commits into from
Aug 8, 2024

Conversation

cnotv
Copy link
Member

@cnotv cnotv commented Jun 26, 2024

Summary

Fixes #11272

Occurred changes and/or fixed issues

Technical notes summary

Strictly libraries related changes, as original plan

  • Replaced @nuxtjs/axios with defu, axios and axios-retry
  • Corrected http-proxy-middleware import

Side effects crossed while debugging:

  • Pinned ALL the versions and resolutions to current working versions
  • Added dependency resolution for roarr used in a dependency of cy2
  • Extended migration script due changes in GH Workflow tree
  • Updated checkout@, artifact@ and node@ actions to latest for multiple GHA workflows
  • Updated Node version in CI to 16 for missing cases after issue on master/rebase update node version on workflows #11377 This has been replaced by .nvmrc file versioning pinning at this time.
  • Extended babel configuration for @rancher/components due issue on compile not pointing to the right ES module after removing @nuxtjs/webpack-profile

Generic side effects:

  • Removed script/style from within the app in Vue index.html
  • Abstracted exports from Vue files as they started to fail (bad practice):
Screenshot 2024-07-01 at 16 36 10

Areas or cases that should be tested

Areas which could experience regressions

Screenshot/Video

Checklist

  • The PR is linked to an issue and the linked issue has a Milestone, or no issue is needed
  • The PR has a Milestone
  • The PR template has been filled out
  • The PR has been self reviewed
  • The PR has a reviewer assigned
  • The PR has automated tests or clear instructions for manual tests and the linked issue has appropriate QA labels, or tests are not needed
  • The PR has reviewed with UX and tested in light and dark mode, or there are no UX changes

@rancher-ui-project-bot rancher-ui-project-bot bot added this to the v2.10.0 milestone Jun 26, 2024
@cnotv cnotv force-pushed the feature/11272-nuxt-libraries branch 15 times, most recently from dd06a54 to cf4dd1a Compare July 3, 2024 15:32
@cnotv cnotv force-pushed the feature/11272-nuxt-libraries branch 3 times, most recently from 5d30844 to 7707757 Compare July 8, 2024 10:05
@cnotv cnotv marked this pull request as ready for review July 8, 2024 10:05
@cnotv cnotv marked this pull request as draft July 8, 2024 10:20
@cnotv cnotv force-pushed the feature/11272-nuxt-libraries branch 3 times, most recently from bb26a50 to 3e5fb45 Compare July 9, 2024 14:33
@cnotv cnotv marked this pull request as ready for review July 9, 2024 15:18
@cnotv cnotv requested a review from codyrancher July 9, 2024 15:21
if-no-files-found: error
retention-days: 10
compression-level: 9
- uses: actions/checkout@v4
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation was wrong, bumped checkout versions

rak-phillip
rak-phillip previously approved these changes Aug 7, 2024
Copy link
Member

@rak-phillip rak-phillip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functionally, this looks good to me.

It looks like there's a minor merge conflict that needs to be resolved.

package.json Outdated Show resolved Hide resolved
@cnotv cnotv force-pushed the feature/11272-nuxt-libraries branch from 9494816 to aafaee0 Compare August 7, 2024 21:04
@cnotv
Copy link
Member Author

cnotv commented Aug 8, 2024

I'm still seeing some warnings about window.$nuxt coming from shell/initialize/App.vue

window.$nuxt is deprecated. It would be best to stop using globalState all together. For an alternative you can use window.$globalApp.

Is this something that we can safely remove at this point?

We finally agreed about removing it and is out now. We are going to test in a rancher/dashboard branch to ensure Harvester does not break: https://github.com/rancher/dashboard/tree/nuxt-removal-dev

It looks like we are clashing with working time, so since we can test it afterward on the branch, we'll just merge it. If any issue we'll restore this part of the code or solve in Harvester I guess.

@cnotv cnotv merged commit a2304f4 into rancher:master Aug 8, 2024
31 checks passed
@torchiaf
Copy link
Member

torchiaf commented Aug 8, 2024

@cnotv @rak-phillip I've tested the navigation from/to Harvester clusters and navigating Harvester pages.
I get this error message in the console + navigation inside Harvester is broken:

image

How to replicate:

  • Click on Virtualization Management
  • Click on a Harvester cluster
  • Go to Virtual Machine page

@cnotv
Copy link
Member Author

cnotv commented Aug 8, 2024

@cnotv @rak-phillip I've tested the navigation from/to Harvester clusters and navigating Harvester pages. I get this error message in the console + navigation inside Harvester is broken:

How to replicate:

  • Click on Virtualization Management
  • Click on a Harvester cluster
  • Go to Virtual Machine page

Ok I'll make a PR to restore that part and add a comment about it. Investigating if the last change has been breaking or if the issue is related to this PR at all, since these errors are suspicious and unrelated to my changes.

@cnotv
Copy link
Member Author

cnotv commented Aug 9, 2024

I can confirm that the issue is related to this last code removed.

Screenshot 2024-08-09 at 14 13 12

cnotv added a commit to cnotv/dashboard that referenced this pull request Aug 12, 2024
* Update checkout to v4 and bump Node to 16

* Update GHA workflow migration paths

* Removed named exports from Vue files

* Move code outside of the Vue app element

* Remove @nuxtjs/eslint-config-typescript

* Remove @nuxt/types and @nuxt/typescript-build

* Fix import issue with http-proxy-middleware

* Replace @nuxtjs/axios with axios and axios-retry

* Remove @nuxtjs/webpack-profile

* Fix linting issues after Nuxt webpack removal

* Pin resolution for glob after rebase

* Update yarn.lock after rebase

* Fix issue with rancher-components

* Bump rancher-component GHA config to match rebase changes

* Generate yarn file

* Add dependency

* Remove nuxt global var in app template

* Pin version for babel/plugin-proposal-private-methods
nwmac pushed a commit to nwmac/dashboard that referenced this pull request Aug 13, 2024
* Update checkout to v4 and bump Node to 16

* Update GHA workflow migration paths

* Removed named exports from Vue files

* Move code outside of the Vue app element

* Remove @nuxtjs/eslint-config-typescript

* Remove @nuxt/types and @nuxt/typescript-build

* Fix import issue with http-proxy-middleware

* Replace @nuxtjs/axios with axios and axios-retry

* Remove @nuxtjs/webpack-profile

* Fix linting issues after Nuxt webpack removal

* Pin resolution for glob after rebase

* Update yarn.lock after rebase

* Fix issue with rancher-components

* Bump rancher-component GHA config to match rebase changes

* Generate yarn file

* Add dependency

* Remove nuxt global var in app template

* Pin version for babel/plugin-proposal-private-methods
nwmac pushed a commit to nwmac/dashboard that referenced this pull request Oct 24, 2024
* Update checkout to v4 and bump Node to 16

* Update GHA workflow migration paths

* Removed named exports from Vue files

* Move code outside of the Vue app element

* Remove @nuxtjs/eslint-config-typescript

* Remove @nuxt/types and @nuxt/typescript-build

* Fix import issue with http-proxy-middleware

* Replace @nuxtjs/axios with axios and axios-retry

* Remove @nuxtjs/webpack-profile

* Fix linting issues after Nuxt webpack removal

* Pin resolution for glob after rebase

* Update yarn.lock after rebase

* Fix issue with rancher-components

* Bump rancher-component GHA config to match rebase changes

* Generate yarn file

* Add dependency

* Remove nuxt global var in app template

* Pin version for babel/plugin-proposal-private-methods
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove or replace all the @nuxt libraries
4 participants