From 68f05ba80c0581a0eb7375c2dd17edfe9e90f4ab Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 14:14:18 -0500 Subject: [PATCH 01/31] chore(deps/tools): bump helm.sh/helm/v3 from 3.16.2 to 3.16.3 in /hack/tools in the go-patch group (#2946) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- hack/tools/go.mod | 4 ++-- hack/tools/go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hack/tools/go.mod b/hack/tools/go.mod index 02fd94395..7bc4d5d32 100644 --- a/hack/tools/go.mod +++ b/hack/tools/go.mod @@ -6,7 +6,7 @@ require ( github.com/bufbuild/buf v1.46.0 github.com/golangci/golangci-lint v1.61.0 golang.org/x/tools v0.27.0 - helm.sh/helm/v3 v3.16.2 + helm.sh/helm/v3 v3.16.3 k8s.io/code-generator v0.31.2 sigs.k8s.io/controller-tools v0.16.5 ) @@ -83,7 +83,7 @@ require ( github.com/containerd/typeurl/v2 v2.2.0 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect github.com/curioswitch/go-reassign v0.2.0 // indirect - github.com/cyphar/filepath-securejoin v0.3.1 // indirect + github.com/cyphar/filepath-securejoin v0.3.4 // indirect github.com/daixiang0/gci v0.13.5 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/denis-tingaikin/go-header v0.5.0 // indirect diff --git a/hack/tools/go.sum b/hack/tools/go.sum index 84a6eb972..c81a46155 100644 --- a/hack/tools/go.sum +++ b/hack/tools/go.sum @@ -186,8 +186,8 @@ github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/curioswitch/go-reassign v0.2.0 h1:G9UZyOcpk/d7Gd6mqYgd8XYWFMw/znxwGDUstnC9DIo= github.com/curioswitch/go-reassign v0.2.0/go.mod h1:x6OpXuWvgfQaMGks2BZybTngWjT84hqJfKoO8Tt/Roc= -github.com/cyphar/filepath-securejoin v0.3.1 h1:1V7cHiaW+C+39wEfpH6XlLBQo3j/PciWFrgfCLS8XrE= -github.com/cyphar/filepath-securejoin v0.3.1/go.mod h1:F7i41x/9cBF7lzCrVsYs9fuzwRZm4NQsGTBdpp6mETc= +github.com/cyphar/filepath-securejoin v0.3.4 h1:VBWugsJh2ZxJmLFSM06/0qzQyiQX2Qs0ViKrUAcqdZ8= +github.com/cyphar/filepath-securejoin v0.3.4/go.mod h1:8s/MCNJREmFK0H02MF6Ihv1nakJe4L/w3WZLHNkvlYM= github.com/daixiang0/gci v0.13.5 h1:kThgmH1yBmZSBCh1EJVxQ7JsHpm5Oms0AMed/0LaH4c= github.com/daixiang0/gci v0.13.5/go.mod h1:12etP2OniiIdP4q+kjUGrC/rUagga7ODbqsom5Eo5Yk= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -1072,8 +1072,8 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= -helm.sh/helm/v3 v3.16.2 h1:Y9v7ry+ubQmi+cb5zw1Llx8OKHU9Hk9NQ/+P+LGBe2o= -helm.sh/helm/v3 v3.16.2/go.mod h1:SyTXgKBjNqi2NPsHCW5dDAsHqvGIu0kdNYNH9gQaw70= +helm.sh/helm/v3 v3.16.3 h1:kb8bSxMeRJ+knsK/ovvlaVPfdis0X3/ZhYCSFRP+YmY= +helm.sh/helm/v3 v3.16.3/go.mod h1:zeVWGDR4JJgiRbT3AnNsjYaX8OTJlIE9zC+Q7F7iUSU= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.5.1 h1:4bH5o3b5ZULQ4UrBmP+63W9r7qIkqJClEA9ko5YKx+I= From 3d4f6f56e9a69b0542c52e19c95942266ee2fdae Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 14:16:05 -0500 Subject: [PATCH 02/31] chore(deps): bump google.golang.org/api from 0.205.0 to 0.206.0 in the go-minor group (#2945) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 11 +++++------ go.sum | 25 +++++++++++++------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/go.mod b/go.mod index 652634f40..08ec11b89 100644 --- a/go.mod +++ b/go.mod @@ -47,7 +47,7 @@ require ( golang.org/x/net v0.31.0 golang.org/x/oauth2 v0.24.0 golang.org/x/sync v0.9.0 - google.golang.org/api v0.205.0 + google.golang.org/api v0.206.0 google.golang.org/grpc v1.68.0 google.golang.org/protobuf v1.35.1 gopkg.in/yaml.v3 v3.0.1 @@ -65,7 +65,7 @@ require ( ) require ( - cloud.google.com/go/auth v0.10.1 // indirect + cloud.google.com/go/auth v0.10.2 // indirect cloud.google.com/go/auth/oauth2adapt v0.2.5 // indirect dario.cat/mergo v1.0.1 // indirect github.com/BurntSushi/toml v1.3.2 // indirect @@ -99,7 +99,7 @@ require ( github.com/google/go-github/v64 v64.0.0 // indirect github.com/google/s2a-go v0.1.8 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.4 // indirect - github.com/googleapis/gax-go/v2 v2.13.0 // indirect + github.com/googleapis/gax-go/v2 v2.14.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/gosuri/uitable v0.0.4 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect @@ -127,7 +127,6 @@ require ( go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/otel/sdk v1.29.0 // indirect go.opentelemetry.io/otel/sdk/metric v1.28.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 // indirect gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect k8s.io/component-base v0.31.2 // indirect @@ -213,9 +212,9 @@ require ( golang.org/x/sys v0.27.0 // indirect golang.org/x/term v0.26.0 // indirect golang.org/x/text v0.20.0 // indirect - golang.org/x/time v0.7.0 // indirect + golang.org/x/time v0.8.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect k8s.io/apiextensions-apiserver v0.31.2 diff --git a/go.sum b/go.sum index 98f5d7431..0f36eda70 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,6 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go/auth v0.10.1 h1:TnK46qldSfHWt2a0b/hciaiVJsmDXWy9FqyUan0uYiI= -cloud.google.com/go/auth v0.10.1/go.mod h1:xxA5AqpDrvS+Gkmo9RqrGGRh6WSNKKOXhY3zNOr38tI= +cloud.google.com/go/auth v0.10.2 h1:oKF7rgBfSHdp/kuhXtqU/tNDr0mZqhYbEh+6SiqzkKo= +cloud.google.com/go/auth v0.10.2/go.mod h1:xxA5AqpDrvS+Gkmo9RqrGGRh6WSNKKOXhY3zNOr38tI= cloud.google.com/go/auth/oauth2adapt v0.2.5 h1:2p29+dePqsCHPP1bqDJcKj4qxRyYCcbzKpFyKGt3MTk= cloud.google.com/go/auth/oauth2adapt v0.2.5/go.mod h1:AlmsELtlEBnaNTL7jCj8VQFLy6mbZv0s4Q7NGBeQ5E8= cloud.google.com/go/compute/metadata v0.5.2 h1:UxK4uu/Tn+I3p2dYWTfiX4wva7aYlKixAHn3fyqngqo= @@ -278,8 +278,8 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.3.4 h1:XYIDZApgAnrN1c855gTgghdIA6Stxb52D5RnLI1SLyw= github.com/googleapis/enterprise-certificate-proxy v0.3.4/go.mod h1:YKe7cfqYXjKGpGvmSg28/fFvhNzinZQm8DGnaburhGA= -github.com/googleapis/gax-go/v2 v2.13.0 h1:yitjD5f7jQHhyDsnhKEBU52NdvvdSeGzlAnDPT0hH1s= -github.com/googleapis/gax-go/v2 v2.13.0/go.mod h1:Z/fvTZXF8/uw7Xu5GuslPw+bplx6SS338j1Is2S+B7A= +github.com/googleapis/gax-go/v2 v2.14.0 h1:f+jMrjBPl+DL9nI4IQzLUxMq7XrAqFYB7hBPqMNIe8o= +github.com/googleapis/gax-go/v2 v2.14.0/go.mod h1:lhBCnjdLrWRaPvLWhmc8IS24m9mr07qSYnHncrgo+zk= github.com/gorilla/handlers v1.5.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyEE= github.com/gorilla/handlers v1.5.2/go.mod h1:dX+xVpaxdSw+q0Qek8SSsl3dfMk3jNddUkMzo0GtH0w= github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= @@ -646,8 +646,8 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug= golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4= -golang.org/x/time v0.7.0 h1:ntUhktv3OPE6TgYxXWv9vKvUSJyIFJlyohwbkEwPrKQ= -golang.org/x/time v0.7.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.8.0 h1:9i3RxcPv3PZnitoVGMPDKZSq1xW1gK1Xy3ArNOGZfEg= +golang.org/x/time v0.8.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -665,17 +665,18 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= -google.golang.org/api v0.205.0 h1:LFaxkAIpDb/GsrWV20dMMo5MR0h8UARTbn24LmD+0Pg= -google.golang.org/api v0.205.0/go.mod h1:NrK1EMqO8Xk6l6QwRAmrXXg2v6dzukhlOyvkYtnvUuc= +google.golang.org/api v0.206.0 h1:A27GClesCSheW5P2BymVHjpEeQ2XHH8DI8Srs2HI2L8= +google.golang.org/api v0.206.0/go.mod h1:BtB8bfjTYIrai3d8UyvPmV9REGgox7coh+ZRwm0b+W8= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 h1:fVoAXEKA4+yufmbdVYv+SE73+cPZbbbe8paLsHfkK+U= -google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53/go.mod h1:riSXTwQ4+nqmPGtobMFyW5FqVAmIs0St6VPp4Ug7CE4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38 h1:zciRKQ4kBpFgpfC5QQCVtnnNAcLIqweL7plyZRQHVpI= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= +google.golang.org/genproto v0.0.0-20241104194629-dd2ea8efbc28 h1:KJjNNclfpIkVqrZlTWcgOOaVQ00LdBnoEaRfkUx760s= +google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28 h1:M0KvPgPmDZHPlbRbaNU1APr28TvwvvdUPlSv7PUvy8g= +google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28/go.mod h1:dguCy7UOdZhTvLzDyt15+rOrawrpM4q7DD9dQ1P11P4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 h1:XVhgTWWV3kGQlwJHR3upFWZeTsei6Oks1apkZSeonIE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= From 611c004ce8645a77d22031e31074592043d9a182 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 19:16:36 +0000 Subject: [PATCH 03/31] chore(deps): bump the go-patch group with 5 updates (#2944) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 14 +++++++------- go.sum | 30 ++++++++++++++++-------------- 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/go.mod b/go.mod index 08ec11b89..56532646e 100644 --- a/go.mod +++ b/go.mod @@ -9,10 +9,10 @@ require ( github.com/Masterminds/semver/v3 v3.3.0 github.com/adrg/xdg v0.5.3 github.com/aws/aws-sdk-go-v2 v1.32.4 - github.com/aws/aws-sdk-go-v2/config v1.28.3 - github.com/aws/aws-sdk-go-v2/credentials v1.17.44 + github.com/aws/aws-sdk-go-v2/config v1.28.4 + github.com/aws/aws-sdk-go-v2/credentials v1.17.45 github.com/aws/aws-sdk-go-v2/service/ecr v1.36.5 - github.com/aws/aws-sdk-go-v2/service/sts v1.32.4 + github.com/aws/aws-sdk-go-v2/service/sts v1.33.0 github.com/bacongobbler/browser v1.1.0 github.com/bombsimon/logrusr/v4 v4.1.0 github.com/coreos/go-oidc/v3 v3.11.0 @@ -49,9 +49,9 @@ require ( golang.org/x/sync v0.9.0 google.golang.org/api v0.206.0 google.golang.org/grpc v1.68.0 - google.golang.org/protobuf v1.35.1 + google.golang.org/protobuf v1.35.2 gopkg.in/yaml.v3 v3.0.1 - helm.sh/helm/v3 v3.16.2 + helm.sh/helm/v3 v3.16.3 k8s.io/api v0.31.2 k8s.io/apimachinery v0.31.2 k8s.io/apiserver v0.31.2 @@ -85,7 +85,7 @@ require ( github.com/aws/smithy-go v1.22.0 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/chai2010/gettext-go v1.0.2 // indirect - github.com/containerd/errdefs v0.1.0 // indirect + github.com/containerd/errdefs v0.3.0 // indirect github.com/containerd/platforms v0.2.1 // indirect github.com/evanphx/json-patch v5.9.0+incompatible // indirect github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect @@ -140,7 +140,7 @@ require ( github.com/benbjohnson/clock v1.3.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect - github.com/containerd/containerd v1.7.20 // indirect + github.com/containerd/containerd v1.7.23 // indirect github.com/containerd/log v0.1.0 // indirect github.com/containerd/stargz-snapshotter/estargz v0.14.3 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect diff --git a/go.sum b/go.sum index 0f36eda70..4996830d2 100644 --- a/go.sum +++ b/go.sum @@ -51,10 +51,10 @@ github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3d github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/aws/aws-sdk-go-v2 v1.32.4 h1:S13INUiTxgrPueTmrm5DZ+MiAo99zYzHEFh1UNkOxNE= github.com/aws/aws-sdk-go-v2 v1.32.4/go.mod h1:2SK5n0a2karNTv5tbP1SjsX0uhttou00v/HpXKM1ZUo= -github.com/aws/aws-sdk-go-v2/config v1.28.3 h1:kL5uAptPcPKaJ4q0sDUjUIdueO18Q7JDzl64GpVwdOM= -github.com/aws/aws-sdk-go-v2/config v1.28.3/go.mod h1:SPEn1KA8YbgQnwiJ/OISU4fz7+F6Fe309Jf0QTsRCl4= -github.com/aws/aws-sdk-go-v2/credentials v1.17.44 h1:qqfs5kulLUHUEXlHEZXLJkgGoF3kkUeFUTVA585cFpU= -github.com/aws/aws-sdk-go-v2/credentials v1.17.44/go.mod h1:0Lm2YJ8etJdEdw23s+q/9wTpOeo2HhNE97XcRa7T8MA= +github.com/aws/aws-sdk-go-v2/config v1.28.4 h1:qgD0MKmkIzZR2DrAjWJcI9UkndjR+8f6sjUQvXh0mb0= +github.com/aws/aws-sdk-go-v2/config v1.28.4/go.mod h1:LgnWnNzHZw4MLplSyEGia0WgJ/kCGD86zGCjvNpehJs= +github.com/aws/aws-sdk-go-v2/credentials v1.17.45 h1:DUgm5lFso57E7150RBgu1JpVQoF8fAPretiDStIuVjg= +github.com/aws/aws-sdk-go-v2/credentials v1.17.45/go.mod h1:dnBpENcPC1ekZrGpSWspX+ZRGzhkvqngT2Qp5xBR1dY= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.19 h1:woXadbf0c7enQ2UGCi8gW/WuKmE0xIzxBF/eD94jMKQ= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.19/go.mod h1:zminj5ucw7w0r65bP6nhyOd3xL6veAUMc3ElGMoLVb4= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.23 h1:A2w6m6Tmr+BNXjDsr7M90zkWjsu4JXHwrzPg235STs4= @@ -73,8 +73,8 @@ github.com/aws/aws-sdk-go-v2/service/sso v1.24.5 h1:HJwZwRt2Z2Tdec+m+fPjvdmkq2s9 github.com/aws/aws-sdk-go-v2/service/sso v1.24.5/go.mod h1:wrMCEwjFPms+V86TCQQeOxQF/If4vT44FGIOFiMC2ck= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.4 h1:zcx9LiGWZ6i6pjdcoE9oXAB6mUdeyC36Ia/QEiIvYdg= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.4/go.mod h1:Tp/ly1cTjRLGBBmNccFumbZ8oqpZlpdhFf80SrRh4is= -github.com/aws/aws-sdk-go-v2/service/sts v1.32.4 h1:yDxvkz3/uOKfxnv8YhzOi9m+2OGIxF+on3KOISbK5IU= -github.com/aws/aws-sdk-go-v2/service/sts v1.32.4/go.mod h1:9XEUty5v5UAsMiFOBJrNibZgwCeOma73jgGwwhgffa8= +github.com/aws/aws-sdk-go-v2/service/sts v1.33.0 h1:s7LRgBqhwLaxcocnAniBJp7gaAB+4I4vHzqUqjH18yc= +github.com/aws/aws-sdk-go-v2/service/sts v1.33.0/go.mod h1:9XEUty5v5UAsMiFOBJrNibZgwCeOma73jgGwwhgffa8= github.com/aws/smithy-go v1.22.0 h1:uunKnWlcoL3zO7q+gG2Pk53joueEOsnNB28QdMsmiMM= github.com/aws/smithy-go v1.22.0/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= github.com/bacongobbler/browser v1.1.0 h1:6YTctUlzcApit1vpWgh+myjh8lQUyQRD2Ltoyvy2EoM= @@ -102,12 +102,12 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/containerd/cgroups v1.1.0 h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM= github.com/containerd/cgroups v1.1.0/go.mod h1:6ppBcbh/NOOUU+dMKrykgaBnK9lCIBxHqJDGwsa1mIw= -github.com/containerd/containerd v1.7.20 h1:Sl6jQYk3TRavaU83h66QMbI2Nqg9Jm6qzwX57Vsn1SQ= -github.com/containerd/containerd v1.7.20/go.mod h1:52GsS5CwquuqPuLncsXwG0t2CiUce+KsNHJZQJvAgR0= +github.com/containerd/containerd v1.7.23 h1:H2CClyUkmpKAGlhQp95g2WXHfLYc7whAuvZGBNYOOwQ= +github.com/containerd/containerd v1.7.23/go.mod h1:7QUzfURqZWCZV7RLNEn1XjUCQLEf0bkaK4GjUaZehxw= github.com/containerd/continuity v0.4.2 h1:v3y/4Yz5jwnvqPKJJ+7Wf93fyWoCB3F5EclWG023MDM= github.com/containerd/continuity v0.4.2/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ= -github.com/containerd/errdefs v0.1.0 h1:m0wCRBiu1WJT/Fr+iOoQHMQS/eP5myQ8lCv4Dz5ZURM= -github.com/containerd/errdefs v0.1.0/go.mod h1:YgWiiHtLmSeBrvpw+UfPijzbLaB77mEG1WwJTDETIV0= +github.com/containerd/errdefs v0.3.0 h1:FSZgGOeK4yuT/+DnF07/Olde/q4KBoMsaamhXxIMDp4= +github.com/containerd/errdefs v0.3.0/go.mod h1:+YBYIdtsnF4Iw6nWZhJcqGSg/dwvV7tyJ/kCkyJ2k+M= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/containerd/platforms v0.2.1 h1:zvwtM3rz2YHPQsF2CHYM8+KtB5dvhISiXh5ZpSBQv6A= @@ -393,6 +393,8 @@ github.com/moby/spdystream v0.4.0 h1:Vy79D6mHeJJjiPdFEL2yku1kl0chZpJfZcPpb16BRl8 github.com/moby/spdystream v0.4.0/go.mod h1:xBAYlnt/ay+11ShkdFKNAG7LsyK/tmNBVvVOwrfMgdI= github.com/moby/sys/mountinfo v0.6.2 h1:BzJjoreD5BMFNmD9Rus6gdd1pLuecOFPt8wC+Vygl78= github.com/moby/sys/mountinfo v0.6.2/go.mod h1:IJb6JQeOklcdMU9F5xQ8ZALD+CUr5VlGpwtX+VE0rpI= +github.com/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g= +github.com/moby/sys/userns v0.1.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28= github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -693,8 +695,8 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= -google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.35.2 h1:8Ar7bF+apOIoThw1EdZl0p1oWvMqTHmpA2fRTyZO8io= +google.golang.org/protobuf v1.35.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= @@ -714,8 +716,8 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= -helm.sh/helm/v3 v3.16.2 h1:Y9v7ry+ubQmi+cb5zw1Llx8OKHU9Hk9NQ/+P+LGBe2o= -helm.sh/helm/v3 v3.16.2/go.mod h1:SyTXgKBjNqi2NPsHCW5dDAsHqvGIu0kdNYNH9gQaw70= +helm.sh/helm/v3 v3.16.3 h1:kb8bSxMeRJ+knsK/ovvlaVPfdis0X3/ZhYCSFRP+YmY= +helm.sh/helm/v3 v3.16.3/go.mod h1:zeVWGDR4JJgiRbT3AnNsjYaX8OTJlIE9zC+Q7F7iUSU= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= k8s.io/api v0.31.2 h1:3wLBbL5Uom/8Zy98GRPXpJ254nEFpl+hwndmk9RwmL0= From e6ba1f1453c4965e71002972a381aeb400d6b1fa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 19:17:05 +0000 Subject: [PATCH 04/31] chore(deps): bump codecov/codecov-action from 4.6.0 to 5.0.2 (#2942) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a24ffebdc..91553078a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -40,7 +40,7 @@ jobs: grep -v .pb.go coverage.txt | grep -v zz_generated | grep -v service.connect.go > coverage.tmp mv coverage.tmp coverage.txt - name: Upload coverage reports - uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0 + uses: codecov/codecov-action@5c47607acb93fed5485fdbf7232e8a31425f672a # v5.0.2 with: token: ${{ secrets.CODECOV_TOKEN }} From 2fa4fc4043f882f129cb90feb01998297dd366df Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 19:41:44 +0000 Subject: [PATCH 05/31] chore(deps): bump cross-spawn from 7.0.3 to 7.0.6 in /docs (#2957) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- docs/pnpm-lock.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/pnpm-lock.yaml b/docs/pnpm-lock.yaml index d646d8a09..84983258b 100644 --- a/docs/pnpm-lock.yaml +++ b/docs/pnpm-lock.yaml @@ -1841,8 +1841,8 @@ packages: typescript: optional: true - cross-spawn@7.0.3: - resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} + cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} engines: {node: '>= 8'} crypto-random-string@4.0.0: @@ -7398,7 +7398,7 @@ snapshots: optionalDependencies: typescript: 5.2.2 - cross-spawn@7.0.3: + cross-spawn@7.0.6: dependencies: path-key: 3.1.1 shebang-command: 2.0.0 @@ -7785,7 +7785,7 @@ snapshots: execa@5.1.1: dependencies: - cross-spawn: 7.0.3 + cross-spawn: 7.0.6 get-stream: 6.0.1 human-signals: 2.1.0 is-stream: 2.0.1 @@ -9666,7 +9666,7 @@ snapshots: address: 1.2.2 browserslist: 4.22.1 chalk: 4.1.2 - cross-spawn: 7.0.3 + cross-spawn: 7.0.6 detect-port-alt: 1.1.6 escape-string-regexp: 4.0.0 filesize: 8.0.7 From 34c612821d126a3cb3f95ff6132cec0b248d988a Mon Sep 17 00:00:00 2001 From: Hidde Beydals Date: Tue, 19 Nov 2024 00:46:25 +0100 Subject: [PATCH 06/31] fix(build): use `tini` to reap zombie processes (#2959) Signed-off-by: Hidde Beydals --- Dockerfile | 4 +++- charts/kargo/templates/controller/deployment.yaml | 3 ++- charts/kargo/templates/garbage-collector/cron-job.yaml | 3 ++- charts/kargo/templates/management-controller/deployment.yaml | 3 ++- charts/kargo/templates/webhooks-server/deployment.yaml | 3 ++- kargo-base.apko.yaml | 1 + 6 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 79edd5c75..16e3cb41b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -79,7 +79,7 @@ RUN GRPC_HEALTH_PROBE_VERSION=v0.4.15 && \ #################################################################################################### FROM alpine:latest AS back-end-dev -RUN apk update && apk add ca-certificates git gpg gpg-agent openssh-client +RUN apk update && apk add ca-certificates git gpg gpg-agent openssh-client tini COPY bin/credential-helper /usr/local/bin/credential-helper COPY bin/controlplane/kargo /usr/local/bin/kargo @@ -87,6 +87,7 @@ COPY bin/controlplane/kargo /usr/local/bin/kargo RUN adduser -D -H -u 1000 kargo USER 1000:0 +ENTRYPOINT ["/sbin/tini", "--"] CMD ["/usr/local/bin/kargo"] #################################################################################################### @@ -119,4 +120,5 @@ FROM ${BASE_IMAGE}:latest-${TARGETARCH} AS final COPY --from=back-end-builder /kargo/bin/ /usr/local/bin/ COPY --from=tools /tools/ /usr/local/bin/ +ENTRYPOINT ["/sbin/tini", "--"] CMD ["/usr/local/bin/kargo"] diff --git a/charts/kargo/templates/controller/deployment.yaml b/charts/kargo/templates/controller/deployment.yaml index 3f5fe5478..88631e9a1 100644 --- a/charts/kargo/templates/controller/deployment.yaml +++ b/charts/kargo/templates/controller/deployment.yaml @@ -57,7 +57,8 @@ spec: - name: controller image: {{ include "kargo.image" . }} imagePullPolicy: {{ .Values.image.pullPolicy }} - command: ["/usr/local/bin/kargo", "controller"] + command: ["/sbin/tini", "--", "/usr/local/bin/kargo"] + args: ["controller"] env: - name: GOMEMLIMIT valueFrom: diff --git a/charts/kargo/templates/garbage-collector/cron-job.yaml b/charts/kargo/templates/garbage-collector/cron-job.yaml index db27005b6..0943061c5 100644 --- a/charts/kargo/templates/garbage-collector/cron-job.yaml +++ b/charts/kargo/templates/garbage-collector/cron-job.yaml @@ -56,7 +56,8 @@ spec: - name: garbage-collector image: {{ include "kargo.image" . }} imagePullPolicy: {{ .Values.image.pullPolicy }} - command: ["/usr/local/bin/kargo", "garbage-collector"] + command: ["/sbin/tini", "--", "/usr/local/bin/kargo"] + args: ["garbage-collector"] env: - name: GOMEMLIMIT valueFrom: diff --git a/charts/kargo/templates/management-controller/deployment.yaml b/charts/kargo/templates/management-controller/deployment.yaml index 05081f720..b0f39f671 100644 --- a/charts/kargo/templates/management-controller/deployment.yaml +++ b/charts/kargo/templates/management-controller/deployment.yaml @@ -57,7 +57,8 @@ spec: - name: management-controller image: {{ include "kargo.image" . }} imagePullPolicy: {{ .Values.image.pullPolicy }} - command: ["/usr/local/bin/kargo", "management-controller"] + command: ["/sbin/tini", "--", "/usr/local/bin/kargo"] + args: ["management-controller"] env: - name: GOMEMLIMIT valueFrom: diff --git a/charts/kargo/templates/webhooks-server/deployment.yaml b/charts/kargo/templates/webhooks-server/deployment.yaml index b4e86dd99..ffde69802 100644 --- a/charts/kargo/templates/webhooks-server/deployment.yaml +++ b/charts/kargo/templates/webhooks-server/deployment.yaml @@ -57,7 +57,8 @@ spec: - name: webhooks-server image: {{ include "kargo.image" . }} imagePullPolicy: {{ .Values.image.pullPolicy }} - command: ["/usr/local/bin/kargo", "webhooks-server"] + command: ["/sbin/tini", "--", "/usr/local/bin/kargo"] + args: ["webhooks-server"] env: - name: GOMEMLIMIT valueFrom: diff --git a/kargo-base.apko.yaml b/kargo-base.apko.yaml index 451ded016..49feb0e9a 100644 --- a/kargo-base.apko.yaml +++ b/kargo-base.apko.yaml @@ -11,6 +11,7 @@ contents: - gpg-agent~2 - helm~3 # Required for Kustomize Helm plugin - openssh-client~9 + - tini accounts: groups: From d407679846bf9306e47e43056fd3aa413be2f9cf Mon Sep 17 00:00:00 2001 From: Hidde Beydals Date: Tue, 19 Nov 2024 07:32:35 +0100 Subject: [PATCH 07/31] fix(stages): set healthy status for promotions w/o checks (#2951) Signed-off-by: Hidde Beydals --- internal/controller/stages/regular_stages.go | 40 +++++++-------- .../controller/stages/regular_stages_test.go | 50 ++++++++++++++++--- 2 files changed, 64 insertions(+), 26 deletions(-) diff --git a/internal/controller/stages/regular_stages.go b/internal/controller/stages/regular_stages.go index bbc330bfd..5856a9566 100644 --- a/internal/controller/stages/regular_stages.go +++ b/internal/controller/stages/regular_stages.go @@ -694,23 +694,27 @@ func (r *RegularStageReconciler) assessHealth(ctx context.Context, stage *kargoa return newStatus } - // If there are no health checks to perform, then we can skip the health - // assessment. - healthChecks := lastPromo.Status.HealthChecks - if len(healthChecks) == 0 { - logger.Debug("Stage has no health checks to perform for last Promotion") + // If the last Promotion did not succeed, then we cannot perform any health + // checks because they are only available after a successful Promotion. + // + // TODO(hidde): Long term, this should probably be changed to allow to + // continue to run health checks from the last successful Promotion, + // even if the current Promotion did not succeed (e.g. because it was + // aborted). + if lastPromo.Status.Phase != kargoapi.PromotionPhaseSucceeded { + logger.Debug("Last promotion did not succeed: no health checks to perform") conditions.Set(&newStatus, &metav1.Condition{ Type: kargoapi.ConditionTypeHealthy, Status: metav1.ConditionUnknown, - Reason: "NoHealthChecks", - Message: "Stage has no health checks to perform", + Reason: fmt.Sprintf("LastPromotion%s", lastPromo.Status.Phase), + Message: "No health checks to perform for unsuccessful Promotion", ObservedGeneration: stage.Generation, }) - newStatus.Health = nil return newStatus } // Compose the health check steps. + healthChecks := lastPromo.Status.HealthChecks var steps []directives.HealthCheckStep for _, step := range healthChecks { steps = append(steps, directives.HealthCheckStep{ @@ -733,22 +737,18 @@ func (r *RegularStageReconciler) assessHealth(ctx context.Context, stage *kargoa Type: kargoapi.ConditionTypeHealthy, Status: metav1.ConditionTrue, Reason: string(health.Status), - Message: "Stage is healthy", + Message: fmt.Sprintf("Stage is healthy (performed %d health checks)", len(healthChecks)), ObservedGeneration: stage.Generation, }) case kargoapi.HealthStateUnhealthy: conditions.Set(&newStatus, &metav1.Condition{ - Type: kargoapi.ConditionTypeHealthy, - Status: metav1.ConditionFalse, - Reason: string(health.Status), - Message: "Stage is unhealthy", - ObservedGeneration: stage.Generation, - }) - case kargoapi.HealthStateNotApplicable: - conditions.Set(&newStatus, &metav1.Condition{ - Type: kargoapi.ConditionTypeHealthy, - Status: metav1.ConditionUnknown, - Reason: string(health.Status), + Type: kargoapi.ConditionTypeHealthy, + Status: metav1.ConditionFalse, + Reason: string(health.Status), + Message: fmt.Sprintf( + "Stage is unhealthy (%d issues in %d health checks)", + len(health.Issues), len(healthChecks), + ), ObservedGeneration: stage.Generation, }) default: diff --git a/internal/controller/stages/regular_stages_test.go b/internal/controller/stages/regular_stages_test.go index 18b014c6b..1d8f83ab2 100644 --- a/internal/controller/stages/regular_stages_test.go +++ b/internal/controller/stages/regular_stages_test.go @@ -1204,7 +1204,7 @@ func TestRegularStageReconciler_assessHealth(t *testing.T) { }, }, { - name: "no health checks", + name: "unsuccessful last promotion", stage: &kargoapi.Stage{ ObjectMeta: metav1.ObjectMeta{ Namespace: "fake-project", @@ -1213,6 +1213,7 @@ func TestRegularStageReconciler_assessHealth(t *testing.T) { Status: kargoapi.StageStatus{ LastPromotion: &kargoapi.PromotionReference{ Status: &kargoapi.PromotionStatus{ + Phase: kargoapi.PromotionPhaseAborted, HealthChecks: nil, }, }, @@ -1224,8 +1225,35 @@ func TestRegularStageReconciler_assessHealth(t *testing.T) { healthyCond := conditions.Get(&status, kargoapi.ConditionTypeHealthy) require.NotNil(t, healthyCond) assert.Equal(t, metav1.ConditionUnknown, healthyCond.Status) - assert.Equal(t, "NoHealthChecks", healthyCond.Reason) - assert.Equal(t, "Stage has no health checks to perform", healthyCond.Message) + assert.Equal(t, "LastPromotionAborted", healthyCond.Reason) + assert.Equal(t, "No health checks to perform for unsuccessful Promotion", healthyCond.Message) + }, + }, + { + name: "no health checks", + stage: &kargoapi.Stage{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: "fake-project", + Name: "test-stage", + }, + Status: kargoapi.StageStatus{ + LastPromotion: &kargoapi.PromotionReference{ + Status: &kargoapi.PromotionStatus{ + Phase: kargoapi.PromotionPhaseSucceeded, + HealthChecks: nil, + }, + }, + }, + }, + assertions: func(t *testing.T, status kargoapi.StageStatus) { + assert.NotNil(t, status.Health) + assert.Equal(t, kargoapi.HealthStateHealthy, status.Health.Status) + + healthyCond := conditions.Get(&status, kargoapi.ConditionTypeHealthy) + require.NotNil(t, healthyCond) + assert.Equal(t, metav1.ConditionTrue, healthyCond.Status) + assert.Equal(t, kargoapi.ConditionTypeHealthy, healthyCond.Reason) + assert.Contains(t, healthyCond.Message, "Stage is healthy") }, }, { @@ -1238,6 +1266,7 @@ func TestRegularStageReconciler_assessHealth(t *testing.T) { Status: kargoapi.StageStatus{ LastPromotion: &kargoapi.PromotionReference{ Status: &kargoapi.PromotionStatus{ + Phase: kargoapi.PromotionPhaseSucceeded, HealthChecks: []kargoapi.HealthCheckStep{ { Uses: "test-check", @@ -1262,7 +1291,7 @@ func TestRegularStageReconciler_assessHealth(t *testing.T) { require.NotNil(t, healthyCond) assert.Equal(t, metav1.ConditionTrue, healthyCond.Status) assert.Equal(t, string(kargoapi.HealthStateHealthy), healthyCond.Reason) - assert.Equal(t, "Stage is healthy", healthyCond.Message) + assert.Contains(t, healthyCond.Message, "Stage is healthy") }, }, { @@ -1275,6 +1304,7 @@ func TestRegularStageReconciler_assessHealth(t *testing.T) { Status: kargoapi.StageStatus{ LastPromotion: &kargoapi.PromotionReference{ Status: &kargoapi.PromotionStatus{ + Phase: kargoapi.PromotionPhaseSucceeded, HealthChecks: []kargoapi.HealthCheckStep{ { Uses: "test-check", @@ -1289,7 +1319,12 @@ func TestRegularStageReconciler_assessHealth(t *testing.T) { directives.HealthCheckContext, []directives.HealthCheckStep, ) kargoapi.Health { - return kargoapi.Health{Status: kargoapi.HealthStateUnhealthy} + return kargoapi.Health{ + Status: kargoapi.HealthStateUnhealthy, + Issues: []string{ + "issue-1", "issue-2", + }, + } }, assertions: func(t *testing.T, status kargoapi.StageStatus) { require.NotNil(t, status.Health) @@ -1299,7 +1334,8 @@ func TestRegularStageReconciler_assessHealth(t *testing.T) { require.NotNil(t, healthyCond) assert.Equal(t, metav1.ConditionFalse, healthyCond.Status) assert.Equal(t, string(kargoapi.HealthStateUnhealthy), healthyCond.Reason) - assert.Equal(t, "Stage is unhealthy", healthyCond.Message) + assert.Contains(t, healthyCond.Message, "Stage is unhealthy") + assert.Contains(t, healthyCond.Message, "2 issues in 1 health check") }, }, { @@ -1313,6 +1349,7 @@ func TestRegularStageReconciler_assessHealth(t *testing.T) { Conditions: []metav1.Condition{}, LastPromotion: &kargoapi.PromotionReference{ Status: &kargoapi.PromotionStatus{ + Phase: kargoapi.PromotionPhaseSucceeded, HealthChecks: []kargoapi.HealthCheckStep{ { Uses: "test-check", @@ -1348,6 +1385,7 @@ func TestRegularStageReconciler_assessHealth(t *testing.T) { Status: kargoapi.StageStatus{ LastPromotion: &kargoapi.PromotionReference{ Status: &kargoapi.PromotionStatus{ + Phase: kargoapi.PromotionPhaseSucceeded, HealthChecks: []kargoapi.HealthCheckStep{ { Uses: "test-check", From 47a61de8622ed952b455eb8c82ed555df0cbfce3 Mon Sep 17 00:00:00 2001 From: Mayursinh Sarvaiya Date: Tue, 19 Nov 2024 15:48:18 -0400 Subject: [PATCH 08/31] ci: add typechecks for UI (#2949) Signed-off-by: Mayursinh Sarvaiya --- .github/workflows/ci.yaml | 8 ++-- Makefile | 5 +++ .../common/code-editor/yaml-editor-lazy.tsx | 1 + .../credentials/create-credentials-modal.tsx | 3 +- ui/src/features/project/credentials/utils.tsx | 2 +- .../project/list/project-list-filter.tsx | 6 ++- .../pipelines/nodes/freight-indicators.tsx | 2 +- .../project/pipelines/utils/useImages.ts | 38 ++++++++++--------- ui/tsconfig.json | 3 +- 9 files changed, 41 insertions(+), 27 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 91553078a..bb7bd6749 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -44,7 +44,7 @@ jobs: with: token: ${{ secrets.CODECOV_TOKEN }} - lint-ui: + lint-and-typecheck-ui: runs-on: ubuntu-latest steps: - name: Checkout code @@ -65,6 +65,8 @@ jobs: node-version: "22.8.0" cache: "pnpm" cache-dependency-path: "**/pnpm-lock.yaml" + - name: Run typecheck + run: make typecheck-ui - name: Run linter run: make lint-ui @@ -186,7 +188,7 @@ jobs: run: git diff --exit-code -- . build-image: - needs: [test-unit, lint-go, lint-charts, lint-proto, lint-ui, check-codegen] + needs: [test-unit, lint-go, lint-charts, lint-proto, lint-and-typecheck-ui, check-codegen] runs-on: ubuntu-latest services: registry: @@ -218,7 +220,7 @@ jobs: cache-to: type=gha,mode=max build-cli: - needs: [test-unit, lint-go, lint-charts, lint-proto, lint-ui, check-codegen] + needs: [test-unit, lint-go, lint-charts, lint-proto, lint-and-typecheck-ui, check-codegen] runs-on: ubuntu-latest container: image: golang:1.23.3-bookworm diff --git a/Makefile b/Makefile index 18321d399..84258f16d 100644 --- a/Makefile +++ b/Makefile @@ -96,6 +96,11 @@ lint-ui: pnpm --dir=ui install --dev pnpm --dir=ui run lint +.PHONY: typecheck-ui +typecheck-ui: + pnpm --dir=ui install + pnpm --dir=ui run typecheck + .PHONY: format-ui format-ui: pnpm --dir=ui install --dev diff --git a/ui/src/features/common/code-editor/yaml-editor-lazy.tsx b/ui/src/features/common/code-editor/yaml-editor-lazy.tsx index 2ee42ca25..c69b5f735 100644 --- a/ui/src/features/common/code-editor/yaml-editor-lazy.tsx +++ b/ui/src/features/common/code-editor/yaml-editor-lazy.tsx @@ -89,6 +89,7 @@ const YamlEditor: FC = (props) => { validate: true, isKubernetes: true, format: true, + // @ts-expect-error correct schema schemas: schema && [ { uri: `https://raw.githubusercontent.com/akuity/kargo/${__UI_VERSION__ && __UI_VERSION__ !== 'development' ? __UI_VERSION__ : 'main'}/ui/src/gen/schema/${resourceType || 'stages'}.kargo.akuity.io_v1alpha1.json`, diff --git a/ui/src/features/project/credentials/create-credentials-modal.tsx b/ui/src/features/project/credentials/create-credentials-modal.tsx index 94f5359f4..ea88abb17 100644 --- a/ui/src/features/project/credentials/create-credentials-modal.tsx +++ b/ui/src/features/project/credentials/create-credentials-modal.tsx @@ -10,11 +10,11 @@ import { FieldContainer } from '@ui/features/common/form/field-container'; import { ModalComponentProps } from '@ui/features/common/modal/modal-context'; import { SegmentLabel } from '@ui/features/common/segment-label'; import { dnsRegex } from '@ui/features/common/utils'; +import { Secret } from '@ui/gen/k8s.io/api/core/v1/generated_pb'; import { createCredentials, updateCredentials } from '@ui/gen/service/v1alpha1/service-KargoService_connectquery'; -import { Secret } from '@ui/gen/v1alpha1/types_pb'; import { zodValidators } from '@ui/utils/validators'; import { constructDefaults, labelForKey, typeLabel } from './utils'; @@ -151,6 +151,7 @@ export const CreateCredentialsModal = ({ project, onSuccess, editing, init, ...p control={control} > {({ field }) => ( + // @ts-expect-error repoUrlInRegex won't be here so no boolean only strings - p.metadata?.name.toLowerCase().includes(filter.toLowerCase()) + p.metadata?.name?.toLowerCase().includes(filter.toLowerCase()) ); const handleKeyDown = (e: React.KeyboardEvent) => { if (e.key === 'Enter' && filteredProjects?.length === 1) { const selectedProject = filteredProjects[0].metadata?.name; - navigate(paths.project.replace(':name', selectedProject)); + if (selectedProject) { + navigate(paths.project.replace(':name', selectedProject)); + } } }; diff --git a/ui/src/features/project/pipelines/nodes/freight-indicators.tsx b/ui/src/features/project/pipelines/nodes/freight-indicators.tsx index 22cfec31a..db8f8c2b1 100644 --- a/ui/src/features/project/pipelines/nodes/freight-indicators.tsx +++ b/ui/src/features/project/pipelines/nodes/freight-indicators.tsx @@ -32,7 +32,7 @@ export const FreightIndicators = ({ style={{ width: '10px', height: '10px', - backgroundColor: warehouseColorMap[freight?.warehouse || ''] + backgroundColor: warehouseColorMap[freight?.origin?.name || ''] }} onClick={(e) => { e.stopPropagation(); diff --git a/ui/src/features/project/pipelines/utils/useImages.ts b/ui/src/features/project/pipelines/utils/useImages.ts index 0ce11c242..4e7c6aff0 100644 --- a/ui/src/features/project/pipelines/utils/useImages.ts +++ b/ui/src/features/project/pipelines/utils/useImages.ts @@ -12,24 +12,26 @@ export const useImages = (stages: Stage[]) => { return useMemo(() => { const images = new Map>(); stages.forEach((stage) => { - const len = stage.status?.history?.length || 0; - stage.status?.history?.forEach((freight, i) => { - freight.images?.forEach((image) => { - let repo = image.repoURL ? images.get(image.repoURL) : undefined; - if (!repo) { - repo = new Map(); - images.set(image.repoURL!, repo); - } - let curStages = image.tag ? repo.get(image.tag) : undefined; - if (!curStages) { - curStages = {} as StageStyleMap; - } - curStages[stage.metadata?.name as string] = { - opacity: 1 - i / len, - backgroundColor: stageColorMap[stage.metadata?.name as string] - }; - repo.set(image.tag!, curStages); - }); + const len = stage.status?.freightHistory?.length || 0; + stage.status?.freightHistory?.forEach((freight, i) => { + for (const warehouseValue of Object.values(freight?.items)) { + warehouseValue.images?.forEach((image) => { + let repo = image.repoURL ? images.get(image.repoURL) : undefined; + if (!repo) { + repo = new Map(); + images.set(image.repoURL!, repo); + } + let curStages = image.tag ? repo.get(image.tag) : undefined; + if (!curStages) { + curStages = {} as StageStyleMap; + } + curStages[stage.metadata?.name as string] = { + opacity: 1 - i / len, + backgroundColor: stageColorMap[stage.metadata?.name as string] + }; + repo.set(image.tag!, curStages); + }); + } }); const existingImages = getCurrentFreight(stage).flatMap((freight) => freight.images || []); diff --git a/ui/tsconfig.json b/ui/tsconfig.json index e2140715f..065bc798d 100644 --- a/ui/tsconfig.json +++ b/ui/tsconfig.json @@ -21,5 +21,6 @@ "@kargo-public/*": ["./public/*"] } }, - "include": ["src/**/*.d.ts", "src/**/*.ts", "src/**/*.tsx"] + "include": ["src/**/*.d.ts", "src/**/*.ts", "src/**/*.tsx"], + "exclude": ["src/**/*.test.ts"] } From 547f686b999c49f8b807f0edc932ef9d9e58ca08 Mon Sep 17 00:00:00 2001 From: Mayursinh Sarvaiya Date: Tue, 19 Nov 2024 15:52:09 -0400 Subject: [PATCH 09/31] feat(ui): warehouse selection persistence throughout pipeline (#2958) Signed-off-by: Mayursinh Sarvaiya Co-authored-by: Rafal --- ui/src/features/common/utils.ts | 21 ++++++++ .../freight-timeline-header.tsx | 52 +++++++++++-------- .../project/pipelines/nodes/stage-node.tsx | 15 ++++-- .../features/project/pipelines/pipelines.tsx | 49 ++++++++++------- 4 files changed, 94 insertions(+), 43 deletions(-) diff --git a/ui/src/features/common/utils.ts b/ui/src/features/common/utils.ts index 01b11bcdd..8f7b8631b 100644 --- a/ui/src/features/common/utils.ts +++ b/ui/src/features/common/utils.ts @@ -28,6 +28,27 @@ export function getCurrentFreight(stage: Stage): FreightReference[] { : []; } +export function getCurrentFreightWarehouse(stage: Stage) { + const freightRef = getCurrentFreight(stage); + const isWarehouseKind = freightRef.some((freight) => freight?.origin?.kind === 'Warehouse'); + + if (isWarehouseKind) { + return freightRef[0]?.origin?.name || stage?.spec?.requestedFreight[0]?.origin?.name || ''; + } + + return ''; +} + +export function selectFreightByWarehouse( + freightsInOrder /* they should be in order as if applied latest to old */ : Freight[], + warehouse?: string +) { + const LATEST_FREIGHT = 0; + const order = freightsInOrder?.findIndex((freight) => freight?.origin?.name === warehouse); + + return order > -1 ? order : LATEST_FREIGHT; +} + export function currentFreightHasVerification(stage: Stage): boolean { const collection = stage?.status?.freightHistory[0]; return (collection && (collection.verificationHistory || []).length > 0) || false; diff --git a/ui/src/features/freight-timeline/freight-timeline-header.tsx b/ui/src/features/freight-timeline/freight-timeline-header.tsx index 709741968..d51b39ca7 100644 --- a/ui/src/features/freight-timeline/freight-timeline-header.tsx +++ b/ui/src/features/freight-timeline/freight-timeline-header.tsx @@ -1,4 +1,5 @@ import { + faBuilding, faBullseye, faCalendarPlus, faCalendarXmark, @@ -65,6 +66,28 @@ export const FreightTimelineHeader = ({ const navigate = useNavigate(); + const WarehouseSelector = ( + setSelectedWarehouse(value)} - size='small' - labelRender={({ label }) =>
{label}
} - optionRender={(opt) => ( -
-
{opt.label}
-
- )} - options={[ - ...(Object.keys(warehouses) || []).map((w) => ({ value: w, label: w })), - { - value: '', - label: 'All warehouses' - } - ]} - /> - +
{WarehouseSelector}
)} )} diff --git a/ui/src/features/project/pipelines/nodes/stage-node.tsx b/ui/src/features/project/pipelines/nodes/stage-node.tsx index 595f2ea37..d67923251 100644 --- a/ui/src/features/project/pipelines/nodes/stage-node.tsx +++ b/ui/src/features/project/pipelines/nodes/stage-node.tsx @@ -17,6 +17,7 @@ import { generatePath, useNavigate } from 'react-router-dom'; import { paths } from '@ui/config/paths'; import { HealthStatusIcon } from '@ui/features/common/health-status/health-status-icon'; import { PromotionStatusIcon } from '@ui/features/common/promotion-status/promotion-status-icon'; +import { selectFreightByWarehouse } from '@ui/features/common/utils'; import { willStagePromotionOpenPR } from '@ui/features/promotion-directives/utils'; import { Freight, Stage } from '@ui/gen/v1alpha1/generated_pb'; import { useLocalStorage } from '@ui/utils/use-local-storage'; @@ -49,7 +50,8 @@ export const StageNode = ({ onClick, onHover, highlighted, - autoPromotion + autoPromotion, + selectedWarehouse }: { stage: Stage; color: string; @@ -64,13 +66,20 @@ export const StageNode = ({ onHover: (hovering: boolean) => void; highlighted?: boolean; autoPromotion?: boolean; + selectedWarehouse?: string; }) => { const navigate = useNavigate(); - const [visibleFreight, setVisibleFreight] = useLocalStorage( + const [_visibleFreight, setVisibleFreight] = useLocalStorage( `${projectName}-${stage.metadata?.name}`, - 0 + selectFreightByWarehouse(currentFreight, selectedWarehouse) ); + let visibleFreight = _visibleFreight; + + if (selectedWarehouse) { + visibleFreight = selectFreightByWarehouse(currentFreight, selectedWarehouse); + } + return ( <>
import('@ui/features/stage/stage-details')); const CreateStage = lazy(() => import('@ui/features/stage/create-stage')); const CreateWarehouse = lazy(() => import('@ui/features/stage/create-warehouse/create-warehouse')); import { SuspenseSpin } from '@ui/features/common/suspense-spin'; -import { getCurrentFreight, mapToNames } from '@ui/features/common/utils'; +import { + getCurrentFreight, + getCurrentFreightWarehouse, + mapToNames +} from '@ui/features/common/utils'; const FreightTimelineHeader = lazy( () => import('@ui/features/freight-timeline/freight-timeline-header') ); @@ -129,6 +133,8 @@ export const Pipelines = ({ ); const [selectedWarehouse, setSelectedWarehouse] = React.useState(''); + // remember what user selected explicitly + const lastExplicitlySelectedWarehouse = useRef(''); const [freightTimelineCollapsed, setFreightTimelineCollapsed] = React.useState( CollapseMode.Expanded ); @@ -338,7 +344,10 @@ export const Pipelines = ({ }} downstreamSubs={Array.from(subscribersByStage[state.stage || ''] || [])} selectedWarehouse={selectedWarehouse || ''} - setSelectedWarehouse={setSelectedWarehouse} + setSelectedWarehouse={(explicitlySelectedWarehouse) => { + lastExplicitlySelectedWarehouse.current = explicitlySelectedWarehouse; + setSelectedWarehouse(explicitlySelectedWarehouse); + }} warehouses={warehouseMap} collapsed={freightTimelineCollapsed} setCollapsed={setFreightTimelineCollapsed} @@ -503,28 +512,24 @@ export const Pipelines = ({ .length <= 1 } onPromoteClick={(type: FreightTimelineAction) => { - const currentFreight = getCurrentFreight(node.data); - const isWarehouseKind = currentFreight.reduce( - (acc, cur) => acc || cur?.origin?.kind === 'Warehouse', - false - ); - let currentWarehouse = ''; - if (isWarehouseKind) { - currentWarehouse = - currentFreight[0]?.origin?.name || - node.data?.spec?.requestedFreight[0]?.origin?.name || - ''; + // which warehouse to select? + // check if they have filter applied in freight timeline + // if not, then select the warehouse of latest promoted freight + if (selectedWarehouse === '') { + setSelectedWarehouse(getCurrentFreightWarehouse(node.data)); } - setSelectedWarehouse(currentWarehouse); + if (state.stage === node.data?.metadata?.name) { // deselect state.clear(); - setSelectedWarehouse(''); + + setSelectedWarehouse(lastExplicitlySelectedWarehouse.current); } else { const stageName = node.data?.metadata?.name || ''; state.select(type, stageName, undefined); } }} + selectedWarehouse={selectedWarehouse} action={state.action} onClick={ state.action === FreightTimelineAction.ManualApproval @@ -570,7 +575,7 @@ export const Pipelines = ({ } > {node.type === NodeType.WAREHOUSE && ( -
+
{(Object.keys(warehouseMap) || []).length > 1 && (