warrensbox/terraform-switcher

New version v1.1.0 does not work as expected

Closed this issue · 4 comments

Hello, there is some issue with the latest version which has been released today - it determines wrongly Terraform version "09" while it was working fine until today. Please kindly fix the issue.

warrensbox/terraform-switcher info checking GitHub for latest tag
warrensbox/terraform-switcher info found version: 1.1.0 for v1.1.0/linux/amd64
warrensbox/terraform-switcher info installed /home/AzDevOps/.bin/tfswitch

Trying to read required terraform binary version from terraform files within /agent/_work/1/s/edited
TFVER=09

Could you please start tfswitch with --log-level=DEBUG and provide us with the output?

We determined that the root cause of the issue is that some outputs of tfswitch has been changed - for example timestamp has been added before "Matched version: " and this is causing our pipelines to fail (because we are extracting the version from tfswitch outputs and then we assign it to variable).

Ah sorry to hear that.
The log format will (likely) not change in the future, but this is really not something one should rely on in a build pipeline.
Logging output is prone to changes.

You probably want something like this #296

@Mabog10 see latest release.
Let us know if the fix proposed by @MatrixCrawler works.