Skip to content

Set go version in one place - #8774

Merged
brooke-hamilton merged 21 commits into
radius-project:mainfrom
brooke-hamilton:update-go-version
Mar 19, 2025
Merged

brooke-hamilton merged 21 commits into
radius-project:mainfrom
brooke-hamilton:update-go-version

Conversation

@brooke-hamilton

@brooke-hamilton brooke-hamilton commented Mar 10, 2025 •

Copy link
Copy Markdown
Member

Description

This PR addresses issue #8374 by consolidating all references to the Go version into the go.mod file, so that the Go version can be set in one place. Previously, the Go version was also set in the GitHub workflow files, which resulted in different versions being used across different workflows.

This PR also updates the Go version from 1.23.0 to 1.24.1, which was released on Feb 11, with the minor version update on March 4. This update is included in this PR because Go version 1.23.0 had reported issues with caching errors in GitHub workflows. A side-effect of updating the Go version is that go module caching is now working, which reduces workflow times. For example, the non-cloud tests took 15 minutes on the forked repo, down from 20 minutes before the update.

As part of updating the Go version to 1.24.1, the golangci-lint tool is updated in lint.yaml to version 1.64.6.

A similar PR is created on the bicep-types-aws repo.

Note: See the Testing section below for information on how this PR was tested.

Workflow updates:

  • .github/workflows/build.yaml: Removed the GOVER environment variable and updated the Go setup steps to use go-version-file: go.mod and cache-dependency-path: go.sum instead of go-version: ${{ env.GOVER }}.
  • .github/workflows/functional-test-cloud.yaml: Removed the GOVER environment variable and updated the Go setup steps to use go-version-file: go.mod and cache-dependency-path: go.sum instead of go-version: ${{ env.GOVER }}.
  • .github/workflows/functional-test-noncloud.yaml: Removed the GOVER environment variable and updated the Go setup steps to use go-version-file: go.mod and cache-dependency-path: go.sum instead of go-version: ${{ env.GOVER }}.
  • .github/workflows/lint.yaml: Removed the GOVER environment variable and updated the Go setup steps to use go-version-file: go.mod and cache-dependency-path: go.sum instead of go-version: ${{ env.GOVER }}.
  • .github/workflows/long-running-azure.yaml: Removed the GOVER environment variable and updated the Go setup steps to use go-version-file: go.mod and cache-dependency-path: go.sum instead of go-version: ${{ env.GOVER }}.
  • .github/workflows/publish-docs.yaml: Removed the GOVER environment variable and updated the Go setup steps to use go-version-file: radius/go.mod and cache-dependency-path: radius/go.sum instead of go-version: ${{ env.GOVER }}.
  • pkg/cli/clients/management.go: this change was prompted by the updated version of golangci-lint.

Go version update:

  • go.mod: Updated the Go version from 1.23.0 to 1.24.1.

Testing

Not all workflows can be run from a fork, but these tests ran successfully:

  • Functional Tests (with Non-Cloud Resources) (functional-test-noncloud.yaml)
  • Generate Reference Docs (publish-docs.yaml)
  • Check code is up-to-date (lint.yaml)

Type of change

  • This pull request fixes a bug in Radius and has an approved issue (issue link required).

Fixes: #8374

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

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>
Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>
Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>
Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>
Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>
Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>
@codecov

codecov Bot commented Mar 10, 2025 •

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.72%. Comparing base (5f08d01) to head (b569029).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8774      +/-   ##
==========================================
- Coverage   59.89%   55.72%   -4.17%     
==========================================
  Files         595      595              
  Lines       40481    40481              
==========================================
- Hits        24248    22560    -1688     
- Misses      14406    16209    +1803     
+ Partials     1827     1712     -115     

☔ 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.

@radius-functional-tests

radius-functional-tests Bot commented Mar 10, 2025 •

Copy link
Copy Markdown

Radius functional test overview

🔍 Go to test action run

Name Value
Repository brooke-hamilton/radius
Commit ref 57169fb
Unique ID funcb2e005d738
Image tag pr-funcb2e005d738
Click here to see the list of tools in the current test run
  • gotestsum 1.12.0
  • KinD: v0.20.0
  • Dapr:
  • 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-funcb2e005d738
  • 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-funcb2e005d738
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-funcb2e005d738
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-funcb2e005d738
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-funcb2e005d738
  • 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 ucp-cloud functional tests...
⌛ Starting corerp-cloud functional tests...
✅ ucp-cloud functional tests succeeded
✅ corerp-cloud functional tests succeeded

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>
Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>
@brooke-hamilton brooke-hamilton changed the title Update go version Set go version in one place Mar 10, 2025
Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>
Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>
@radius-functional-tests

radius-functional-tests Bot commented Mar 10, 2025 •

Copy link
Copy Markdown

Radius functional test overview

🔍 Go to test action run

Name Value
Repository brooke-hamilton/radius
Commit ref bbcc154
Unique ID func1220ee590c
Image tag pr-func1220ee590c
Click here to see the list of tools in the current test run
  • gotestsum 1.12.0
  • KinD: v0.20.0
  • Dapr:
  • 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-func1220ee590c
  • 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-func1220ee590c
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-func1220ee590c
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-func1220ee590c
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-func1220ee590c
  • 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...
✅ corerp-cloud functional tests succeeded
✅ ucp-cloud functional tests succeeded

@radius-functional-tests

radius-functional-tests Bot commented Mar 12, 2025 •

Copy link
Copy Markdown

Radius functional test overview

🔍 Go to test action run

Name Value
Repository brooke-hamilton/radius
Commit ref 11c6c63
Unique ID func8a9b974371
Image tag pr-func8a9b974371
Click here to see the list of tools in the current test run
  • gotestsum 1.12.0
  • KinD: v0.20.0
  • Dapr:
  • 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-func8a9b974371
  • 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-func8a9b974371
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-func8a9b974371
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-func8a9b974371
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-func8a9b974371
  • 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 ucp-cloud functional tests...
⌛ Starting corerp-cloud functional tests...
✅ ucp-cloud functional tests succeeded
✅ corerp-cloud functional tests succeeded

@radius-functional-tests

radius-functional-tests Bot commented Mar 13, 2025 •

Copy link
Copy Markdown

Radius functional test overview

🔍 Go to test action run

Name Value
Repository brooke-hamilton/radius
Commit ref 89af791
Unique ID funcebe6822a26
Image tag pr-funcebe6822a26
Click here to see the list of tools in the current test run
  • gotestsum 1.12.0
  • KinD: v0.20.0
  • Dapr:
  • 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-funcebe6822a26
  • 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-funcebe6822a26
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-funcebe6822a26
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-funcebe6822a26
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-funcebe6822a26
  • 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

@radius-functional-tests

radius-functional-tests Bot commented Mar 14, 2025 •

Copy link
Copy Markdown

Radius functional test overview

🔍 Go to test action run

Name Value
Repository brooke-hamilton/radius
Commit ref b26a76d
Unique ID func20a7e37322
Image tag pr-func20a7e37322
Click here to see the list of tools in the current test run
  • gotestsum 1.12.0
  • KinD: v0.20.0
  • Dapr:
  • 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-func20a7e37322
  • 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-func20a7e37322
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-func20a7e37322
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-func20a7e37322
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-func20a7e37322
  • 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 ucp-cloud functional tests...
⌛ Starting corerp-cloud functional tests...
✅ ucp-cloud functional tests succeeded
✅ corerp-cloud functional tests succeeded

@radius-functional-tests

radius-functional-tests Bot commented Mar 14, 2025 •

Copy link
Copy Markdown

Radius functional test overview

🔍 Go to test action run

Name Value
Repository brooke-hamilton/radius
Commit ref f01f32c
Unique ID func2d30ab0f29
Image tag pr-func2d30ab0f29
Click here to see the list of tools in the current test run
  • gotestsum 1.12.0
  • KinD: v0.20.0
  • Dapr:
  • 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-func2d30ab0f29
  • 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-func2d30ab0f29
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-func2d30ab0f29
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-func2d30ab0f29
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-func2d30ab0f29
  • 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 ucp-cloud functional tests...
⌛ Starting corerp-cloud functional tests...
✅ ucp-cloud functional tests succeeded
✅ corerp-cloud functional tests succeeded

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>
@brooke-hamilton
brooke-hamilton requested a review from a team as a code owner March 19, 2025 19:29
Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>
@radius-functional-tests

radius-functional-tests Bot commented Mar 19, 2025 •

Copy link
Copy Markdown

Radius functional test overview

🔍 Go to test action run

Name Value
Repository brooke-hamilton/radius
Commit ref c76916a
Unique ID funcdebacb3089
Image tag pr-funcdebacb3089
Click here to see the list of tools in the current test run
  • gotestsum 1.12.0
  • KinD: v0.20.0
  • Dapr:
  • 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-funcdebacb3089
  • 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-funcdebacb3089
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-funcdebacb3089
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-funcdebacb3089
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-funcdebacb3089
  • 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 ucp-cloud functional tests...
⌛ Starting corerp-cloud functional tests...
✅ ucp-cloud functional tests succeeded
✅ corerp-cloud functional tests succeeded

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>
Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>
@radius-functional-tests

radius-functional-tests Bot commented Mar 19, 2025 •

Copy link
Copy Markdown

Radius functional test overview

🔍 Go to test action run

Name Value
Repository brooke-hamilton/radius
Commit ref b569029
Unique ID func7ac674cdb9
Image tag pr-func7ac674cdb9
Click here to see the list of tools in the current test run
  • gotestsum 1.12.0
  • KinD: v0.20.0
  • Dapr:
  • 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-func7ac674cdb9
  • 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-func7ac674cdb9
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-func7ac674cdb9
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-func7ac674cdb9
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-func7ac674cdb9
  • 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 ucp-cloud functional tests...
⌛ Starting corerp-cloud functional tests...
✅ ucp-cloud functional tests succeeded
✅ corerp-cloud functional tests succeeded

@ytimocin ytimocin 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.

How do we know if these will break the workflows or not?

@brooke-hamilton

brooke-hamilton commented Mar 19, 2025 •

Copy link
Copy Markdown
Member Author

How do we know if these will break the workflows or not?

I ran these workflows on the fork when I was testing. These are the ones I know will run on a fork.

  • Functional Tests (with Non-Cloud Resources) (functional-test-noncloud.yaml)
  • Generate Reference Docs (publish-docs.yaml)
  • Check code is up-to-date (lint.yaml)

Comment thread pkg/cli/clients/management.go Resolved
@brooke-hamilton
brooke-hamilton merged commit 7604da1 into radius-project:main Mar 19, 2025
@brooke-hamilton brooke-hamilton mentioned this pull request Mar 30, 2025
6 of 12 tasks
brooke-hamilton added a commit that referenced this pull request May 15, 2025
# Description

While working on [updating the go
version](#8774) there was a
need to install the correct version of `golanglint-ci`. The
[documentation](https://golangci-lint.run/welcome/install/#install-from-sources)
recommends using a binary installation, so I added that to the
devcontainer specification (`devcontainer.json`). As part of that change
I moved the `postCreateCommand` into a script. I also fixed broken links
to `golanglint-ci` in the Radius contributing docs.

Development environment setup:

*
[`.devcontainer/devcontainer.json`](diffhunk://#diff-24ad71c8613ddcf6fd23818cb3bb477a1fb6d83af4550b0bad43099813088686L45-R45):
Changed the `postCreateCommand` to use a new script
`.devcontainer/post-create.sh` instead of a long inline command.
*
[`.devcontainer/post-create.sh`](diffhunk://#diff-bcf66a848607b49d2a45edfad434f6808017ee9d18f5a20dde6670745010d89aR1-R20):
Created a new script to handle post-create tasks, including setting up
the workspace as a safe directory, installing `golangci-lint`, and other
Go tools.

Documentation updates: fix broken links

*
[`docs/contributing/contributing-code/contributing-code-first-commit/first-commit-00-prerequisites/index.md`](diffhunk://#diff-1b65ceaf649b58267d9199873c6df394b0bc30508b0bfb540cc247e0028af6a1L31-R31):
Updated the link for `golangci-lint` installation to the welcome page.
*
[`docs/contributing/contributing-code/contributing-code-first-commit/first-commit-06-creating-a-pr/index.md`](diffhunk://#diff-39e98fec72f851ba1d675c0fc5fd47452569b04c7e85331c257b790c31f967feL17-R17):
Updated the link for `golangci-lint` in the pre-PR checklist.
*
[`docs/contributing/contributing-code/contributing-code-prerequisites/README.md`](diffhunk://#diff-b3cdecf6f61c777e0a2e7089a64f8f49aeef24995ae79aa62a215f8911929cb8L102-R102):
Updated the link for `golangci-lint` in the list of core dependencies.

## 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).

Fixes: N/A

## 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
    - [x] Not applicable
- 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
    - [x] Not applicable
- The design document has been reviewed and approved by Radius
maintainers/approvers.
    - [ ] Yes
    - [x] Not applicable
- 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
    - [x] Not applicable
- 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
    - [x] Not applicable
- 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
    - [x] Not applicable

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>

This branch was previously deployed

2 inactive deployments
functional-tests — b569029f Deployed Mar 19, 2025 by brooke-hamilton
publish-bicep — b569029f Deployed Mar 19, 2025 by brooke-hamilton
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Go version is inconsistent in GitHub workflows

3 participants