Skip to content

pin tf version to avoid surprise breaking changes - #11779

Merged
nithyatsu merged 3 commits into
radius-project:mainfrom
nithyatsu:tffix
Apr 30, 2026
Merged

nithyatsu merged 3 commits into
radius-project:mainfrom
nithyatsu:tffix

Conversation

@nithyatsu

@nithyatsu nithyatsu commented Apr 29, 2026 •

Copy link
Copy Markdown
Contributor

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:

  • An overview of proposed schema changes is included in a linked GitHub issue.
    • Yes
    • Not applicable
  • A design document PR is created in the design-notes repository, if new APIs are being introduced.
    • Yes
    • Not applicable
  • The design document has been reviewed and approved by Radius maintainers/approvers.
    • Yes
    • Not applicable
  • A PR for the samples repository is created, if existing samples are affected by the changes in this PR.
    • Yes
    • Not applicable
  • A PR for the documentation repository is created, if the changes in this PR affect the documentation or any user facing updates are made.
    • Yes
    • Not applicable
  • A PR for the recipes repository is created, if existing recipes are affected by the changes in this PR.
    • Yes
    • Not applicable

Co-authored-by: Copilot <copilot@github.com>
@nithyatsu
nithyatsu marked this pull request as ready for review April 29, 2026 20:26
Copilot AI review requested due to automatic review settings April 29, 2026 20:26
@nithyatsu
nithyatsu requested review from a team as code owners April 29, 2026 20:26
willdavsmith
willdavsmith previously approved these changes Apr 29, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.LatestVersion to releases.ExactVersion in the Terraform installer path.
  • Add github.com/hashicorp/go-version usage 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),
		},

Comment thread pkg/recipes/terraform/install.go Resolved
Comment thread pkg/recipes/terraform/install.go Resolved

@brooke-hamilton brooke-hamilton left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

codecov Bot commented Apr 29, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.39%. Comparing base (210a9ec) to head (d0f074e).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/recipes/terraform/version.go 0.00% 2 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Co-authored-by: Copilot <copilot@github.com>
@radius-functional-tests

radius-functional-tests Bot commented Apr 29, 2026 •

Copy link
Copy Markdown

Radius functional test overview

🔍 Go to test action run

Click here to see the test run details
Name Value
Repository nithyatsu/radius
Commit ref d0f074e
Unique ID func3f458fabed
Image tag pr-func3f458fabed
  • gotestsum 1.13.0
  • KinD: v0.29.0
  • Dapr: 1.14.4
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.3.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/testrecipes/test-bicep-recipes/<name>:pr-func3f458fabed
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-func3f458fabed
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-func3f458fabed
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-func3f458fabed
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-func3f458fabed
  • deployment-engine test image location: ghcr.io/radius-project/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting corerp-cloud functional tests...
⌛ Starting ucp-cloud functional tests...
✅ ucp-cloud functional tests succeeded
✅ corerp-cloud functional tests succeeded

@nithyatsu nithyatsu added the pr:standard Ongoing maintenance, minor improvements, documentation updates, and routine development work label Apr 29, 2026
@nithyatsu

Copy link
Copy Markdown
Contributor Author

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.

I have updated the code to conform to this pattern. Could you please review.

@nithyatsu
nithyatsu merged commit ec789e8 into radius-project:main Apr 30, 2026
57 of 58 checks passed
sk593 pushed a commit that referenced this pull request May 4, 2026
# 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>
brooke-hamilton pushed a commit that referenced this pull request May 12, 2026
# 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:standard Ongoing maintenance, minor improvements, documentation updates, and routine development work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants