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

Nuxt removal #7211

Merged
merged 2 commits into from
Mar 8, 2023
Merged

Nuxt removal #7211

merged 2 commits into from
Mar 8, 2023

Conversation

codyrancher
Copy link
Contributor

@codyrancher codyrancher commented Oct 18, 2022

General strategy:

Nuxt generates files for our application including things like route creation or plugin instantiation. I take all of the generated files and move them into shell/nuxt with minimal changes. I then migrate our nuxt.config.js to vue.config.js as close to 1 to 1 as I can. I then modify certain files if we no longer support certain aspects such as not supporting .ts/module imports in the vue.config.js or having to prepend @ to some of the style file imports.

Notes

  • I don't think you need to look at the files in the nuxt directory. If you insist, the two that have the most edits are the router.js and the index.js files in order to fix imports.
  • Changes like https://github.com/rancher/ui-plugin-examples/pull/17/files will be necessary for extensions to work with this change
  • I verified that extensions work with the ui-plugin-examples
  • I still need to verify that the dist directory generated by yarn build will work

fixes #5968

@codyrancher codyrancher force-pushed the nuxt-removal branch 3 times, most recently from 572a41d to 1dd43af Compare November 3, 2022 22:05
@codyrancher
Copy link
Contributor Author

I see the tests aren't passing so I'll take a look at that tomorrow. I think it's ready to have eyes on it though.

@codyrancher codyrancher closed this Nov 4, 2022
@github-actions github-actions bot added this to the v2.7.1 milestone Nov 4, 2022
@codyrancher codyrancher reopened this Nov 4, 2022
@codyrancher codyrancher force-pushed the nuxt-removal branch 5 times, most recently from 1623a30 to 5bbe668 Compare November 8, 2022 16:11
@codyrancher codyrancher marked this pull request as ready for review November 8, 2022 16:29
@codyrancher codyrancher closed this Nov 8, 2022
@codyrancher codyrancher reopened this Nov 8, 2022
@zube zube bot closed this Nov 8, 2022
@codyrancher codyrancher force-pushed the nuxt-removal branch 4 times, most recently from 67678a4 to af0ca33 Compare February 10, 2023 17:04
@codyrancher
Copy link
Contributor Author

codyrancher commented Feb 14, 2023

Those port and host entries are in master. The current request is for a public entry. I had issues before with the host, which i now need to manually specify in my host file (at lease machine name --> 0.0.0.0).

The public entry was added.

@codyrancher
Copy link
Contributor Author

codyrancher commented Feb 14, 2023

Dashboard version string and app creator aside, there's been a number of blockers. Some that have only just been resolve or still open include $worker creation, typescript conversions to js and autoLoadPackages handling

Either way we need to wait for 2.7.2 to branch before merging. We should be in a good place when it happens.

I debated whether I would respond since I'm not sure it will impact anything but I decided I wanted to just in case it might improve things in the future. I say this with respect, I know you put a good amount of effort and time into these reviews but I disagree with most of the above.

It's so difficult for me to see a world in which the Typescript changes requested were a blocker.

  • The changes obviously had 0 impact on the user as it didn't impact correctness at all

  • The changes hardly had any impact on a developer since

    • It was only in config files where there's very little logic
    • Very few places in our code can make use of intellisense or type enforcement by the compiler.
    • Vue 2 has very poor support for typescript and we spend seemingly most our time in the vue files
    • I might be making a bit of a stretch on this one but it sounds like Vue3 has better support for Typescript and Vue3 is blocked by this change. The longer we delay changes like this the longer we delay better support and adoption of Typescript in this project.
  • You're right that we have to wait for 2.7.2. But this PR has been open for months and now multiple releases... I have to admit that I've been responsible for the delays too but stuff like Typescript which could've easily been recorded as an issue and fixed after this change had been pushed definitely contribute.

If there are other changes you want done please let me know. I'm planning to have Neil take a look during my 1 on 1 today and if there's nothing more I'm going to update the routes and plugins in anticipation of a final look over.

@codyrancher
Copy link
Contributor Author

Unless there's something wrong with autoload I don't think there's much left.

richard-cox
richard-cox previously approved these changes Mar 3, 2023
Copy link
Member

@richard-cox richard-cox left a comment

Choose a reason for hiding this comment

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

I've

  • rebased to resolve a merge conflict
  • fixed websocket proxying for paths other than v1/v3/k8s (for example streaming container logs)
  • created Remove autoLoad #8338

There was a failing test, if that passes though and once we branch for 2.7.2, lets get this in.

[Update]: Same gate failed. If @nwmac is happy merging this before it's fixed (and we branch) then it can merge

@codyrancher codyrancher removed the request for review from cnotv March 8, 2023 04:02
- This broke things like container log streaming
- Fix is to dynamically find proxy to upgrade to
- list of proxies to upgrade to is limited to those that initially have ws enabled
- Also add typing
@codyrancher codyrancher requested review from cnotv and removed request for cnotv March 8, 2023 04:04
@codyrancher codyrancher dismissed cnotv’s stale review March 8, 2023 04:06

The changes requested were resolved a while ago

@codyrancher codyrancher requested a review from richard-cox March 8, 2023 04:25
Copy link
Contributor

@cnotv cnotv left a comment

Choose a reason for hiding this comment

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

I'm just doing an overview of the changes and I think there's a bunch of work which needs to be addressed and added in the TODO for the Vue3 migration.
It makes no sense to block for this, obviously, but we need to take notes.
#7653

ASAP I'll try to run and build it as part of the QA.
Some concerns go to the deployment process and the configuration with the paths, but it seems formally ok.


import '../assets/styles/app.scss'

import _77180f1e from '../layouts/blank.vue'
Copy link
Contributor

Choose a reason for hiding this comment

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

I have some concerns about hardcoding hashed imports, as they may cause cache issues.
Let's make an issue to review this and apply proper naming maybe?

}

const $loading = () => {
const $nuxt = typeof window !== 'undefined' && window['$nuxt']
Copy link
Contributor

Choose a reason for hiding this comment

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

This, as for the cache, should have an issue to remove Nuxt residual out of the code.

@@ -0,0 +1,143 @@
<template>
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we document/comment concisely somewhere what is this code from the shell/nuxt folder for, why do we need it and what are we planning to do?
Up to you either with a commit or an issue.

@@ -17,16 +17,16 @@
"rootDir": ".",
Copy link
Contributor

Choose a reason for hiding this comment

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

It does not make so much sense to have a default inside a folder and the one in the root importing it which imports another one 😅
We should make an issue where we review the TsConfigs we have around.

Copy link
Member

@richard-cox richard-cox left a comment

Choose a reason for hiding this comment

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

Given #8376 is addressed soon, and we're not publishing shell, lets get this in.

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 Nuxt as a Dependency
5 participants