Skip to content

Commit

Permalink
merge with main
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimss committed Feb 4, 2025
2 parents 417c752 + f120f0a commit 5e575f3
Show file tree
Hide file tree
Showing 270 changed files with 4,381 additions and 2,212 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/nightly_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
with:
cosign-release: v2.2.3
- name: Install regctl
uses: regclient/actions/regctl-installer@b6614f5f56245066b533343a85f4109bdc38c8cc # main
uses: regclient/actions/regctl-installer@ce5fd131e371ffcdd7508b478cb223b3511a9183 # main
- name: Build images
run: make images
- name: Log in to GHCR
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/pr_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ jobs:
with:
go-version-file: 'go.mod'
- name: Install regctl
uses: regclient/actions/regctl-installer@b6614f5f56245066b533343a85f4109bdc38c8cc # main
uses: regclient/actions/regctl-installer@ce5fd131e371ffcdd7508b478cb223b3511a9183 # main
- name: Download archived images
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
Expand All @@ -146,7 +146,7 @@ jobs:
- name: Build artifacts
run: ./.github/workflows/scripts/build_artifacts.sh ${{ runner.os }}
- name: Archive artifacts
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4
with:
name: binaries-linux
path: ./artifacts/
Expand Down Expand Up @@ -186,7 +186,7 @@ jobs:
- name: Export images
run: tar -czvf images.tar.gz *-image.tar
- name: Archive images
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4
with:
name: images
path: images.tar.gz
Expand Down Expand Up @@ -215,7 +215,7 @@ jobs:
docker save spire-server-windows:latest-local spire-agent-windows:latest-local oidc-discovery-provider-windows:latest-local -o images-windows.tar
gzip images-windows.tar
- name: Archive images
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4
with:
name: images-windows
path: images-windows.tar.gz
Expand Down Expand Up @@ -268,7 +268,7 @@ jobs:
with:
go-version-file: 'go.mod'
- name: Install regctl
uses: regclient/actions/regctl-installer@b6614f5f56245066b533343a85f4109bdc38c8cc # main
uses: regclient/actions/regctl-installer@ce5fd131e371ffcdd7508b478cb223b3511a9183 # main
- name: Load cached deps
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
Expand Down Expand Up @@ -328,7 +328,7 @@ jobs:
with:
go-version-file: 'go.mod'
- name: Install regctl
uses: regclient/actions/regctl-installer@b6614f5f56245066b533343a85f4109bdc38c8cc # main
uses: regclient/actions/regctl-installer@ce5fd131e371ffcdd7508b478cb223b3511a9183 # main
- name: Load cached deps
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
Expand Down Expand Up @@ -584,7 +584,7 @@ jobs:
- name: Build artifacts
run: ./.github/workflows/scripts/build_artifacts.sh ${{ runner.os }}
- name: Archive artifacts
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4
with:
name: binaries-windows
path: ./artifacts/
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/release_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ jobs:
with:
go-version-file: 'go.mod'
- name: Install regctl
uses: regclient/actions/regctl-installer@b6614f5f56245066b533343a85f4109bdc38c8cc # main
uses: regclient/actions/regctl-installer@ce5fd131e371ffcdd7508b478cb223b3511a9183 # main
- name: Download archived images
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
Expand All @@ -137,7 +137,7 @@ jobs:
- name: Build artifacts
run: ./.github/workflows/scripts/build_artifacts.sh ${{ runner.os }}
- name: Archive artifacts
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4
with:
name: binaries-linux
path: ./artifacts/
Expand Down Expand Up @@ -172,7 +172,7 @@ jobs:
- name: Export images
run: tar -czvf images.tar.gz *-image.tar
- name: Archive images
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4
with:
name: images
path: images.tar.gz
Expand Down Expand Up @@ -200,7 +200,7 @@ jobs:
docker save spire-server-windows:latest-local spire-agent-windows:latest-local oidc-discovery-provider-windows:latest-local -o images-windows.tar
gzip images-windows.tar
- name: Archive images
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4
with:
name: images-windows
path: images-windows.tar.gz
Expand Down Expand Up @@ -260,7 +260,7 @@ jobs:
with:
go-version-file: 'go.mod'
- name: Install regctl
uses: regclient/actions/regctl-installer@b6614f5f56245066b533343a85f4109bdc38c8cc # main
uses: regclient/actions/regctl-installer@ce5fd131e371ffcdd7508b478cb223b3511a9183 # main
- name: Load cached deps
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
Expand Down Expand Up @@ -320,7 +320,7 @@ jobs:
with:
go-version-file: 'go.mod'
- name: Install regctl
uses: regclient/actions/regctl-installer@b6614f5f56245066b533343a85f4109bdc38c8cc # main
uses: regclient/actions/regctl-installer@ce5fd131e371ffcdd7508b478cb223b3511a9183 # main
- name: Load cached deps
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
Expand Down Expand Up @@ -540,7 +540,7 @@ jobs:
path: ./bin/
key: ${{ runner.os }}-executables-${{ hashFiles('**/*.exe') }}
- name: Archive artifacts
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4
with:
name: binaries-windows
path: ./artifacts/
Expand Down Expand Up @@ -593,7 +593,7 @@ jobs:
with:
cosign-release: v2.2.3
- name: Install regctl
uses: regclient/actions/regctl-installer@b6614f5f56245066b533343a85f4109bdc38c8cc # main
uses: regclient/actions/regctl-installer@ce5fd131e371ffcdd7508b478cb223b3511a9183 # main
- name: Download archived images
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/scripts/find_k8s.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@

declare -A tags_map
for element in "${tags_sorted[@]}"; do
# Skip 1.32.1 until either a new version of kind is released the problem
# with the kindest/node:1.32.1 image is fixed. See upstream kind issue:
# https://github.com/kubernetes-sigs/kind/issues/3853
if [[ "$element" == "v1.32.1" ]]; then
continue
fi

# Element is in this form: "X.XX.YY"
# If not, continue
num_dots=$(echo "$element" | grep -o '\.' | wc -l)
Expand Down
2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.23.4
1.23.5
10 changes: 10 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,28 @@ linters:
- bodyclose
- durationcheck
- errorlint
- gofmt
- goimports
- revive
- gosec
- misspell
- nakedret
- nilerr
- unconvert
- unparam
- intrange
- whitespace
- gocritic
- copyloopvar
- wastedassign
- nolintlint

linters-settings:
govet:
enable:
- nilness
- sortslice
- unusedwrite
revive:
# minimal confidence for issues, default is 0.8
confidence: 0.0
Expand Down
14 changes: 7 additions & 7 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
* @evan2645 @amartinezfayo @azdagron @MarcosDY @rturner3
* @evan2645 @amartinezfayo @sorindumitru @MarcosDY @rturner3

##########################################
# Maintainers
##########################################

# Evan Gilman
# VMware, Inc
# SPIRL, Inc.
# @evan2645

# Agustin Martínez Fayó
# Hewlett-Packard Enterprise
# @amartinezfayo

# Andrew Harding
# VMware, Inc
# @azdagron
# Sorin Dumitru
# Bloomberg L.P.
# @sorindumitru

# Marcos Yacob
# Hewlett-Packard Enterprise
# @MarcosDY

# Ryan Turner
# Uber Technologies, Inc
# Cielara AI
# @rturner3

##########################################
# Community Chair
##########################################

# Umair Khan
# Hewlett-Packard Enterprise
# Stacklet, Inc.
# @umairmkhan
13 changes: 7 additions & 6 deletions cmd/spire-agent/cli/api/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import (
"github.com/mitchellh/cli"
"github.com/spiffe/go-spiffe/v2/proto/spiffe/workload"
"github.com/spiffe/go-spiffe/v2/spiffeid"
"github.com/spiffe/spire/cmd/spire-server/cli/common"
commoncli "github.com/spiffe/spire/pkg/common/cli"
"github.com/spiffe/spire/pkg/common/x509util"
"github.com/spiffe/spire/test/clitest"
"github.com/spiffe/spire/test/fakes/fakeworkloadapi"
"github.com/spiffe/spire/test/spiretest"
"github.com/spiffe/spire/test/testca"
Expand Down Expand Up @@ -416,9 +416,10 @@ func TestValidateJWTCommand(t *testing.T) {
Claims: &structpb.Struct{
Fields: map[string]*structpb.Value{
"aud": {
Kind: &structpb.Value_ListValue{ListValue: &structpb.ListValue{
Values: []*structpb.Value{{Kind: &structpb.Value_StringValue{StringValue: "foo"}}},
},
Kind: &structpb.Value_ListValue{
ListValue: &structpb.ListValue{
Values: []*structpb.Value{{Kind: &structpb.Value_StringValue{StringValue: "foo"}}},
},
},
},
},
Expand Down Expand Up @@ -504,7 +505,7 @@ func setupTest(t *testing.T, newCmd func(env *commoncli.Env, clientMaker workloa
}, newWorkloadClient)

test := &apiTest{
addr: common.GetAddr(addr),
addr: clitest.GetAddr(addr),
stdin: stdin,
stdout: stdout,
stderr: stderr,
Expand Down Expand Up @@ -538,7 +539,7 @@ func (s *apiTest) afterTest(t *testing.T) {
}

func (s *apiTest) args(extra ...string) []string {
return append([]string{common.AddrArg, s.addr}, extra...)
return append([]string{clitest.AddrArg, s.addr}, extra...)
}

func assertOutputBasedOnFormat(t *testing.T, format, stdoutString, expectedStdoutJSON string, expectedStdoutPretty ...string) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/spire-agent/cli/api/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func newWorkloadClient(ctx context.Context, addr net.Addr, timeout time.Duration
if err != nil {
return nil, err
}
conn, err := util.GRPCDialContext(ctx, target)
conn, err := util.NewGRPCClient(target)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/spire-agent/cli/healthcheck/healthcheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func (c *healthCheckCommand) run() error {
if err != nil {
return err
}
conn, err := util.GRPCDialContext(context.Background(), target)
conn, err := util.NewGRPCClient(target)
if err != nil {
return err
}
Expand Down
8 changes: 0 additions & 8 deletions cmd/spire-agent/cli/run/run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,6 @@ func TestDownloadTrustBundle(t *testing.T) {
}

for _, testCase := range cases {
testCase := testCase

t.Run(testCase.msg, func(t *testing.T) {
testServer := httptest.NewServer(http.HandlerFunc(
func(w http.ResponseWriter, r *http.Request) {
Expand Down Expand Up @@ -629,8 +627,6 @@ func TestMergeInput(t *testing.T) {
cases = append(cases, mergeInputCasesOS()...)

for _, testCase := range cases {
testCase := testCase

fileInput := &Config{Agent: &agentConfig{}}
cliInput := &agentConfig{}

Expand Down Expand Up @@ -1042,8 +1038,6 @@ func TestNewAgentConfig(t *testing.T) {
}
cases = append(cases, newAgentConfigCasesOS(t)...)
for _, testCase := range cases {
testCase := testCase

input := defaultValidConfig()

testCase.input(input)
Expand Down Expand Up @@ -1206,8 +1200,6 @@ func TestWarnOnUnknownConfig(t *testing.T) {
}

for _, testCase := range cases {
testCase := testCase

c, err := ParseFile(filepath.Join(testFileDir, testCase.confFile), false)
require.NoError(t, err)

Expand Down
Loading

0 comments on commit 5e575f3

Please sign in to comment.