As we upgrade Node.js versions on CI, we often need to make upgrades in our repositories to support these changes. This is particularly a problem in repositories that build and commit assets (with Webpack/rollup) as building assets in different Node.js versions often produces different results which breaks validation given we commit those assets to the repo. It's also a problem in repos that use Webdriver as Webdriver often needs rebuilding/new releases with each new Node version.
When upgrading we often have to write several patches to the master branch in preparation, but we never consider release branches, and as a result often break compatibility with CI on older branches.
A recent example is T296082 where upgrading from Node.js required an upgrade to both WebdriverIO v5 as well as an update to nvm: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MobileFrontend/+/740616
This is very counterintuitive for people not familiar with the code repositories in questions that are trying to do releases and requires a bit of detective work from people having to revisit patches that are sometimes several years old.
One option to counter this is to freeze the Node.js version on relevant release branches. Another option would be to disable Selenium jobs on those branches altogether to reduce the work needed to get these to work with CI.
Alternatively, if we retain the status quo, we should be addressing this every time we do a Node.js release, making that part of our upgrade process.