Skip to content

Commit 2dd62c2

Browse files
brooke-hamiltonCopilotsk593nithyatsuCopilot
authored
Pin Deployment Engine image to 0.56 for v0.57.1 patch release (#11866)
# Description This pull request implements a patch release (v0.57.1) for the Radius Helm chart that addresses an issue with the Deployment Engine by pinning its image to version 0.56. The patch ensures stability for users on the v0.57 channel and updates related documentation and configuration files accordingly. Release and version updates: * Added release notes for v0.57.1, explaining the reason for pinning the Deployment Engine image and providing changelog details. (`docs/release-notes/v0.57.1.md`) * Updated the supported version in `versions.yaml` from v0.57.0 to v0.57.1. (`versions.yaml`) Deployment Engine image pinning: * Changed the default Deployment Engine image tag from the latest to `0.56` in `values.yaml` to work around a bug in v0.57.0. (`deploy/Chart/values.yaml`) * Modified the Helm test helper to clear the `de.tag` value, ensuring the global imageTag fallback is exercised in tests. (`deploy/Chart/tests/helpers_test.yaml`) ## Type of change - This pull request is a patch release. ## 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 <!-- 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 --> --------- Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: sk593 <42750942+sk593@users.noreply.github.com> Co-authored-by: Shruthi Kumar <shruthikumar2401@gmail.com> Co-authored-by: Nithya Subramanian <98416062+nithyatsu@users.noreply.github.com> Co-authored-by: Copilot <copilot@github.com>
1 parent 451e64b commit 2dd62c2

13 files changed

Lines changed: 140 additions & 19 deletions

File tree

.github/workflows/functional-test-noncloud.yaml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ env:
8787
GIT_HTTP_PASSWORD: not-a-secret-password
8888
# Kubernetes client QPS and Burst settings for high-concurrency CI environments
8989
RADIUS_QPS_AND_BURST: "800"
90+
# Bicep CLI pinned: v0.40+ rejects br:localhost:5000/... (ThrowIfRegistryNotTrusted).
91+
# Bump only after verifying localhost support or adding allowedUntrustedRegistries to bicepconfig.json.
92+
BICEP_VER: v0.42.1
9093

9194
jobs:
9295
changes:
@@ -248,6 +251,13 @@ jobs:
248251
registry-server: ${{ env.LOCAL_REGISTRY_SERVER }}
249252
registry-port: ${{ env.LOCAL_REGISTRY_PORT }}
250253

254+
- name: Setup and verify bicep CLI
255+
run: |
256+
curl -Lo bicep "https://github.com/Azure/bicep/releases/download/${{ env.BICEP_VER }}/bicep-linux-x64"
257+
chmod +x ./bicep
258+
sudo mv ./bicep /usr/local/bin/bicep
259+
bicep --version
260+
251261
- name: Publish bicep types
252262
run: |
253263
bicep publish-extension ./hack/bicep-types-radius/generated/index.json --target br:${{ env.LOCAL_REGISTRY_SERVER }}:${{ env.LOCAL_REGISTRY_PORT }}/radius:${{ env.REL_VERSION == 'edge' && 'latest' || env.REL_VERSION }} --force
@@ -428,13 +438,6 @@ jobs:
428438
run: |
429439
make publish-test-terraform-recipes
430440
431-
- name: Setup and verify bicep CLI
432-
run: |
433-
curl -Lo bicep https://github.com/Azure/bicep/releases/latest/download/bicep-linux-x64
434-
chmod +x ./bicep
435-
sudo mv ./bicep /usr/local/bin/bicep
436-
bicep --version
437-
438441
- name: Publish bicep types
439442
run: |
440443
bicep publish-extension ./hack/bicep-types-radius/generated/index.json --target br:${{ env.LOCAL_REGISTRY_SERVER }}:${{ env.LOCAL_REGISTRY_PORT }}/radius:${{ env.REL_VERSION == 'edge' && 'latest' || env.REL_VERSION }} --force

.github/workflows/validate-bicep.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ env:
3333
LOCAL_REGISTRY_SERVER: localhost
3434
# Local Docker registry port
3535
LOCAL_REGISTRY_PORT: "5000"
36+
# Bicep CLI pinned: v0.43+ rejects br:localhost:5000/... (ThrowIfRegistryNotTrusted).
37+
# Bump only after verifying localhost support or adding allowedUntrustedRegistries to bicepconfig.json.
38+
BICEP_VER: v0.42.1
3639

3740
concurrency:
3841
# Cancel the previously triggered build for only PR build.
@@ -72,7 +75,7 @@ jobs:
7275
- name: Setup and verify bicep CLI
7376
run: |
7477
# Download bicep CLI
75-
curl -Lo bicep https://github.com/Azure/bicep/releases/latest/download/bicep-linux-x64
78+
curl -Lo bicep "https://github.com/Azure/bicep/releases/download/${{ env.BICEP_VER }}/bicep-linux-x64"
7679
chmod +x ./bicep
7780
7881
# Install in both locations for maximum compatibility

.terraform-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.14.9

build/build.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ else
5353
endif
5454

5555
# Linker flags: https://cmake.org/cmake/help/latest/envvar/LDFLAGS.html.
56-
LDFLAGS := "-s -w -X $(BASE_PACKAGE_NAME)/pkg/version.channel=$(REL_CHANNEL) -X $(BASE_PACKAGE_NAME)/pkg/version.release=$(REL_VERSION) -X $(BASE_PACKAGE_NAME)/pkg/version.commit=$(GIT_COMMIT) -X $(BASE_PACKAGE_NAME)/pkg/version.version=$(GIT_VERSION) -X $(BASE_PACKAGE_NAME)/pkg/version.chartVersion=$(CHART_VERSION)"
56+
TERRAFORM_VERSION := $(shell cat .terraform-version)
57+
LDFLAGS := "-s -w -X $(BASE_PACKAGE_NAME)/pkg/version.channel=$(REL_CHANNEL) -X $(BASE_PACKAGE_NAME)/pkg/version.release=$(REL_VERSION) -X $(BASE_PACKAGE_NAME)/pkg/version.commit=$(GIT_COMMIT) -X $(BASE_PACKAGE_NAME)/pkg/version.version=$(GIT_VERSION) -X $(BASE_PACKAGE_NAME)/pkg/version.chartVersion=$(CHART_VERSION) -X $(BASE_PACKAGE_NAME)/pkg/recipes/terraform.terraformVersion=$(TERRAFORM_VERSION)"
5758

5859
# Combination of flags into GOARGS.
5960
GOARGS := -v -gcflags $(GCFLAGS) -ldflags $(LDFLAGS)

build/install-bicep.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,17 @@ if [ "$ARCH" = "arm64" ]; then
5959
BICEP_ARCH="arm64"
6060
fi
6161

62+
# Bicep CLI version. Pinned because Bicep v0.43+ tightened
63+
# ContainerRegistryClientFactory.ThrowIfRegistryNotTrusted to reject br:localhost:5000/... targets,
64+
# breaking publish-extension to local registries used by our CI and local dev workflows.
65+
BICEP_VER="v0.42.1"
66+
6267
# Check if bicep binary already exists in the target location
6368
if [ -f "$OUTPUT_DIR/bicep" ]; then
6469
echo "Bicep CLI already exists at $OUTPUT_DIR/bicep, skipping download."
6570
else
66-
echo "Downloading Bicep CLI..."
67-
if ! curl -Lo bicep https://github.com/Azure/bicep/releases/latest/download/bicep-linux-$BICEP_ARCH; then
71+
echo "Downloading Bicep CLI ${BICEP_VER}..."
72+
if ! curl -Lo bicep "https://github.com/Azure/bicep/releases/download/${BICEP_VER}/bicep-linux-${BICEP_ARCH}"; then
6873
echo "Failed to download Bicep CLI. Please check your internet connection or the URL."
6974
exit 1
7075
fi

deploy/Chart/tests/helpers_test.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,9 @@ tests:
398398
rp.image: applications-rp
399399
dynamicrp.image: dynamic-rp
400400
de.image: deployment-engine
401+
# Clear the values.yaml pin so this test exercises the
402+
# global.imageTag fallthrough for the DE image.
403+
de.tag: ""
401404
asserts:
402405
- equal:
403406
path: spec.template.spec.containers[0].image

deploy/Chart/values.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ controller:
8383

8484
de:
8585
image: deployment-engine
86-
# Default tag uses Chart AppVersion.
87-
# tag: latest
86+
# Pin Deployment Engine to the v0.56.0 image for the v0.57.1 patch release.
87+
tag: 0.56
8888
resources:
8989
requests:
9090
# request memory is the average memory usage + 10% buffer.

docs/release-notes/v0.57.1.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
## Radius v0.57.1
2+
3+
This patch release pins the Deployment Engine image installed by the Radius Helm chart to the `0.56` tag to work around a bug in Deployment Engine `0.57.0`, pins the Bicep CLI used by the `rad` CLI and CI workflows to `v0.42.1` to work around a breaking change in Bicep `v0.43+` that rejects local registry targets (e.g. `br:localhost:5000/...`), and pins the Terraform version to avoid surprise breaking changes. Check out the [changelog](#changelog) for more details of what was addressed in this patch.
4+
5+
## Changelog
6+
7+
* Pin Deployment Engine image to 0.56 for v0.57.1 patch release by @brooke-hamilton in https://github.com/radius-project/radius/pull/11855
8+
* Pin Bicep CLI to v0.42.1 in workflows and rad CLI by @sk593 in https://github.com/radius-project/radius/pull/11812
9+
* Pin tf version to avoid surprise breaking changes by @nithyatsu in https://github.com/radius-project/radius/pull/11779
10+
11+
**Full Changelog**: https://github.com/radius-project/radius/compare/v0.57.0...v0.57.1

pkg/cli/bicep/tools/download_tools.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,14 @@ import (
2828
)
2929

3030
const (
31+
// bicepVersion is the pinned version of the Bicep CLI to download.
32+
// Pinned because Bicep v0.43+ tightened ContainerRegistryClientFactory.ThrowIfRegistryNotTrusted
33+
// to reject br:localhost:5000/... targets, breaking publish-extension to local registries used
34+
// by our CI and local dev workflows.
35+
bicepVersion = "v0.42.1"
36+
3137
// binaryRepo is the name of the remote bicep binary repository
32-
binaryRepo = "https://github.com/Azure/bicep/releases/latest/download/"
38+
binaryRepo = "https://github.com/Azure/bicep/releases/download/" + bicepVersion + "/"
3339
)
3440

3541
// validPlatforms is a map of valid platforms to download for. The key is the combination of GOOS and GOARCH.

pkg/recipes/terraform/install.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import (
2424
"time"
2525

2626
"github.com/go-logr/logr"
27+
"github.com/hashicorp/go-version"
2728
install "github.com/hashicorp/hc-install"
2829
"github.com/hashicorp/hc-install/product"
2930
"github.com/hashicorp/hc-install/releases"
@@ -174,10 +175,7 @@ func downloadAndInstallTerraform(ctx context.Context, installer *install.Install
174175

175176
installStartTime := time.Now()
176177
execPath, err := installer.Ensure(ctx, []src.Source{
177-
&releases.LatestVersion{
178-
Product: product.Terraform,
179-
InstallDir: globalDir,
180-
},
178+
&releases.ExactVersion{Product: product.Terraform, Version: version.Must(version.NewVersion(terraformVersion))},
181179
})
182180
if err != nil {
183181
metrics.DefaultRecipeEngineMetrics.RecordTerraformInstallationDuration(ctx, installStartTime,

0 commit comments

Comments
 (0)