Skip to content

Commit

Permalink
remove subscriptionID from roledefinitionclient.New
Browse files Browse the repository at this point in the history
Signed-off-by: Fan Shang Xiang <[email protected]>
  • Loading branch information
MartinForReal committed Sep 10, 2024
1 parent 4856a0c commit f631ca9
Show file tree
Hide file tree
Showing 11 changed files with 40 additions and 43 deletions.
15 changes: 5 additions & 10 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
# The branches below must be a subset of the branches above
branches: [ master, 'release-**' ]
schedule:
- cron: '0 */24 * * *'
- cron: '10 */12 * * *'

jobs:
analyze:
Expand All @@ -37,12 +37,6 @@ jobs:
# Learn more about CodeQL language support at https://git.io/codeql-language-support

steps:
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: ^1.18
id: go

- name: Checkout repository
uses: actions/checkout@v4

Expand All @@ -51,16 +45,17 @@ jobs:
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: manual
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
run: |
make all
# - name: Autobuild
- run: |
make clean all
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
7 changes: 4 additions & 3 deletions .github/workflows/darwin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ jobs:
name: Build
runs-on: macos-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: ^1.16
go-version: '>=1.18'
check-latest: true
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Build Test
run: |
make blob-darwin
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: ^1.16
go-version: '>=1.18'
check-latest: true
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v4

- name: Run unit test
run: |
export PATH=$PATH:$HOME/.local/bin
Expand Down
22 changes: 12 additions & 10 deletions .github/workflows/static.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ jobs:
name: Go Lint
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: ^1.19
- uses: actions/checkout@master
- name: Run linter
uses: golangci/golangci-lint-action@v6
with:
version: v1.60
args: -E=gofmt,unused,ineffassign,revive,misspell,exportloopref,asciicheck,bodyclose,depguard,dogsled,durationcheck,errname,forbidigo -D=staticcheck --timeout=30m0s
- uses: actions/checkout@master
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: '>=1.18'
check-latest: true
id: go
- name: Run linter
uses: golangci/golangci-lint-action@v6
with:
version: v1.60
args: -E=gofmt,unused,ineffassign,revive,misspell,exportloopref,asciicheck,bodyclose,depguard,dogsled,durationcheck,errname,forbidigo -D=staticcheck --timeout=30m0s
9 changes: 4 additions & 5 deletions .github/workflows/trivy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: 1.23.1
go-version: '>=1.18'
check-latest: true
id: go

- name: Checkout code
uses: actions/checkout@v4

- name: Build an image from Dockerfile
run: |
export PUBLISH=true
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ jobs:
platform: [windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: ^1.16
go-version: '>=1.18'
check-latest: true
id: go
- name: Checkout code
uses: actions/checkout@v4
- name: Build Test
run: |
make blob-windows
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ require (
k8s.io/pod-security-admission v0.30.3
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8
sigs.k8s.io/cloud-provider-azure v1.27.1-0.20240805152051-72936abe6812
sigs.k8s.io/cloud-provider-azure/pkg/azclient v0.0.49
sigs.k8s.io/cloud-provider-azure/pkg/azclient v0.0.51
sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader v0.0.18
sigs.k8s.io/yaml v1.4.0
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -455,8 +455,8 @@ sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.29.0 h1:/U5vjBbQn3RCh
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.29.0/go.mod h1:z7+wmGM2dfIiLRfrC6jb5kV2Mq/sK1ZP303cxzkV5Y4=
sigs.k8s.io/cloud-provider-azure v1.27.1-0.20240805152051-72936abe6812 h1:/wecScN9etwdtLeibmyMjSrT6WwjZxmaltAUppmcj60=
sigs.k8s.io/cloud-provider-azure v1.27.1-0.20240805152051-72936abe6812/go.mod h1:lQvP3CccouEXTBu56sCNxPOPyeNwM8PlfL4+ms2C4sE=
sigs.k8s.io/cloud-provider-azure/pkg/azclient v0.0.49 h1:3AsgRzy3mz/AOsofFsuzQFs2paHACDl2J0Ibd6dh+5Q=
sigs.k8s.io/cloud-provider-azure/pkg/azclient v0.0.49/go.mod h1:1M90A+akyTabHVnveSKlvIO/Kk9kEr1LjRx+08twKVU=
sigs.k8s.io/cloud-provider-azure/pkg/azclient v0.0.51 h1:VTNa/fNAm1FV1CVjB829WPGvFCI0p/gbyyWkIslwtyY=
sigs.k8s.io/cloud-provider-azure/pkg/azclient v0.0.51/go.mod h1:ymK0BL/Q6IhmE/a/fIasOcuqtueUX0cKnzU66uVmt1w=
sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader v0.0.18 h1:PhXbmp06mdagpcavRWc/bAF7aNAEknuuzioI+NJgE3E=
sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader v0.0.18/go.mod h1:qJdztdabNCvj3MiRKT1AEOeYwhplYAodY8UPR/LwcT8=
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo=
Expand Down
2 changes: 1 addition & 1 deletion test/utils/azure/azure_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func GetClient(cloud, subscriptionID, clientID, tenantID, clientSecret string, a
if err != nil {
return nil, err
}
roleclient, err := roledefinitionclient.New(subscriptionID, cred, nil)
roleclient, err := roledefinitionclient.New(cred, nil)
if err != nil {
return nil, err
}
Expand Down
4 changes: 2 additions & 2 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1619,8 +1619,8 @@ sigs.k8s.io/cloud-provider-azure/pkg/util/string
sigs.k8s.io/cloud-provider-azure/pkg/util/taints
sigs.k8s.io/cloud-provider-azure/pkg/util/vm
sigs.k8s.io/cloud-provider-azure/pkg/version
# sigs.k8s.io/cloud-provider-azure/pkg/azclient v0.0.49
## explicit; go 1.22
# sigs.k8s.io/cloud-provider-azure/pkg/azclient v0.0.51
## explicit; go 1.23.1
sigs.k8s.io/cloud-provider-azure/pkg/azclient
sigs.k8s.io/cloud-provider-azure/pkg/azclient/accountclient
sigs.k8s.io/cloud-provider-azure/pkg/azclient/accountclient/mock_accountclient
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f631ca9

Please sign in to comment.