Skip to content

Find and remove old NodeSource files#6773

Merged
gherceg merged 3 commits intomasterfrom
gh/node/remove-old-files
Jan 5, 2026
Merged

Find and remove old NodeSource files#6773
gherceg merged 3 commits intomasterfrom
gh/node/remove-old-files

Conversation

@gherceg
Copy link
Copy Markdown
Contributor

@gherceg gherceg commented Dec 29, 2025

Followup to #6742

https://dimagi.atlassian.net/browse/SAAS-19040

apt was hitting an error due to /etc/apt/sources.list.d containing http://deb.nodesource.com/node_20.x which was returning a 404. This change ensures references to nodesource files are removed prior to installing the new version of node. I don't see any references for v24 in /etc/apt/sources.list.d, so I suspect that is a safe change to make.

Environments Affected

All

  • If the changes affect multiple environments, I will ensure they are rolled out consistently across all environments.
Announce New Release
  • After merging, I will follow these instructions
    to announce a new commcare-cloud release.

@gherceg
Copy link
Copy Markdown
Contributor Author

gherceg commented Dec 29, 2025

@AmitPhulera I'm leaning towards creating a new changelog for self hosters to run this again as opposed to updating the v24 changelog. Does that seem right to you?

@gherceg gherceg marked this pull request as ready for review December 29, 2025 20:26
Comment on lines +5 to +6
- "deb_nodesource_com_node_*.list"
- "nodesource*.list"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  • Are the filenames being removed dynamic, and therefore cannot be matched exactly? If not, why not use exact known-problematic filenames?
  • Could it be confusing at a later time if a nodesource list was added intentionally, and then this automation caused it to be removed?
  • If exact filenames are not possible, would it be possible (and make sense) to change the patterns to match specific (old) versions rather than these patterns that would seem to match any version?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks yeah this was a reflection of my lack of understanding here, which is all the more reason to keep it simple/clean and remove specific files.

- "deb_nodesource_com_node_*.list"
- "nodesource*.list"
- "deb_nodesource_com_node_16_x.list"
- "deb_nodesource_com_node_20_x.list"
Copy link
Copy Markdown
Contributor

@millerdev millerdev Jan 1, 2026

Choose a reason for hiding this comment

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

Looks like this list will grow over time. I wonder if we're doing something wrong or in a not-best way (other than not using containers)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure it will grow, and again I have a lack of understanding here. We do not have a corresponding file for deb_nodesource_com_24_x.list in this directory. It seems that because of the change made to how we install node, it might no longer rely on files like these.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Got it, we did something somewhere else to avoid these files going forward. Excellent!

@gherceg gherceg merged commit 4398dbd into master Jan 5, 2026
7 checks passed
@gherceg gherceg deleted the gh/node/remove-old-files branch January 5, 2026 16:06
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.

2 participants