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
Preinstall Palette Nodes #405
Comments
Considerations: |
Adding a list of npm module specifiers (name/version) in the Template object is fairly straight forward. The harder parts are: Getting the UI right Although a simple expandable list of text inputs (like the env var table) should do for MVP. Considering how the nodes then get installed Given the memory constraints a container could be running under, we know that running It is always more preferable for the nodes to get 'baked' into the container image being run - however that is an administrative task to build such an image, then create a stack that identifies the new image and make it available. That is hardly the self-service model we want in ff.cloud. When That will cause a slower startup time - need to ensure we don't get timeouts in the forge UI/API whilst waiting for it to complete. |
@knolleary I assume the slower start time is the tradeoff that frees up more memory for NPM because Node-RED isn't running? |
It is generally better to have the node installed before Node-RED starts. In fact, the 'auto install' capability only works for nodes that Node-RED knows it needs to have installed based on what it saw the last time it was running. It wouldn't work for the case a user chooses to add a node via the FF dashboard - unless we also manually update the NR runtime settings in the database to make it think it knows about it. (Sorry if that isn't clear... I know what I mean and these comments will make sense to me when we look at this properly). Another consideration that may be inscope of this story is:
I think there should be a single consolidated view - we wouldn't want things to get confused because there are two different ways to add nodes to the project and they result in different views saying different things. |
ignore me!
|
This has some tie in with FlowFuse/nr-launcher#54 and FlowFuse/nr-launcher#53 (comment) |
Revisiting this story, I'm increasing the sizing as there as a reasonable amount of UI work to get right as well as launcher work to get the nodes installed. Plus there are, of course, some edge cases that need thinking about.
The problems start when you consider the Palette Manager in the editor - where a user can both install and remove nodes within the editor directly. Essentially: How do we resolve changes made in the flowforge UI with changes made in Node-RED directly? This can get quite complicated. To keep it simple, I think the approach I favour is:
The only gap is what happens if the user has modified the node list in the project, not restarted NR, then uses the NR palette manager to modify the list. We now have two sets of competing changes... I suspect we just need to start implementing all of the above and the right approach to this bit will emerge. |
Verified on Staging |
Hi @knolleary, on your second point in your comment above you mention specifying a template. Where exactly do you do this? My goal: What I tried:
This resulted in an overwrite of the package file. After adding the dependencies and doing an npm install manually, it installs the packages as expected but after a restart of the FF instance again it is reverted in the settings of the project. I also attempted to activate the autoInstall configuration in the settings.js file. It also gets overwritten. Comments on this will be appreciated. |
Hi @JMDaling I assume this within your own local install of FlowForge? We do not support manually editing the individual instance's package.json and settings files - they are all managed/generated by the platform. Currently, the only ways to manage the packages in your instance is either via the Manage Palette option within the editor, or via the Instance palette settings view in the platform. We do have an item in the backlog to support adding packages to the Instance Template - so they get preinstalled with any instance created from that Template. You can follow #2002 for updates. |
Epic
#141
Description
As a: user
I want to: specify node that are pre-installed as part of a template
So that: I can start a project with my commonly used nodes
Acceptance Criteria
@1.2.3
syntaxThe text was updated successfully, but these errors were encountered: