Skip to content

Conversation

@pujitm
Copy link
Member

@pujitm pujitm commented Mar 19, 2025

thank you to SteveHawk on the unraid.net forums for surfacing this: https://forums.unraid.net/topic/188319-persist-node-package-download/

Summary by CodeRabbit

  • Bug Fixes
    • Improved the plugin’s file-cleanup process by correcting the reference used to identify outdated Node.js archive files. This update ensures that file management functions as intended, contributing to more reliable plugin behavior.

@pujitm pujitm requested a review from elibosley as a code owner March 19, 2025 21:57
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 19, 2025

Walkthrough

The pull request updates a bash script in the Unraid plugin configuration. It changes the reference used for identifying Node.js archive files from an entity (&NODEJS_FILENAME;) to the variable ${NODE_FILE}. Additionally, the exported variable declaration has been adjusted to use the variable substitution ${NODEJS_FILENAME};.

Changes

File(s) Change Summary
plugin/.../dynamix.unraid.net.plg Changed the find command to reference ${NODE_FILE} instead of &NODEJS_FILENAME; and updated the NODE_FILE export declaration accordingly.

Possibly Related PRs

Suggested Reviewers

  • elibosley

Poem

A tweak in a script, a clever light,
Variables gleam in the code so bright.
Node files now dance to a proper tune,
Ensuring deletion under a clear monsoon.
Small changes sing an efficient, joyful flight!


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro (Legacy)

📥 Commits

Reviewing files that changed from the base of the PR and between 33a1a1d and c4cda3f.

📒 Files selected for processing (1)
  • plugin/plugins/dynamix.unraid.net.plg (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: Build Web App
  • GitHub Check: Build API
  • GitHub Check: Test API
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (1)
plugin/plugins/dynamix.unraid.net.plg (1)

137-137:

✅ Verification successful

Fixed Node.js persistence across reboots

The change properly uses the ${NODE_FILE} variable instead of the XML entity reference &NODEJS_FILENAME; directly. This ensures the correct Node.js archive is preserved during cleanup operations, which fixes the issue of Node.js installations not persisting across system reboots.


🏁 Script executed:

#!/bin/bash
# Verify that the NODE_FILE variable is correctly set and used
grep -A 5 "NODE_FILE" plugin/plugins/dynamix.unraid.net.plg

# Check if there are any other instances where entity references might need similar fixes
grep -n "&NODEJS" plugin/plugins/dynamix.unraid.net.plg | grep -v "\"&NODEJS"

Length of output: 1584


Verified: Node.js persistence fix confirmed

The code now correctly uses the ${NODE_FILE} variable in the cleanup command rather than hardcoding the XML entity reference. The verification output confirms that although NODE_FILE is assigned the XML entity ("&NODEJS_FILENAME;"), it is properly referenced in the file operations (including the cleanup with the find command), ensuring that the correct Node.js archive is preserved across reboots. No further changes are required.


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions
Copy link
Contributor

This plugin has been deployed to Cloudflare R2 and is available for testing.
Download it at this URL:

https://preview.dl.unraid.net/unraid-api/tag/PR1256/dynamix.unraid.net.plg

@elibosley
Copy link
Member

Should we also delete on uninstall?

@elibosley elibosley merged commit 0415cf1 into main Mar 20, 2025
8 checks passed
@elibosley elibosley deleted the fix/node-dl branch March 20, 2025 14:18
elibosley pushed a commit that referenced this pull request Mar 25, 2025
🤖 I have created a release *beep* *boop*
---


## [4.4.0](v4.3.1...v4.4.0)
(2025-03-25)


### Features

* add ReplaceKey functionality to plugin
([#1264](#1264))
([4aadcef](4aadcef))
* downgrade page replace key check
([#1263](#1263))
([8d56d12](8d56d12))
* make log viewer component dynamic
([#1242](#1242))
([e6ec110](e6ec110))
* ReplaceKey functionality in Registration and Update pages
([#1246](#1246))
([04307c9](04307c9))
* UnraidCheckExec for Check OS Updates via UPC dropdown
([#1265](#1265))
([5935a3b](5935a3b))


### Bug Fixes

* **deps:** update all non-major dependencies
([#1236](#1236))
([7194f85](7194f85))
* **deps:** update all non-major dependencies
([#1247](#1247))
([20b0aeb](20b0aeb))
* **deps:** update all non-major dependencies
([#1251](#1251))
([33a1a1d](33a1a1d))
* **deps:** update all non-major dependencies
([#1253](#1253))
([53fec0e](53fec0e))
* **deps:** update dependency @nestjs/passport to v11
([#1244](#1244))
([edc93a9](edc93a9))
* **deps:** update dependency graphql-subscriptions to v3
([#1209](#1209))
([c14c85f](c14c85f))
* **deps:** update dependency ini to v5
([#1217](#1217))
([f27660f](f27660f))
* **deps:** update dependency jose to v6
([#1248](#1248))
([42e3d59](42e3d59))
* **deps:** update dependency marked to v15
([#1249](#1249))
([2b6693f](2b6693f))
* **deps:** update dependency pino-pretty to v13
([#1250](#1250))
([85fb910](85fb910))
* **deps:** update dependency pm2 to v6
([#1258](#1258))
([04ad2bc](04ad2bc))
* **deps:** update dependency shadcn-vue to v1
([#1259](#1259))
([1a4fe8f](1a4fe8f))
* **deps:** update dependency vue-i18n to v11
([#1261](#1261))
([0063286](0063286))
* **deps:** update vueuse monorepo to v13 (major)
([#1262](#1262))
([94caae3](94caae3))
* make scripts executable when building the plugin
([#1255](#1255))
([e237f38](e237f38))
* node installation not persisting across reboots
([#1256](#1256))
([0415cf1](0415cf1))
* update configValid state to ineligible in var.ini and adjust rel…
([#1268](#1268))
([ef8c954](ef8c954))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

3 participants