From 6d33a52a2df6704153ecd847407492a590e8efe4 Mon Sep 17 00:00:00 2001 From: Nell Shamrell Date: Tue, 18 Nov 2025 00:49:52 +0000 Subject: [PATCH 1/2] Fixes: #10383 - changes the name of the downloaded bicep binary from "rad-bicep" to "bicep" Signed-off-by: Nell Shamrell --- pkg/cli/bicep/bicep.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cli/bicep/bicep.go b/pkg/cli/bicep/bicep.go index 2ecd0f1d30..99cf75b847 100644 --- a/pkg/cli/bicep/bicep.go +++ b/pkg/cli/bicep/bicep.go @@ -26,7 +26,7 @@ import ( const ( radBicepEnvVar = "RAD_BICEP" - binaryName = "rad-bicep" + binaryName = "bicep" retryAttempts = 10 retryDelaySecs = 5 ) From 7c99f5f6977f1c6ab026ad362a86057d5e01dd8a Mon Sep 17 00:00:00 2001 From: Nell Shamrell Date: Fri, 12 Dec 2025 14:03:29 -0800 Subject: [PATCH 2/2] update other references to rad-bicep Signed-off-by: Nell Shamrell --- .github/workflows/validate-bicep.yaml | 6 +++--- bicep-types | 2 +- build/test.mk | 2 +- deploy/install.ps1 | 2 +- deploy/install.sh | 6 +++--- .../contributing-code-schema-changes/README.md | 2 +- .../running-functional-tests.md | 2 +- pkg/cli/bicep/bicep.go | 4 ++-- pkg/cli/bicep/build.go | 12 ++++++------ pkg/cli/bicep/types.go | 6 +++--- pkg/cli/cmd/bicep/publishextension/publish.go | 2 +- 11 files changed, 23 insertions(+), 23 deletions(-) diff --git a/.github/workflows/validate-bicep.yaml b/.github/workflows/validate-bicep.yaml index ccf110c787..ff70e0dd57 100644 --- a/.github/workflows/validate-bicep.yaml +++ b/.github/workflows/validate-bicep.yaml @@ -98,10 +98,10 @@ jobs: # Also ensure rad CLI can find bicep by creating the expected directory structure mkdir -p ~/.rad/bin - cp /usr/local/bin/bicep ~/.rad/bin/rad-bicep + cp /usr/local/bin/bicep ~/.rad/bin/bicep - # Verify rad-bicep also works - ~/.rad/bin/rad-bicep --version + # Verify bicep also works + ~/.rad/bin/bicep --version - name: Create a temporary file system run: | diff --git a/bicep-types b/bicep-types index 1133b78880..42aa3c3c5d 160000 --- a/bicep-types +++ b/bicep-types @@ -1 +1 @@ -Subproject commit 1133b78880f922038032c8be62ca7caff0f68414 +Subproject commit 42aa3c3c5d374658b8f0b2647b892542bb394435 diff --git a/build/test.mk b/build/test.mk index 0a68676334..a9ba971f3a 100644 --- a/build/test.mk +++ b/build/test.mk @@ -159,7 +159,7 @@ test-functional-samples-noncloud: ## Runs Samples functional tests that do not r .PHONY: test-validate-bicep test-validate-bicep: ## Validates that all .bicep files compile cleanly - BICEP_PATH="${HOME}/.rad/bin/rad-bicep" ./build/validate-bicep.sh + BICEP_PATH="${HOME}/.rad/bin/bicep" ./build/validate-bicep.sh .PHONY: test-helm test-helm: ## Runs Helm chart unit tests diff --git a/deploy/install.ps1 b/deploy/install.ps1 index 4b0e2082f0..ede01dbce6 100755 --- a/deploy/install.ps1 +++ b/deploy/install.ps1 @@ -208,7 +208,7 @@ Write-Output "rad CLI has been successfully installed" Write-Output "`r`nInstalling Bicep..." $cmd = (Start-Process -NoNewWindow -FilePath $RadiusCliFilePath -ArgumentList "bicep download" -PassThru -Wait) if ($cmd.ExitCode -ne 0) { - Write-Warning "`r`nFailed to install rad-bicep" + Write-Warning "`r`nFailed to install bicep" } else { Write-Output "Bicep has been successfully installed" diff --git a/deploy/install.sh b/deploy/install.sh index 08d00285d7..6df2abb0c6 100755 --- a/deploy/install.sh +++ b/deploy/install.sh @@ -176,13 +176,13 @@ installFile() { if [ -f "$RADIUS_CLI_FILE" ]; then echo "$RADIUS_CLI_FILENAME installed into $RADIUS_INSTALL_DIR successfully" - echo "Installing rad-bicep (\"rad bicep download\")..." + echo "Installing bicep (\"rad bicep download\")..." $RADIUS_CLI_FILE bicep download result=$? if [ $result -eq 0 ]; then - echo "rad-bicep installed successfully" + echo "bicep installed successfully" else - echo "Failed to install rad-bicep" + echo "Failed to install bicep" exit 1 fi diff --git a/docs/contributing/contributing-code/contributing-code-schema-changes/README.md b/docs/contributing/contributing-code/contributing-code-schema-changes/README.md index a94f75f5c0..7d010008f8 100644 --- a/docs/contributing/contributing-code/contributing-code-schema-changes/README.md +++ b/docs/contributing/contributing-code/contributing-code-schema-changes/README.md @@ -57,7 +57,7 @@ If you would like to test that your schema changes are compilable in a Bicep tem 1. Follow the steps in the Bicep [documentation](https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/install) to download Bicep. -Note: Alternatively, if you already have the Radius CLI installed, you can choose to use the Bicep binary that is installed as part of Radius. The Bicep binary gets downloaded to `./.rad/bin/rad-bicep`. You can use this file path instead. +Note: Alternatively, if you already have the Radius CLI installed, you can choose to use the Bicep binary that is installed as part of Radius. The Bicep binary gets downloaded to `./.rad/bin/bicep`. You can use this file path instead. ## Step 2: Create a file directory diff --git a/docs/contributing/contributing-code/contributing-code-tests/running-functional-tests.md b/docs/contributing/contributing-code/contributing-code-tests/running-functional-tests.md index 786cadb24f..c964cca8d4 100644 --- a/docs/contributing/contributing-code/contributing-code-tests/running-functional-tests.md +++ b/docs/contributing/contributing-code/contributing-code-tests/running-functional-tests.md @@ -76,7 +76,7 @@ If you need to debug cleanup issues, re-run with RADIUS_TEST_FAST_CLEANUP=false ### Prerequisites 1. Place `rad` on your path -2. Make sure `rad-bicep` is downloaded (`rad bicep download`) +2. Make sure `bicep` is downloaded (`rad bicep download`) 3. Make sure your [local dev environment is setup](../contributing-code-control-plane/running-controlplane-locally.md) 4. Log into your Github account and [Generate PAT](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) 5. Log-in to the container registry of your Github organization. diff --git a/pkg/cli/bicep/bicep.go b/pkg/cli/bicep/bicep.go index 99cf75b847..3dcafb03b9 100644 --- a/pkg/cli/bicep/bicep.go +++ b/pkg/cli/bicep/bicep.go @@ -25,14 +25,14 @@ import ( ) const ( - radBicepEnvVar = "RAD_BICEP" + BicepEnvVar = "BICEP" binaryName = "bicep" retryAttempts = 10 retryDelaySecs = 5 ) func GetBicepFilePath() (string, error) { - return tools.GetLocalFilepath(radBicepEnvVar, binaryName) + return tools.GetLocalFilepath(BicepEnvVar, binaryName) } // IsBicepInstalled returns true if our local copy of bicep is installed diff --git a/pkg/cli/bicep/build.go b/pkg/cli/bicep/build.go index 62fb68990a..1a44e97dcf 100644 --- a/pkg/cli/bicep/build.go +++ b/pkg/cli/bicep/build.go @@ -32,19 +32,19 @@ import ( // https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string const SemanticVersionRegex = `(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?` -// Run rad-bicep with the given args and return the stdout. The stderr +// Run bicep with the given args and return the stdout. The stderr // is not capture but instead redirected to that of the current process. func runBicepRaw(args ...string) ([]byte, error) { if installed, _ := IsBicepInstalled(); !installed { - return nil, fmt.Errorf("rad-bicep not installed, run \"rad bicep download\" to install") + return nil, fmt.Errorf("bicep not installed, run \"rad bicep download\" to install") } - binPath, err := tools.GetLocalFilepath(radBicepEnvVar, binaryName) + binPath, err := tools.GetLocalFilepath(BicepEnvVar, binaryName) if err != nil { - return nil, fmt.Errorf("failed to find rad-bicep: %w", err) + return nil, fmt.Errorf("failed to find bicep: %w", err) } - // runs 'rad-bicep' + // runs 'bicep' fullCmd := binPath + " " + strings.Join(args, " ") c := exec.Command(binPath, args...) c.Stderr = os.Stderr @@ -72,7 +72,7 @@ func runBicepRaw(args ...string) ([]byte, error) { // read the content bytes, err := io.ReadAll(&buf) if err != nil { - return nil, fmt.Errorf("failed to read rad-bicep output: %w", err) + return nil, fmt.Errorf("failed to read bicep output: %w", err) } return bytes, nil diff --git a/pkg/cli/bicep/types.go b/pkg/cli/bicep/types.go index 22bc81221a..8727604153 100644 --- a/pkg/cli/bicep/types.go +++ b/pkg/cli/bicep/types.go @@ -54,14 +54,14 @@ func (i *Impl) PrepareTemplate(filePath string) (map[string]any, error) { ok, err := IsBicepInstalled() if err != nil { - return nil, fmt.Errorf("failed to find rad-bicep: %w", err) + return nil, fmt.Errorf("failed to find bicep: %w", err) } if !ok { i.Output.LogInfo("Downloading Bicep for channel %s...", version.Channel()) err = DownloadBicep() if err != nil { - return nil, fmt.Errorf("failed to download rad-bicep: %w", err) + return nil, fmt.Errorf("failed to download bicep: %w", err) } } @@ -88,7 +88,7 @@ func (i *Impl) PrepareTemplate(filePath string) (map[string]any, error) { return template, nil } -// Call runs `rad-bicep` with the given arguments. +// Call runs `bicep` with the given arguments. func (i *Impl) Call(args ...string) ([]byte, error) { return runBicepRaw(args...) } diff --git a/pkg/cli/cmd/bicep/publishextension/publish.go b/pkg/cli/cmd/bicep/publishextension/publish.go index 9018dd7b4c..f6c637d37e 100644 --- a/pkg/cli/cmd/bicep/publishextension/publish.go +++ b/pkg/cli/cmd/bicep/publishextension/publish.go @@ -141,7 +141,7 @@ func publishExtension(ctx context.Context, inputDirectoryPath string, target str return err } - // rad-bicep publish-extension /index.json --target + // bicep publish-extension /index.json --target args := []string{ "publish-extension", filepath.Join(inputDirectoryPath, "index.json"),