Repository navigation
pin tf version to avoid surprise breaking changes - #11779
Conversation
Co-authored-by: Copilot <copilot@github.com>
There was a problem hiding this comment.
Pull request overview
Pins the Terraform CLI version used by the recipes engine to reduce unexpected behavior from upstream “latest” changes.
Changes:
- Switch Terraform installation from
releases.LatestVersiontoreleases.ExactVersionin the Terraform installer path. - Add
github.com/hashicorp/go-versionusage to construct the pinned version object.
Comments suppressed due to low confidence (1)
pkg/recipes/terraform/install.go:194
- Terraform installation metrics are still tagged with terraform_version="latest" even though the installer now pins an exact version. This will make dashboards/alerts misleading; tag the metrics with the pinned version string (and keep it consistent for both success and failure paths).
&releases.ExactVersion{Product: product.Terraform, Version: version.Must(version.NewVersion("1.14.9"))},
})
if err != nil {
metrics.DefaultRecipeEngineMetrics.RecordTerraformInstallationDuration(ctx, installStartTime,
[]attribute.KeyValue{
metrics.TerraformVersionAttrKey.String("latest"),
metrics.OperationStateAttrKey.String(metrics.FailedOperationState),
},
)
return fmt.Errorf("failed to install Terraform to global location: %w", err)
}
metrics.DefaultRecipeEngineMetrics.RecordTerraformInstallationDuration(ctx, installStartTime,
[]attribute.KeyValue{
metrics.TerraformVersionAttrKey.String("latest"),
metrics.OperationStateAttrKey.String(metrics.SuccessfulOperationState),
},
There was a problem hiding this comment.
Let's put the version number in a separate location from the code. For Python and node and other tools we have .<version> files at the root of the repo. For example, .node-version. How about following that pattern, unless Terraform has another convention that we could hook into.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #11779 +/- ##
==========================================
+ Coverage 51.38% 51.39% +0.01%
==========================================
Files 698 699 +1
Lines 44037 44036 -1
==========================================
+ Hits 22627 22634 +7
+ Misses 19252 19246 -6
+ Partials 2158 2156 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Radius functional test overviewClick here to see the test run details
Test Status⌛ Building Radius and pushing container images for functional tests... |
I have updated the code to conform to this pattern. Could you please review. |
# Description Pinning tf vesion in code. ## Type of change - This pull request is a minor refactor, code cleanup, test improvement, or other maintenance task and doesn't change the functionality of Radius (issue link optional). ## Contributor checklist Please verify that the PR meets the following requirements, where applicable: <!-- This checklist uses "TaskRadio" comments to make certain options mutually exclusive. See: https://github.com/mheap/require-checklist-action?tab=readme-ov-file#radio-groups For details on how this works and why it's required. --> - An overview of proposed schema changes is included in a linked GitHub issue. - [ ] Yes <!-- TaskRadio schema --> - [x] Not applicable <!-- TaskRadio schema --> - A design document PR is created in the [design-notes repository](https://github.com/radius-project/design-notes/), if new APIs are being introduced. - [ ] Yes <!-- TaskRadio design-pr --> - [x] Not applicable <!-- TaskRadio design-pr --> - The design document has been reviewed and approved by Radius maintainers/approvers. - [ ] Yes <!-- TaskRadio design-review --> - [x] Not applicable <!-- TaskRadio design-review --> - A PR for the [samples repository](https://github.com/radius-project/samples) is created, if existing samples are affected by the changes in this PR. - [ ] Yes <!-- TaskRadio samples-pr --> - [x] Not applicable <!-- TaskRadio samples-pr --> - A PR for the [documentation repository](https://github.com/radius-project/docs) is created, if the changes in this PR affect the documentation or any user facing updates are made. - [ ] Yes <!-- TaskRadio docs-pr --> - [x] Not applicable <!-- TaskRadio docs-pr --> - A PR for the [recipes repository](https://github.com/radius-project/recipes) is created, if existing recipes are affected by the changes in this PR. - [ ] Yes <!-- TaskRadio recipes-pr --> - [x] Not applicable <!-- TaskRadio recipes-pr --> --------- Co-authored-by: Copilot <copilot@github.com> Signed-off-by: sk593 <shruthikumar@microsoft.com>
# Description Pinning tf vesion in code. ## Type of change - This pull request is a minor refactor, code cleanup, test improvement, or other maintenance task and doesn't change the functionality of Radius (issue link optional). ## Contributor checklist Please verify that the PR meets the following requirements, where applicable: <!-- This checklist uses "TaskRadio" comments to make certain options mutually exclusive. See: https://github.com/mheap/require-checklist-action?tab=readme-ov-file#radio-groups For details on how this works and why it's required. --> - An overview of proposed schema changes is included in a linked GitHub issue. - [ ] Yes <!-- TaskRadio schema --> - [x] Not applicable <!-- TaskRadio schema --> - A design document PR is created in the [design-notes repository](https://github.com/radius-project/design-notes/), if new APIs are being introduced. - [ ] Yes <!-- TaskRadio design-pr --> - [x] Not applicable <!-- TaskRadio design-pr --> - The design document has been reviewed and approved by Radius maintainers/approvers. - [ ] Yes <!-- TaskRadio design-review --> - [x] Not applicable <!-- TaskRadio design-review --> - A PR for the [samples repository](https://github.com/radius-project/samples) is created, if existing samples are affected by the changes in this PR. - [ ] Yes <!-- TaskRadio samples-pr --> - [x] Not applicable <!-- TaskRadio samples-pr --> - A PR for the [documentation repository](https://github.com/radius-project/docs) is created, if the changes in this PR affect the documentation or any user facing updates are made. - [ ] Yes <!-- TaskRadio docs-pr --> - [x] Not applicable <!-- TaskRadio docs-pr --> - A PR for the [recipes repository](https://github.com/radius-project/recipes) is created, if existing recipes are affected by the changes in this PR. - [ ] Yes <!-- TaskRadio recipes-pr --> - [x] Not applicable <!-- TaskRadio recipes-pr --> --------- Co-authored-by: Copilot <copilot@github.com> (cherry picked from commit ec789e8)
Description
Pinning tf vesion in code.
Type of change
Contributor checklist
Please verify that the PR meets the following requirements, where applicable: