Skip to content

fix: use first tool version from .tool-versions when multiple are declared#1147

Open
marnagy wants to merge 15 commits into
mainfrom
mnagy/dt-5340/fix-multiple-tool-versions
Open

fix: use first tool version from .tool-versions when multiple are declared#1147
marnagy wants to merge 15 commits into
mainfrom
mnagy/dt-5340/fix-multiple-tool-versions

Conversation

@marnagy
Copy link
Copy Markdown
Contributor

@marnagy marnagy commented May 18, 2026

Please read CONTRIBUTING.md for additional information on contributing to this repository!

What this PR does / why we need it

What is says on the tin.

Jira ID

DT-5340

Notes for your reviewers


Rovo Dev code review: Rovo Dev has reviewed this pull request
Any suggestions or improvements have been posted as pull request comments.

@atlassian
Copy link
Copy Markdown
Contributor

atlassian Bot commented May 18, 2026

The issue is ready for review, and the acceptance criteria have been met:

  • ✅ Using multiple versions of the same tool (node) within the same repository does not fail in CircleCI.

Check Jira issue

Comment thread shell/ci/env/mise.sh Outdated
Comment thread shell/circleci/machine.sh Outdated
@getoutreach-ci-1
Copy link
Copy Markdown
Contributor

Link to code coverage report (posted by coverbot 🤖)

@marnagy marnagy marked this pull request as ready for review May 18, 2026 14:10
@marnagy marnagy requested a review from a team as a code owner May 18, 2026 14:10
Copy link
Copy Markdown
Member

@malept malept left a comment

Choose a reason for hiding this comment

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

The design of this change is approaching the problem from the wrong angle. Try this instead:

[REMOVED, see later comment]

Also, this fix is missing tests (originally for version_all_from_toolversions but for the suggestion, versions_from_toolversions).

Copy link
Copy Markdown
Member

@malept malept left a comment

Choose a reason for hiding this comment

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

That being said, I think the simpler solution is to just install the first Node.js version and ignore the rest. Still needs regression tests though.

…ests

- Use version_from_toolversions (first entry) instead of iterating all
  versions with version_all_from_toolversions in both shell/ci/env/mise.sh
  and shell/circleci/machine.sh, as requested by reviewer
- Add shell/lib/mise_test.bats with regression tests for
  version_from_toolversions and version_all_from_toolversions
Copy link
Copy Markdown
Member

@malept malept left a comment

Choose a reason for hiding this comment

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

Remove version_all_from_toolversions, it's unused

@marnagy marnagy requested a review from malept May 18, 2026 17:01
Copy link
Copy Markdown
Member

@malept malept left a comment

Choose a reason for hiding this comment

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

  1. Revert changes in shell/ci/env/mise.sh and shell/circleci/machine.sh, it's not worth changing the order.
  2. Fix function comment for version_from_toolversions - it's referencing a now-deleted function and the actual change can be better integrated into the doc comment, rather than appending a note at the end.
  3. Add regression tests for version_from_toolversions.

@malept
Copy link
Copy Markdown
Member

malept commented May 19, 2026

Also probably needs a better PR title

@marnagy marnagy changed the title fix: multiple versions cause CI error fix: use first nodejs version from .tool-versions when multiple are declared May 20, 2026
@marnagy marnagy requested a review from malept May 20, 2026 08:12
@malept malept changed the title fix: use first nodejs version from .tool-versions when multiple are declared fix: use first tool version from .tool-versions when multiple are declared May 20, 2026
Comment thread shell/lib/mise_test.bats Outdated
Comment thread shell/lib/mise_test.bats Outdated
Comment thread shell/lib/mise_test.bats Outdated
marnagy and others added 2 commits May 21, 2026 08:48
Co-authored-by: Mark Lee <malept@users.noreply.github.com>
Co-authored-by: Mark Lee <malept@users.noreply.github.com>
@marnagy marnagy requested a review from malept May 21, 2026 07:49
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