Skip to content

Commit ac5b3a0

Browse files
authored
chore(deps): upgrade argo-cd from v2.14.16 to v3.1.8 (#1258)
Signed-off-by: Cheng Fang <[email protected]>
1 parent 9509766 commit ac5b3a0

25 files changed

+358
-348
lines changed

cmd/ask_pass.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ import (
1212
"google.golang.org/grpc"
1313
"google.golang.org/grpc/credentials/insecure"
1414

15-
"github.com/argoproj/argo-cd/v2/util/askpass"
16-
"github.com/argoproj/argo-cd/v2/util/errors"
17-
grpc_util "github.com/argoproj/argo-cd/v2/util/grpc"
18-
"github.com/argoproj/argo-cd/v2/util/io"
15+
"github.com/argoproj/argo-cd/v3/util/askpass"
16+
"github.com/argoproj/argo-cd/v3/util/errors"
17+
grpc_util "github.com/argoproj/argo-cd/v3/util/grpc"
18+
"github.com/argoproj/argo-cd/v3/util/io"
1919
)
2020

2121
const (

cmd/ask_pass_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"strings"
1010
"testing"
1111

12-
"github.com/argoproj/argo-cd/v2/util/askpass"
12+
"github.com/argoproj/argo-cd/v3/util/askpass"
1313
"github.com/spf13/cobra"
1414
"github.com/stretchr/testify/assert"
1515
"google.golang.org/grpc"

cmd/common.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"text/template"
88
"time"
99

10-
"github.com/argoproj/argo-cd/v2/util/askpass"
10+
"github.com/argoproj/argo-cd/v3/util/askpass"
1111
"github.com/go-logr/logr"
1212
"go.uber.org/ratelimit"
1313

cmd/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ package main
1919
import (
2020
"os"
2121

22-
argocdapplicationv1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
22+
argocdapplicationv1alpha1 "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1"
2323
"github.com/spf13/cobra"
2424
"k8s.io/apimachinery/pkg/runtime"
2525
utilruntime "k8s.io/apimachinery/pkg/util/runtime"

cmd/webhook_test.go

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
package main
22

33
import (
4-
"context"
54
"math"
6-
"os"
75
"strconv"
86
"testing"
97

108
"github.com/stretchr/testify/assert"
119

12-
"github.com/argoproj-labs/argocd-image-updater/internal/controller"
1310
"github.com/argoproj-labs/argocd-image-updater/pkg/common"
1411
"github.com/argoproj-labs/argocd-image-updater/registry-scanner/pkg/env"
1512
)
@@ -49,26 +46,3 @@ func TestNewWebhookCommand(t *testing.T) {
4946

5047
asser.Nil(controllerCommand.Help())
5148
}
52-
53-
// Assisted-by: Gemini AI
54-
// TestRunWebhook_NoKubeConfig verifies runWebhook returns an error when kubeconfig cannot be loaded.
55-
func TestRunWebhook_NoKubeConfig(t *testing.T) {
56-
asser := assert.New(t)
57-
58-
oldVal, had := os.LookupEnv("KUBECONFIG")
59-
_ = os.Setenv("KUBECONFIG", "/this/path/does/not/exist")
60-
t.Cleanup(func() {
61-
if had {
62-
_ = os.Setenv("KUBECONFIG", oldVal)
63-
} else {
64-
_ = os.Unsetenv("KUBECONFIG")
65-
}
66-
})
67-
68-
ctx := context.Background()
69-
cfg := &controller.ImageUpdaterConfig{}
70-
whCfg := &WebhookConfig{Port: 0}
71-
72-
err := runWebhook(ctx, cfg, whCfg, 1)
73-
asser.Error(err)
74-
}

ext/git/client.go

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import (
1616
"syscall"
1717
"time"
1818

19-
argoexec "github.com/argoproj/pkg/exec"
2019
"github.com/bmatcuk/doublestar/v4"
2120
"github.com/go-git/go-git/v5"
2221
"github.com/go-git/go-git/v5/config"
@@ -31,11 +30,11 @@ import (
3130
apierrors "k8s.io/apimachinery/pkg/api/errors"
3231
utilnet "k8s.io/apimachinery/pkg/util/net"
3332

34-
"github.com/argoproj/argo-cd/v2/common"
35-
certutil "github.com/argoproj/argo-cd/v2/util/cert"
36-
"github.com/argoproj/argo-cd/v2/util/env"
37-
executil "github.com/argoproj/argo-cd/v2/util/exec"
38-
"github.com/argoproj/argo-cd/v2/util/proxy"
33+
"github.com/argoproj/argo-cd/v3/common"
34+
certutil "github.com/argoproj/argo-cd/v3/util/cert"
35+
"github.com/argoproj/argo-cd/v3/util/env"
36+
executil "github.com/argoproj/argo-cd/v3/util/exec"
37+
"github.com/argoproj/argo-cd/v3/util/proxy"
3938
)
4039

4140
var ErrInvalidRepoURL = fmt.Errorf("repo URL is invalid")
@@ -804,7 +803,7 @@ func (m *nativeGitClient) runCmdOutput(cmd *exec.Cmd, ropts runOpts) (string, er
804803
}
805804
cmd.Env = proxy.UpsertEnv(cmd, m.proxy, "")
806805
opts := executil.ExecRunOpts{
807-
TimeoutBehavior: argoexec.TimeoutBehavior{
806+
TimeoutBehavior: executil.TimeoutBehavior{
808807
Signal: syscall.SIGTERM,
809808
ShouldWait: true,
810809
},

ext/git/creds.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ import (
2424
"github.com/bradleyfalzon/ghinstallation/v2"
2525
log "github.com/sirupsen/logrus"
2626

27-
"github.com/argoproj/argo-cd/v2/common"
28-
certutil "github.com/argoproj/argo-cd/v2/util/cert"
29-
argoioutils "github.com/argoproj/argo-cd/v2/util/io"
27+
"github.com/argoproj/argo-cd/v3/common"
28+
certutil "github.com/argoproj/argo-cd/v3/util/cert"
29+
argoioutils "github.com/argoproj/argo-cd/v3/util/io"
3030
)
3131

3232
var (

ext/git/creds_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ import (
1515
"golang.org/x/oauth2"
1616
"golang.org/x/oauth2/google"
1717

18-
"github.com/argoproj/argo-cd/v2/util/cert"
19-
"github.com/argoproj/argo-cd/v2/util/io"
18+
"github.com/argoproj/argo-cd/v3/util/cert"
19+
"github.com/argoproj/argo-cd/v3/util/io"
2020
)
2121

2222
type cred struct {

ext/git/git_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ import (
1010

1111
"github.com/stretchr/testify/assert"
1212

13-
"github.com/argoproj/argo-cd/v2/common"
14-
"github.com/argoproj/argo-cd/v2/test/fixture/log"
15-
"github.com/argoproj/argo-cd/v2/test/fixture/path"
16-
"github.com/argoproj/argo-cd/v2/test/fixture/test"
13+
"github.com/argoproj/argo-cd/v3/common"
14+
"github.com/argoproj/argo-cd/v3/test/fixture/log"
15+
"github.com/argoproj/argo-cd/v3/test/fixture/path"
16+
"github.com/argoproj/argo-cd/v3/test/fixture/test"
1717
)
1818

1919
func TestIsCommitSHA(t *testing.T) {
@@ -342,7 +342,7 @@ func TestVerifyShallowFetchCheckout(t *testing.T) {
342342
}
343343

344344
func TestNewFactory(t *testing.T) {
345-
addBinDirToPath := path.NewBinDirToPath()
345+
addBinDirToPath := path.NewBinDirToPath(t)
346346
defer addBinDirToPath.Close()
347347
closer := log.Debug()
348348
defer closer()

0 commit comments

Comments
 (0)