Skip to content

Commit

Permalink
fix(deps): update k8s.io/test-infra digest to de927c5 (#1068)
Browse files Browse the repository at this point in the history
  • Loading branch information
renovate[bot] authored Dec 5, 2022
1 parent 85302db commit 6577603
Show file tree
Hide file tree
Showing 24 changed files with 695 additions and 1,479 deletions.
15 changes: 7 additions & 8 deletions cmd/rerere/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@ const (

type options struct {
dryRun bool
github prowflagutil.GitHubOptions
labels prowflagutil.Strings

github prowflagutil.GitHubOptions
git prowflagutil.GitOptions
retesting rerere.RetestingOptions
webhookSecretFile string
git prowflagutil.GitOptions
retesting rerere.RetestingOptions
}

// validate validates options.
Expand Down Expand Up @@ -83,17 +84,15 @@ func main() {
log.WithError(err).Fatal("Error unmarshal job spec.")
}

secretAgent := &secret.Agent{}
if err := secretAgent.Start([]string{o.github.TokenPath}); err != nil {
if err := secret.Add(o.webhookSecretFile); err != nil {
log.WithError(err).Fatal("Error starting secrets agent.")
}

githubClient, err := o.github.GitHubClient(secretAgent, o.dryRun)
githubClient, err := o.github.GitHubClient(o.dryRun)
if err != nil {
log.WithError(err).Fatal("Error getting GitHub client.")
}

gitClient, err := o.git.GitClient(githubClient, secretAgent.GetTokenGenerator(o.github.TokenPath), nil, o.dryRun)
gitClient, err := o.github.GitClientFactory("", nil, o.dryRun)
if err != nil {
log.WithError(err).Fatal("Error getting Git client.")
}
Expand Down
7 changes: 3 additions & 4 deletions cmd/ticommunityautoresponder/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,11 @@ func main() {
log.WithError(err).Fatalf("Error loading external plugin config from %q.", o.externalPluginsConfig)
}

secretAgent := &secret.Agent{}
if err := secretAgent.Start([]string{o.github.TokenPath, o.webhookSecretFile}); err != nil {
if err := secret.Add(o.webhookSecretFile); err != nil {
logrus.WithError(err).Fatal("Error starting secrets agent.")
}

githubClient, err := o.github.GitHubClient(secretAgent, o.dryRun)
githubClient, err := o.github.GitHubClient(o.dryRun)
if err != nil {
logrus.WithError(err).Fatal("Error getting GitHub client.")
}
Expand All @@ -88,7 +87,7 @@ func main() {
_ = githubClient.Throttle(360, 360)

server := &server{
tokenGenerator: secretAgent.GetTokenGenerator(o.webhookSecretFile),
tokenGenerator: secret.GetTokenGenerator(o.webhookSecretFile),
gc: githubClient,
configAgent: epa,
log: log,
Expand Down
7 changes: 3 additions & 4 deletions cmd/ticommunityblunderbuss/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,11 @@ func main() {
log.WithError(err).Fatalf("Error loading external plugin config from %q.", o.externalPluginsConfig)
}

secretAgent := &secret.Agent{}
if err := secretAgent.Start([]string{o.github.TokenPath, o.webhookSecretFile}); err != nil {
if err := secret.Add(o.webhookSecretFile); err != nil {
logrus.WithError(err).Fatal("Error starting secrets agent.")
}

githubClient, err := o.github.GitHubClient(secretAgent, o.dryRun)
githubClient, err := o.github.GitHubClient(o.dryRun)
if err != nil {
logrus.WithError(err).Fatal("Error getting GitHub client.")
}
Expand All @@ -98,7 +97,7 @@ func main() {
ol := &ownersclient.OwnersClient{Client: client}

server := &server{
tokenGenerator: secretAgent.GetTokenGenerator(o.webhookSecretFile),
tokenGenerator: secret.GetTokenGenerator(o.webhookSecretFile),
gc: githubClient,
ol: ol,
configAgent: epa,
Expand Down
16 changes: 6 additions & 10 deletions cmd/ticommunitycherrypicker/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
"k8s.io/test-infra/pkg/flagutil"
"k8s.io/test-infra/prow/config/secret"
prowflagutil "k8s.io/test-infra/prow/flagutil"
git "k8s.io/test-infra/prow/git/v2"
"k8s.io/test-infra/prow/interrupts"
"k8s.io/test-infra/prow/pjutil"
"k8s.io/test-infra/prow/pluginhelp/externalplugins"
Expand Down Expand Up @@ -72,20 +71,19 @@ func main() {
log.WithError(err).Fatalf("Error loading external plugin config from %q.", o.externalPluginsConfig)
}

secretAgent := &secret.Agent{}
if err := secretAgent.Start([]string{o.github.TokenPath, o.webhookSecretFile}); err != nil {
if err := secret.Add(o.webhookSecretFile); err != nil {
logrus.WithError(err).Fatal("Error starting secrets agent.")
}

githubClient, err := o.github.GitHubClient(secretAgent, o.dryRun)
githubClient, err := o.github.GitHubClient(o.dryRun)
if err != nil {
logrus.WithError(err).Fatal("Error getting GitHub client.")
}
// NOTICE: This error is only possible when using the GitHub APP,
// but if we use the APP auth later we will have to handle the err.
_ = githubClient.Throttle(360, 360)

gitClient, err := o.github.GitClient(secretAgent, o.dryRun)
gitClient, err := o.github.GitClientFactory("", nil, o.dryRun)
if err != nil {
logrus.WithError(err).Fatal("Error getting Git client.")
}
Expand All @@ -110,16 +108,14 @@ func main() {
log.WithError(err).Fatal("Error listing bot repositories.")
}

tokenGenerator := secretAgent.GetTokenGenerator(o.github.TokenPath)
server := &cherrypicker.Server{
WebhookSecretGenerator: secretAgent.GetTokenGenerator(o.webhookSecretFile),
GitHubTokenGenerator: tokenGenerator,
WebhookSecretGenerator: secret.GetTokenGenerator(o.webhookSecretFile),
BotUser: botUser,
Email: email,
ConfigAgent: epa,

GitClient: git.ClientFactoryFrom(gitClient),
GitHubClient: newExtGithubClient(githubClient, tokenGenerator),
GitClient: gitClient,
GitHubClient: newExtGithubClient(githubClient, nil),
Log: log,

Bare: &http.Client{},
Expand Down
7 changes: 3 additions & 4 deletions cmd/ticommunitycontribution/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,11 @@ func main() {
log.WithError(err).Fatalf("Error loading external plugin config from %q.", o.externalPluginsConfig)
}

secretAgent := &secret.Agent{}
if err := secretAgent.Start([]string{o.github.TokenPath, o.webhookSecretFile}); err != nil {
if err := secret.Add(o.webhookSecretFile); err != nil {
logrus.WithError(err).Fatal("Error starting secrets agent.")
}

githubClient, err := o.github.GitHubClient(secretAgent, o.dryRun)
githubClient, err := o.github.GitHubClient(o.dryRun)
if err != nil {
logrus.WithError(err).Fatal("Error getting GitHub client.")
}
Expand All @@ -88,7 +87,7 @@ func main() {
_ = githubClient.Throttle(360, 360)

server := &server{
tokenGenerator: secretAgent.GetTokenGenerator(o.webhookSecretFile),
tokenGenerator: secret.GetTokenGenerator(o.webhookSecretFile),
gc: githubClient,
configAgent: epa,
log: log,
Expand Down
7 changes: 3 additions & 4 deletions cmd/ticommunityformatchecker/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,11 @@ func main() {
log.WithError(err).Fatalf("Error loading external plugin config from %q.", o.externalPluginsConfig)
}

secretAgent := &secret.Agent{}
if err := secretAgent.Start([]string{o.github.TokenPath, o.webhookSecretFile}); err != nil {
if err := secret.Add(o.webhookSecretFile); err != nil {
logrus.WithError(err).Fatal("Error starting secrets agent.")
}

githubClient, err := o.github.GitHubClient(secretAgent, o.dryRun)
githubClient, err := o.github.GitHubClient(o.dryRun)
if err != nil {
logrus.WithError(err).Fatal("Error getting GitHub client.")
}
Expand All @@ -87,7 +86,7 @@ func main() {
_ = githubClient.Throttle(360, 360)

server := &server{
tokenGenerator: secretAgent.GetTokenGenerator(o.webhookSecretFile),
tokenGenerator: secret.GetTokenGenerator(o.webhookSecretFile),
gc: githubClient,
configAgent: epa,
log: log,
Expand Down
9 changes: 4 additions & 5 deletions cmd/ticommunityissuetriage/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,11 @@ func main() {
}

log.Infof("%s %s", o.github.TokenPath, o.webhookSecretFile)
secretAgent := &secret.Agent{}
if err := secretAgent.Start([]string{o.github.TokenPath, o.webhookSecretFile}); err != nil {
if err := secret.Add(o.webhookSecretFile); err != nil {
logrus.WithError(err).Fatal("Error starting secrets agent.")
}

githubClient, err := o.github.GitHubClient(secretAgent, o.dryRun)
githubClient, err := o.github.GitHubClient(o.dryRun)
if err != nil {
logrus.WithError(err).Fatal("Error getting GitHub client.")
}
Expand All @@ -86,8 +85,8 @@ func main() {
_ = githubClient.Throttle(360, 360)

server := &issuetriage.Server{
WebhookSecretGenerator: secretAgent.GetTokenGenerator(o.webhookSecretFile),
GitHubTokenGenerator: secretAgent.GetTokenGenerator(o.github.TokenPath),
WebhookSecretGenerator: secret.GetTokenGenerator(o.webhookSecretFile),
GitHubTokenGenerator: secret.GetTokenGenerator(o.github.TokenPath),
GitHubClient: githubClient,
ConfigAgent: epa,
}
Expand Down
7 changes: 3 additions & 4 deletions cmd/ticommunitylabel/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,11 @@ func main() {
log.WithError(err).Fatalf("Error loading external plugin config from %q.", o.externalPluginsConfig)
}

secretAgent := &secret.Agent{}
if err := secretAgent.Start([]string{o.github.TokenPath, o.webhookSecretFile}); err != nil {
if err := secret.Add(o.webhookSecretFile); err != nil {
logrus.WithError(err).Fatal("Error starting secrets agent.")
}

githubClient, err := o.github.GitHubClient(secretAgent, o.dryRun)
githubClient, err := o.github.GitHubClient(o.dryRun)
if err != nil {
logrus.WithError(err).Fatal("Error getting GitHub client.")
}
Expand All @@ -88,7 +87,7 @@ func main() {
_ = githubClient.Throttle(360, 360)

server := &server{
tokenGenerator: secretAgent.GetTokenGenerator(o.webhookSecretFile),
tokenGenerator: secret.GetTokenGenerator(o.webhookSecretFile),
gc: githubClient,
configAgent: epa,
log: log,
Expand Down
7 changes: 3 additions & 4 deletions cmd/ticommunitylabelblocker/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,11 @@ func main() {
log.WithError(err).Fatalf("Error loading external plugin config from %q.", o.externalPluginsConfig)
}

secretAgent := &secret.Agent{}
if err := secretAgent.Start([]string{o.github.TokenPath, o.webhookSecretFile}); err != nil {
if err := secret.Add(o.webhookSecretFile); err != nil {
logrus.WithError(err).Fatal("Error starting secrets agent.")
}

githubClient, err := o.github.GitHubClient(secretAgent, o.dryRun)
githubClient, err := o.github.GitHubClient(o.dryRun)
if err != nil {
logrus.WithError(err).Fatal("Error getting GitHub client.")
}
Expand All @@ -90,7 +89,7 @@ func main() {
_ = githubClient.Throttle(360, 360)

server := &server{
tokenGenerator: secretAgent.GetTokenGenerator(o.webhookSecretFile),
tokenGenerator: secret.GetTokenGenerator(o.webhookSecretFile),
gc: githubClient,
configAgent: epa,
log: log,
Expand Down
7 changes: 3 additions & 4 deletions cmd/ticommunitylgtm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,11 @@ func main() {
log.WithError(err).Fatalf("Error loading external plugin config from %q.", o.externalPluginsConfig)
}

secretAgent := &secret.Agent{}
if err := secretAgent.Start([]string{o.github.TokenPath, o.webhookSecretFile}); err != nil {
if err := secret.Add(o.webhookSecretFile); err != nil {
logrus.WithError(err).Fatal("Error starting secrets agent.")
}

githubClient, err := o.github.GitHubClient(secretAgent, o.dryRun)
githubClient, err := o.github.GitHubClient(o.dryRun)
if err != nil {
logrus.WithError(err).Fatal("Error getting GitHub client.")
}
Expand All @@ -98,7 +97,7 @@ func main() {
ol := &ownersclient.OwnersClient{Client: client}

server := &server{
tokenGenerator: secretAgent.GetTokenGenerator(o.webhookSecretFile),
tokenGenerator: secret.GetTokenGenerator(o.webhookSecretFile),
gc: githubClient,
ol: ol,
configAgent: epa,
Expand Down
7 changes: 3 additions & 4 deletions cmd/ticommunitymerge/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,11 @@ func main() {
log.WithError(err).Fatalf("Error loading external plugin config from %q.", o.externalPluginsConfig)
}

secretAgent := &secret.Agent{}
if err := secretAgent.Start([]string{o.github.TokenPath, o.webhookSecretFile}); err != nil {
if err := secret.Add(o.webhookSecretFile); err != nil {
logrus.WithError(err).Fatal("Error starting secrets agent.")
}

githubClient, err := o.github.GitHubClient(secretAgent, o.dryRun)
githubClient, err := o.github.GitHubClient(o.dryRun)
if err != nil {
logrus.WithError(err).Fatal("Error getting GitHub client.")
}
Expand All @@ -99,7 +98,7 @@ func main() {
ol := &ownersclient.OwnersClient{Client: client}

server := &server{
tokenGenerator: secretAgent.GetTokenGenerator(o.webhookSecretFile),
tokenGenerator: secret.GetTokenGenerator(o.webhookSecretFile),
gc: githubClient,
ol: ol,
configAgent: epa,
Expand Down
7 changes: 3 additions & 4 deletions cmd/ticommunityowners/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,11 @@ func main() {
log.WithError(err).Fatalf("Error loading external plugin config from %q.", o.externalPluginsConfig)
}

secretAgent := &secret.Agent{}
if err := secretAgent.Start([]string{o.github.TokenPath, o.webhookSecretFile}); err != nil {
if err := secret.Add(o.webhookSecretFile); err != nil {
logrus.WithError(err).Fatal("Error starting secrets agent.")
}

githubClient, err := o.github.GitHubClient(secretAgent, o.dryRun)
githubClient, err := o.github.GitHubClient(o.dryRun)
if err != nil {
logrus.WithError(err).Fatal("Error getting GitHub client.")
}
Expand All @@ -94,7 +93,7 @@ func main() {

server := &owners.Server{
Client: client,
TokenGenerator: secretAgent.GetTokenGenerator(o.webhookSecretFile),
TokenGenerator: secret.GetTokenGenerator(o.webhookSecretFile),
Gc: githubClient,
ConfigAgent: epa,
Log: log,
Expand Down
9 changes: 4 additions & 5 deletions cmd/ticommunitytars/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,11 @@ func main() {
log := logrus.StandardLogger().WithField("plugin", tars.PluginName)

pa := &plugins.ConfigAgent{}
if err := pa.Start(o.pluginConfig, nil, "", false); err != nil {
if err := pa.Start(o.pluginConfig, nil, "", false, false); err != nil {
log.WithError(err).Fatalf("Error loading plugin config from %q.", o.pluginConfig)
}

secretAgent := &secret.Agent{}
if err := secretAgent.Start([]string{o.github.TokenPath, o.webhookSecretFile}); err != nil {
if err := secret.Add(o.webhookSecretFile); err != nil {
logrus.WithError(err).Fatal("Error starting secrets agent.")
}

Expand All @@ -88,7 +87,7 @@ func main() {
log.WithError(err).Fatalf("Error loading external plugin config from %q.", o.externalPluginsConfig)
}

githubClient, err := o.github.GitHubClient(secretAgent, o.dryRun)
githubClient, err := o.github.GitHubClient(o.dryRun)
if err != nil {
logrus.WithError(err).Fatal("Error getting GitHub client.")
}
Expand All @@ -97,7 +96,7 @@ func main() {
_ = githubClient.Throttle(360, 360)

server := &Server{
tokenGenerator: secretAgent.GetTokenGenerator(o.webhookSecretFile),
tokenGenerator: secret.GetTokenGenerator(o.webhookSecretFile),
ghc: githubClient,
log: log,
configAgent: epa,
Expand Down
Loading

0 comments on commit 6577603

Please sign in to comment.