fix: generate local mise.toml config when tf/tofu_version inputs are set#119
Open
Tensho wants to merge 3 commits intogruntwork-io:mainfrom
Open
fix: generate local mise.toml config when tf/tofu_version inputs are set#119Tensho wants to merge 3 commits intogruntwork-io:mainfrom
Tensho wants to merge 3 commits intogruntwork-io:mainfrom
Conversation
f354e0a to
6a481ee
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The current
mise.tomlconfig file presence check doesn't look up to the repository root:Hence, error like this come up:
I guess there was an assumption that action should always target repo root, not a unit folder. In contrast,
miselooks up config file hierarchically, which is expected behaviour for those who rely on this dev tool. This PR preservestf_version/tofu_versionaction inputs precedence overmise.toml, but with mise-native approach:tf_version/tofu_versioninput variable is set, no matter ofmise.tomlconfig file presence (at any level) – generate localmise.tomlconfig file and letmiselook it up and use.tf_version/tofu_versioninput variable is not set, butmise.tomlconfig files is present (not necessary at the root, anywhere upwards the current working directory) – letmiselook it up and use.tf_version/tofu_versioninput variable is not set andmise.tomlconfig files is present – letmiseinstall the latest version.This behaviour is intuitive in terms of tool versions resolution.
Release Notes (draft)
Migration Guide
N/A
Notes
tf_versionaction input to specify desired Terraform version. I don't know why it has been removed in v3, TBH. Happy to yank it if you want to preservetofu_version+tf_pathinterface exclusively.jdx/mise-actionfromv2tov3. There are no breaking changes.MISE_GITHUB_TOKENenvironment variable withgithub_tokenaction input as the former one is not supported (code search)P.S. I like the tools versioning shift towards
miseand I appreciate there is an option for it 👍