Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump up golang in github actions #1383

Merged
merged 1 commit into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.22
- uses: actions/checkout@v3
go-version-file: 'go.mod'
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/golangci-ut.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.22
- uses: actions/checkout@v4
go-version-file: 'go.mod'
- name: Install dependencies
run: |
go get .
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,22 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
go-version-file: 'go.mod'
-
name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.50
args: --issues-exit-code=1
skip-pkg-cache: true
skip-build-cache: true
-
name: Import GPG key
id: import_gpg
Expand Down
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ linters:
- gosec
- goimports
- vet
- revive
- misspell
- gosimple
- staticcheck
Expand Down
1 change: 1 addition & 0 deletions nsxt/data_source_nsxt_policy_uplink_host_switch_profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package nsxt

import (
"fmt"

"github.com/vmware/vsphere-automation-sdk-go/runtime/bindings"

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
Expand Down
1 change: 1 addition & 0 deletions nsxt/data_source_nsxt_upgrade_prepare_ready.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package nsxt

import (
"fmt"

"github.com/vmware/terraform-provider-nsxt/nsxt/util"

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
Expand Down
5 changes: 5 additions & 0 deletions nsxt/resource_nsxt_upgrade_run.go
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ func prepareUpgrade(upgradeClientSet *upgradeClientSet, d *schema.ResourceData,
continue
}

//#nosec G601 Ignore implicit memory aliasing in for loop temporarily
status, err := getUpgradeStatus(upgradeClientSet.StatusClient, &component)
if err != nil {
return err
Expand All @@ -407,13 +408,15 @@ func prepareUpgrade(upgradeClientSet *upgradeClientSet, d *schema.ResourceData,
if status.Status == model.ComponentUpgradeStatus_STATUS_IN_PROGRESS {
upgradeClientSet.PlanClient.Pause()
}
//#nosec G601 Ignore implicit memory aliasing in for loop temporarily
err = waitUpgradeForStatus(upgradeClientSet, &component, inFlightComponentUpgradeStatus, staticComponentUpgradeStatus)
if err != nil {
return err
}

// Cache the group list before reset as group IDs change by reset operation. References for some types of groups
// could be affected here
//#nosec G601 Ignore implicit memory aliasing in for loop temporarily
preResetGroupList, err := upgradeClientSet.GroupClient.List(&component, nil, nil, nil, nil, nil, nil, nil)
if err != nil {
return err
Expand Down Expand Up @@ -746,7 +749,9 @@ func runUpgrade(upgradeClientSet *upgradeClientSet, partialUpgradeMap map[string
prevComponent = component
completeLog = fmt.Sprintf("[INFO] %s upgrade is partially completed.", component)
}
//#nosec G601 Ignore implicit memory aliasing in for loop temporarily
upgradeClientSet.PlanClient.Upgrade(&component)
//#nosec G601 Ignore implicit memory aliasing in for loop temporarily
err = waitUpgradeForStatus(upgradeClientSet, &component, pendingStatus, targetStatus)
if err != nil {
return err
Expand Down
Loading