[BUG] 'runway tfenv install' broken
See original GitHub issueBug Description
Hello,
This started happening yesterday Apr 13, 2022
We’ve tried all sort of combinations of runway/terraform/python versions and cannot seem to make this work anymore.
This is affect our CI/CD pipeline which can no longer install the version of terraform specified in the runway.yaml file because runway, i believe, is using runway tfenv to install the desired version of terraform
Any help would be greatly appreciated. Until then i’ll be creating my own “wrapper” to install the desired versions of terraform myself into the directory runway is looking for $HOME/.tfenv/versions
Thanks!
devops/tfetest|~/repos/innovyze/devops-terraform
😄-bash-⌲ runway tfenv install 1.0.0
Traceback (most recent call last):
File "/Users/patrick.raco/.local/bin/runway", line 8, in <module>
sys.exit(cli())
File "/Users/patrick.raco/.local/lib/python3.7/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/Users/patrick.raco/.local/lib/python3.7/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/Users/patrick.raco/.local/lib/python3.7/site-packages/runway/_cli/main.py", line 33, in invoke
return super().invoke(ctx)
File "/Users/patrick.raco/.local/lib/python3.7/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/patrick.raco/.local/lib/python3.7/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/patrick.raco/.local/lib/python3.7/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/patrick.raco/.local/lib/python3.7/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/Users/patrick.raco/.local/lib/python3.7/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/Users/patrick.raco/.local/lib/python3.7/site-packages/runway/_cli/commands/_tfenv/_install.py", line 31, in install
"terraform path: %s", TFEnvManager().install(version_requested=version)
File "/Users/patrick.raco/.local/lib/python3.7/site-packages/runway/env_mgr/tfenv.py", line 348, in install
if not self.version:
File "/Users/patrick.raco/.local/lib/python3.7/site-packages/backports/cached_property/__init__.py", line 80, in __get__
val = self.func(instance)
File "/Users/patrick.raco/.local/lib/python3.7/site-packages/runway/env_mgr/tfenv.py", line 276, in version
for i in get_available_tf_versions(include_prerelease_versions)
File "/Users/patrick.raco/.local/lib/python3.7/site-packages/runway/env_mgr/tfenv.py", line 118, in get_available_tf_versions
reverse=True,
File "/Users/patrick.raco/.pyenv/versions/3.7.12/lib/python3.7/distutils/version.py", line 52, in __lt__
c = self._cmp(other)
File "/Users/patrick.raco/.pyenv/versions/3.7.12/lib/python3.7/distutils/version.py", line 337, in _cmp
if self.version < other.version:
TypeError: '<' not supported between instances of 'str' and 'int'```
### Expected Behavior
1. run: `runway tfenv install VERSION`
2. expect specified terraform version to be installed
### Steps To Reproduce
1. install `runway`: `pip install runway [--user]`
2. make sure desired version of terraform is not installed with: `runway tfenv list`
3. try to install it: `runway tfenv install --version`
### Runway version
- 1.18.1
- 1.18.3
- 2.6.1
### Installation Type
pypi (pip, pipenv, poetry, etc)
### OS / Environment
- macos
- linux
### Anything else?
- seems to happen if/when the desired version of terraform is NOT installed
- Did notice these diffs in the installed python packages between a successful and failed run:

Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:16 (2 by maintainers)
Top Results From Across the Web
Manual installation broke. tfenv 2.2.2-82-g82fe3ce · Issue #284
Everything worked fine on Friday, but now it doesn't tfenv 2.2.2-82-g82fe3ce How to reproduce: docker run -it --rm ...
Read more >Release 1.18.3 Onica Group - runway Documentation
runway tfenv install [OPTIONS] [<version>]. Options. --debug ... The path is broken down into the following attributes:.
Read more >@onica/runway: Versions | Openbase
fix broken url in error when registering invalid CFNgin lookups @ITProKyle (#1295) ... cli: add tfenv list command @ITProKyle (#777); cli: add kbenv...
Read more >How to manage multiple versions of Terragrunt and Terraform ...
Here is what this post will cover: Locking down compatible Terraform versions in your modules; Using tgswitch and tfenv to install multiple ...
Read more >Difference between tfenv custom image build compare with ...
Difference between tfenv custom image build compare with standard hashicorp image ... and we are getting an error while installing software, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

This is straying from the topic of this issue but @pataraco the issue you are referring to is not that YAML anchors are not supported its that invalid fields are no longer supported in the config file (e.g.
airif not a valid field in a CFNgin or runway config file). All you need to do is define your anchors under a supported field.Example:
@sagargulabani as a workaround, i wrote something to install the required versions of terraform into the directory ($HOME/.tfenv/versions) that
runwaychecks if it needs to install them itself usingrunway tfenvso it will be happy and just do the planning/deploying.