fix: parse json to extract terraform version #7239
Merged
+1
−1
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.
Request JSON output when getting the Terraform version to build the versions.txt file. When using terraform version, and piping the output to head (to get the first line) and then to awk (to get the version string), there's a race condition that might cause head to close the pipe before Terraform flushed its entire output to the pipe, resulting in a 141 error (141 -128 = 13 -> SIGPIPE).
This change is expected to make the CI workflow more stable.
Readiness checklist
In order to have this pull request merged, complete the following tasks.
Pull request author tasks
Conventional Commit v1.0.0 spec.
upgrade guide.
Fix #ISSUE_NUMBERorClose #ISSUE_NUMBERtext to the description ofthe pull request.
Super-linter maintainer tasks
breakingif this change breaks compatibility with the previousreleased version.
automation,bug,documentation,enhancement,infrastructure.with the version that release-please proposes in the
preview-release-notesCI job.