diff --git a/cmd/mindthegap/create/bundle/bundle.go b/cmd/mindthegap/create/bundle/bundle.go index 56d54730..6bbc3bbf 100644 --- a/cmd/mindthegap/create/bundle/bundle.go +++ b/cmd/mindthegap/create/bundle/bundle.go @@ -132,7 +132,7 @@ func NewCommand(out output.Output) *cobra.Command { return fmt.Errorf("failed to create local Docker registry: %w", err) } go func() { - if err := reg.ListenAndServe(); err != nil { + if err := reg.ListenAndServe(output.NewOutputLogr(out)); err != nil { out.Error(err, "error serving Docker registry") os.Exit(2) } diff --git a/cmd/mindthegap/importcmd/imagebundle/image_bundle.go b/cmd/mindthegap/importcmd/imagebundle/image_bundle.go index 265c1399..85f3c7ec 100644 --- a/cmd/mindthegap/importcmd/imagebundle/image_bundle.go +++ b/cmd/mindthegap/importcmd/imagebundle/image_bundle.go @@ -83,7 +83,7 @@ func NewCommand(out output.Output) *cobra.Command { return fmt.Errorf("failed to create local Docker registry: %w", err) } go func() { - if err := reg.ListenAndServe(); err != nil { + if err := reg.ListenAndServe(output.NewOutputLogr(out)); err != nil { out.Error(err, "error serving Docker registry") os.Exit(2) } diff --git a/cmd/mindthegap/push/bundle/bundle.go b/cmd/mindthegap/push/bundle/bundle.go index e5e0c349..6d79f914 100644 --- a/cmd/mindthegap/push/bundle/bundle.go +++ b/cmd/mindthegap/push/bundle/bundle.go @@ -111,7 +111,7 @@ func NewCommand(out output.Output, bundleCmdName string) *cobra.Command { return fmt.Errorf("failed to create local Docker registry: %w", err) } go func() { - if err := reg.ListenAndServe(); err != nil { + if err := reg.ListenAndServe(output.NewOutputLogr(out)); err != nil { out.Error(err, "error serving Docker registry") os.Exit(2) } diff --git a/cmd/mindthegap/root/root.go b/cmd/mindthegap/root/root.go index 0a35712d..0caadc98 100644 --- a/cmd/mindthegap/root/root.go +++ b/cmd/mindthegap/root/root.go @@ -9,6 +9,7 @@ import ( "strings" "github.com/spf13/cobra" + ctrllog "sigs.k8s.io/controller-runtime/pkg/log" "github.com/mesosphere/dkp-cli-runtime/core/cmd/root" "github.com/mesosphere/dkp-cli-runtime/core/output" @@ -19,6 +20,12 @@ import ( "github.com/mesosphere/mindthegap/cmd/mindthegap/serve" ) +const ( + // MinimumVerbosityForControllerRuntimeMessages is the minimum verbosity at which controller-runtime + // log messages are included in the output. Set to >= 1 to exclude from default output. + MinimumVerbosityForControllerRuntimeMessages = 1 +) + func NewCommand(in io.Reader, out, errOut io.Writer) (*cobra.Command, output.Output) { rootCmd, rootOpts := root.NewCommand(out, errOut) @@ -53,6 +60,10 @@ func Execute() { // disable cobra built-in error printing, we output the error with formatting. rootCmd.SilenceErrors = true + // All packages in the controller-runtime module expect this logger to be + // defined within 30 seconds of initialization. + ctrllog.SetLogger(output.NewOutputLogr(out)) + if err := rootCmd.Execute(); err != nil { out.Error(err, "") os.Exit(1) diff --git a/cmd/mindthegap/serve/bundle/bundle.go b/cmd/mindthegap/serve/bundle/bundle.go index 7afcbd27..4d8a3d6a 100644 --- a/cmd/mindthegap/serve/bundle/bundle.go +++ b/cmd/mindthegap/serve/bundle/bundle.go @@ -103,7 +103,7 @@ func NewCommand( out.Infof("Listening on %s\n", reg.Address()) go func() { - if err := reg.ListenAndServe(); err != nil && + if err := reg.ListenAndServe(output.NewOutputLogr(out)); err != nil && !errors.Is(err, http.ErrServerClosed) { out.Error(err, "error serving Docker registry") os.Exit(2) diff --git a/devbox.lock b/devbox.lock index 6b842a50..ede2c89e 100644 --- a/devbox.lock +++ b/devbox.lock @@ -2,56 +2,56 @@ "lockfile_version": "1", "packages": { "actionlint@latest": { - "last_modified": "2024-09-12T11:58:09Z", - "resolved": "github:NixOS/nixpkgs/280db3decab4cbeb22a4599bd472229ab74d25e1#actionlint", + "last_modified": "2024-10-13T23:44:06Z", + "resolved": "github:NixOS/nixpkgs/d4f247e89f6e10120f911e2e2d2254a050d0f732#actionlint", "source": "devbox-search", - "version": "1.7.1", + "version": "1.7.3", "systems": { "aarch64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/lhv2a93jjckg1h3ix8x7vryvhvw878v6-actionlint-1.7.1", + "path": "/nix/store/rw7v977ipky8r3ydhl2g0rp6hd5qbs9k-actionlint-1.7.3", "default": true } ], - "store_path": "/nix/store/lhv2a93jjckg1h3ix8x7vryvhvw878v6-actionlint-1.7.1" + "store_path": "/nix/store/rw7v977ipky8r3ydhl2g0rp6hd5qbs9k-actionlint-1.7.3" }, "aarch64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/4w9w3lb0q5k8az0l2z3897imiflmbdmg-actionlint-1.7.1", + "path": "/nix/store/panhq42cnq6240mkllnrqshcwa0ii3rl-actionlint-1.7.3", "default": true } ], - "store_path": "/nix/store/4w9w3lb0q5k8az0l2z3897imiflmbdmg-actionlint-1.7.1" + "store_path": "/nix/store/panhq42cnq6240mkllnrqshcwa0ii3rl-actionlint-1.7.3" }, "x86_64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/pn5lm8v33as5nz64c5ywiapj7a23058r-actionlint-1.7.1", + "path": "/nix/store/rjq12m13p89ljnkb7zmi6p57cz5davdx-actionlint-1.7.3", "default": true } ], - "store_path": "/nix/store/pn5lm8v33as5nz64c5ywiapj7a23058r-actionlint-1.7.1" + "store_path": "/nix/store/rjq12m13p89ljnkb7zmi6p57cz5davdx-actionlint-1.7.3" }, "x86_64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/syvxybli9kzpbsg6i7ak86hq7klg1ak5-actionlint-1.7.1", + "path": "/nix/store/3fxnhvjl93djzmwa8d36gqd9v2s45s29-actionlint-1.7.3", "default": true } ], - "store_path": "/nix/store/syvxybli9kzpbsg6i7ak86hq7klg1ak5-actionlint-1.7.1" + "store_path": "/nix/store/3fxnhvjl93djzmwa8d36gqd9v2s45s29-actionlint-1.7.3" } } }, "coreutils@latest": { - "last_modified": "2024-09-12T11:58:09Z", - "resolved": "github:NixOS/nixpkgs/280db3decab4cbeb22a4599bd472229ab74d25e1#coreutils", + "last_modified": "2024-10-29T02:50:45Z", + "resolved": "github:NixOS/nixpkgs/30c9efeef01e2ad4880bff6a01a61dd99536b3c9#coreutils", "source": "devbox-search", "version": "9.5", "systems": { @@ -59,71 +59,71 @@ "outputs": [ { "name": "out", - "path": "/nix/store/1l41471x6rlf7l544s1bxkqqgpprd28m-coreutils-9.5", + "path": "/nix/store/b7j95xd7yccclshfln10k843q2qf20yg-coreutils-9.5", "default": true }, { "name": "info", - "path": "/nix/store/ps81dqzr6fxafmxih1834v545dh4apjm-coreutils-9.5-info" + "path": "/nix/store/8rnzj25fishm1d6z4y8b5lb86s45bkm1-coreutils-9.5-info" } ], - "store_path": "/nix/store/1l41471x6rlf7l544s1bxkqqgpprd28m-coreutils-9.5" + "store_path": "/nix/store/b7j95xd7yccclshfln10k843q2qf20yg-coreutils-9.5" }, "aarch64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/ssqdazslv2wjpybnk0pjwnpq0dfpa6q2-coreutils-9.5", + "path": "/nix/store/cqnb5spmpzvc32h16568s028frzvz8hs-coreutils-9.5", "default": true }, { "name": "debug", - "path": "/nix/store/g66h1ajc1wx18milg2290yylbivq2jhd-coreutils-9.5-debug" + "path": "/nix/store/05xfc02h42y6xs1giwgnvmkwp8x136hl-coreutils-9.5-debug" }, { "name": "info", - "path": "/nix/store/y311wv5dlqakkq6hr3yl6zmiiprxb3v5-coreutils-9.5-info" + "path": "/nix/store/gv411q70m9qx6754zvzpaw7vfnk37wrn-coreutils-9.5-info" } ], - "store_path": "/nix/store/ssqdazslv2wjpybnk0pjwnpq0dfpa6q2-coreutils-9.5" + "store_path": "/nix/store/cqnb5spmpzvc32h16568s028frzvz8hs-coreutils-9.5" }, "x86_64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/mw0amk6q5v2401y3s8zg7hxa2v0ia6vw-coreutils-9.5", + "path": "/nix/store/k8pmb9qpypmip7ph667abbs6rllfd1f1-coreutils-9.5", "default": true }, { "name": "info", - "path": "/nix/store/jgslj3bb2rs55xaaxarqwsg7bppfxg8p-coreutils-9.5-info" + "path": "/nix/store/x900szhk9vk50swrlj41wbpm1bzmpbj5-coreutils-9.5-info" } ], - "store_path": "/nix/store/mw0amk6q5v2401y3s8zg7hxa2v0ia6vw-coreutils-9.5" + "store_path": "/nix/store/k8pmb9qpypmip7ph667abbs6rllfd1f1-coreutils-9.5" }, "x86_64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/0kg70swgpg45ipcz3pr2siidq9fn6d77-coreutils-9.5", + "path": "/nix/store/ph44jcx3ddmlwh394mh1wb7f1qigxqb1-coreutils-9.5", "default": true }, { "name": "debug", - "path": "/nix/store/73i7cdbz2w862wx1gfxxvyrw95rmmwl3-coreutils-9.5-debug" + "path": "/nix/store/faxmahlbgdg3mz3mbgnmnn6sf5hsvcb8-coreutils-9.5-debug" }, { "name": "info", - "path": "/nix/store/p1mj9zdizsa605xsy3jjx4db4ya1wnix-coreutils-9.5-info" + "path": "/nix/store/kb44yznfd4w4asrr6rsc3x4zm99nz426-coreutils-9.5-info" } ], - "store_path": "/nix/store/0kg70swgpg45ipcz3pr2siidq9fn6d77-coreutils-9.5" + "store_path": "/nix/store/ph44jcx3ddmlwh394mh1wb7f1qigxqb1-coreutils-9.5" } } }, "crane@latest": { - "last_modified": "2024-09-11T08:20:13Z", - "resolved": "github:NixOS/nixpkgs/159be5db480d1df880a0135ca0bfed84c2f88353#crane", + "last_modified": "2024-10-13T23:44:06Z", + "resolved": "github:NixOS/nixpkgs/d4f247e89f6e10120f911e2e2d2254a050d0f732#crane", "source": "devbox-search", "version": "0.20.2", "systems": { @@ -131,83 +131,83 @@ "outputs": [ { "name": "crane", - "path": "/nix/store/lqsgfk3b7y4rd8yr9q039a0xa8wmvbk0-go-containerregistry-0.20.2-crane", + "path": "/nix/store/qycjbncha71hfzasv582dlwjcwnzsgqj-go-containerregistry-0.20.2-crane", "default": true }, { "name": "out", - "path": "/nix/store/410jj0dcyrpz4wb1ss8hykfa0yizs7iw-go-containerregistry-0.20.2", + "path": "/nix/store/1a2bys3yy3z3yjr73i8jm4azi6xk9jwk-go-containerregistry-0.20.2", "default": true }, { "name": "gcrane", - "path": "/nix/store/ampln4ywb66l2lhp53sqwv8lhmasxbkp-go-containerregistry-0.20.2-gcrane" + "path": "/nix/store/fkigdd53wzw0a32746cks7bkcc2cisn0-go-containerregistry-0.20.2-gcrane" } ], - "store_path": "/nix/store/lqsgfk3b7y4rd8yr9q039a0xa8wmvbk0-go-containerregistry-0.20.2-crane" + "store_path": "/nix/store/qycjbncha71hfzasv582dlwjcwnzsgqj-go-containerregistry-0.20.2-crane" }, "aarch64-linux": { "outputs": [ { "name": "crane", - "path": "/nix/store/gmy0yjnm63pgrp1xrxhn7dhhpxi2jy97-go-containerregistry-0.20.2-crane", + "path": "/nix/store/vy3z068kzhgb2kyxnj395jswap179zpr-go-containerregistry-0.20.2-crane", "default": true }, { "name": "out", - "path": "/nix/store/w4brrjw9akjmvyj5wwkj4qyszc4ssdyz-go-containerregistry-0.20.2", + "path": "/nix/store/99hrcq06y6jnl1bnnkn020n7za2k4skp-go-containerregistry-0.20.2", "default": true }, { "name": "gcrane", - "path": "/nix/store/zr8bjdqybkb2i2cf7a331nzcjscmd7y4-go-containerregistry-0.20.2-gcrane" + "path": "/nix/store/dld7qgb4m2spag1hilrikpc5jljy55zq-go-containerregistry-0.20.2-gcrane" } ], - "store_path": "/nix/store/gmy0yjnm63pgrp1xrxhn7dhhpxi2jy97-go-containerregistry-0.20.2-crane" + "store_path": "/nix/store/vy3z068kzhgb2kyxnj395jswap179zpr-go-containerregistry-0.20.2-crane" }, "x86_64-darwin": { "outputs": [ { "name": "crane", - "path": "/nix/store/kv82vvbd9ga74b8ji28kwrqgx3a9lalw-go-containerregistry-0.20.2-crane", + "path": "/nix/store/7c8la4l420ly0q68ykpkhp80wydbmr6n-go-containerregistry-0.20.2-crane", "default": true }, { "name": "out", - "path": "/nix/store/dgv3pfawxiwsy6sfx8q09mzwnzlr2ws6-go-containerregistry-0.20.2", + "path": "/nix/store/wqvzx8jajmwly1gff3vd9xbz722np11f-go-containerregistry-0.20.2", "default": true }, { "name": "gcrane", - "path": "/nix/store/bscmq7fd5adfl3rj690c5dbm36n78rar-go-containerregistry-0.20.2-gcrane" + "path": "/nix/store/w54705mh6gnb1bhzm48pwf23c9125zdn-go-containerregistry-0.20.2-gcrane" } ], - "store_path": "/nix/store/kv82vvbd9ga74b8ji28kwrqgx3a9lalw-go-containerregistry-0.20.2-crane" + "store_path": "/nix/store/7c8la4l420ly0q68ykpkhp80wydbmr6n-go-containerregistry-0.20.2-crane" }, "x86_64-linux": { "outputs": [ { "name": "crane", - "path": "/nix/store/4i04gvm5iz6fnkyz9f03m67fpy0jvfw1-go-containerregistry-0.20.2-crane", + "path": "/nix/store/x68g62jxnm6myka2zjyrhgg72gfc6ffg-go-containerregistry-0.20.2-crane", "default": true }, { "name": "out", - "path": "/nix/store/gpc8ji9wglng0wzyh3xa5hqf8y5qc75d-go-containerregistry-0.20.2", + "path": "/nix/store/b2dmz5dzbyb4f9xyavxf3wg1sgf40yn8-go-containerregistry-0.20.2", "default": true }, { "name": "gcrane", - "path": "/nix/store/wj5jhm9a2jvbihrlvd6sfw10fvp1m7wp-go-containerregistry-0.20.2-gcrane" + "path": "/nix/store/qbs0dc31mwal35qn6ajqa98v6pvm3znz-go-containerregistry-0.20.2-gcrane" } ], - "store_path": "/nix/store/4i04gvm5iz6fnkyz9f03m67fpy0jvfw1-go-containerregistry-0.20.2-crane" + "store_path": "/nix/store/x68g62jxnm6myka2zjyrhgg72gfc6ffg-go-containerregistry-0.20.2-crane" } } }, "fd@latest": { - "last_modified": "2024-09-12T11:58:09Z", - "resolved": "github:NixOS/nixpkgs/280db3decab4cbeb22a4599bd472229ab74d25e1#fd", + "last_modified": "2024-10-13T23:44:06Z", + "resolved": "github:NixOS/nixpkgs/d4f247e89f6e10120f911e2e2d2254a050d0f732#fd", "source": "devbox-search", "version": "10.2.0", "systems": { @@ -215,47 +215,47 @@ "outputs": [ { "name": "out", - "path": "/nix/store/bbzqnzwnj2v3advibp3wps10gihj1ln6-fd-10.2.0", + "path": "/nix/store/x2w1slijdmnpmd9rh15h1b2pava6clkl-fd-10.2.0", "default": true } ], - "store_path": "/nix/store/bbzqnzwnj2v3advibp3wps10gihj1ln6-fd-10.2.0" + "store_path": "/nix/store/x2w1slijdmnpmd9rh15h1b2pava6clkl-fd-10.2.0" }, "aarch64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/y1rz0pyv8x7n1hka1j2zpwxc1l9z9243-fd-10.2.0", + "path": "/nix/store/xzlg56rwscm5bhxwfhivvb6wb79xm8az-fd-10.2.0", "default": true } ], - "store_path": "/nix/store/y1rz0pyv8x7n1hka1j2zpwxc1l9z9243-fd-10.2.0" + "store_path": "/nix/store/xzlg56rwscm5bhxwfhivvb6wb79xm8az-fd-10.2.0" }, "x86_64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/v89khrhdmza9yh9gzkglhj0k3vp2qxc8-fd-10.2.0", + "path": "/nix/store/18nvbnf4g9vjx2dnrlb5aidh28q9dhq5-fd-10.2.0", "default": true } ], - "store_path": "/nix/store/v89khrhdmza9yh9gzkglhj0k3vp2qxc8-fd-10.2.0" + "store_path": "/nix/store/18nvbnf4g9vjx2dnrlb5aidh28q9dhq5-fd-10.2.0" }, "x86_64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/bs1pr3k75mmi65b67xp2gjb2i385wxig-fd-10.2.0", + "path": "/nix/store/lx9c161bhlklj8lqbsvqxnc2amqadsmd-fd-10.2.0", "default": true } ], - "store_path": "/nix/store/bs1pr3k75mmi65b67xp2gjb2i385wxig-fd-10.2.0" + "store_path": "/nix/store/lx9c161bhlklj8lqbsvqxnc2amqadsmd-fd-10.2.0" } } }, "ginkgo@latest": { - "last_modified": "2024-09-12T11:58:09Z", - "resolved": "github:NixOS/nixpkgs/280db3decab4cbeb22a4599bd472229ab74d25e1#ginkgo", + "last_modified": "2024-10-13T23:44:06Z", + "resolved": "github:NixOS/nixpkgs/d4f247e89f6e10120f911e2e2d2254a050d0f732#ginkgo", "source": "devbox-search", "version": "2.20.2", "systems": { @@ -263,119 +263,119 @@ "outputs": [ { "name": "out", - "path": "/nix/store/nid0ha9rpkvbcp77q6vr5zy351n8yn9m-ginkgo-2.20.2", + "path": "/nix/store/sdp5jk0cag02zir9g46mixfglkkb4pin-ginkgo-2.20.2", "default": true } ], - "store_path": "/nix/store/nid0ha9rpkvbcp77q6vr5zy351n8yn9m-ginkgo-2.20.2" + "store_path": "/nix/store/sdp5jk0cag02zir9g46mixfglkkb4pin-ginkgo-2.20.2" }, "aarch64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/ak1481f4za57iaxr4kljslwyxnskfc93-ginkgo-2.20.2", + "path": "/nix/store/a12y3dv4xb4h22y6jz2vxnkjmgw7kyy3-ginkgo-2.20.2", "default": true } ], - "store_path": "/nix/store/ak1481f4za57iaxr4kljslwyxnskfc93-ginkgo-2.20.2" + "store_path": "/nix/store/a12y3dv4xb4h22y6jz2vxnkjmgw7kyy3-ginkgo-2.20.2" }, "x86_64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/1k9ykqp9a0q6jrbg4zm5jygasl5jcdcy-ginkgo-2.20.2", + "path": "/nix/store/7lfxp4m6y9wdpjzdnbl57nqzdj128l0p-ginkgo-2.20.2", "default": true } ], - "store_path": "/nix/store/1k9ykqp9a0q6jrbg4zm5jygasl5jcdcy-ginkgo-2.20.2" + "store_path": "/nix/store/7lfxp4m6y9wdpjzdnbl57nqzdj128l0p-ginkgo-2.20.2" }, "x86_64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/2waqj0vva63gjq24agj96qbf5gb3kicp-ginkgo-2.20.2", + "path": "/nix/store/5635w7bfw46kwr7w4vfq3i9nnckiphk3-ginkgo-2.20.2", "default": true } ], - "store_path": "/nix/store/2waqj0vva63gjq24agj96qbf5gb3kicp-ginkgo-2.20.2" + "store_path": "/nix/store/5635w7bfw46kwr7w4vfq3i9nnckiphk3-ginkgo-2.20.2" } } }, "git@latest": { - "last_modified": "2024-09-12T11:58:09Z", - "resolved": "github:NixOS/nixpkgs/280db3decab4cbeb22a4599bd472229ab74d25e1#git", + "last_modified": "2024-10-23T22:21:09Z", + "resolved": "github:NixOS/nixpkgs/6301495959cf1737c6ebcd153833e4c4596f56e2#git", "source": "devbox-search", - "version": "2.46.0", + "version": "2.46.1", "systems": { "aarch64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/msgwpjsr2607nmlm4f0klc60m7vyp2ls-git-2.46.0", + "path": "/nix/store/fzsjyd9wxiymv5j38f1igk99660hi4vl-git-2.46.1", "default": true }, { "name": "doc", - "path": "/nix/store/ycx57sa7dfrs9z1gq0sk1ai29ib9hvhl-git-2.46.0-doc" + "path": "/nix/store/9i3j85b675c29xwmyg7bvaxs2jbqn4gx-git-2.46.1-doc" } ], - "store_path": "/nix/store/msgwpjsr2607nmlm4f0klc60m7vyp2ls-git-2.46.0" + "store_path": "/nix/store/fzsjyd9wxiymv5j38f1igk99660hi4vl-git-2.46.1" }, "aarch64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/lgr3n0573wi478bj456zggh541wjrbiw-git-2.46.0", + "path": "/nix/store/qmdn10127g14bb1v5h5qpckcm6n9m8ms-git-2.46.1", "default": true }, { "name": "debug", - "path": "/nix/store/v6r2pdpiwn62yhjp489gjkqhz6yn8zl5-git-2.46.0-debug" + "path": "/nix/store/qgm6gdx0ic216alm4kl7lyyd5k74gn1p-git-2.46.1-debug" }, { "name": "doc", - "path": "/nix/store/5aiq8j373y5k9dh1p98zlic3n5f5ycnq-git-2.46.0-doc" + "path": "/nix/store/ngyj5imnlagsj5avqgc3f65iz9pffqjm-git-2.46.1-doc" } ], - "store_path": "/nix/store/lgr3n0573wi478bj456zggh541wjrbiw-git-2.46.0" + "store_path": "/nix/store/qmdn10127g14bb1v5h5qpckcm6n9m8ms-git-2.46.1" }, "x86_64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/lfb5ngmzsmnbqw41wm11i7hjnrkii7ic-git-2.46.0", + "path": "/nix/store/n4s67bnpyvxqj51fhj57gxn7f8n1v6wk-git-2.46.1", "default": true }, { "name": "doc", - "path": "/nix/store/kcgzncw4plawrs6fw524dprbscqdl78n-git-2.46.0-doc" + "path": "/nix/store/vhiqrx6ka20krpi255vk99iac98zr3sb-git-2.46.1-doc" } ], - "store_path": "/nix/store/lfb5ngmzsmnbqw41wm11i7hjnrkii7ic-git-2.46.0" + "store_path": "/nix/store/n4s67bnpyvxqj51fhj57gxn7f8n1v6wk-git-2.46.1" }, "x86_64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/0l63mqr7qx1asjxfz86j4zbs4758gn98-git-2.46.0", + "path": "/nix/store/zmmhkn7ndfskwk2mfqn9nzmv9y699lms-git-2.46.1", "default": true }, { - "name": "doc", - "path": "/nix/store/5r0irlcap11p8wqbdiy9fz1y3pk1mn4n-git-2.46.0-doc" + "name": "debug", + "path": "/nix/store/n5i11ch2x778v95wnbg56mlc9rc8xsjn-git-2.46.1-debug" }, { - "name": "debug", - "path": "/nix/store/x1g0dhpqg1fi4dz20lp2i2h759bdkark-git-2.46.0-debug" + "name": "doc", + "path": "/nix/store/9xdnzfl42isjgsn1mnxyjdmspakf8ayi-git-2.46.1-doc" } ], - "store_path": "/nix/store/0l63mqr7qx1asjxfz86j4zbs4758gn98-git-2.46.0" + "store_path": "/nix/store/zmmhkn7ndfskwk2mfqn9nzmv9y699lms-git-2.46.1" } } }, "gnugrep@latest": { - "last_modified": "2024-09-12T11:58:09Z", - "resolved": "github:NixOS/nixpkgs/280db3decab4cbeb22a4599bd472229ab74d25e1#gnugrep", + "last_modified": "2024-10-13T23:44:06Z", + "resolved": "github:NixOS/nixpkgs/d4f247e89f6e10120f911e2e2d2254a050d0f732#gnugrep", "source": "devbox-search", "version": "3.11", "systems": { @@ -383,63 +383,63 @@ "outputs": [ { "name": "out", - "path": "/nix/store/p57w57nln7yjvj95i9wlx27g7gcnwgga-gnugrep-3.11", + "path": "/nix/store/dxqp89x3g9z721ic4ddis07hwxqafn86-gnugrep-3.11", "default": true }, { "name": "info", - "path": "/nix/store/l52aizz37nkh8141bcpgmjawp3rk6wn5-gnugrep-3.11-info" + "path": "/nix/store/mhw68paz9fhcmbl9k3xchmrb4w2fhnza-gnugrep-3.11-info" } ], - "store_path": "/nix/store/p57w57nln7yjvj95i9wlx27g7gcnwgga-gnugrep-3.11" + "store_path": "/nix/store/dxqp89x3g9z721ic4ddis07hwxqafn86-gnugrep-3.11" }, "aarch64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/fxf2s99x6hiaihxij4rah74x16d9svfl-gnugrep-3.11", + "path": "/nix/store/hz0n7bgpmnkvd83kz7ahgd899yiwrvsa-gnugrep-3.11", "default": true }, { "name": "info", - "path": "/nix/store/zfqrbxrss3m2lyy33xb1pdkzka9c613y-gnugrep-3.11-info" + "path": "/nix/store/6vkbzpdlw438lvzhn0pi4hky3rkynvd0-gnugrep-3.11-info" } ], - "store_path": "/nix/store/fxf2s99x6hiaihxij4rah74x16d9svfl-gnugrep-3.11" + "store_path": "/nix/store/hz0n7bgpmnkvd83kz7ahgd899yiwrvsa-gnugrep-3.11" }, "x86_64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/kzk823k82k36b8manfdf6a17zlpak48w-gnugrep-3.11", + "path": "/nix/store/knhqbfrkmkpd079yq6axms7ibsqh1nkz-gnugrep-3.11", "default": true }, { "name": "info", - "path": "/nix/store/pwvmc7717lk3jr2n33jr08knas2i6qmj-gnugrep-3.11-info" + "path": "/nix/store/p499kg12jqhnsfkyj1y67nnbl0s6w76m-gnugrep-3.11-info" } ], - "store_path": "/nix/store/kzk823k82k36b8manfdf6a17zlpak48w-gnugrep-3.11" + "store_path": "/nix/store/knhqbfrkmkpd079yq6axms7ibsqh1nkz-gnugrep-3.11" }, "x86_64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/vsyc8jhsr4d9lm2r8yqq9n3j4i66inlj-gnugrep-3.11", + "path": "/nix/store/lvnwdmnjm7nvaq0a3vhvvn46iy4ql7gr-gnugrep-3.11", "default": true }, { "name": "info", - "path": "/nix/store/c9cl57yplbalgi8v39s210827d51m7a3-gnugrep-3.11-info" + "path": "/nix/store/19q1k2wab4bgcn0d5srfv6d6r3d5d0yh-gnugrep-3.11-info" } ], - "store_path": "/nix/store/vsyc8jhsr4d9lm2r8yqq9n3j4i66inlj-gnugrep-3.11" + "store_path": "/nix/store/lvnwdmnjm7nvaq0a3vhvvn46iy4ql7gr-gnugrep-3.11" } } }, "gnused@latest": { - "last_modified": "2024-09-12T11:58:09Z", - "resolved": "github:NixOS/nixpkgs/280db3decab4cbeb22a4599bd472229ab74d25e1#gnused", + "last_modified": "2024-10-13T23:44:06Z", + "resolved": "github:NixOS/nixpkgs/d4f247e89f6e10120f911e2e2d2254a050d0f732#gnused", "source": "devbox-search", "version": "4.9", "systems": { @@ -447,159 +447,159 @@ "outputs": [ { "name": "out", - "path": "/nix/store/671pvppgcdzgdxkbhggb5z1zs3dx096y-gnused-4.9", + "path": "/nix/store/8yjj9w5ay33pb741sr2mcfszmsvzbqaz-gnused-4.9", "default": true }, { "name": "info", - "path": "/nix/store/dhcmhyjs9zr3lcag9qafvlks4jcbpidh-gnused-4.9-info" + "path": "/nix/store/wb0n2yrk54hj125j5q9dk89wigdxjhcv-gnused-4.9-info" } ], - "store_path": "/nix/store/671pvppgcdzgdxkbhggb5z1zs3dx096y-gnused-4.9" + "store_path": "/nix/store/8yjj9w5ay33pb741sr2mcfszmsvzbqaz-gnused-4.9" }, "aarch64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/5ri0v39300yv8b17ywn1vab716cwj2wx-gnused-4.9", + "path": "/nix/store/i3f50210jpp4wmzkpds6l7zbp81ds4xf-gnused-4.9", "default": true }, { "name": "info", - "path": "/nix/store/2vdwa2l8bpz0s053cli0jvs5bv7gvm5h-gnused-4.9-info" + "path": "/nix/store/ssxslyng9vws5xnd6g21pjyk9bihxzkr-gnused-4.9-info" } ], - "store_path": "/nix/store/5ri0v39300yv8b17ywn1vab716cwj2wx-gnused-4.9" + "store_path": "/nix/store/i3f50210jpp4wmzkpds6l7zbp81ds4xf-gnused-4.9" }, "x86_64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/ggi9564sg3b8nigjnhsn8qg64kq4j9pq-gnused-4.9", + "path": "/nix/store/hj87q7liarm4d5cb8mw5p7f58qq69lhc-gnused-4.9", "default": true }, { "name": "info", - "path": "/nix/store/4gsvmcr6d0jmg7r6kfp7x285gbf3k949-gnused-4.9-info" + "path": "/nix/store/yw3r521w36dhvw54252n86p8yib43p1v-gnused-4.9-info" } ], - "store_path": "/nix/store/ggi9564sg3b8nigjnhsn8qg64kq4j9pq-gnused-4.9" + "store_path": "/nix/store/hj87q7liarm4d5cb8mw5p7f58qq69lhc-gnused-4.9" }, "x86_64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/gjlh1zvckhz0qv795lnzgw2zciklbzj2-gnused-4.9", + "path": "/nix/store/yd9vbyhbxx62j0cyhd6v0iacz11nxpvc-gnused-4.9", "default": true }, { "name": "info", - "path": "/nix/store/11rx42rgzwsvi2s7kc17xkyfxxhxmgya-gnused-4.9-info" + "path": "/nix/store/0dgkyi00x4rm32cd02kdalnsvm23k27z-gnused-4.9-info" } ], - "store_path": "/nix/store/gjlh1zvckhz0qv795lnzgw2zciklbzj2-gnused-4.9" + "store_path": "/nix/store/yd9vbyhbxx62j0cyhd6v0iacz11nxpvc-gnused-4.9" } } }, "go-task@latest": { - "last_modified": "2024-09-12T11:58:09Z", - "resolved": "github:NixOS/nixpkgs/280db3decab4cbeb22a4599bd472229ab74d25e1#go-task", + "last_modified": "2024-10-13T23:44:06Z", + "resolved": "github:NixOS/nixpkgs/d4f247e89f6e10120f911e2e2d2254a050d0f732#go-task", "source": "devbox-search", - "version": "3.38.0", + "version": "3.39.2", "systems": { "aarch64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/6fnjga1f6y9yw0xfa7bqq48mk4wnwj60-go-task-3.38.0", + "path": "/nix/store/aqcr7jv0m2s8nz481ay310i0dh4mbj48-go-task-3.39.2", "default": true } ], - "store_path": "/nix/store/6fnjga1f6y9yw0xfa7bqq48mk4wnwj60-go-task-3.38.0" + "store_path": "/nix/store/aqcr7jv0m2s8nz481ay310i0dh4mbj48-go-task-3.39.2" }, "aarch64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/y00rivpjziw0zpzacdxjmrs5i28d7grf-go-task-3.38.0", + "path": "/nix/store/08haalp24y68v0krddls5c18hcl6n80p-go-task-3.39.2", "default": true } ], - "store_path": "/nix/store/y00rivpjziw0zpzacdxjmrs5i28d7grf-go-task-3.38.0" + "store_path": "/nix/store/08haalp24y68v0krddls5c18hcl6n80p-go-task-3.39.2" }, "x86_64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/kc0zm9kgsraznqyns5jqv0dixfgk6fm7-go-task-3.38.0", + "path": "/nix/store/n6qmzm7h0vdj87qz3bfay17cfrhm3bki-go-task-3.39.2", "default": true } ], - "store_path": "/nix/store/kc0zm9kgsraznqyns5jqv0dixfgk6fm7-go-task-3.38.0" + "store_path": "/nix/store/n6qmzm7h0vdj87qz3bfay17cfrhm3bki-go-task-3.39.2" }, "x86_64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/6fya93gcf8sla6npxp99rnbvyj6pmnr5-go-task-3.38.0", + "path": "/nix/store/sxlbgmc56mkv64rn772rczpin8vjn6lp-go-task-3.39.2", "default": true } ], - "store_path": "/nix/store/6fya93gcf8sla6npxp99rnbvyj6pmnr5-go-task-3.38.0" + "store_path": "/nix/store/sxlbgmc56mkv64rn772rczpin8vjn6lp-go-task-3.39.2" } } }, "go@latest": { - "last_modified": "2024-09-12T11:58:09Z", - "resolved": "github:NixOS/nixpkgs/280db3decab4cbeb22a4599bd472229ab74d25e1#go_1_23", + "last_modified": "2024-10-13T23:44:06Z", + "resolved": "github:NixOS/nixpkgs/d4f247e89f6e10120f911e2e2d2254a050d0f732#go", "source": "devbox-search", - "version": "1.23.1", + "version": "1.23.2", "systems": { "aarch64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/nvaay1c4banbccyvv6ba1gzyqpypjmfq-go-1.23.1", + "path": "/nix/store/35jikx2wg5r0qj47sic0p99bqnmwi6cn-go-1.23.2", "default": true } ], - "store_path": "/nix/store/nvaay1c4banbccyvv6ba1gzyqpypjmfq-go-1.23.1" + "store_path": "/nix/store/35jikx2wg5r0qj47sic0p99bqnmwi6cn-go-1.23.2" }, "aarch64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/9ylsay11jb3p6yarkmlz0fin76cdypwa-go-1.23.1", + "path": "/nix/store/6bx6d90kpy537yab22wja70ibpp4gkww-go-1.23.2", "default": true } ], - "store_path": "/nix/store/9ylsay11jb3p6yarkmlz0fin76cdypwa-go-1.23.1" + "store_path": "/nix/store/6bx6d90kpy537yab22wja70ibpp4gkww-go-1.23.2" }, "x86_64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/zkg5xhyx2rs03dq0qp14nqlx9ff1y5c5-go-1.23.1", + "path": "/nix/store/yi89mimkmw48qhzrll1aaibxbvllpsjv-go-1.23.2", "default": true } ], - "store_path": "/nix/store/zkg5xhyx2rs03dq0qp14nqlx9ff1y5c5-go-1.23.1" + "store_path": "/nix/store/yi89mimkmw48qhzrll1aaibxbvllpsjv-go-1.23.2" }, "x86_64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/mi0ybwsm6pmxzv9hsm6bcbqaq1pkf8wh-go-1.23.1", + "path": "/nix/store/klw1ipjsqx1np7pkk833x7sad7f3ivv9-go-1.23.2", "default": true } ], - "store_path": "/nix/store/mi0ybwsm6pmxzv9hsm6bcbqaq1pkf8wh-go-1.23.1" + "store_path": "/nix/store/klw1ipjsqx1np7pkk833x7sad7f3ivv9-go-1.23.2" } } }, "gojq@latest": { - "last_modified": "2024-09-12T11:58:09Z", - "resolved": "github:NixOS/nixpkgs/280db3decab4cbeb22a4599bd472229ab74d25e1#gojq", + "last_modified": "2024-10-13T23:44:06Z", + "resolved": "github:NixOS/nixpkgs/d4f247e89f6e10120f911e2e2d2254a050d0f732#gojq", "source": "devbox-search", "version": "0.12.16", "systems": { @@ -617,37 +617,37 @@ "outputs": [ { "name": "out", - "path": "/nix/store/w3817xwn2f8ficw18sbs368hvw0rhc7p-gojq-0.12.16", + "path": "/nix/store/yi1xq6p5w9d3979vh3m58yl99f7h2bk5-gojq-0.12.16", "default": true } ], - "store_path": "/nix/store/w3817xwn2f8ficw18sbs368hvw0rhc7p-gojq-0.12.16" + "store_path": "/nix/store/yi1xq6p5w9d3979vh3m58yl99f7h2bk5-gojq-0.12.16" }, "x86_64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/lrx5q470iamwawj70z8byw7da568g9ff-gojq-0.12.16", + "path": "/nix/store/0gpg4h4h1gb7da79vpr2aya5w82iqng2-gojq-0.12.16", "default": true } ], - "store_path": "/nix/store/lrx5q470iamwawj70z8byw7da568g9ff-gojq-0.12.16" + "store_path": "/nix/store/0gpg4h4h1gb7da79vpr2aya5w82iqng2-gojq-0.12.16" }, "x86_64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/5mc6v4wc945xh8sg3pyzjzgn2wiqf7vh-gojq-0.12.16", + "path": "/nix/store/grr1h1hbj3qj722i4i3a93zk4qi9422r-gojq-0.12.16", "default": true } ], - "store_path": "/nix/store/5mc6v4wc945xh8sg3pyzjzgn2wiqf7vh-gojq-0.12.16" + "store_path": "/nix/store/grr1h1hbj3qj722i4i3a93zk4qi9422r-gojq-0.12.16" } } }, "golangci-lint@latest": { - "last_modified": "2024-09-12T11:58:09Z", - "resolved": "github:NixOS/nixpkgs/280db3decab4cbeb22a4599bd472229ab74d25e1#golangci-lint", + "last_modified": "2024-10-13T23:44:06Z", + "resolved": "github:NixOS/nixpkgs/d4f247e89f6e10120f911e2e2d2254a050d0f732#golangci-lint", "source": "devbox-search", "version": "1.61.0", "systems": { @@ -655,47 +655,47 @@ "outputs": [ { "name": "out", - "path": "/nix/store/mycyzj74j3hb0z3cn93zl27vn636nzvp-golangci-lint-1.61.0", + "path": "/nix/store/8fx25j98hqdblwzf7wbx8dijjc4smjrs-golangci-lint-1.61.0", "default": true } ], - "store_path": "/nix/store/mycyzj74j3hb0z3cn93zl27vn636nzvp-golangci-lint-1.61.0" + "store_path": "/nix/store/8fx25j98hqdblwzf7wbx8dijjc4smjrs-golangci-lint-1.61.0" }, "aarch64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/615pmvpwdk4a8zvysig394qyxryycvv5-golangci-lint-1.61.0", + "path": "/nix/store/pqv50bg81jx4h5qavk48pgw4kvvyjnmk-golangci-lint-1.61.0", "default": true } ], - "store_path": "/nix/store/615pmvpwdk4a8zvysig394qyxryycvv5-golangci-lint-1.61.0" + "store_path": "/nix/store/pqv50bg81jx4h5qavk48pgw4kvvyjnmk-golangci-lint-1.61.0" }, "x86_64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/1ka14pll6a8kmvp4m3j493kaks8kf7hk-golangci-lint-1.61.0", + "path": "/nix/store/7p5pn20a06xgm1816xdz6ik6bjr5klip-golangci-lint-1.61.0", "default": true } ], - "store_path": "/nix/store/1ka14pll6a8kmvp4m3j493kaks8kf7hk-golangci-lint-1.61.0" + "store_path": "/nix/store/7p5pn20a06xgm1816xdz6ik6bjr5klip-golangci-lint-1.61.0" }, "x86_64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/l9q9gr0500smf0wiqyv3q804ld8xdj21-golangci-lint-1.61.0", + "path": "/nix/store/62cj9b5izk9z682r7vcjwx3gqdgrdqfm-golangci-lint-1.61.0", "default": true } ], - "store_path": "/nix/store/l9q9gr0500smf0wiqyv3q804ld8xdj21-golangci-lint-1.61.0" + "store_path": "/nix/store/62cj9b5izk9z682r7vcjwx3gqdgrdqfm-golangci-lint-1.61.0" } } }, "golines@latest": { - "last_modified": "2024-09-12T11:58:09Z", - "resolved": "github:NixOS/nixpkgs/280db3decab4cbeb22a4599bd472229ab74d25e1#golines", + "last_modified": "2024-10-13T23:44:06Z", + "resolved": "github:NixOS/nixpkgs/d4f247e89f6e10120f911e2e2d2254a050d0f732#golines", "source": "devbox-search", "version": "0.12.2", "systems": { @@ -703,143 +703,143 @@ "outputs": [ { "name": "out", - "path": "/nix/store/08p0z14flgpkx0dbqirc7hw20fcksr4c-golines-0.12.2", + "path": "/nix/store/i1jczl1m2wxsxf2k4rbg2z60j2qbx9s1-golines-0.12.2", "default": true } ], - "store_path": "/nix/store/08p0z14flgpkx0dbqirc7hw20fcksr4c-golines-0.12.2" + "store_path": "/nix/store/i1jczl1m2wxsxf2k4rbg2z60j2qbx9s1-golines-0.12.2" }, "aarch64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/7jwpafpz5bp7rgg8bhli10bzh8a61vz5-golines-0.12.2", + "path": "/nix/store/lhmyn09i3sa0s1n20a712175khw1jawz-golines-0.12.2", "default": true } ], - "store_path": "/nix/store/7jwpafpz5bp7rgg8bhli10bzh8a61vz5-golines-0.12.2" + "store_path": "/nix/store/lhmyn09i3sa0s1n20a712175khw1jawz-golines-0.12.2" }, "x86_64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/679vrl9dh5cr6d19734a4i9x1qw22k43-golines-0.12.2", + "path": "/nix/store/6a8224hchxmjp6kz3v41abxkkgnnq625-golines-0.12.2", "default": true } ], - "store_path": "/nix/store/679vrl9dh5cr6d19734a4i9x1qw22k43-golines-0.12.2" + "store_path": "/nix/store/6a8224hchxmjp6kz3v41abxkkgnnq625-golines-0.12.2" }, "x86_64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/k7k5b3s2i9xlmnzp6hp9hq2i3762lnz7-golines-0.12.2", + "path": "/nix/store/cq83bls3cfcifg5l3bjvzl1c8psc8a8z-golines-0.12.2", "default": true } ], - "store_path": "/nix/store/k7k5b3s2i9xlmnzp6hp9hq2i3762lnz7-golines-0.12.2" + "store_path": "/nix/store/cq83bls3cfcifg5l3bjvzl1c8psc8a8z-golines-0.12.2" } } }, "goreleaser@latest": { - "last_modified": "2024-10-13T23:44:06Z", - "resolved": "github:NixOS/nixpkgs/d4f247e89f6e10120f911e2e2d2254a050d0f732#goreleaser", + "last_modified": "2024-10-27T16:09:49Z", + "resolved": "github:NixOS/nixpkgs/0fcb98acb6633445764dafe180e6833eb0f95208#goreleaser", "source": "devbox-search", - "version": "2.2.0", + "version": "2.3.2", "systems": { "aarch64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/mfwm9y5vhs3dzfbhmpqmgr2mx0p4kbnl-goreleaser-2.2.0", + "path": "/nix/store/krh45dirqhjvxs1b747f9g5smvakk2dc-goreleaser-2.3.2", "default": true } ], - "store_path": "/nix/store/mfwm9y5vhs3dzfbhmpqmgr2mx0p4kbnl-goreleaser-2.2.0" + "store_path": "/nix/store/krh45dirqhjvxs1b747f9g5smvakk2dc-goreleaser-2.3.2" }, "aarch64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/gqpm92gd4lnbk2467cgypjxl8af4zv6p-goreleaser-2.2.0", + "path": "/nix/store/rpg6k4iy5rifcswyfsi1a6j526440gfb-goreleaser-2.3.2", "default": true } ], - "store_path": "/nix/store/gqpm92gd4lnbk2467cgypjxl8af4zv6p-goreleaser-2.2.0" + "store_path": "/nix/store/rpg6k4iy5rifcswyfsi1a6j526440gfb-goreleaser-2.3.2" }, "x86_64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/bk3fkkjqa4cxl23a1qz8s0w3dj5pi4zn-goreleaser-2.2.0", + "path": "/nix/store/ggjq23k8jg1z67k0xazymqb5m7ij2vqa-goreleaser-2.3.2", "default": true } ], - "store_path": "/nix/store/bk3fkkjqa4cxl23a1qz8s0w3dj5pi4zn-goreleaser-2.2.0" + "store_path": "/nix/store/ggjq23k8jg1z67k0xazymqb5m7ij2vqa-goreleaser-2.3.2" }, "x86_64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/pjh8k3pnrfaj7riis0s5addqx3v4jbrn-goreleaser-2.2.0", + "path": "/nix/store/fsc9cjzb4k1ly1i29xsl3sizvazcqnrl-goreleaser-2.3.2", "default": true } ], - "store_path": "/nix/store/pjh8k3pnrfaj7riis0s5addqx3v4jbrn-goreleaser-2.2.0" + "store_path": "/nix/store/fsc9cjzb4k1ly1i29xsl3sizvazcqnrl-goreleaser-2.3.2" } } }, "gotestsum@latest": { - "last_modified": "2024-09-12T11:58:09Z", - "resolved": "github:NixOS/nixpkgs/280db3decab4cbeb22a4599bd472229ab74d25e1#gotestsum", + "last_modified": "2024-10-13T23:44:06Z", + "resolved": "github:NixOS/nixpkgs/d4f247e89f6e10120f911e2e2d2254a050d0f732#gotestsum", "source": "devbox-search", - "version": "1.11.0", + "version": "1.12.0-unstable-2024-09-17", "systems": { "aarch64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/gkq6wldjndpcgg3vx4la6dpp0sgmqm4y-gotestsum-1.11.0", + "path": "/nix/store/maxxbllyfdqd0nnxaq8kzy9k7wzx1m0x-gotestsum-1.12.0-unstable-2024-09-17", "default": true } ], - "store_path": "/nix/store/gkq6wldjndpcgg3vx4la6dpp0sgmqm4y-gotestsum-1.11.0" + "store_path": "/nix/store/maxxbllyfdqd0nnxaq8kzy9k7wzx1m0x-gotestsum-1.12.0-unstable-2024-09-17" }, "aarch64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/dqj7agwyi9h11hd3775dnn66lzi5w8x2-gotestsum-1.11.0", + "path": "/nix/store/wbfc9pxg0yxg1cbqrn5jlqargdamw94d-gotestsum-1.12.0-unstable-2024-09-17", "default": true } ], - "store_path": "/nix/store/dqj7agwyi9h11hd3775dnn66lzi5w8x2-gotestsum-1.11.0" + "store_path": "/nix/store/wbfc9pxg0yxg1cbqrn5jlqargdamw94d-gotestsum-1.12.0-unstable-2024-09-17" }, "x86_64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/f5dph9gaf4d1xni7ysdvr76i86b8p85l-gotestsum-1.11.0", + "path": "/nix/store/agxialib14rsk6v0fzf612in2qsw55v8-gotestsum-1.12.0-unstable-2024-09-17", "default": true } ], - "store_path": "/nix/store/f5dph9gaf4d1xni7ysdvr76i86b8p85l-gotestsum-1.11.0" + "store_path": "/nix/store/agxialib14rsk6v0fzf612in2qsw55v8-gotestsum-1.12.0-unstable-2024-09-17" }, "x86_64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/d6wki0gr4y5b3442x496hqbnxbyd16px-gotestsum-1.11.0", + "path": "/nix/store/hfaw5ry636vw608cxw6wl3r96dpvj31q-gotestsum-1.12.0-unstable-2024-09-17", "default": true } ], - "store_path": "/nix/store/d6wki0gr4y5b3442x496hqbnxbyd16px-gotestsum-1.11.0" + "store_path": "/nix/store/hfaw5ry636vw608cxw6wl3r96dpvj31q-gotestsum-1.12.0-unstable-2024-09-17" } } }, "ko@latest": { - "last_modified": "2024-09-12T11:58:09Z", - "resolved": "github:NixOS/nixpkgs/280db3decab4cbeb22a4599bd472229ab74d25e1#ko", + "last_modified": "2024-10-13T23:44:06Z", + "resolved": "github:NixOS/nixpkgs/d4f247e89f6e10120f911e2e2d2254a050d0f732#ko", "source": "devbox-search", "version": "0.15.4", "systems": { @@ -847,207 +847,207 @@ "outputs": [ { "name": "out", - "path": "/nix/store/cz1wlmdf1c04j0wc10fi6id7d3g7pa5w-ko-0.15.4", + "path": "/nix/store/a115rv0r9sh21qksb2s6im57gpldwk0w-ko-0.15.4", "default": true } ], - "store_path": "/nix/store/cz1wlmdf1c04j0wc10fi6id7d3g7pa5w-ko-0.15.4" + "store_path": "/nix/store/a115rv0r9sh21qksb2s6im57gpldwk0w-ko-0.15.4" }, "aarch64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/0csyy71avbjbrjwk04an0fr0iwq3n4xc-ko-0.15.4", + "path": "/nix/store/ydnsanna4inbiyrmizrw51r6i224skzr-ko-0.15.4", "default": true } ], - "store_path": "/nix/store/0csyy71avbjbrjwk04an0fr0iwq3n4xc-ko-0.15.4" + "store_path": "/nix/store/ydnsanna4inbiyrmizrw51r6i224skzr-ko-0.15.4" }, "x86_64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/mvlja8c6mcqfhhb59jdl5kyg4lkckz98-ko-0.15.4", + "path": "/nix/store/0gf7l9pfhczzc8yf7m9cszbg9583nywh-ko-0.15.4", "default": true } ], - "store_path": "/nix/store/mvlja8c6mcqfhhb59jdl5kyg4lkckz98-ko-0.15.4" + "store_path": "/nix/store/0gf7l9pfhczzc8yf7m9cszbg9583nywh-ko-0.15.4" }, "x86_64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/33jsb1yw71in0lrjk150yhn9b0myawg3-ko-0.15.4", + "path": "/nix/store/jvrcrahz03qax3dqjqbq8bab74p25j7i-ko-0.15.4", "default": true } ], - "store_path": "/nix/store/33jsb1yw71in0lrjk150yhn9b0myawg3-ko-0.15.4" + "store_path": "/nix/store/jvrcrahz03qax3dqjqbq8bab74p25j7i-ko-0.15.4" } } }, "kubernetes-helm@latest": { - "last_modified": "2024-09-12T11:58:09Z", - "resolved": "github:NixOS/nixpkgs/280db3decab4cbeb22a4599bd472229ab74d25e1#kubernetes-helm", + "last_modified": "2024-10-26T14:05:56Z", + "resolved": "github:NixOS/nixpkgs/4e0eec54db79d4d0909f45a88037210ff8eaffee#kubernetes-helm", "source": "devbox-search", - "version": "3.15.4", + "version": "3.16.2", "systems": { "aarch64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/yxbbxgpql76sabh4ac8gwivy1xiik6ds-kubernetes-helm-3.15.4", + "path": "/nix/store/idlvhs4zs349wf77znrxxyshvcp4bd9l-kubernetes-helm-3.16.2", "default": true } ], - "store_path": "/nix/store/yxbbxgpql76sabh4ac8gwivy1xiik6ds-kubernetes-helm-3.15.4" + "store_path": "/nix/store/idlvhs4zs349wf77znrxxyshvcp4bd9l-kubernetes-helm-3.16.2" }, "aarch64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/vdw78nb3gvfvf1zjk18zi4niqqgg60pm-kubernetes-helm-3.15.4", + "path": "/nix/store/6mn1p7dq1x7cp29jf7jrzk45l4zc39xa-kubernetes-helm-3.16.2", "default": true } ], - "store_path": "/nix/store/vdw78nb3gvfvf1zjk18zi4niqqgg60pm-kubernetes-helm-3.15.4" + "store_path": "/nix/store/6mn1p7dq1x7cp29jf7jrzk45l4zc39xa-kubernetes-helm-3.16.2" }, "x86_64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/his95njlm5f7pivvyhmjx55lxsrg7b7v-kubernetes-helm-3.15.4", + "path": "/nix/store/ms18g5bs5xpzncxgkm89xa9s33g5zcpr-kubernetes-helm-3.16.2", "default": true } ], - "store_path": "/nix/store/his95njlm5f7pivvyhmjx55lxsrg7b7v-kubernetes-helm-3.15.4" + "store_path": "/nix/store/ms18g5bs5xpzncxgkm89xa9s33g5zcpr-kubernetes-helm-3.16.2" }, "x86_64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/x4mb959fwbfpjn1mlq4hhh6cz6h4gvr3-kubernetes-helm-3.15.4", + "path": "/nix/store/d54j0f8sr1mmkwhlvq8y7148vm4qlivd-kubernetes-helm-3.16.2", "default": true } ], - "store_path": "/nix/store/x4mb959fwbfpjn1mlq4hhh6cz6h4gvr3-kubernetes-helm-3.15.4" + "store_path": "/nix/store/d54j0f8sr1mmkwhlvq8y7148vm4qlivd-kubernetes-helm-3.16.2" } } }, "pre-commit@latest": { - "last_modified": "2024-09-12T11:58:09Z", - "resolved": "github:NixOS/nixpkgs/280db3decab4cbeb22a4599bd472229ab74d25e1#pre-commit", + "last_modified": "2024-10-23T22:21:09Z", + "resolved": "github:NixOS/nixpkgs/6301495959cf1737c6ebcd153833e4c4596f56e2#pre-commit", "source": "devbox-search", - "version": "3.7.1", + "version": "4.0.1", "systems": { "aarch64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/rc7a3m278dvszzb5vbsdhaa3a9jfbpj3-pre-commit-3.7.1", + "path": "/nix/store/xnxr8a5wgzl1iqqyzx1fvlkd80ax3y7g-pre-commit-4.0.1", "default": true }, { "name": "dist", - "path": "/nix/store/pg7ik51gbhxls1h331f258jr9d9ad971-pre-commit-3.7.1-dist" + "path": "/nix/store/fjxy7489pv2zcfcr1db5r9vy186xvi17-pre-commit-4.0.1-dist" } ], - "store_path": "/nix/store/rc7a3m278dvszzb5vbsdhaa3a9jfbpj3-pre-commit-3.7.1" + "store_path": "/nix/store/xnxr8a5wgzl1iqqyzx1fvlkd80ax3y7g-pre-commit-4.0.1" }, "aarch64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/ibhhz3rpnzpvq7q8g7dyvgmy0mz1qpxg-pre-commit-3.7.1", + "path": "/nix/store/w7gwhwaz6ijg0rsisn5q9jqqh6kfrzmd-pre-commit-4.0.1", "default": true }, { "name": "dist", - "path": "/nix/store/7ljv9l15k3r27svhwf2h23xi2a6bizhj-pre-commit-3.7.1-dist" + "path": "/nix/store/7bv6iqpy3c8q614ss0r5bfk2qn7955jc-pre-commit-4.0.1-dist" } ], - "store_path": "/nix/store/ibhhz3rpnzpvq7q8g7dyvgmy0mz1qpxg-pre-commit-3.7.1" + "store_path": "/nix/store/w7gwhwaz6ijg0rsisn5q9jqqh6kfrzmd-pre-commit-4.0.1" }, "x86_64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/fkblsil3k46swjag8lz1maijzmvnxmfk-pre-commit-3.7.1", + "path": "/nix/store/9j6smdlyvw92asjdsa2bkx2dmd56x6v0-pre-commit-4.0.1", "default": true }, { "name": "dist", - "path": "/nix/store/g4n4np8nkvr9dnnsfg2h1blaqaipy64q-pre-commit-3.7.1-dist" + "path": "/nix/store/6rn193qlyag10g8m7hjd3b8lm0sijffp-pre-commit-4.0.1-dist" } ], - "store_path": "/nix/store/fkblsil3k46swjag8lz1maijzmvnxmfk-pre-commit-3.7.1" + "store_path": "/nix/store/9j6smdlyvw92asjdsa2bkx2dmd56x6v0-pre-commit-4.0.1" }, "x86_64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/l49d5zihkp48l6pvhk6953x1rb721mx3-pre-commit-3.7.1", + "path": "/nix/store/62l1alph77x3d051zivy530mpdvkzi7c-pre-commit-4.0.1", "default": true }, { "name": "dist", - "path": "/nix/store/awlcncgn92xlx5fkawgdq6vdxzw26vfh-pre-commit-3.7.1-dist" + "path": "/nix/store/dxd5cifrhg553fkchg1qgcb4blqxg4iy-pre-commit-4.0.1-dist" } ], - "store_path": "/nix/store/l49d5zihkp48l6pvhk6953x1rb721mx3-pre-commit-3.7.1" + "store_path": "/nix/store/62l1alph77x3d051zivy530mpdvkzi7c-pre-commit-4.0.1" } } }, "shfmt@latest": { - "last_modified": "2024-09-12T11:58:09Z", - "resolved": "github:NixOS/nixpkgs/280db3decab4cbeb22a4599bd472229ab74d25e1#shfmt", + "last_modified": "2024-10-21T08:58:42Z", + "resolved": "github:NixOS/nixpkgs/56c7c4a3f5fdbef5bf81c7d9c28fbb45dc626611#shfmt", "source": "devbox-search", - "version": "3.9.0", + "version": "3.10.0", "systems": { "aarch64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/1r6nhq0flx19kdvpmnvzgjxwcs0yzfw2-shfmt-3.9.0", + "path": "/nix/store/dbrvc5n5005wz77fq8slxcgzl10nl2v4-shfmt-3.10.0", "default": true } ], - "store_path": "/nix/store/1r6nhq0flx19kdvpmnvzgjxwcs0yzfw2-shfmt-3.9.0" + "store_path": "/nix/store/dbrvc5n5005wz77fq8slxcgzl10nl2v4-shfmt-3.10.0" }, "aarch64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/sf0azn8z0jh9vsg7y6z0n060315qdqv8-shfmt-3.9.0", + "path": "/nix/store/vw43g4jiy21hd6vvjk8bf5amww5yp2kl-shfmt-3.10.0", "default": true } ], - "store_path": "/nix/store/sf0azn8z0jh9vsg7y6z0n060315qdqv8-shfmt-3.9.0" + "store_path": "/nix/store/vw43g4jiy21hd6vvjk8bf5amww5yp2kl-shfmt-3.10.0" }, "x86_64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/hilj99wvybz2vxh2hz4q1s10dsb5mmzg-shfmt-3.9.0", + "path": "/nix/store/a6gfcfnr0sr2av3gyma30wsm2hk7mx4q-shfmt-3.10.0", "default": true } ], - "store_path": "/nix/store/hilj99wvybz2vxh2hz4q1s10dsb5mmzg-shfmt-3.9.0" + "store_path": "/nix/store/a6gfcfnr0sr2av3gyma30wsm2hk7mx4q-shfmt-3.10.0" }, "x86_64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/a2gjm6j03cznwkc7cqpbajr32syxg36w-shfmt-3.9.0", + "path": "/nix/store/b12kmzbam8ydg5lf3gafzywrkr2ghykn-shfmt-3.10.0", "default": true } ], - "store_path": "/nix/store/a2gjm6j03cznwkc7cqpbajr32syxg36w-shfmt-3.9.0" + "store_path": "/nix/store/b12kmzbam8ydg5lf3gafzywrkr2ghykn-shfmt-3.10.0" } } }, "upx@latest": { - "last_modified": "2024-09-12T11:58:09Z", - "resolved": "github:NixOS/nixpkgs/280db3decab4cbeb22a4599bd472229ab74d25e1#upx", + "last_modified": "2024-10-13T23:44:06Z", + "resolved": "github:NixOS/nixpkgs/d4f247e89f6e10120f911e2e2d2254a050d0f732#upx", "source": "devbox-search", "version": "4.2.4", "systems": { @@ -1055,41 +1055,41 @@ "outputs": [ { "name": "out", - "path": "/nix/store/abzf9qzfl90ai77lb1dwf00ibv3b625q-upx-4.2.4", + "path": "/nix/store/y882681awz2xf2mg97rcj5pskw1ak11p-upx-4.2.4", "default": true } ], - "store_path": "/nix/store/abzf9qzfl90ai77lb1dwf00ibv3b625q-upx-4.2.4" + "store_path": "/nix/store/y882681awz2xf2mg97rcj5pskw1ak11p-upx-4.2.4" }, "aarch64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/ccl77p8z0hgbw1wcbzzydspvj9bydgrr-upx-4.2.4", + "path": "/nix/store/frypjm3p8y4a0qhws83jyz13kd5kfj9j-upx-4.2.4", "default": true } ], - "store_path": "/nix/store/ccl77p8z0hgbw1wcbzzydspvj9bydgrr-upx-4.2.4" + "store_path": "/nix/store/frypjm3p8y4a0qhws83jyz13kd5kfj9j-upx-4.2.4" }, "x86_64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/c0khdml9d3b0hcczs0l1326gm3d1s43h-upx-4.2.4", + "path": "/nix/store/pznp9jb8f949khg764lmd1q35ivadk18-upx-4.2.4", "default": true } ], - "store_path": "/nix/store/c0khdml9d3b0hcczs0l1326gm3d1s43h-upx-4.2.4" + "store_path": "/nix/store/pznp9jb8f949khg764lmd1q35ivadk18-upx-4.2.4" }, "x86_64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/yzxqpnykp3xvlskwxxs1bbcsh1lih1nv-upx-4.2.4", + "path": "/nix/store/35i8rwsa1cy3i6bkbfk188rdpxlp6shx-upx-4.2.4", "default": true } ], - "store_path": "/nix/store/yzxqpnykp3xvlskwxxs1bbcsh1lih1nv-upx-4.2.4" + "store_path": "/nix/store/35i8rwsa1cy3i6bkbfk188rdpxlp6shx-upx-4.2.4" } } } diff --git a/docker/registry/registry.go b/docker/registry/registry.go index 2283ecb4..a6cca3e3 100644 --- a/docker/registry/registry.go +++ b/docker/registry/registry.go @@ -6,6 +6,7 @@ package registry import ( "bytes" "context" + "crypto/tls" "errors" "fmt" "math" @@ -17,8 +18,10 @@ import ( "github.com/distribution/distribution/v3/configuration" "github.com/distribution/distribution/v3/registry/handlers" _ "github.com/distribution/distribution/v3/registry/storage/driver/filesystem" + "github.com/go-logr/logr" "github.com/phayes/freeport" "github.com/sirupsen/logrus" + "sigs.k8s.io/controller-runtime/pkg/certwatcher" ) type Config struct { @@ -125,16 +128,14 @@ func NewRegistry(cfg Config) (*Registry, error) { logrus.SetLevel(logrus.FatalLevel) regHandler := handlers.NewApp(context.Background(), registryConfig) - reg := &http.Server{ - Addr: registryConfig.HTTP.Addr, - Handler: regHandler, - ReadHeaderTimeout: 1 * time.Second, - } - return &Registry{ - config: registryConfig, - delegate: reg, - address: registryConfig.HTTP.Addr, + config: registryConfig, + delegate: &http.Server{ + Addr: registryConfig.HTTP.Addr, + Handler: regHandler, + ReadHeaderTimeout: 1 * time.Second, + }, + address: registryConfig.HTTP.Addr, }, nil } @@ -146,10 +147,26 @@ func (r Registry) Shutdown(ctx context.Context) error { return r.delegate.Shutdown(ctx) } -func (r Registry) ListenAndServe() error { +func (r Registry) ListenAndServe(log logr.Logger) error { var err error if r.config.HTTP.TLS.Certificate != "" && r.config.HTTP.TLS.Key != "" { - err = r.delegate.ListenAndServeTLS(r.config.HTTP.TLS.Certificate, r.config.HTTP.TLS.Key) + watcher, cwErr := certwatcher.New(r.config.HTTP.TLS.Certificate, r.config.HTTP.TLS.Key) + if cwErr != nil { + return fmt.Errorf("failed to read TLS certificate or key: %w", cwErr) + } + r.delegate.TLSConfig = &tls.Config{ + GetCertificate: watcher.GetCertificate, + MinVersion: tls.VersionTLS12, + } + go func() { + if startErr := watcher.Start(context.TODO()); startErr != nil { + panic(fmt.Sprintf("certwatcher Start failed: %v", startErr)) + } + }() + + // Certificate and key are not passed to ListenAndServeTLS, because they + // are read from r.delegate.TLSConfig.GetCertificate(). + err = r.delegate.ListenAndServeTLS("", "") } else { err = r.delegate.ListenAndServe() } diff --git a/go.mod b/go.mod index c4a4c313..bac55a6e 100644 --- a/go.mod +++ b/go.mod @@ -22,6 +22,7 @@ require ( github.com/docker/docker-credential-helpers v0.8.2 github.com/docker/go-connections v0.5.0 github.com/elazarl/goproxy v0.0.0-20230731152917-f99041a5c027 + github.com/go-logr/logr v1.4.2 github.com/google/go-containerregistry v0.20.2 github.com/hashicorp/go-getter v1.7.6 github.com/mesosphere/dkp-cli-runtime/core v0.7.3 @@ -41,6 +42,7 @@ require ( k8s.io/apimachinery v0.31.2 k8s.io/klog/v2 v2.130.1 k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 + sigs.k8s.io/controller-runtime v0.19.1 ) require ( @@ -109,10 +111,10 @@ require ( github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect github.com/fatih/color v1.15.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/fxamacker/cbor/v2 v2.7.0 // indirect github.com/go-errors/errors v1.4.2 // indirect github.com/go-gorp/gorp/v3 v3.1.0 // indirect - github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-openapi/jsonpointer v0.21.0 // indirect github.com/go-openapi/jsonreference v0.21.0 // indirect diff --git a/go.sum b/go.sum index ae78c78e..ff03e2a6 100644 --- a/go.sum +++ b/go.sum @@ -406,6 +406,8 @@ github.com/envoyproxy/protoc-gen-validate v1.1.0 h1:tntQDh69XqOCOZsDz0lVJQez/2L6 github.com/envoyproxy/protoc-gen-validate v1.1.0/go.mod h1:sXRDRVmzEbkM7CVcM06s9shE/m23dg3wzjl0UWqJ2q4= github.com/evanphx/json-patch v5.9.0+incompatible h1:fBXyNpNMuTTDdquAq/uisOr2lShz4oaXpDTX2bLe7ls= github.com/evanphx/json-patch v5.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch/v5 v5.9.0 h1:kcBlZQbplgElYIlo/n1hJbls2z/1awpXxpRi0/FOJfg= +github.com/evanphx/json-patch/v5 v5.9.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d h1:105gxyaGwCFad8crR9dcMQWvV9Hvulu6hwUh4tWPJnM= github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= @@ -417,6 +419,8 @@ github.com/foxcpp/go-mockdns v1.1.0 h1:jI0rD8M0wuYAxL7r/ynTrCQQq0BVqfB99Vgk7Dlme github.com/foxcpp/go-mockdns v1.1.0/go.mod h1:IhLeSFGed3mJIAXPH2aiRQB+kqz7oqu8ld2qVbOu7Wk= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -435,6 +439,8 @@ github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= +github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF2+tg1TRrwQ= @@ -899,6 +905,10 @@ go.starlark.net v0.0.0-20230525235612-a134d8f9ddca h1:VdD38733bfYv5tUZwEIskMM93V go.starlark.net v0.0.0-20230525235612-a134d8f9ddca/go.mod h1:jxU+3+j+71eXOW14274+SmmuW82qJzl6iZSeqEtTGds= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= +go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -1201,6 +1211,8 @@ golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +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.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -1481,6 +1493,8 @@ oras.land/oras-go v1.2.5/go.mod h1:PuAwRShRZCsZb7g8Ar3jKKQR/2A/qN+pkYxIOd/FAoo= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/controller-runtime v0.19.1 h1:Son+Q40+Be3QWb+niBXAg2vFiYWolDjjRfO8hn/cxOk= +sigs.k8s.io/controller-runtime v0.19.1/go.mod h1:iRmWllt8IlaLjvTTDLhRBXIEtkCK6hwVBJJsYS9Ajf4= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/kustomize/api v0.17.2 h1:E7/Fjk7V5fboiuijoZHgs4aHuexi5Y2loXlVOAVAG5g= diff --git a/tasks/test.yaml b/tasks/test.yaml index d60646ca..204b5eb5 100644 --- a/tasks/test.yaml +++ b/tasks/test.yaml @@ -81,7 +81,7 @@ tasks: {{if .E2E_FOCUS}}--focus="{{.E2E_FOCUS}}"{{end}} \ {{if .E2E_SKIP}}--skip="{{.E2E_SKIP}}"{{end}} \ {{if .E2E_LABEL}}--label-filter="{{.E2E_LABEL}}"{{end}} \ - {{if .E2E_LE2E_GINKGO_FLAGSABEL}}{{.E2E_GINKGO_FLAGS}}{{end}} \ + {{if .E2E_GINKGO_FLAGS}}{{.E2E_GINKGO_FLAGS}}{{end}} \ --junit-report=junit-e2e.xml \ --json-report=report-e2e.json \ --tags e2e \ diff --git a/test/e2e/helmbundle/helpers/helpers.go b/test/e2e/helmbundle/helpers/helpers.go index e7f1fc0f..05056852 100644 --- a/test/e2e/helmbundle/helpers/helpers.go +++ b/test/e2e/helmbundle/helpers/helpers.go @@ -24,6 +24,7 @@ import ( "github.com/onsi/gomega" "github.com/spf13/cobra" "helm.sh/helm/v3/pkg/action" + ctrllog "sigs.k8s.io/controller-runtime/pkg/log" "github.com/mesosphere/dkp-cli-runtime/core/output" @@ -45,6 +46,7 @@ func NewCommand( newFn func(out output.Output) *cobra.Command, ) *cobra.Command { t.Helper() + ctrllog.SetLogger(ginkgo.GinkgoLogr) cmd := newFn(output.NewNonInteractiveShell(ginkgo.GinkgoWriter, ginkgo.GinkgoWriter, 10)) cmd.SilenceUsage = true return cmd @@ -114,20 +116,26 @@ func GenerateCertificateAndKeyWithIPSAN( gomega.ExpectWithOffset(1, err).NotTo(gomega.HaveOccurred()) caCertFile = filepath.Join(destDir, "ca.crt") - caCertF, err := os.Create(caCertFile) + tmpCACertFile := caCertFile + ".tmp" + caCertF, err := os.Create(tmpCACertFile) gomega.ExpectWithOffset(1, err).NotTo(gomega.HaveOccurred()) defer caCertF.Close() gomega.ExpectWithOffset(1, pem.Encode(caCertF, &pem.Block{Type: "CERTIFICATE", Bytes: caDerBytes})). To(gomega.Succeed()) + gomega.ExpectWithOffset(1, caCertF.Close()).To(gomega.Succeed()) + gomega.ExpectWithOffset(1, os.Rename(tmpCACertFile, caCertFile)).To(gomega.Succeed()) b, err := x509.MarshalECPrivateKey(caPriv) gomega.ExpectWithOffset(1, err).NotTo(gomega.HaveOccurred()) pemBlock := pem.Block{Type: "EC PRIVATE KEY", Bytes: b} caKeyFile = filepath.Join(destDir, "ca.key") - caKeyF, err := os.Create(caKeyFile) + tmpCAKeyFile := caKeyFile + ".tmp" + caKeyF, err := os.Create(tmpCAKeyFile) gomega.ExpectWithOffset(1, err).NotTo(gomega.HaveOccurred()) defer caKeyF.Close() gomega.ExpectWithOffset(1, pem.Encode(caKeyF, &pemBlock)).To(gomega.Succeed()) + gomega.ExpectWithOffset(1, caKeyF.Close()).To(gomega.Succeed()) + gomega.ExpectWithOffset(1, os.Rename(tmpCAKeyFile, caKeyFile)).To(gomega.Succeed()) priv, err := ecdsa.GenerateKey(elliptic.P521(), rand.Reader) gomega.ExpectWithOffset(1, err).NotTo(gomega.HaveOccurred()) @@ -156,26 +164,33 @@ func GenerateCertificateAndKeyWithIPSAN( gomega.ExpectWithOffset(1, err).NotTo(gomega.HaveOccurred()) certFile = filepath.Join(destDir, "tls.crt") - certF, err := os.Create(certFile) + tmpCertFile := certFile + ".tmp" + certF, err := os.Create(tmpCertFile) gomega.ExpectWithOffset(1, err).NotTo(gomega.HaveOccurred()) defer certF.Close() gomega.ExpectWithOffset(1, pem.Encode(certF, &pem.Block{Type: "CERTIFICATE", Bytes: derBytes})). To(gomega.Succeed()) + gomega.ExpectWithOffset(1, certF.Close()).To(gomega.Succeed()) + gomega.ExpectWithOffset(1, os.Rename(tmpCertFile, certFile)).To(gomega.Succeed()) b, err = x509.MarshalECPrivateKey(priv) gomega.ExpectWithOffset(1, err).NotTo(gomega.HaveOccurred()) pemBlock = pem.Block{Type: "EC PRIVATE KEY", Bytes: b} keyFile = filepath.Join(destDir, "tls.key") - keyF, err := os.Create(keyFile) + tmpKeyFile := keyFile + ".tmp" + keyF, err := os.Create(tmpKeyFile) gomega.ExpectWithOffset(1, err).NotTo(gomega.HaveOccurred()) defer keyF.Close() gomega.ExpectWithOffset(1, pem.Encode(keyF, &pemBlock)).To(gomega.Succeed()) + gomega.ExpectWithOffset(1, keyF.Close()).To(gomega.Succeed()) + gomega.ExpectWithOffset(1, os.Rename(tmpKeyFile, keyFile)).To(gomega.Succeed()) return caCertFile, caKeyFile, certFile, keyFile } func ValidateChartIsAvailable( t ginkgo.GinkgoTInterface, + g gomega.Gomega, addr string, port int, chartName, chartVersion string, @@ -196,9 +211,9 @@ func ValidateChartIsAvailable( chartVersion, pullOpts..., ) - gomega.ExpectWithOffset(1, err).NotTo(gomega.HaveOccurred()) + g.ExpectWithOffset(1, err).NotTo(gomega.HaveOccurred()) chrt, err := helm.LoadChart(d) - gomega.ExpectWithOffset(1, err).NotTo(gomega.HaveOccurred()) - gomega.ExpectWithOffset(1, chrt.Metadata.Name).To(gomega.Equal(chartName)) - gomega.ExpectWithOffset(1, chrt.Metadata.Version).To(gomega.Equal(chartVersion)) + g.ExpectWithOffset(1, err).NotTo(gomega.HaveOccurred()) + g.ExpectWithOffset(1, chrt.Metadata.Name).To(gomega.Equal(chartName)) + g.ExpectWithOffset(1, chrt.Metadata.Version).To(gomega.Equal(chartVersion)) } diff --git a/test/e2e/helmbundle/push_bundle_test.go b/test/e2e/helmbundle/push_bundle_test.go index 71fca774..6d4a5621 100644 --- a/test/e2e/helmbundle/push_bundle_test.go +++ b/test/e2e/helmbundle/push_bundle_test.go @@ -8,8 +8,10 @@ package helmbundle_test import ( "context" "fmt" + "log" "path/filepath" + "github.com/go-logr/logr/funcr" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/phayes/freeport" @@ -59,7 +61,13 @@ var _ = Describe("Push Bundle", func() { go func() { defer GinkgoRecover() - Expect(reg.ListenAndServe()).To(Succeed()) + Expect( + reg.ListenAndServe( + funcr.New(func(prefix, args string) { + log.Println(prefix, args) + }, funcr.Options{}), + ), + ).To(Succeed()) close(done) }() @@ -76,6 +84,7 @@ var _ = Describe("Push Bundle", func() { helpers.ValidateChartIsAvailable( GinkgoT(), + Default, "127.0.0.1", port, "podinfo", @@ -85,6 +94,7 @@ var _ = Describe("Push Bundle", func() { helpers.ValidateChartIsAvailable( GinkgoT(), + Default, "127.0.0.1", port, "node-feature-discovery", @@ -130,7 +140,13 @@ var _ = Describe("Push Bundle", func() { go func() { defer GinkgoRecover() - Expect(reg.ListenAndServe()).To(Succeed()) + Expect( + reg.ListenAndServe( + funcr.New(func(prefix, args string) { + log.Println(prefix, args) + }, funcr.Options{}), + ), + ).To(Succeed()) close(done) }() @@ -186,7 +202,13 @@ var _ = Describe("Push Bundle", func() { go func() { defer GinkgoRecover() - Expect(reg.ListenAndServe()).To(Succeed()) + Expect( + reg.ListenAndServe( + funcr.New(func(prefix, args string) { + log.Println(prefix, args) + }, funcr.Options{}), + ), + ).To(Succeed()) close(done) }() diff --git a/test/e2e/helmbundle/serve_bundle_test.go b/test/e2e/helmbundle/serve_bundle_test.go index 70e7eb05..69a4f854 100644 --- a/test/e2e/helmbundle/serve_bundle_test.go +++ b/test/e2e/helmbundle/serve_bundle_test.go @@ -6,9 +6,13 @@ package helmbundle_test import ( + "crypto/x509" + "errors" "fmt" + "os" "path/filepath" "strconv" + "time" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" @@ -68,6 +72,7 @@ var _ = Describe("Serve Helm Bundle", func() { helpers.ValidateChartIsAvailable( GinkgoT(), + Default, "127.0.0.1", port, "podinfo", @@ -77,6 +82,7 @@ var _ = Describe("Serve Helm Bundle", func() { helpers.ValidateChartIsAvailable( GinkgoT(), + Default, "127.0.0.1", port, "node-feature-discovery", @@ -93,7 +99,7 @@ var _ = Describe("Serve Helm Bundle", func() { ipAddr := helpers.GetFirstNonLoopbackIP(GinkgoT()) tempCertDir := GinkgoT().TempDir() - caCertFile, _, certFile, keyFile := helpers.GenerateCertificateAndKeyWithIPSAN( + originalCACertFile, _, certFile, keyFile := helpers.GenerateCertificateAndKeyWithIPSAN( GinkgoT(), tempCertDir, ipAddr, @@ -126,9 +132,50 @@ var _ = Describe("Serve Helm Bundle", func() { helpers.WaitForTCPPort(GinkgoT(), ipAddr.String(), port) - helpers.ValidateChartIsAvailable(GinkgoT(), ipAddr.String(), port, "podinfo", "6.2.0", helm.CAFileOpt(caCertFile)) + // First check that the helm chart is accessible with the old certificate. + helpers.ValidateChartIsAvailable(GinkgoT(), Default, ipAddr.String(), port, "podinfo", "6.2.0", helm.CAFileOpt(originalCACertFile)) - helpers.ValidateChartIsAvailable(GinkgoT(), ipAddr.String(), port, "node-feature-discovery", "0.15.2", helm.CAFileOpt(caCertFile)) + helpers.ValidateChartIsAvailable(GinkgoT(), Default, ipAddr.String(), port, "node-feature-discovery", "0.15.2", helm.CAFileOpt(originalCACertFile)) + + // Backup the original CA file to be used after checking the new CA file works. + // This is to ensure that the server is definitely using the new certificate. + backupDir := GinkgoT().TempDir() + caCertFileName := filepath.Base(originalCACertFile) + Expect(os.Rename(originalCACertFile, filepath.Join(backupDir, caCertFileName))).To(Succeed()) + originalCACertFile = filepath.Join(backupDir, caCertFileName) + + // Create a new certificate. This can happen at any time the server is running, + // and the server is expected to eventually use the new certificate. + // This also generates a new CA file which is even better because we can check + // that the server is using the certificate issued by the new CA. + newCACertFile, _, _, _ := helpers.GenerateCertificateAndKeyWithIPSAN( + GinkgoT(), + tempCertDir, + ipAddr, + ) + + Eventually(func(g Gomega) { + helpers.ValidateChartIsAvailable(GinkgoT(), g, ipAddr.String(), port, "podinfo", "6.2.0", helm.CAFileOpt(newCACertFile)) + + helpers.ValidateChartIsAvailable(GinkgoT(), g, ipAddr.String(), port, "node-feature-discovery", "0.15.2", helm.CAFileOpt(newCACertFile)) + }).WithTimeout(time.Second * 5).WithPolling(time.Second * 1).Should(Succeed()) + + // Now check that the original CA file is now no longer valid, ensuring that the new + // certificate is being used by mindthegap serve. + h, cleanup := helm.NewClient( + output.NewNonInteractiveShell(GinkgoWriter, GinkgoWriter, 10), + ) + DeferCleanup(cleanup) + helmTmpDir := GinkgoT().TempDir() + + _, err = h.GetChartFromRepo( + helmTmpDir, + "", + fmt.Sprintf("%s://%s:%d/charts/%s", helm.OCIScheme, ipAddr.String(), port, "podinfo"), + "6.2.0", + helm.CAFileOpt(originalCACertFile), + ) + Expect(errors.As(err, &x509.UnknownAuthorityError{})).To(BeTrue()) close(stopCh) diff --git a/test/e2e/imagebundle/helpers/helpers.go b/test/e2e/imagebundle/helpers/helpers.go index d817c52d..cd9b48a4 100644 --- a/test/e2e/imagebundle/helpers/helpers.go +++ b/test/e2e/imagebundle/helpers/helpers.go @@ -30,6 +30,7 @@ import ( "github.com/onsi/gomega" "github.com/onsi/gomega/gstruct" "github.com/spf13/cobra" + ctrllog "sigs.k8s.io/controller-runtime/pkg/log" "github.com/mesosphere/dkp-cli-runtime/core/output" @@ -55,6 +56,7 @@ func NewCommand( newFn func(out output.Output) *cobra.Command, ) *cobra.Command { t.Helper() + ctrllog.SetLogger(ginkgo.GinkgoLogr) cmd := newFn(output.NewNonInteractiveShell(ginkgo.GinkgoWriter, ginkgo.GinkgoWriter, 10)) cmd.SilenceUsage = true return cmd diff --git a/test/e2e/imagebundle/push_bundle_test.go b/test/e2e/imagebundle/push_bundle_test.go index 2a5148fa..288dd9e3 100644 --- a/test/e2e/imagebundle/push_bundle_test.go +++ b/test/e2e/imagebundle/push_bundle_test.go @@ -9,6 +9,7 @@ import ( "bytes" "context" "fmt" + "log" "net" "net/http/httptest" "os" @@ -19,6 +20,7 @@ import ( "github.com/docker/cli/cli/config" "github.com/elazarl/goproxy" + "github.com/go-logr/logr/funcr" v1 "github.com/google/go-containerregistry/pkg/v1" "github.com/google/go-containerregistry/pkg/v1/remote" . "github.com/onsi/ginkgo/v2" @@ -88,7 +90,13 @@ var _ = Describe("Push Bundle", func() { go func() { defer GinkgoRecover() - Expect(reg.ListenAndServe()).To(Succeed()) + Expect( + reg.ListenAndServe( + funcr.New(func(prefix, args string) { + log.Println(prefix, args) + }, funcr.Options{}), + ), + ).To(Succeed()) close(done) }() @@ -286,7 +294,13 @@ var _ = Describe("Push Bundle", func() { go func() { defer GinkgoRecover() - Expect(reg.ListenAndServe()).To(Succeed()) + Expect( + reg.ListenAndServe( + funcr.New(func(prefix, args string) { + log.Println(prefix, args) + }, funcr.Options{}), + ), + ).To(Succeed()) close(done) }()