Skip to content

Commit 9be1ab7

Browse files
committed
upgrade the tektoncd/pipeline to v0.45.0 version
Signed-off-by: Nikolaos Moraitis <[email protected]>
1 parent 1fb5b63 commit 9be1ab7

File tree

193 files changed

+6434
-4590
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

193 files changed

+6434
-4590
lines changed

config/prow/cluster/prowjob-crd/prowjob_customresourcedefinition.yaml

Lines changed: 3344 additions & 1625 deletions
Large diffs are not rendered by default.

config/tests/jobs/jobs_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -437,8 +437,8 @@ func validateImagePushingImage(spec *coreapi.PodSpec) error {
437437
func TestTrustedJobSecretsRestricted(t *testing.T) {
438438
type labels map[string]string
439439

440-
getSecretsFromPreset := func(labels labels) sets.String {
441-
secrets := sets.NewString()
440+
getSecretsFromPreset := func(labels labels) sets.Set[string] {
441+
secrets := sets.New[string]()
442442
for _, preset := range c.Presets {
443443
match := true
444444
for k, v1 := range preset.Labels {
@@ -465,11 +465,11 @@ func TestTrustedJobSecretsRestricted(t *testing.T) {
465465
}
466466

467467
secretsRestricted := map[string]struct {
468-
secrets sets.String
468+
secrets sets.Set[string]
469469
isTrusted bool
470470
allowedInPresubmit bool
471471
}{
472-
"kubernetes-sigs/sig-storage-local-static-provisioner": {secrets: sets.NewString("sig-storage-local-static-provisioner-pusher"), isTrusted: true},
472+
"kubernetes-sigs/sig-storage-local-static-provisioner": {secrets: sets.New[string]("sig-storage-local-static-provisioner-pusher"), isTrusted: true},
473473
"kubernetes-csi/csi-driver-nfs": {secrets: getSecretsFromPreset(labels{"preset-azure-cred": "true"}), allowedInPresubmit: true},
474474
"kubernetes-csi/csi-driver-smb": {secrets: getSecretsFromPreset(labels{"preset-azure-cred": "true"}), allowedInPresubmit: true},
475475
"kubernetes-sigs/azuredisk-csi-driver": {secrets: getSecretsFromPreset(labels{"preset-azure-cred": "true"}), allowedInPresubmit: true},
@@ -484,9 +484,9 @@ func TestTrustedJobSecretsRestricted(t *testing.T) {
484484
"kubernetes/sig-release": {secrets: getSecretsFromPreset(labels{"preset-azure-cred": "true"})},
485485
"kubernetes-sigs/cluster-api-provider-azure": {secrets: getSecretsFromPreset(labels{"preset-azure-cred-only": "true"}), allowedInPresubmit: true},
486486
}
487-
allSecrets := sets.String{}
487+
allSecrets := sets.Set[string]{}
488488
for _, s := range secretsRestricted {
489-
allSecrets.Insert(s.secrets.List()...)
489+
allSecrets.Insert(sets.List(s.secrets)...)
490490
}
491491

492492
isSecretUsedByContainer := func(secret string, container coreapi.Container) bool {
@@ -550,14 +550,14 @@ func TestTrustedJobSecretsRestricted(t *testing.T) {
550550
org, project, _ := getJobOrgProjectBasename(job.SourcePath)
551551
s, ok := secretsRestricted[filepath.Join(org, project)]
552552
allowedInPresubmit := ok && s.allowedInPresubmit
553-
for _, secret := range allSecrets.List() {
553+
for _, secret := range sets.List(allSecrets) {
554554
if isSecretUsed(secret, job.JobBase) && !allowedInPresubmit {
555555
t.Errorf("%q defined in %q may not use secret %q in %q cluster", job.Name, job.SourcePath, secret, job.Cluster)
556556
}
557557
}
558558
}
559559

560-
secretsCanUseByPath := func(path string) sets.String {
560+
secretsCanUseByPath := func(path string) sets.Set[string] {
561561
org, project, basename := getJobOrgProjectBasename(path)
562562
s, ok := secretsRestricted[filepath.Join(org, project)]
563563
if !ok || (s.isTrusted && basename != fmt.Sprintf("%s-trusted.yaml", project)) {
@@ -582,7 +582,7 @@ func TestTrustedJobSecretsRestricted(t *testing.T) {
582582
continue
583583
}
584584
secretsCanUse := secretsCanUseByPath(job.SourcePath)
585-
for _, secret := range allSecrets.List() {
585+
for _, secret := range sets.List(allSecrets) {
586586
if secretsCanUse != nil && secretsCanUse.Has(secret) {
587587
t.Logf("allow secret %v for job %s defined in %s", secret, job.Name, job.SourcePath)
588588
continue

experiment/clustersecretbackup/secretmanager/secretmanager.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ import (
2121
"fmt"
2222

2323
secretmanager "cloud.google.com/go/secretmanager/apiv1"
24+
"cloud.google.com/go/secretmanager/apiv1/secretmanagerpb"
2425
"google.golang.org/api/iterator"
25-
secretmanagerpb "google.golang.org/genproto/googleapis/cloud/secretmanager/v1"
2626
"google.golang.org/genproto/protobuf/field_mask"
2727
)
2828

experiment/coverage/apicoverage.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func getOpenAPISpec(url string) apiArray {
9999
return parseOpenAPI(bytes)
100100
}
101101

102-
// I0919 15:34:14.943642 6611 round_trippers.go:414] GET https://172.27.138.63:6443/api/v1/namespaces/kube-system/replicationcontrollers
102+
// I0919 15:34:14.943642 6611 round_trippers.go:414] GET https://172.27.138.63:6443/api/v1/namespaces/kube-system/replicationcontrollers
103103
var reE2eAPILog = regexp.MustCompile(`round_trippers.go:\d+\] (GET|PUT|POST|DELETE|OPTIONS|HEAD|PATCH) (\S+)`)
104104

105105
func parseE2eAPILog(fp io.Reader) apiArray {
@@ -127,7 +127,7 @@ func parseE2eAPILog(fp io.Reader) apiArray {
127127
return apisLog
128128
}
129129

130-
// I0413 12:10:56.612005 1 wrap.go:42] PUT /apis/apiregistration.k8s.io/v1/apiservices/v1.apps/status: (1.671974ms) 200 [[kube-apiserver/v1.11.0 (linux/amd64) kubernetes/7297c1c] 127.0.0.1:44356]
130+
// I0413 12:10:56.612005 1 wrap.go:42] PUT /apis/apiregistration.k8s.io/v1/apiservices/v1.apps/status: (1.671974ms) 200 [[kube-apiserver/v1.11.0 (linux/amd64) kubernetes/7297c1c] 127.0.0.1:44356]
131131
var reAPIServerLog = regexp.MustCompile(`wrap.go:\d+\] (GET|PUT|POST|DELETE|OPTIONS|HEAD|PATCH) (\S+)`)
132132

133133
func parseAPIServerLog(fp io.Reader) apiArray {
@@ -236,8 +236,8 @@ func getCoverageByLevel(apisTested, apisAll apiArray) coverageData {
236236
return coverage
237237
}
238238

239-
//NOTE: This is messy, but the regex doesn't support negative lookahead(?!) on golang.
240-
//This is just a workaround.
239+
// NOTE: This is messy, but the regex doesn't support negative lookahead(?!) on golang.
240+
// This is just a workaround.
241241
var reNotStableAPI = regexp.MustCompile(`\S+(alpha|beta)\S+`)
242242
var reAlphaAPI = regexp.MustCompile(`\S+alpha\S+`)
243243
var reBetaAPI = regexp.MustCompile(`\S+beta\S+`)

experiment/coverage/apicoverage_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
"testing"
2424
)
2525

26-
//NOTE: This method is for avoiding flake tests instead of using reflect.DeepEqual()
26+
// NOTE: This method is for avoiding flake tests instead of using reflect.DeepEqual()
2727
func equalAPIArray(a, b apiArray) bool {
2828
if a == nil && b == nil {
2929
return true

experiment/ml/analyze/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ import (
2424
"time"
2525

2626
automl "cloud.google.com/go/automl/apiv1"
27+
"cloud.google.com/go/automl/apiv1/automlpb"
2728
"google.golang.org/api/option"
28-
automlpb "google.golang.org/genproto/googleapis/cloud/automl/v1"
2929
)
3030

3131
func defaultPredictionClient(ctx context.Context) (*predictionClient, error) {

experiment/ml/prowlog/csv/generate-dataset.go

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,28 @@ limitations under the License.
1717
// Package main will create a CSV dataset by reading the specified zip file.
1818
//
1919
// Zip file is assumed to be created by generate-dataset.go, following this format:
20-
// TRAIN/labelA/foo.txt
21-
// VALIDATION/labelB/bar.txt
22-
// TEST/labelA/whatever.txt
20+
//
21+
// TRAIN/labelA/foo.txt
22+
// VALIDATION/labelB/bar.txt
23+
// TEST/labelA/whatever.txt
24+
//
2325
// aka <partition>/<label>/<name>, or alternatively leaving out the parition:
24-
// labelA/foo.txt
25-
// labelB/bar.txt
26-
// labelA/whatever.txt
26+
//
27+
// labelA/foo.txt
28+
// labelB/bar.txt
29+
// labelA/whatever.txt
2730
//
2831
// The corresponding CSV file rows will look like:
29-
// TRAIN,"hello world",labelA
30-
// VALIDATION,"contents of bar",labelB
31-
// TEST,"more interesting stuff",labelA
32+
//
33+
// TRAIN,"hello world",labelA
34+
// VALIDATION,"contents of bar",labelB
35+
// TEST,"more interesting stuff",labelA
36+
//
3237
// aka <parition>,<content of file>,<label>, possibly leaving the partition column blank:
33-
// ,"hello world",labelA
34-
// ,"contents of bar",labelB
35-
// ,"more interesting stuff",labelA
38+
//
39+
// ,"hello world",labelA
40+
// ,"contents of bar",labelB
41+
// ,"more interesting stuff",labelA
3642
package main
3743

3844
import (

experiment/prowjob-report/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ import (
4343
)
4444

4545
// TODO: parse testgrid config to catch
46-
// - jobs that aren't prowjobs but are on release-informing dashboards
47-
// - jobs that don't declare testgrid info via annotations
46+
// - jobs that aren't prowjobs but are on release-informing dashboards
47+
// - jobs that don't declare testgrid info via annotations
4848
var reportFormat = flag.String("format", "csv", "Output format [csv|json|html] defaults to csv")
4949
var reportDate = flag.String("date", "now", "Date to include in report ('now' is converted to today)")
5050

experiment/service-account-creator/main.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ type options struct {
4646
serviceAccount string
4747
addRoles flagutil.Strings
4848
removeRoles flagutil.Strings
49-
adds sets.String
50-
removes sets.String
49+
adds sets.Set[string]
50+
removes sets.Set[string]
5151
serviceAccountPrefix string
5252
serviceAccountProject string
5353
}
@@ -65,10 +65,10 @@ func (o options) validate() error {
6565
return errors.New("--add or --remove required")
6666
}
6767

68-
o.adds = sets.NewString(adds...)
69-
o.removes = sets.NewString(removes...)
68+
o.adds = sets.New[string](adds...)
69+
o.removes = sets.New[string](removes...)
7070
if both := o.adds.Intersection(o.removes); len(both) > 0 {
71-
return fmt.Errorf("Cannot both add and remove roles: %v", both.List())
71+
return fmt.Errorf("cannot both add and remove roles: %v", sets.List(both))
7272
}
7373
mat := re.FindStringSubmatch(o.serviceAccount)
7474
if mat != nil {

gencred/pkg/secretmanager/secretmanager.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ import (
2121
"fmt"
2222

2323
secretmanager "cloud.google.com/go/secretmanager/apiv1"
24+
"cloud.google.com/go/secretmanager/apiv1/secretmanagerpb"
2425
"google.golang.org/api/iterator"
25-
secretmanagerpb "google.golang.org/genproto/googleapis/cloud/secretmanager/v1"
2626
)
2727

2828
// Client is a wrapper of secretmanager client

ghproxy/ghcache/ghcache.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,11 +317,15 @@ func (c *throttlingTransport) RoundTrip(req *http.Request) (*http.Response, erro
317317
// reach the cache layer in order to force the caching policy we require.
318318
//
319319
// By default github responds to PR requests with:
320-
// Cache-Control: private, max-age=60, s-maxage=60
320+
//
321+
// Cache-Control: private, max-age=60, s-maxage=60
322+
//
321323
// Which means the httpcache would not consider anything stale for 60 seconds.
322324
// However, we want to always revalidate cache entries using ETags and last
323325
// modified times so this RoundTripper overrides response headers to:
324-
// Cache-Control: no-cache
326+
//
327+
// Cache-Control: no-cache
328+
//
325329
// This instructs the cache to store the response, but always consider it stale.
326330
type upstreamTransport struct {
327331
roundTripper http.RoundTripper

0 commit comments

Comments
 (0)