From 45a068d8034ebc9df1e703946aa884fffca70d75 Mon Sep 17 00:00:00 2001 From: Alex Suraci Date: Sun, 9 Oct 2022 10:02:19 -0400 Subject: [PATCH 01/25] dagger runtime --- .gitmodules | 4 + cloak.yaml | 2 + cmd/bass/main.go | 2 +- dagger | 1 + go.mod | 91 ++-- go.sum | 269 ++++----- pkg/runtimes/buildkit.go | 9 +- pkg/runtimes/dagger.go | 249 +++++++++ pkg/runtimes/dagger/.gitattributes | 1 + pkg/runtimes/dagger/api.gen.go | 838 +++++++++++++++++++++++++++++ pkg/runtimes/dagger/workaround.go | 14 + pkg/runtimes/dagger_test.go | 40 ++ 12 files changed, 1346 insertions(+), 174 deletions(-) create mode 100644 cloak.yaml create mode 160000 dagger create mode 100644 pkg/runtimes/dagger.go create mode 100644 pkg/runtimes/dagger/.gitattributes create mode 100644 pkg/runtimes/dagger/api.gen.go create mode 100644 pkg/runtimes/dagger/workaround.go create mode 100644 pkg/runtimes/dagger_test.go diff --git a/.gitmodules b/.gitmodules index 57680b3f..0eeb2516 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,7 @@ [submodule "lsp/testdata/bundle/nvim-lspconfig"] path = pkg/lsp/testdata/bundle/nvim-lspconfig url = https://github.com/neovim/nvim-lspconfig +[submodule "dagger"] + path = dagger + url = https://github.com/vito/dagger + branch = with-qb diff --git a/cloak.yaml b/cloak.yaml new file mode 100644 index 00000000..00f737a3 --- /dev/null +++ b/cloak.yaml @@ -0,0 +1,2 @@ +name: bass +extensions: diff --git a/cmd/bass/main.go b/cmd/bass/main.go index 0f98fe23..155c5dda 100644 --- a/cmd/bass/main.go +++ b/cmd/bass/main.go @@ -102,7 +102,7 @@ var DefaultConfig = bass.Config{ Runtimes: []bass.RuntimeConfig{ { Platform: bass.LinuxPlatform, - Runtime: runtimes.BuildkitName, + Runtime: runtimes.DaggerName, }, }, } diff --git a/dagger b/dagger new file mode 160000 index 00000000..1ed36c50 --- /dev/null +++ b/dagger @@ -0,0 +1 @@ +Subproject commit 1ed36c5000816a94403d61a88e3d234dc3bbeef6 diff --git a/go.mod b/go.mod index 74ff8f34..c57f1edd 100644 --- a/go.mod +++ b/go.mod @@ -3,29 +3,31 @@ module github.com/vito/bass go 1.18 require ( + github.com/Khan/genqlient v0.5.0 github.com/adrg/xdg v0.4.0 github.com/agext/levenshtein v1.2.3 github.com/ajstarks/svgo v0.0.0-20210406150507-75cfd577ce75 github.com/alecthomas/chroma v0.9.2 github.com/c-bata/go-prompt v0.2.6 - github.com/cenkalti/backoff/v4 v4.1.2 - github.com/containerd/containerd v1.6.6 + github.com/cenkalti/backoff/v4 v4.1.3 + github.com/containerd/containerd v1.6.8 + github.com/docker/cli v20.10.17+incompatible github.com/docker/distribution v2.8.1+incompatible - github.com/docker/docker v20.10.7+incompatible + github.com/docker/docker v20.10.18+incompatible github.com/gertd/go-pluralize v0.1.7 github.com/gofrs/flock v0.8.1 - github.com/google/go-cmp v0.5.7 + github.com/google/go-cmp v0.5.8 github.com/hashicorp/go-multierror v1.1.1 github.com/jonboulle/clockwork v0.2.2 github.com/mattn/go-colorable v0.1.12 github.com/mattn/go-isatty v0.0.14 github.com/mattn/go-unicodeclass v0.0.1 - github.com/moby/buildkit v0.10.1-0.20220826012947-46c8b9ee45d0 + github.com/moby/buildkit v0.10.1-0.20221007224755-f394afc591a5 github.com/moby/sys/mountinfo v0.6.2 github.com/morikuni/aec v1.0.0 github.com/neovim/go-client v1.2.2-0.20220118223211-7c85d516f28c github.com/opencontainers/go-digest v1.0.0 - github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 + github.com/opencontainers/image-spec v1.0.3-0.20220303224323-02efb9a75ee1 github.com/opencontainers/umoci v0.4.7 github.com/pkg/errors v0.9.1 github.com/protocolbuffers/txtpbfmt v0.0.0-20220608084003-fc78c767cd6a @@ -44,14 +46,15 @@ require ( github.com/vito/vt100 v0.0.0-20220721174540-1f9a7c0f76a9 github.com/zeebo/xxh3 v1.0.2 github.com/zmb3/spotify/v2 v2.2.1 - go.opentelemetry.io/otel v1.4.1 + go.dagger.io/dagger v0.0.0-00010101000000-000000000000 + go.opentelemetry.io/otel v1.10.0 go.uber.org/zap v1.19.1 - golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e - golang.org/x/sync v0.0.0-20210220032951-036812b2e83c - golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a - golang.org/x/term v0.0.0-20220411215600-e5f449aeb171 - google.golang.org/grpc v1.47.0 - google.golang.org/protobuf v1.27.1 + golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa + golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 + golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab + golang.org/x/term v0.0.0-20220722155259-a9ba230a4035 + google.golang.org/grpc v1.49.0 + google.golang.org/protobuf v1.28.1 ) require ( @@ -60,42 +63,50 @@ require ( github.com/AdamKorcz/go-fuzz-headers v0.0.0-20210312213058-32f4d319f0d2 // indirect github.com/Microsoft/go-winio v0.5.2 // indirect github.com/apex/log v1.4.0 // indirect + github.com/bhoriuchi/graphql-go-tools v1.0.0 // indirect github.com/charmbracelet/bubbles v0.13.0 // indirect github.com/charmbracelet/bubbletea v0.22.0 // indirect github.com/charmbracelet/lipgloss v0.5.0 // indirect github.com/containerd/console v1.0.3 // indirect github.com/containerd/continuity v0.3.0 // indirect github.com/containerd/go-runc v1.0.0 // indirect + github.com/containerd/ttrpc v1.1.0 // indirect github.com/containerd/typeurl v1.0.2 // indirect github.com/creack/pty v1.1.11 // indirect github.com/cyphar/filepath-securejoin v0.2.3 // indirect github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 // indirect github.com/dlclark/regexp2 v1.4.0 // indirect - github.com/docker/cli v20.10.17+incompatible // indirect github.com/docker/docker-credential-helpers v0.6.4 // indirect + github.com/docker/go-connections v0.4.0 // indirect + github.com/docker/go-units v0.5.0 // indirect github.com/fogleman/ease v0.0.0-20170301025033-8da417bf1776 // indirect github.com/go-bindata/go-bindata v3.1.2+incompatible // indirect - github.com/go-logr/logr v1.2.2 // indirect + github.com/go-logr/logr v1.2.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b // indirect + github.com/golang/glog v1.0.0 // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect - github.com/gorilla/websocket v1.4.2 // indirect + github.com/graphql-go/graphql v0.8.0 // indirect + github.com/graphql-go/handler v0.2.3 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect - github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.2 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect + github.com/iancoleman/strcase v0.2.0 // indirect github.com/jessevdk/go-flags v1.4.0 // indirect - github.com/klauspost/compress v1.15.7 // indirect + github.com/klauspost/compress v1.15.9 // indirect github.com/klauspost/cpuid/v2 v2.0.9 // indirect github.com/klauspost/pgzip v1.2.4 // indirect github.com/lucasb-eyer/go-colorful v1.2.0 // indirect github.com/mattn/go-runewidth v0.0.13 // indirect github.com/mattn/go-tty v0.0.3 // indirect + github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-wordwrap v1.0.1 // indirect github.com/mna/pigeon v1.0.1-0.20200224192238-18953b277063 // indirect - github.com/moby/sys/signal v0.6.0 // indirect + github.com/moby/locker v1.0.1 // indirect + github.com/moby/patternmatcher v0.5.0 // indirect + github.com/moby/sys/signal v0.7.0 // indirect github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b // indirect github.com/muesli/cancelreader v0.2.1 // indirect github.com/muesli/reflow v0.3.0 // indirect @@ -106,33 +117,39 @@ require ( github.com/pkg/term v1.2.0-beta.2 // indirect github.com/rivo/uniseg v0.2.0 // indirect github.com/rootless-containers/proto v0.1.0 // indirect - github.com/sergi/go-diff v1.1.0 // indirect - github.com/sirupsen/logrus v1.8.1 // indirect - github.com/tonistiigi/fsutil v0.0.0-20220510150904-0dbf3a8a7d58 // indirect + github.com/rs/zerolog v1.28.0 // indirect + github.com/sirupsen/logrus v1.9.0 // indirect + github.com/tonistiigi/fsutil v0.0.0-20220930225714-4638ad635be5 // indirect github.com/tonistiigi/vt100 v0.0.0-20210615222946-8066bb97264f // indirect github.com/vbatts/go-mtree v0.5.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.4.1 // indirect - go.opentelemetry.io/otel/sdk v1.4.1 // indirect - go.opentelemetry.io/otel/trace v1.4.1 // indirect - go.opentelemetry.io/proto/otlp v0.12.0 // indirect + github.com/vektah/gqlparser/v2 v2.5.1 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.34.0 // indirect + go.opentelemetry.io/otel/exporters/jaeger v1.4.1 // indirect + go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.9.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.9.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.9.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.9.0 // indirect + go.opentelemetry.io/otel/sdk v1.9.0 // indirect + go.opentelemetry.io/otel/trace v1.10.0 // indirect + go.opentelemetry.io/proto/otlp v0.18.0 // indirect go.step.sm/crypto v0.16.2 // indirect go.uber.org/atomic v1.7.0 // indirect - go.uber.org/goleak v1.1.12 // indirect go.uber.org/multierr v1.6.0 // indirect - golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect - golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect - golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect + golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect + golang.org/x/net v0.0.0-20220906165146-f3363e06e74c // indirect + golang.org/x/oauth2 v0.0.0-20220722155238-128564f6959c // indirect golang.org/x/text v0.3.7 // indirect - golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect - golang.org/x/tools v0.1.10 // indirect - golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect + golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 // indirect + golang.org/x/tools v0.1.12 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6 // indirect + google.golang.org/genproto v0.0.0-20220810155839-1856144b1d9c // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect ) +replace go.dagger.io/dagger => ./dagger + // BEGIN SYNC buildkit -replace github.com/docker/docker => github.com/docker/docker v20.10.3-0.20220414164044-61404de7df1a+incompatible +replace github.com/docker/docker => github.com/docker/docker v20.10.3-0.20221006005007-99aa9bb766b5+incompatible // 22.06 branch (v22.06-dev) // END SYNC diff --git a/go.sum b/go.sum index 1b3a4eb9..3e2575e4 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,3 @@ -bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= @@ -40,21 +39,28 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.0.0-rc.1 h1:m0VOOB23frXZvAOK44usCgLWvtsxIoMCTBGJZlpmGfU= filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= +github.com/99designs/gqlgen v0.17.2/go.mod h1:K5fzLKwtph+FFgh9j7nFbRUdBKvTcGnsta51fsMTn3o= github.com/AdamKorcz/go-fuzz-headers v0.0.0-20210312213058-32f4d319f0d2 h1:dIxAd7URQa+ovSiQURY3UJu8Q7A2dG7QKTlxOlvDZHI= github.com/AdamKorcz/go-fuzz-headers v0.0.0-20210312213058-32f4d319f0d2/go.mod h1:VPevheIvXETHZT/ddjwarP3POR5p/cnH9Hy5yoFnQjc= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/Khan/genqlient v0.5.0 h1:TMZJ+tl/BpbmGyIBiXzKzUftDhw4ZWxQZ+1ydn0gyII= +github.com/Khan/genqlient v0.5.0/go.mod h1:EpIvDVXYm01GP6AXzjA7dKriPTH6GmtpmvTAwUUqIX8= github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/Masterminds/sprig/v3 v3.2.2/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk= github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= -github.com/Microsoft/hcsshim v0.9.3 h1:k371PzBuRrz2b+ebGuI2nVgVhgsVX60jMfSw80NECxo= +github.com/Microsoft/hcsshim v0.9.4 h1:mnUj0ivWy6UzbB1uLFqKR6F+ZyiDc7j4iGgHTpO+5+I= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/adrg/xdg v0.4.0 h1:RzRqFcjH4nE5C6oTAxhBtoE2IRyjBSa62SCbyPidvls= github.com/adrg/xdg v0.4.0/go.mod h1:N6ag73EX4wyxeaoeHctc1mas01KZgsj5tYiAIwqJE/E= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= +github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= +github.com/agnivade/levenshtein v1.1.0/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= +github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8= +github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= github.com/ajstarks/svgo v0.0.0-20210406150507-75cfd577ce75 h1:tuK1xIp+jrEEF0l3xXab78w89ilYr0Am170KdSml2xc= github.com/ajstarks/svgo v0.0.0-20210406150507-75cfd577ce75/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38 h1:smF2tmSOzy2Mm+0dGI2AIUHY+w0BUc+4tn40djz7+6U= @@ -68,26 +74,29 @@ github.com/alecthomas/kong v0.2.4/go.mod h1:kQOmtJgV+Lb4aj+I2LEn40cbtawdWJ9Y8QLq github.com/alecthomas/repr v0.0.0-20180818092828-117648cd9897/go.mod h1:xTS7Pm1pD1mvyM075QCDSRqH6qRLXylzS24ZTpRiSzQ= github.com/alecthomas/repr v0.0.0-20181024024818-d37bc2a10ba1 h1:GDQdwm/gAcJcLAKQQZGOJ4knlw+7rfEQQcmwTbt4p5E= github.com/alecthomas/repr v0.0.0-20181024024818-d37bc2a10ba1/go.mod h1:xTS7Pm1pD1mvyM075QCDSRqH6qRLXylzS24ZTpRiSzQ= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alexflint/go-arg v1.4.2/go.mod h1:9iRbDxne7LcR/GSvEr7ma++GLpdIU1zrghf2y2768kM= +github.com/alexflint/go-scalar v1.0.0/go.mod h1:GpHzbCOZXEKMEcygYQ5n/aa4Aq84zbxjy3MxYW0gjYw= +github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= +github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apex/log v1.4.0 h1:jYWeNt9kWJOf1ifht8UjsCQ00eiPnFrUzCBCiiJMw/g= github.com/apex/log v1.4.0/go.mod h1:UMNC4vQNC7hb5gyr47r18ylK1n34rV7GO+gb0wpXvcE= github.com/apex/logs v0.0.7/go.mod h1:XzxuLZ5myVHDy9SAmYpamKKRNApGj54PfYLcFrXqDwo= github.com/aphistic/golf v0.0.0-20180712155816-02c07f170c5a/go.mod h1:3NqKYiepwy8kCu4PNA+aP7WUV72eXWJeP9/r3/K9aLE= github.com/aphistic/sweet v0.2.0/go.mod h1:fWDlIh/isSE9n6EPsRmC0det+whmX6dJid3stzu0Xys= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE= github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= github.com/aws/aws-sdk-go v1.20.6/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/bhoriuchi/graphql-go-tools v1.0.0 h1:viibVf33DxOzyIgO1elJHCcoVbGwlU3Ua8Mc3phsvKU= +github.com/bhoriuchi/graphql-go-tools v1.0.0/go.mod h1:4HQhkpeopRlpAn7DDBseb/Cw+7w+7D2psWAxDuTDkIY= +github.com/bradleyjkemp/cupaloy/v2 v2.6.0/go.mod h1:bm7JXdkRd4BHJk9HpwqAI8BoAY1lps46Enkdqw6aRX0= github.com/c-bata/go-prompt v0.2.6 h1:POP+nrHE+DfLYx370bedwNhsqmpCUynWPxuHi0C5vZI= github.com/c-bata/go-prompt v0.2.6/go.mod h1:/LMAke8wD2FsNu9EXNdHxNLbd9MedkPnCdfpU9wwHfY= -github.com/cenkalti/backoff/v4 v4.1.2 h1:6Yo7N8UP2K6LWZnW94DLVSSrbobcWdVzAYOisuDPIFo= -github.com/cenkalti/backoff/v4 v4.1.2/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= +github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -109,33 +118,30 @@ github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGX github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/containerd/cgroups v1.0.3 h1:ADZftAkglvCiD44c77s5YmMqaP2pzVCFZvBmAlBdAP4= github.com/containerd/console v1.0.1/go.mod h1:XUsP6YE/mKtz6bxc+I8UiKKTP04qjQL4qcS3XoQ5xkw= github.com/containerd/console v1.0.3 h1:lIr7SlA5PxZyMV30bDW0MGbiOPXwc63yRuCP0ARubLw= github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= -github.com/containerd/containerd v1.6.6 h1:xJNPhbrmz8xAMDNoVjHy9YHtWwEQNS+CDkcIRh7t8Y0= -github.com/containerd/containerd v1.6.6/go.mod h1:ZoP1geJldzCVY3Tonoz7b1IXk8rIX0Nltt5QE4OMNk0= -github.com/containerd/continuity v0.1.0/go.mod h1:ICJu0PwR54nI0yPEnJ6jcS+J7CZAUXrLh8lPo2knzsM= +github.com/containerd/containerd v1.6.8 h1:h4dOFDwzHmqFEP754PgfgTeVXFnLiRc6kiqC7tplDJs= +github.com/containerd/containerd v1.6.8/go.mod h1:By6p5KqPK0/7/CgO/A6t/Gz+CUYUu2zf1hUaaymVXB0= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/containerd/fifo v1.0.0 h1:6PirWBr9/L7GDamKr+XM0IeUFXu5mf3M/BPpH9gaLBU= github.com/containerd/go-runc v1.0.0 h1:oU+lLv1ULm5taqgV/CJivypVODI4SUz1znWjv3nNYS0= github.com/containerd/go-runc v1.0.0/go.mod h1:cNU0ZbCgCQVZK4lgG3P+9tn9/PaJNmoDXPpoJhDR+Ok= github.com/containerd/ttrpc v1.1.0 h1:GbtyLRxb0gOLR0TYQWt3O6B0NvT8tMdorEHqIQo/lWI= +github.com/containerd/ttrpc v1.1.0/go.mod h1:XX4ZTnoOId4HklF4edwc4DcqskFZuvXB1Evzy5KFQpQ= github.com/containerd/typeurl v1.0.2 h1:Chlt8zIieDbzQFzXzAeBEF92KhExuE4p9p92/QmY7aY= github.com/containerd/typeurl v1.0.2/go.mod h1:9trJWW2sRlGub4wZJRTW83VtbOLS6hwcDZXTn6oPz9s= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= @@ -149,8 +155,7 @@ github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964/go.mod h1:Xd9 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= github.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/dlclark/regexp2 v1.4.0 h1:F1rxgk7p4uKjwIQxBs9oAXe5CqrXlCduYEJvrF4u93E= github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= @@ -158,22 +163,23 @@ github.com/docker/cli v20.10.17+incompatible h1:eO2KS7ZFeov5UJeaDmIs1NFEDRf32Paq github.com/docker/cli v20.10.17+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v20.10.3-0.20220414164044-61404de7df1a+incompatible h1:jnhU41Zm9biz6e4GPOvAtuognZ+pi8S77ZlRir/SHRA= -github.com/docker/docker v20.10.3-0.20220414164044-61404de7df1a+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.3-0.20221006005007-99aa9bb766b5+incompatible h1:lEs5c8XzubP5AhOcbuEljKeqNmszBORctR3BbHsTOuw= +github.com/docker/docker v20.10.3-0.20221006005007-99aa9bb766b5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.6.4 h1:axCks+yV+2MR3/kZhAmy07yC56WZ2Pwu/fKWtKuZB0o= github.com/docker/docker-credential-helpers v0.6.4/go.mod h1:ofX3UI0Gz1TteYBjtgs07O36Pyasyp66D2uKT7H8W1c= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c h1:+pKlWGMw7gf6bQ+oDZB4KHQFypsfjYlq/C4rfL7D3g8= -github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= -github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= @@ -191,12 +197,11 @@ github.com/go-bindata/go-bindata v3.1.2+incompatible/go.mod h1:xK8Dsgwmeed+BBsSy github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logr/logr v1.2.2 h1:ahHml/yUpnlb96Rp8HCvtYVPY8ZYpxq3g7UYchIYwbs= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= +github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= 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-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= @@ -207,13 +212,11 @@ github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= +github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -258,8 +261,9 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -284,17 +288,19 @@ github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/graphql-go/graphql v0.8.0 h1:JHRQMeQjofwqVvGwYnr8JnPTY0AxgVy1HpHSGPLdH0I= +github.com/graphql-go/graphql v0.8.0/go.mod h1:nKiHzRM0qopJEwCITUuIsxk9PlVlwIiiI8pnJEhordQ= +github.com/graphql-go/handler v0.2.3 h1:CANh8WPnl5M9uA25c2GBhPqJhE53Fg0Iue/fRNla71E= +github.com/graphql-go/handler v0.2.3/go.mod h1:leLF6RpV5uZMN1CdImAxuiayrYYhOk33bZciaUGaXeU= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.2 h1:BqHID5W5qnMkug0Z8UmL8tN0gAy4jQ+B4WFt8cCgluU= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.2/go.mod h1:ZbS3MZTZq/apAfAEHGoB5HbsQQstoqP92SjAqtQ9zeg= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -302,32 +308,30 @@ github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+l github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= +github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= +github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/in-toto/in-toto-golang v0.3.3 h1:tkkEBU5i09UEeWKnrp6Rq4fXKAfpVXYMLRO5mDfnb3I= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGARJA= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.2.2 h1:UOGuzwb1PwsrDAObMuhUnj0p5ULPj8V/xJ7Kx9qUBdQ= github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/jpillora/backoff v0.0.0-20180909062703-3050d21c67d7/go.mod h1:2iMrUgbbvHEiQClaW2NsSzMyGHqN+rDFqY705q49KG0= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kevinmbeaulieu/eq-go v1.0.0/go.mod h1:G3S8ajA56gKBZm4UB9AOyoOS37JO3roToPzKNM8dtdM= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.11.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.15.7 h1:7cgTQxJCU/vy+oP/E3B9RGbQTgbiVzIJWIKOLoAsPok= -github.com/klauspost/compress v1.15.7/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= +github.com/klauspost/compress v1.15.9 h1:wKRjX6JRtDdrE9qwa4b/Cip7ACOshUI4smpCQanqjSY= +github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/pgzip v1.2.4 h1:TQ7CNpYKovDOmqzRHKxJh0BeaBI7UdQZYc6p7pMQh1A= @@ -347,9 +351,10 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/logrusorgru/aurora/v3 v3.0.0/go.mod h1:vsR12bk5grlLvLXAYrBsb5Oc/N+LxAlxggSjiwMnCUc= github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/matryer/moq v0.2.3/go.mod h1:9RtPYjTnH1bSBIkpvtHkFN7nbWAnO7oRpdJkEIn6UtE= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= @@ -374,26 +379,29 @@ github.com/mattn/go-tty v0.0.3 h1:5OfyWorkyO7xP52Mq7tB36ajHDG5OHrmBGIS/DtakQI= github.com/mattn/go-tty v0.0.3/go.mod h1:ihxohKRERHTVzN+aSVRwACLCeqIoZAWpoICkkvrWyR0= github.com/mattn/go-unicodeclass v0.0.1 h1:BKdh58FOa0n4QRd39jSeVEF7ncxxV3l4GL05LxZu+XA= github.com/mattn/go-unicodeclass v0.0.1/go.mod h1:dDCkCgOKUwD3sYX4N+tVQdFh/xlFQ1+cWakbQzy98T8= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.2.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mna/pigeon v1.0.1-0.20200224192238-18953b277063 h1:V7s6vhIrNeOqocziAmRoVJh6gnPPx83ovlpT7Hf5shI= github.com/mna/pigeon v1.0.1-0.20200224192238-18953b277063/go.mod h1:rkFeDZ0gc+YbnrXPw0q2RlI0QRuKBBPu67fgYIyGRNg= -github.com/moby/buildkit v0.10.1-0.20220826012947-46c8b9ee45d0 h1:LCGBQM8P/GrQ41zFuLg10ey20n0ZEPquYBxZ/LkM09U= -github.com/moby/buildkit v0.10.1-0.20220826012947-46c8b9ee45d0/go.mod h1:g7HO1tvhm/frAzTc9tjPUPkQefHWxdGAqz2hscGrOyo= +github.com/moby/buildkit v0.10.1-0.20221007224755-f394afc591a5 h1:LQqevgcYPoy2Z8Q5mjfQD44ffIXVHH88xcMDsSiZ3aY= +github.com/moby/buildkit v0.10.1-0.20221007224755-f394afc591a5/go.mod h1:bnzHh/di+tPWrUsvHJf0b+GzHZgRdoDOCkRCgNxtMa8= github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg= +github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= +github.com/moby/patternmatcher v0.5.0 h1:YCZgJOeULcxLw1Q+sVR636pmS7sPEn1Qo2iAN6M7DBo= +github.com/moby/patternmatcher v0.5.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= 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/signal v0.6.0 h1:aDpY94H8VlhTGa9sNYUFCFsMZIUh5wm0B6XkIoJj/iY= -github.com/moby/sys/signal v0.6.0/go.mod h1:GQ6ObYZfqacOwTtlXvcmh9A26dVRul/hbOZn88Kg8Tg= +github.com/moby/sys/signal v0.7.0 h1:25RW3d5TnQEoKvRbEKUGay6DCQ46IxAVTT9CUMgmsSI= +github.com/moby/sys/signal v0.7.0/go.mod h1:GQ6ObYZfqacOwTtlXvcmh9A26dVRul/hbOZn88Kg8Tg= github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw= github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= @@ -410,14 +418,12 @@ github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKt github.com/muesli/termenv v0.11.1-0.20220204035834-5ac8409525e0/go.mod h1:Bd5NYQ7pd+SrtBSrSNoBBmXlcY8+Xj4BMJgh8qcZrvs= github.com/muesli/termenv v0.11.1-0.20220212125758-44cd13922739 h1:QANkGiGr39l1EESqrE0gZw0/AJNYzIvoGLhIoVYtluI= github.com/muesli/termenv v0.11.1-0.20220212125758-44cd13922739/go.mod h1:Bd5NYQ7pd+SrtBSrSNoBBmXlcY8+Xj4BMJgh8qcZrvs= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/neovim/go-client v1.2.2-0.20220118223211-7c85d516f28c h1:RZWK1awelvqT/WjxL/ews3cvVuG4et4WGmICXO1g2sk= github.com/neovim/go-client v1.2.2-0.20220118223211-7c85d516f28c/go.mod h1:EeqCP3z1vJd70JTaH/KXz9RMZ/nIgEFveX83hYnh/7c= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1lskyM0= @@ -434,8 +440,8 @@ github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9 github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 h1:rc3tiVYb5z54aKaDfakKn0dDjIyPpTtszkjuMzyt7ec= -github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/image-spec v1.0.3-0.20220303224323-02efb9a75ee1 h1:9iFHD5Kt9hkOfeawBNiEeEaV7bmC4/Z5wJp8E9BptMs= +github.com/opencontainers/image-spec v1.0.3-0.20220303224323-02efb9a75ee1/go.mod h1:K/JAU0m27RFhDRX4PcFdIKntROP6y5Ed6O91aZYDQfs= github.com/opencontainers/runc v1.0.0-rc90/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= @@ -443,14 +449,13 @@ github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/ github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417 h1:3snG66yBm59tKhhSPQrQ/0bCrv1LQbKt40LnUPiUxdc= github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= -github.com/opencontainers/selinux v1.10.1 h1:09LIPVRP3uuZGQvgR+SgMSNBd1Eb3vlRbGqQpoHsF8w= +github.com/opencontainers/selinux v1.10.2 h1:NFy2xCsjn7+WspbfZkUd5zyVeisV7VFbPSP96+8/ha4= github.com/opencontainers/umoci v0.4.7 h1:mbIbtMpZ3v9oMpKaLopnWoLykgmnixeLzq51EzAX5nQ= github.com/opencontainers/umoci v0.4.7/go.mod h1:lgJ4bnwJezsN1o/5d7t/xdRPvmf8TvBko5kKYJsYvgo= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/package-url/packageurl-go v0.1.0 h1:efWBc98O/dBZRg1pw2xiDzovnlMjCa9NPnfaiBduh8I= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -458,16 +463,9 @@ github.com/pkg/term v1.2.0-beta.2 h1:L3y/h2jkuBVFdWiJvNfYfKmzcCnILw7mJWm2JQuMppw github.com/pkg/term v1.2.0-beta.2/go.mod h1:E25nymQcrSllhX42Ok8MRm1+hyBdHY0dCeiKZ9jpNGw= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= github.com/protocolbuffers/txtpbfmt v0.0.0-20220608084003-fc78c767cd6a h1:AKJY61V2SQtJ2a2PdeswKk0NM1qF77X+julRNYRxPOk= github.com/protocolbuffers/txtpbfmt v0.0.0-20220608084003-fc78c767cd6a/go.mod h1:KjY0wibdYKc4DYkerHSbguaf3JeIPGhNJBp2BNiFH78= github.com/psanford/memfs v0.0.0-20210214183328-a001468d78ef h1:NKxTG6GVGbfMXc2mIk+KphcH6hagbVXhcFkbTgYleTI= @@ -475,13 +473,17 @@ github.com/psanford/memfs v0.0.0-20210214183328-a001468d78ef/go.mod h1:tcaRap0jS github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.1.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rootless-containers/proto v0.1.0 h1:gS1JOMEtk1YDYHCzBAf/url+olMJbac7MTrgSeP6zh4= github.com/rootless-containers/proto v0.1.0/go.mod h1:vgkUFZbQd0gcE/K/ZwtE4MYjZPu0UNHLXIQxhyqAFh8= +github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.28.0 h1:MirSo27VyNi7RJYP3078AA1+Cyzd2GB66qy3aUHvsWY= +github.com/rs/zerolog v1.28.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6usyD0= +github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sahilm/fuzzy v0.1.0/go.mod h1:VFvziUEIMCrT6A6tw2RFIXPXXmzXbOsSHF0DOI8ZK9Y= github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw= github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= @@ -493,45 +495,39 @@ github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNX github.com/shibumi/go-pathspec v1.2.0 h1:KVKEDHYk7bQolRMs7nfzjT3SBOCgcXFJzccnj9bsGbA= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.3.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smallstep/assert v0.0.0-20200723003110-82e2b9b3b262 h1:unQFBIznI+VYD1/1fApl1A+9VcBk+9dcqGfnePY87LY= github.com/smallstep/assert v0.0.0-20200723003110-82e2b9b3b262/go.mod h1:MyOHs9Po2fbM1LHej6sBUT8ozbxmMOFG+E+rx/GSGuc= github.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM= github.com/smartystreets/gunit v1.0.0/go.mod h1:qwPWnhz6pn0NnRBP++URONOVyNkPyr4SauJk4cUOwJs= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sourcegraph/jsonrpc2 v0.1.0 h1:ohJHjZ+PcaLxDUjqk2NC3tIGsVa5bXThe1ZheSXOjuk= github.com/sourcegraph/jsonrpc2 v0.1.0/go.mod h1:ZafdZgk/axhT1cvZAPOhw+95nz2I/Ra5qMlU4gTRwIo= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spy16/slurp v0.2.3 h1:NZGZ3MEyd0IUlnauMiGcTJe0DfpE4BVe3SMfdFvdwNU= github.com/spy16/slurp v0.2.3/go.mod h1:Omrszh5Bznh+fhYrxnR4R2XrRKRelPlbY5IwQizOui0= github.com/square/certstrap v1.3.0 h1:N9P0ZRA+DjT8pq5fGDj0z3FjafRKnBDypP0QHpMlaAk= github.com/square/certstrap v1.3.0/go.mod h1:wGZo9eE1B7WX2GKBn0htJ+B3OuRl2UsdCFySNooy9hU= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/tj/assert v0.0.0-20171129193455-018094318fb0/go.mod h1:mZ9/Rh9oLWpLLDRpvE+3b7gP/C2YyLFYxNmcLnPTMe0= github.com/tj/assert v0.0.3 h1:Df/BlaZ20mq6kuai7f5z2TvPFiwC3xaWJSDQNiIS3Rk= @@ -539,18 +535,21 @@ github.com/tj/assert v0.0.3/go.mod h1:Ne6X72Q+TB1AteidzQncjw9PabbMp4PBMZ1k+vd1Pv github.com/tj/go-elastic v0.0.0-20171221160941-36157cbbebc2/go.mod h1:WjeM0Oo1eNAjXGDx2yma7uG2XoyRZTq1uv3M/o7imD0= github.com/tj/go-kinesis v0.0.0-20171128231115-08b17f58cb1b/go.mod h1:/yhzCV0xPfx6jb1bBgRFjl5lytqVqZXEaeqWP8lTEao= github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tonistiigi/fsutil v0.0.0-20220510150904-0dbf3a8a7d58 h1:rNya5ozLqz0lK46XhmsmqJuxmQLM8dAWabiT+5gZqLY= -github.com/tonistiigi/fsutil v0.0.0-20220510150904-0dbf3a8a7d58/go.mod h1:oPAfvw32vlUJSjyDcQ3Bu0nb2ON2B+G0dtVN/SZNJiA= +github.com/tonistiigi/fsutil v0.0.0-20220930225714-4638ad635be5 h1:NJ1nZs4j4XcBJKIY5sAwTGp9w5b78Zxr3+r0zXRuKnA= +github.com/tonistiigi/fsutil v0.0.0-20220930225714-4638ad635be5/go.mod h1:F83XRhNblQsKQH9hcKEE45GAOkL9590mtw9KsD0Q4fE= github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea h1:SXhTLE6pb6eld/v/cCndK0AMpt1wiVFb/YYmqB3/QG0= github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea/go.mod h1:WPnis/6cRcDZSUvVmezrxJPkiO87ThFYsoUiMwWNDJk= github.com/tonistiigi/vt100 v0.0.0-20210615222946-8066bb97264f h1:DLpt6B5oaaS8jyXHa9VA4rrZloBVPVXeCtrOsrFauxc= github.com/tonistiigi/vt100 v0.0.0-20210615222946-8066bb97264f/go.mod h1:ulncasL3N9uLrVann0m+CDlJKWsIAP34MPcOJF6VRvc= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.4/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= github.com/vbatts/go-mtree v0.5.0 h1:dM+5XZdqH0j9CSZeerhoN/tAySdwnmevaZHO1XGW2Vc= github.com/vbatts/go-mtree v0.5.0/go.mod h1:7JbaNHyBMng+RP8C3Q4E+4Ca8JnGQA2R/MB+jb4tSOk= +github.com/vektah/gqlparser/v2 v2.4.0/go.mod h1:flJWIR04IMQPGz+BXLrORkrARBxv/rtyIAFvd/MceW0= +github.com/vektah/gqlparser/v2 v2.4.5/go.mod h1:flJWIR04IMQPGz+BXLrORkrARBxv/rtyIAFvd/MceW0= +github.com/vektah/gqlparser/v2 v2.5.1 h1:ZGu+bquAY23jsxDRcYpWjttRZrUz07LbiY77gUOHcr4= +github.com/vektah/gqlparser/v2 v2.5.1/go.mod h1:mPgqFBu/woKTVYWyNk8cO3kh4S/f4aRFZrvOnp3hmCs= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= github.com/vito/booklit v0.12.2-0.20220630023834-33787382be72 h1:sq7HcTdViwIlK4dpfCq1YSVt2FFgqdSdlxDpJ3SgTGg= @@ -565,8 +564,9 @@ github.com/vito/progrock v0.0.0-20220724152603-739ff265774e h1:8DEDY1kIeCoDW5OZ6 github.com/vito/progrock v0.0.0-20220724152603-739ff265774e/go.mod h1:VAbfE0Xv/I1WKC5IGb0EESyGCEYOtz7mkhEeo4yp+80= github.com/vito/vt100 v0.0.0-20220721174540-1f9a7c0f76a9 h1:w5wq45A37gCoC0c3Tu2TorPVKjHwYV2IMywZJHaYEjU= github.com/vito/vt100 v0.0.0-20220721174540-1f9a7c0f76a9/go.mod h1:tef+Px8jpdyyUTNDDgZjqkm5UZWM+rs3tXclM8NeC7o= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -578,7 +578,6 @@ github.com/zeebo/xxh3 v1.0.2 h1:xZmwmqxHZA8AI603jOQ0tMqmBr9lPeFwGg6d+xy9DC0= github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= github.com/zmb3/spotify/v2 v2.2.1 h1:5Nb8pwVDPl6CVr3jEfvYuEuWTPO69KvP2a2BzThq+WY= github.com/zmb3/spotify/v2 v2.2.1/go.mod h1:+LVh9CafHu7SedyqYmEf12Rd01dIVlEL845yNhksW0E= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -587,22 +586,30 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0/go.mod h1:LsankqVDx4W+RhZNA5uWarULII/MBhF5qwCYxTuyXjs= -go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= -go.opentelemetry.io/otel v1.4.1 h1:QbINgGDDcoQUoMJa2mMaWno49lja9sHwp6aoa2n3a4g= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.34.0 h1:PNEMW4EvpNQ7SuoPFNkvbZqi1STkTPKq+8vfoMl/6AE= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.34.0/go.mod h1:fk1+icoN47ytLSgkoWHLJrtVTSQ+HgmkNgPTKrk/Nsc= go.opentelemetry.io/otel v1.4.1/go.mod h1:StM6F/0fSwpd8dKWDCdRr7uRvEPYdW0hBSlbdTiUde4= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.4.1/go.mod h1:VpP4/RMn8bv8gNo9uK7/IMY4mtWLELsS+JIP0inH0h4= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.4.1 h1:WPpPsAAs8I2rA47v5u0558meKmmwm1Dj99ZbqCV8sZ8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.4.1/go.mod h1:o5RW5o2pKpJLD5dNTCmjF1DorYwMeFJmb/rKr5sLaa8= -go.opentelemetry.io/otel/sdk v1.4.1 h1:J7EaW71E0v87qflB4cDolaqq3AcujGrtyIPGQoZOB0Y= +go.opentelemetry.io/otel v1.10.0 h1:Y7DTJMR6zs1xkS/upamJYk0SxxN4C9AqRd77jmZnyY4= +go.opentelemetry.io/otel v1.10.0/go.mod h1:NbvWjCthWHKBEUMpf0/v8ZRZlni86PpGFEMA9pnQSnQ= +go.opentelemetry.io/otel/exporters/jaeger v1.4.1 h1:VHCK+2yTZDqDaVXj7JH2Z/khptuydo6C0ttBh2bxAbc= +go.opentelemetry.io/otel/exporters/jaeger v1.4.1/go.mod h1:ZW7vkOu9nC1CxsD8bHNHCia5JUbwP39vxgd1q4Z5rCI= +go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.9.0 h1:ggqApEjDKczicksfvZUCxuvoyDmR6Sbm56LwiK8DVR0= +go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.9.0/go.mod h1:78XhIg8Ht9vR4tbLNUhXsiOnE2HOuSeKAiAcoVQEpOY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.9.0 h1:NN90Cuna0CnBg8YNu1Q0V35i2E8LDByFOwHRCq/ZP9I= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.9.0/go.mod h1:0EsCXjZAiiZGnLdEUXM9YjCKuuLZMYyglh2QDXcYKVA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.9.0 h1:M0/hqGuJBLeIEu20f89H74RGtqV2dn+SFWEz9ATAAwY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.9.0/go.mod h1:K5G92gbtCrYJ0mn6zj9Pst7YFsDFuvSYEhYKRMcufnM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.9.0 h1:FAF9l8Wjxi9Ad2k/vLTfHZyzXYX72C62wBGpV3G6AIo= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.9.0/go.mod h1:smUdtylgc0YQiUr2PuifS4hBXhAS5xtR6WQhxP1wiNA= go.opentelemetry.io/otel/sdk v1.4.1/go.mod h1:NBwHDgDIBYjwK2WNu1OPgsIc2IJzmBXNnvIJxJc8BpE= -go.opentelemetry.io/otel/trace v1.4.0/go.mod h1:uc3eRsqDfWs9R7b92xbQbU42/eTNz4N+gLP8qJCi4aE= -go.opentelemetry.io/otel/trace v1.4.1 h1:O+16qcdTrT7zxv2J6GejTPFinSwA++cYerC5iSiF8EQ= +go.opentelemetry.io/otel/sdk v1.9.0 h1:LNXp1vrr83fNXTHgU8eO89mhzxb/bbWAsHG6fNf3qWo= +go.opentelemetry.io/otel/sdk v1.9.0/go.mod h1:AEZc8nt5bd2F7BC24J5R0mrjYnpEgYHyTcM/vrSple4= go.opentelemetry.io/otel/trace v1.4.1/go.mod h1:iYEVbroFCNut9QkwEczV9vMRPHNKSSwYZjulEtsmhFc= +go.opentelemetry.io/otel/trace v1.10.0 h1:npQMbR8o7mum8uF95yFbOEJffhs1sbCOfDh8zAJiH5E= +go.opentelemetry.io/otel/trace v1.10.0/go.mod h1:Sij3YYczqAdz+EhmGhE6TpTxUO5/F/AzrK+kxfGqySM= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.opentelemetry.io/proto/otlp v0.12.0 h1:CMJ/3Wp7iOWES+CYLfnBv+DVmPbB+kmy9PJ92XvlR6c= -go.opentelemetry.io/proto/otlp v0.12.0/go.mod h1:TsIjwGWIx5VFYv9KGVlOpxoBl5Dy+63SUguV7GGvlSQ= +go.opentelemetry.io/proto/otlp v0.18.0 h1:W5hyXNComRa23tGpKwG+FRAc4rfF6ZUg1JReK+QHS80= +go.opentelemetry.io/proto/otlp v0.18.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.step.sm/crypto v0.16.2 h1:Pr9aazTwWBBZNogUsOqhOrPSdwAa9pPs+lMB602lnDA= go.step.sm/crypto v0.16.2/go.mod h1:1WkTOTY+fOX/RY4TnZREp6trQAsBHRQ7nu6QJBiNQF8= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -610,7 +617,6 @@ go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= -go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= @@ -628,8 +634,8 @@ golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e h1:T8NU3HyQ8ClP4SEE+KbFlg6n0NhuTsN4MyznaarGsZM= -golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa h1:zuSxTR4o9y82ebqCUJYNGJbGPo6sKVl54f/TVDObg1c= +golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -664,20 +670,19 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o= +golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -711,8 +716,9 @@ golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211216030914-fe4d6282115f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f h1:oA4XRj0qtSt8Yo1Zms0CUlsT3KG69V2UGQWPBxujDmc= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220906165146-f3363e06e74c h1:yKufUcDwucU5urd+50/Opbt4AYpqthk7wHpHok8f1lo= +golang.org/x/net v0.0.0-20220906165146-f3363e06e74c/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -725,8 +731,9 @@ golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210810183815-faf39c7919d5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f h1:Qmd2pbz05z7z6lm0DrgQVVPuBm92jqujBKMHMOlOQEw= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220722155238-128564f6959c h1:q3gFqPqH7NVofKo3c3yETAP//pPI+G5mvB7qqj1Y5kY= +golang.org/x/oauth2 v0.0.0-20220722155238-128564f6959c/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -737,13 +744,12 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -794,7 +800,6 @@ golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210313202042-bd2e13477e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -814,12 +819,15 @@ golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220204135822-1c1b9b1eba6a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab h1:2QkjZIsXupsJbJIdSjjUOgWK3aEtzyuh2mPt3l/CkeU= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.0.0-20220411215600-e5f449aeb171 h1:EH1Deb8WZJ0xc0WK//leUHXcX9aLE5SymusoTmMZye8= golang.org/x/term v0.0.0-20220411215600-e5f449aeb171/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.0.0-20220722155259-a9ba230a4035 h1:Q5284mrmYTpACcm+eAKjKJH48BBwSyfJqmmGDTtT8Vc= +golang.org/x/term v0.0.0-20220722155259-a9ba230a4035/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -833,9 +841,8 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= -golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 h1:ftMN5LMiBFjbzleLqtoBZk7KdJwhuybIU+FckUHgoyQ= +golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 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= @@ -847,7 +854,6 @@ golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190830223141-573d9926052a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -878,6 +884,7 @@ golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200815165600-90abf76919f3/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= @@ -888,12 +895,13 @@ golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.10 h1:QjFRCZxdOhBJ/UNgnBZLbNV13DlbnK0quyivTnXJM20= +golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= +golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 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= @@ -965,11 +973,11 @@ google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6 h1:FglFEfyj61zP3c6LgjmVHxYxZWXYul9oiS1EZqD5gLc= -google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220810155839-1856144b1d9c h1:IooGDWedfLC6KLczH/uduUsKQP42ZZYhKx+zd50L1Sk= +google.golang.org/genproto v0.0.0-20220810155839-1856144b1d9c/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= @@ -987,10 +995,10 @@ google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA5 google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= -google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.49.0 h1:WTLtQzmQori5FUH25Pq4WT22oCsv8USpQ+F6rqtsmxw= +google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1003,9 +1011,9 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1014,11 +1022,9 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntN gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.6.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -1033,7 +1039,6 @@ gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= -gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/pkg/runtimes/buildkit.go b/pkg/runtimes/buildkit.go index 6a3ed3aa..73c1b649 100644 --- a/pkg/runtimes/buildkit.go +++ b/pkg/runtimes/buildkit.go @@ -33,15 +33,16 @@ import ( "github.com/morikuni/aec" ocispecs "github.com/opencontainers/image-spec/specs-go/v1" "github.com/tonistiigi/units" + "github.com/vito/progrock" + "github.com/vito/progrock/graph" + "go.uber.org/zap" + "github.com/vito/bass/pkg/bass" "github.com/vito/bass/pkg/basstls" "github.com/vito/bass/pkg/cli" "github.com/vito/bass/pkg/ioctx" "github.com/vito/bass/pkg/runtimes/util/buildkitd" "github.com/vito/bass/pkg/zapctx" - "github.com/vito/progrock" - "github.com/vito/progrock/graph" - "go.uber.org/zap" ) const buildkitProduct = "bass" @@ -99,7 +100,7 @@ func NewBuildkit(ctx context.Context, _ bass.RuntimePool, cfg *bass.Scope) (bass var config BuildkitConfig if cfg != nil { if err := cfg.Decode(&config); err != nil { - return nil, fmt.Errorf("docker runtime config: %w", err) + return nil, fmt.Errorf("buildkit runtime config: %w", err) } } diff --git a/pkg/runtimes/dagger.go b/pkg/runtimes/dagger.go new file mode 100644 index 00000000..851b43c1 --- /dev/null +++ b/pkg/runtimes/dagger.go @@ -0,0 +1,249 @@ +//go:generate dagger client-gen -o ./dagger/api.gen.go + +package runtimes + +import ( + "context" + "errors" + "fmt" + "io" + + kitdclient "github.com/moby/buildkit/client" + ocispecs "github.com/opencontainers/image-spec/specs-go/v1" + "github.com/vito/bass/pkg/bass" + "github.com/vito/bass/pkg/runtimes/dagger" + "github.com/vito/progrock" + "go.dagger.io/dagger/engine" +) + +const DaggerName = "dagger" + +func init() { + RegisterRuntime(DaggerName, NewDagger) +} + +type Dagger struct { + Config BuildkitConfig + Client *kitdclient.Client + Platform ocispecs.Platform +} + +var _ bass.Runtime = &Dagger{} + +func NewDagger(ctx context.Context, _ bass.RuntimePool, cfg *bass.Scope) (bass.Runtime, error) { + r := &Dagger{} + + if cfg != nil { + if err := cfg.Decode(&r.Config); err != nil { + return nil, fmt.Errorf("dagger runtime config: %w", err) + } + } + + return r, nil +} + +func (runtime *Dagger) Resolve(ctx context.Context, imageRef bass.ImageRef) (bass.ImageRef, error) { + // TODO + return imageRef, nil +} + +func (runtime *Dagger) Run(ctx context.Context, thunk bass.Thunk) error { + statusProxy := forwardStatus(progrock.RecorderFromContext(ctx)) + defer statusProxy.Wait() + + opts := &engine.Config{ + Progress: statusProxy.Writer(), + } + + return engine.Start(ctx, opts, func(ctx engine.Context) error { + core := dagger.New(ctx.Client) + + ctr, err := runtime.container(ctx, core, thunk) + if err != nil { + return err + } + + status, err := ctr.ExitCode(ctx) + if err != nil { + return err + } + + if status != 0 { + return fmt.Errorf("exit status %d", status) + } + + return nil + }) +} + +func (runtime *Dagger) Start(ctx context.Context, thunk bass.Thunk) (StartResult, error) { + return StartResult{}, errors.New("Start: not implemented") +} + +func (runtime *Dagger) Read(ctx context.Context, w io.Writer, thunk bass.Thunk) error { + statusProxy := forwardStatus(progrock.RecorderFromContext(ctx)) + defer statusProxy.Wait() + + opts := &engine.Config{ + Progress: statusProxy.Writer(), + } + + return engine.Start(ctx, opts, func(ctx engine.Context) error { + core := dagger.New(ctx.Client) + + ctr, err := runtime.container(ctx, core, thunk) + if err != nil { + return err + } + + stdout, err := ctr.Stdout().Contents(ctx) + if err != nil { + return err + } + + _, err = fmt.Fprint(w, stdout) + if err != nil { + return err + } + + return nil + }) +} + +func (runtime *Dagger) Export(ctx context.Context, w io.Writer, thunk bass.Thunk) error { + return errors.New("Export: not implemented") +} + +func (runtime *Dagger) ExportPath(ctx context.Context, w io.Writer, tp bass.ThunkPath) error { + return errors.New("ExportPath: not implemented") +} + +func (runtime *Dagger) Prune(ctx context.Context, opts bass.PruneOpts) error { + return errors.New("Prune: not implemented") +} + +func (runtime *Dagger) Close() error { + return nil +} + +func (runtime *Dagger) container(ctx context.Context, core *dagger.Query, thunk bass.Thunk) (*dagger.Container, error) { + cmd, err := NewCommand(ctx, runtime, thunk) + if err != nil { + return nil, err + } + + imageRef, baseContainer, err := runtime.image(ctx, core, thunk.Image) + if err != nil { + return nil, err + } + + var root *dagger.Container + if baseContainer != nil { + root = baseContainer + } else { + root = core.Container().From(imageRef) + } + + // TODO: use as hostname (also Dagger should support arbitrary labels?) + // id, err := thunk.Hash() + // if err != nil { + // return nil, err + // } + + // TODO: TLS and service networking, but Dagger needs to figure that out + // first + + ctr := root. + WithMountedTemp("/tmp"). + WithMountedTemp("/dev/shm"). + WithWorkdir(workDir). + Exec(dagger.WithContainerExecArgs(cmd.Args)) + + // TODO: insecure + // if thunk.Insecure { + // needsInsecure = true + + // runOpt = append(runOpt, + // llb.WithCgroupParent(id), + // llb.Security(llb.SecurityModeInsecure)) + // } + + for _, mount := range cmd.Mounts { + mounted, err := runtime.mount(ctx, core, ctr, mount.Target, mount.Source) + if err != nil { + return nil, err + } + + ctr = mounted + } + + // TODO: cache disabling in Dagger? + // if b.runtime.Config.DisableCache { + // runOpt = append(runOpt, llb.IgnoreCache) + // } + + // runOpt = append(runOpt, extraOpts...) + + return ctr, nil +} + +func (runtime *Dagger) mount(ctx context.Context, core *dagger.Query, ctr *dagger.Container, target string, src bass.ThunkMountSource) (*dagger.Container, error) { + switch { + case src.ThunkPath != nil: + srcCtr, err := runtime.container(ctx, core, src.ThunkPath.Thunk) + if err != nil { + return nil, err + } + + fsp := src.ThunkPath.Path.FilesystemPath() + if fsp.IsDir() { + id, err := srcCtr.Directory(fsp.Slash()).ID(ctx) + if err != nil { + return nil, err + } + + return ctr.WithMountedDirectory(target, id), nil + } else { + return nil, fmt.Errorf("mounting files not implemented yet") + + // id, err := srcCtr.File(fsp.Slash()).ID(ctx) + // if err != nil { + // return nil, err + // } + + // return ctr.WithMountedDirectory(target, id), nil + } + default: + return nil, fmt.Errorf("mounting %T not implemented yet", src.ToValue()) + } +} + +func (runtime *Dagger) image(ctx context.Context, core *dagger.Query, image *bass.ThunkImage) (dagger.ContainerAddress, *dagger.Container, error) { + if image == nil { + return "", nil, nil + } + + if image.Ref != nil { + ref, err := image.Ref.Ref() + if err != nil { + return "", nil, err + } + + return dagger.ContainerAddress(ref), nil, nil + } + + if image.Thunk != nil { + ctr, err := runtime.container(ctx, core, *image.Thunk) + if err != nil { + return "", nil, fmt.Errorf("image thunk llb: %w", err) + } + + return "", ctr, nil + } + + if image.Archive != nil { + return "", nil, fmt.Errorf("image from archive unsupported") + } + + return "", nil, fmt.Errorf("unsupported image type: %+v", image) +} diff --git a/pkg/runtimes/dagger/.gitattributes b/pkg/runtimes/dagger/.gitattributes new file mode 100644 index 00000000..014859db --- /dev/null +++ b/pkg/runtimes/dagger/.gitattributes @@ -0,0 +1 @@ +/api.gen.go linguist-generated=true \ No newline at end of file diff --git a/pkg/runtimes/dagger/api.gen.go b/pkg/runtimes/dagger/api.gen.go new file mode 100644 index 00000000..9e960e85 --- /dev/null +++ b/pkg/runtimes/dagger/api.gen.go @@ -0,0 +1,838 @@ +package dagger + +import ( + "context" + + "github.com/Khan/genqlient/graphql" + "go.dagger.io/dagger/sdk/go/dagger/querybuilder" +) + +// New returns a new API query object +func New(c graphql.Client) *Query { + return &Query{ + q: querybuilder.Query(), + c: c, + } +} + +// The address (also known as "ref") of a container published as an OCI image. +// +// Examples: +// - "alpine" +// - "index.docker.io/alpine" +// - "index.docker.io/alpine:latest" +// - "index.docker.io/alpine:latest@sha256deadbeefdeadbeefdeadbeef" +type ContainerAddress string + +// A unique container identifier. Null designates an empty container (scratch). +type ContainerID string + +// A content-addressed directory identifier +type DirectoryID string + +type FileID string + +type SecretID string + +// Additional options for executing a command +type ExecOpts struct { + // Optionally redirect the command's standard error to a file in the container. + // Null means discard output. + RedirectStderr string `json:"redirectStderr"` + + // Optionally redirect the command's standard output to a file in the container. + // Null means discard output. + RedirectStdout string `json:"redirectStdout"` + + // Optionally write to the command's standard input + // + // - Null means don't touch stdin (no redirection) + // - Empty string means inject zero bytes to stdin, then send EOF + Stdin string `json:"stdin"` +} + +// An OCI-compatible container, also known as a docker container +type Container struct { + q *querybuilder.Selection + c graphql.Client +} + +// Default arguments for future commands +func (r *Container) DefaultArgs(ctx context.Context) ([]string, error) { + q := r.q.Select("defaultArgs") + + var response []string + q = q.Bind(&response) + return response, q.Execute(ctx, r.c) +} + +// Retrieve a directory at the given path. Mounts are included. +func (r *Container) Directory(path string) *Directory { + q := r.q.Select("directory") + q = q.Arg("path", path) + + return &Directory{ + q: q, + c: r.c, + } +} + +// Entrypoint to be prepended to the arguments of all commands +func (r *Container) Entrypoint(ctx context.Context) ([]string, error) { + q := r.q.Select("entrypoint") + + var response []string + q = q.Bind(&response) + return response, q.Execute(ctx, r.c) +} + +// ContainerExecOptions contains options for Container.Exec +type ContainerExecOptions struct { + Args *[]string + + Opts *ExecOpts +} + +// ContainerExecOption represents an option handler for Container.Exec +type ContainerExecOption func(*ContainerExecOptions) + +// WithContainerExecArgs sets the "args" option for Exec +func WithContainerExecArgs(args []string) ContainerExecOption { + return func(daggerOptions *ContainerExecOptions) { + daggerOptions.Args = &args + } +} + +// WithContainerExecOpts sets the "opts" option for Exec +func WithContainerExecOpts(opts ExecOpts) ContainerExecOption { + return func(daggerOptions *ContainerExecOptions) { + daggerOptions.Opts = &opts + } +} + +// This container after executing the specified command inside it +func (r *Container) Exec(options ...ContainerExecOption) *Container { + opts := &ContainerExecOptions{} + for _, fn := range options { + fn(opts) + } + q := r.q.Select("exec") + if opts != nil && opts.Args != nil { + q = q.Arg("args", opts.Args) + } + if opts != nil && opts.Opts != nil { + q = q.Arg("opts", opts.Opts) + } + + return &Container{ + q: q, + c: r.c, + } +} + +// Exit code of the last executed command. Zero means success. +// Null if no command has been executed. +func (r *Container) ExitCode(ctx context.Context) (int, error) { + q := r.q.Select("exitCode") + + var response int + q = q.Bind(&response) + return response, q.Execute(ctx, r.c) +} + +// Initialize this container from the base image published at the given address +func (r *Container) From(address ContainerAddress) *Container { + q := r.q.Select("from") + q = q.Arg("address", address) + + return &Container{ + q: q, + c: r.c, + } +} + +// A unique identifier for this container +func (r *Container) ID(ctx context.Context) (ContainerID, error) { + q := r.q.Select("id") + + var response ContainerID + q = q.Bind(&response) + return response, q.Execute(ctx, r.c) +} + +// List of paths where a directory is mounted +func (r *Container) Mounts(ctx context.Context) ([]string, error) { + q := r.q.Select("mounts") + + var response []string + q = q.Bind(&response) + return response, q.Execute(ctx, r.c) +} + +// Publish this container as a new image +func (r *Container) Publish(ctx context.Context, address ContainerAddress) (ContainerAddress, error) { + q := r.q.Select("publish") + q = q.Arg("address", address) + + var response ContainerAddress + q = q.Bind(&response) + return response, q.Execute(ctx, r.c) +} + +// This container's root filesystem. Mounts are not included. +func (r *Container) Rootfs() *Directory { + q := r.q.Select("rootfs") + + return &Directory{ + q: q, + c: r.c, + } +} + +// The error stream of the last executed command. +// Null if no command has been executed. +func (r *Container) Stderr() *File { + q := r.q.Select("stderr") + + return &File{ + q: q, + c: r.c, + } +} + +// The output stream of the last executed command. +// Null if no command has been executed. +func (r *Container) Stdout() *File { + q := r.q.Select("stdout") + + return &File{ + q: q, + c: r.c, + } +} + +// The user to be set for all commands +func (r *Container) User(ctx context.Context) (string, error) { + q := r.q.Select("user") + + var response string + q = q.Bind(&response) + return response, q.Execute(ctx, r.c) +} + +// The value of the specified environment variable +func (r *Container) Variable(ctx context.Context, name string) (string, error) { + q := r.q.Select("variable") + q = q.Arg("name", name) + + var response string + q = q.Bind(&response) + return response, q.Execute(ctx, r.c) +} + +// A list of environment variables passed to commands +func (r *Container) Variables(ctx context.Context) ([]string, error) { + q := r.q.Select("variables") + + var response []string + q = q.Bind(&response) + return response, q.Execute(ctx, r.c) +} + +// ContainerWithDefaultArgsOptions contains options for Container.WithDefaultArgs +type ContainerWithDefaultArgsOptions struct { + Args *[]string +} + +// ContainerWithDefaultArgsOption represents an option handler for Container.WithDefaultArgs +type ContainerWithDefaultArgsOption func(*ContainerWithDefaultArgsOptions) + +// WithContainerWithDefaultArgsArgs sets the "args" option for WithDefaultArgs +func WithContainerWithDefaultArgsArgs(args []string) ContainerWithDefaultArgsOption { + return func(daggerOptions *ContainerWithDefaultArgsOptions) { + daggerOptions.Args = &args + } +} + +// Configures default arguments for future commands +func (r *Container) WithDefaultArgs(options ...ContainerWithDefaultArgsOption) *Container { + opts := &ContainerWithDefaultArgsOptions{} + for _, fn := range options { + fn(opts) + } + q := r.q.Select("withDefaultArgs") + if opts != nil && opts.Args != nil { + q = q.Arg("args", opts.Args) + } + + return &Container{ + q: q, + c: r.c, + } +} + +// This container but with a different command entrypoint +func (r *Container) WithEntrypoint(args []string) *Container { + q := r.q.Select("withEntrypoint") + q = q.Arg("args", args) + + return &Container{ + q: q, + c: r.c, + } +} + +// ContainerWithMountedCacheOptions contains options for Container.WithMountedCache +type ContainerWithMountedCacheOptions struct { + Source *DirectoryID +} + +// ContainerWithMountedCacheOption represents an option handler for Container.WithMountedCache +type ContainerWithMountedCacheOption func(*ContainerWithMountedCacheOptions) + +// WithContainerWithMountedCacheSource sets the "source" option for WithMountedCache +func WithContainerWithMountedCacheSource(source DirectoryID) ContainerWithMountedCacheOption { + return func(daggerOptions *ContainerWithMountedCacheOptions) { + daggerOptions.Source = &source + } +} + +// This container plus a cache volume mounted at the given path +func (r *Container) WithMountedCache(cache CacheID, path string, options ...ContainerWithMountedCacheOption) *Container { + opts := &ContainerWithMountedCacheOptions{} + for _, fn := range options { + fn(opts) + } + q := r.q.Select("withMountedCache") + q = q.Arg("cache", cache) + q = q.Arg("path", path) + if opts != nil && opts.Source != nil { + q = q.Arg("source", opts.Source) + } + + return &Container{ + q: q, + c: r.c, + } +} + +// This container plus a directory mounted at the given path +func (r *Container) WithMountedDirectory(path string, source DirectoryID) *Container { + q := r.q.Select("withMountedDirectory") + q = q.Arg("path", path) + q = q.Arg("source", source) + + return &Container{ + q: q, + c: r.c, + } +} + +// This container plus a file mounted at the given path +func (r *Container) WithMountedFile(path string, source FileID) *Container { + q := r.q.Select("withMountedFile") + q = q.Arg("path", path) + q = q.Arg("source", source) + + return &Container{ + q: q, + c: r.c, + } +} + +// This container plus a secret mounted into a file at the given path +func (r *Container) WithMountedSecret(path string, source SecretID) *Container { + q := r.q.Select("withMountedSecret") + q = q.Arg("path", path) + q = q.Arg("source", source) + + return &Container{ + q: q, + c: r.c, + } +} + +// This container plus a temporary directory mounted at the given path +func (r *Container) WithMountedTemp(path string) *Container { + q := r.q.Select("withMountedTemp") + q = q.Arg("path", path) + + return &Container{ + q: q, + c: r.c, + } +} + +// This container plus an env variable containing the given secret +func (r *Container) WithSecretVariable(name string, secret SecretID) *Container { + q := r.q.Select("withSecretVariable") + q = q.Arg("name", name) + q = q.Arg("secret", secret) + + return &Container{ + q: q, + c: r.c, + } +} + +// This container but with a different command user +func (r *Container) WithUser(name string) *Container { + q := r.q.Select("withUser") + q = q.Arg("name", name) + + return &Container{ + q: q, + c: r.c, + } +} + +// This container plus the given environment variable +func (r *Container) WithVariable(name string, value string) *Container { + q := r.q.Select("withVariable") + q = q.Arg("name", name) + q = q.Arg("value", value) + + return &Container{ + q: q, + c: r.c, + } +} + +// This container but with a different working directory +func (r *Container) WithWorkdir(path string) *Container { + q := r.q.Select("withWorkdir") + q = q.Arg("path", path) + + return &Container{ + q: q, + c: r.c, + } +} + +// This container after unmounting everything at the given path. +func (r *Container) WithoutMount(path string) *Container { + q := r.q.Select("withoutMount") + q = q.Arg("path", path) + + return &Container{ + q: q, + c: r.c, + } +} + +// This container minus the given environment variable +func (r *Container) WithoutVariable(name string) *Container { + q := r.q.Select("withoutVariable") + q = q.Arg("name", name) + + return &Container{ + q: q, + c: r.c, + } +} + +// The working directory for all commands +func (r *Container) Workdir(ctx context.Context) (string, error) { + q := r.q.Select("workdir") + + var response string + q = q.Bind(&response) + return response, q.Execute(ctx, r.c) +} + +// A directory +type Directory struct { + q *querybuilder.Selection + c graphql.Client +} + +// DirectoryContentsOptions contains options for Directory.Contents +type DirectoryContentsOptions struct { + Path *string +} + +// DirectoryContentsOption represents an option handler for Directory.Contents +type DirectoryContentsOption func(*DirectoryContentsOptions) + +// WithDirectoryContentsPath sets the "path" option for Contents +func WithDirectoryContentsPath(path string) DirectoryContentsOption { + return func(daggerOptions *DirectoryContentsOptions) { + daggerOptions.Path = &path + } +} + +// Return a list of files and directories at the given path +func (r *Directory) Contents(ctx context.Context, options ...DirectoryContentsOption) ([]string, error) { + opts := &DirectoryContentsOptions{} + for _, fn := range options { + fn(opts) + } + q := r.q.Select("contents") + if opts != nil && opts.Path != nil { + q = q.Arg("path", opts.Path) + } + + var response []string + q = q.Bind(&response) + return response, q.Execute(ctx, r.c) +} + +// The difference between this directory and an another directory +func (r *Directory) Diff(other DirectoryID) *Directory { + q := r.q.Select("diff") + q = q.Arg("other", other) + + return &Directory{ + q: q, + c: r.c, + } +} + +// Retrieve a directory at the given path +func (r *Directory) Directory(path string) *Directory { + q := r.q.Select("directory") + q = q.Arg("path", path) + + return &Directory{ + q: q, + c: r.c, + } +} + +// Retrieve a file at the given path +func (r *Directory) File(path string) *File { + q := r.q.Select("file") + q = q.Arg("path", path) + + return &File{ + q: q, + c: r.c, + } +} + +// The content-addressed identifier of the directory +func (r *Directory) ID(ctx context.Context) (DirectoryID, error) { + q := r.q.Select("id") + + var response DirectoryID + q = q.Bind(&response) + return response, q.Execute(ctx, r.c) +} + +// A secret backed by the file at the given path +func (r *Directory) Secret(ctx context.Context, path string) (SecretID, error) { + q := r.q.Select("secret") + q = q.Arg("path", path) + + var response SecretID + q = q.Bind(&response) + return response, q.Execute(ctx, r.c) +} + +// This directory plus the contents of the given file copied to the given path +func (r *Directory) WithCopiedFile(path string, source FileID) *Directory { + q := r.q.Select("withCopiedFile") + q = q.Arg("path", path) + q = q.Arg("source", source) + + return &Directory{ + q: q, + c: r.c, + } +} + +// This directory plus a directory written at the given path +func (r *Directory) WithDirectory(directory DirectoryID, path string) *Directory { + q := r.q.Select("withDirectory") + q = q.Arg("directory", directory) + q = q.Arg("path", path) + + return &Directory{ + q: q, + c: r.c, + } +} + +// DirectoryWithNewFileOptions contains options for Directory.WithNewFile +type DirectoryWithNewFileOptions struct { + Contents *string +} + +// DirectoryWithNewFileOption represents an option handler for Directory.WithNewFile +type DirectoryWithNewFileOption func(*DirectoryWithNewFileOptions) + +// WithDirectoryWithNewFileContents sets the "contents" option for WithNewFile +func WithDirectoryWithNewFileContents(contents string) DirectoryWithNewFileOption { + return func(daggerOptions *DirectoryWithNewFileOptions) { + daggerOptions.Contents = &contents + } +} + +// This directory plus a new file written at the given path +func (r *Directory) WithNewFile(path string, options ...DirectoryWithNewFileOption) *Directory { + opts := &DirectoryWithNewFileOptions{} + for _, fn := range options { + fn(opts) + } + q := r.q.Select("withNewFile") + if opts != nil && opts.Contents != nil { + q = q.Arg("contents", opts.Contents) + } + q = q.Arg("path", path) + + return &Directory{ + q: q, + c: r.c, + } +} + +// This directory with the directory at the given path removed +func (r *Directory) WithoutDirectory(path string) *Directory { + q := r.q.Select("withoutDirectory") + q = q.Arg("path", path) + + return &Directory{ + q: q, + c: r.c, + } +} + +// This directory with the file at the given path removed +func (r *Directory) WithoutFile(path string) *Directory { + q := r.q.Select("withoutFile") + q = q.Arg("path", path) + + return &Directory{ + q: q, + c: r.c, + } +} + +// A file +type File struct { + q *querybuilder.Selection + c graphql.Client +} + +// The contents of the file +func (r *File) Contents(ctx context.Context) (string, error) { + q := r.q.Select("contents") + + var response string + q = q.Bind(&response) + return response, q.Execute(ctx, r.c) +} + +// The content-addressed identifier of the file +func (r *File) ID(ctx context.Context) (FileID, error) { + q := r.q.Select("id") + + var response FileID + q = q.Bind(&response) + return response, q.Execute(ctx, r.c) +} + +// The size of the file, in bytes +func (r *File) Size(ctx context.Context) (int, error) { + q := r.q.Select("size") + + var response int + q = q.Bind(&response) + return response, q.Execute(ctx, r.c) +} + +// A git ref (tag or branch) +type GitRef struct { + q *querybuilder.Selection + c graphql.Client +} + +// The digest of the current value of this ref +func (r *GitRef) Digest(ctx context.Context) (string, error) { + q := r.q.Select("digest") + + var response string + q = q.Bind(&response) + return response, q.Execute(ctx, r.c) +} + +// The filesystem tree at this ref +func (r *GitRef) Tree() *Directory { + q := r.q.Select("tree") + + return &Directory{ + q: q, + c: r.c, + } +} + +// A git repository +type GitRepository struct { + q *querybuilder.Selection + c graphql.Client +} + +// Details on one branch +func (r *GitRepository) Branch(name string) *GitRef { + q := r.q.Select("branch") + q = q.Arg("name", name) + + return &GitRef{ + q: q, + c: r.c, + } +} + +// List of branches on the repository +func (r *GitRepository) Branches(ctx context.Context) ([]string, error) { + q := r.q.Select("branches") + + var response []string + q = q.Bind(&response) + return response, q.Execute(ctx, r.c) +} + +// Details on one tag +func (r *GitRepository) Tag(name string) *GitRef { + q := r.q.Select("tag") + q = q.Arg("name", name) + + return &GitRef{ + q: q, + c: r.c, + } +} + +// List of tags on the repository +func (r *GitRepository) Tags(ctx context.Context) ([]string, error) { + q := r.q.Select("tags") + + var response []string + q = q.Bind(&response) + return response, q.Execute(ctx, r.c) +} + +type Query struct { + q *querybuilder.Selection + c graphql.Client +} + +// Construct a cache volume from its ID +func (r *Query) Cache(id CacheID) *CacheVolume { + q := r.q.Select("cache") + q = q.Arg("id", id) + + return &CacheVolume{ + q: q, + c: r.c, + } +} + +// Create a new cache volume identified by an arbitrary set of tokens +func (r *Query) CacheFromTokens(tokens []string) *CacheVolume { + q := r.q.Select("cacheFromTokens") + q = q.Arg("tokens", tokens) + + return &CacheVolume{ + q: q, + c: r.c, + } +} + +// QueryContainerOptions contains options for Query.Container +type QueryContainerOptions struct { + ID *ContainerID +} + +// QueryContainerOption represents an option handler for Query.Container +type QueryContainerOption func(*QueryContainerOptions) + +// WithQueryContainerID sets the "id" option for Container +func WithQueryContainerID(id ContainerID) QueryContainerOption { + return func(daggerOptions *QueryContainerOptions) { + daggerOptions.ID = &id + } +} + +// Load a container from ID. +// Null ID returns an empty container (scratch). +func (r *Query) Container(options ...QueryContainerOption) *Container { + opts := &QueryContainerOptions{} + for _, fn := range options { + fn(opts) + } + q := r.q.Select("container") + if opts != nil && opts.ID != nil { + q = q.Arg("id", opts.ID) + } + + return &Container{ + q: q, + c: r.c, + } +} + +// QueryDirectoryOptions contains options for Query.Directory +type QueryDirectoryOptions struct { + ID *DirectoryID +} + +// QueryDirectoryOption represents an option handler for Query.Directory +type QueryDirectoryOption func(*QueryDirectoryOptions) + +// WithQueryDirectoryID sets the "id" option for Directory +func WithQueryDirectoryID(id DirectoryID) QueryDirectoryOption { + return func(daggerOptions *QueryDirectoryOptions) { + daggerOptions.ID = &id + } +} + +// Load a directory by ID. No argument produces an empty directory. +func (r *Query) Directory(options ...QueryDirectoryOption) *Directory { + opts := &QueryDirectoryOptions{} + for _, fn := range options { + fn(opts) + } + q := r.q.Select("directory") + if opts != nil && opts.ID != nil { + q = q.Arg("id", opts.ID) + } + + return &Directory{ + q: q, + c: r.c, + } +} + +// Load a file by ID +func (r *Query) File(id FileID) *File { + q := r.q.Select("file") + q = q.Arg("id", id) + + return &File{ + q: q, + c: r.c, + } +} + +// Query a git repository +func (r *Query) Git(url string) *GitRepository { + q := r.q.Select("git") + q = q.Arg("url", url) + + return &GitRepository{ + q: q, + c: r.c, + } +} + +// An http remote +func (r *Query) HTTP(url string) *File { + q := r.q.Select("http") + q = q.Arg("url", url) + + return &File{ + q: q, + c: r.c, + } +} diff --git a/pkg/runtimes/dagger/workaround.go b/pkg/runtimes/dagger/workaround.go new file mode 100644 index 00000000..9040752b --- /dev/null +++ b/pkg/runtimes/dagger/workaround.go @@ -0,0 +1,14 @@ +package dagger + +import ( + "github.com/Khan/genqlient/graphql" + "go.dagger.io/dagger/sdk/go/dagger/querybuilder" +) + +// TODO(vito): why are these not being added? +type CacheID string + +type CacheVolume struct { + q *querybuilder.Selection + c graphql.Client +} diff --git a/pkg/runtimes/dagger_test.go b/pkg/runtimes/dagger_test.go new file mode 100644 index 00000000..75c9013e --- /dev/null +++ b/pkg/runtimes/dagger_test.go @@ -0,0 +1,40 @@ +package runtimes_test + +import ( + "context" + "os" + "testing" + + "github.com/vito/bass/pkg/bass" + "github.com/vito/bass/pkg/runtimes" + "github.com/vito/bass/pkg/runtimes/util/buildkitd" + "github.com/vito/is" +) + +func TestDaggerRuntime(t *testing.T) { + is := is.New(t) + + if testing.Short() { + t.SkipNow() + return + } + + host, err := buildkitd.Start(context.Background()) + is.NoErr(err) + + os.Setenv("BUILDKIT_HOST", host) + + ctx := context.Background() + + pool, err := runtimes.NewPool(ctx, &bass.Config{ + Runtimes: []bass.RuntimeConfig{ + { + Platform: bass.LinuxPlatform, + Runtime: runtimes.DaggerName, + }, + }, + }) + is.NoErr(err) + + runtimes.Suite(t, pool) +} From 1041e7ecd0cf9e3f56eacb4614bdbc014fb236b0 Mon Sep 17 00:00:00 2001 From: Alex Suraci Date: Mon, 10 Oct 2022 18:19:23 -0400 Subject: [PATCH 02/25] unbump buildkit to v0.10.4 simpler this way, keeps in sync with dagger which needs stable version --- dagger | 2 +- go.mod | 12 +++--- go.sum | 87 ++++++++++++++++++++++++++++++++++++---- pkg/runtimes/buildkit.go | 3 +- 4 files changed, 87 insertions(+), 17 deletions(-) diff --git a/dagger b/dagger index 1ed36c50..83b8e65a 160000 --- a/dagger +++ b/dagger @@ -1 +1 @@ -Subproject commit 1ed36c5000816a94403d61a88e3d234dc3bbeef6 +Subproject commit 83b8e65a55cd21218cce812b45d9d534824e3eb3 diff --git a/go.mod b/go.mod index c57f1edd..941d6b1d 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( github.com/mattn/go-colorable v0.1.12 github.com/mattn/go-isatty v0.0.14 github.com/mattn/go-unicodeclass v0.0.1 - github.com/moby/buildkit v0.10.1-0.20221007224755-f394afc591a5 + github.com/moby/buildkit v0.10.4 github.com/moby/sys/mountinfo v0.6.2 github.com/morikuni/aec v1.0.0 github.com/neovim/go-client v1.2.2-0.20220118223211-7c85d516f28c @@ -46,7 +46,7 @@ require ( github.com/vito/vt100 v0.0.0-20220721174540-1f9a7c0f76a9 github.com/zeebo/xxh3 v1.0.2 github.com/zmb3/spotify/v2 v2.2.1 - go.dagger.io/dagger v0.0.0-00010101000000-000000000000 + go.dagger.io/dagger v0.2.35 go.opentelemetry.io/otel v1.10.0 go.uber.org/zap v1.19.1 golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa @@ -119,7 +119,7 @@ require ( github.com/rootless-containers/proto v0.1.0 // indirect github.com/rs/zerolog v1.28.0 // indirect github.com/sirupsen/logrus v1.9.0 // indirect - github.com/tonistiigi/fsutil v0.0.0-20220930225714-4638ad635be5 // indirect + github.com/tonistiigi/fsutil v0.0.0-20220115021204-b19f7f9cb274 // indirect github.com/tonistiigi/vt100 v0.0.0-20210615222946-8066bb97264f // indirect github.com/vbatts/go-mtree v0.5.0 // indirect github.com/vektah/gqlparser/v2 v2.5.1 // indirect @@ -147,9 +147,9 @@ require ( gopkg.in/yaml.v2 v2.4.0 // indirect ) -replace go.dagger.io/dagger => ./dagger - // BEGIN SYNC buildkit -replace github.com/docker/docker => github.com/docker/docker v20.10.3-0.20221006005007-99aa9bb766b5+incompatible // 22.06 branch (v22.06-dev) +replace github.com/docker/docker => github.com/docker/docker v20.10.3-0.20220414164044-61404de7df1a+incompatible // END SYNC + +replace go.dagger.io/dagger => ./dagger diff --git a/go.sum b/go.sum index 3e2575e4..3a3e9d41 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,4 @@ +bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= @@ -74,6 +75,8 @@ github.com/alecthomas/kong v0.2.4/go.mod h1:kQOmtJgV+Lb4aj+I2LEn40cbtawdWJ9Y8QLq github.com/alecthomas/repr v0.0.0-20180818092828-117648cd9897/go.mod h1:xTS7Pm1pD1mvyM075QCDSRqH6qRLXylzS24ZTpRiSzQ= github.com/alecthomas/repr v0.0.0-20181024024818-d37bc2a10ba1 h1:GDQdwm/gAcJcLAKQQZGOJ4knlw+7rfEQQcmwTbt4p5E= github.com/alecthomas/repr v0.0.0-20181024024818-d37bc2a10ba1/go.mod h1:xTS7Pm1pD1mvyM075QCDSRqH6qRLXylzS24ZTpRiSzQ= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alexflint/go-arg v1.4.2/go.mod h1:9iRbDxne7LcR/GSvEr7ma++GLpdIU1zrghf2y2768kM= github.com/alexflint/go-scalar v1.0.0/go.mod h1:GpHzbCOZXEKMEcygYQ5n/aa4Aq84zbxjy3MxYW0gjYw= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= @@ -85,11 +88,14 @@ github.com/apex/logs v0.0.7/go.mod h1:XzxuLZ5myVHDy9SAmYpamKKRNApGj54PfYLcFrXqDw github.com/aphistic/golf v0.0.0-20180712155816-02c07f170c5a/go.mod h1:3NqKYiepwy8kCu4PNA+aP7WUV72eXWJeP9/r3/K9aLE= github.com/aphistic/sweet v0.2.0/go.mod h1:fWDlIh/isSE9n6EPsRmC0det+whmX6dJid3stzu0Xys= github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= github.com/aws/aws-sdk-go v1.20.6/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/bhoriuchi/graphql-go-tools v1.0.0 h1:viibVf33DxOzyIgO1elJHCcoVbGwlU3Ua8Mc3phsvKU= github.com/bhoriuchi/graphql-go-tools v1.0.0/go.mod h1:4HQhkpeopRlpAn7DDBseb/Cw+7w+7D2psWAxDuTDkIY= github.com/bradleyjkemp/cupaloy/v2 v2.6.0/go.mod h1:bm7JXdkRd4BHJk9HpwqAI8BoAY1lps46Enkdqw6aRX0= @@ -128,6 +134,7 @@ github.com/containerd/console v1.0.3 h1:lIr7SlA5PxZyMV30bDW0MGbiOPXwc63yRuCP0ARu github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= github.com/containerd/containerd v1.6.8 h1:h4dOFDwzHmqFEP754PgfgTeVXFnLiRc6kiqC7tplDJs= github.com/containerd/containerd v1.6.8/go.mod h1:By6p5KqPK0/7/CgO/A6t/Gz+CUYUu2zf1hUaaymVXB0= +github.com/containerd/continuity v0.1.0/go.mod h1:ICJu0PwR54nI0yPEnJ6jcS+J7CZAUXrLh8lPo2knzsM= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/containerd/fifo v1.0.0 h1:6PirWBr9/L7GDamKr+XM0IeUFXu5mf3M/BPpH9gaLBU= @@ -137,8 +144,13 @@ github.com/containerd/ttrpc v1.1.0 h1:GbtyLRxb0gOLR0TYQWt3O6B0NvT8tMdorEHqIQo/lW github.com/containerd/ttrpc v1.1.0/go.mod h1:XX4ZTnoOId4HklF4edwc4DcqskFZuvXB1Evzy5KFQpQ= github.com/containerd/typeurl v1.0.2 h1:Chlt8zIieDbzQFzXzAeBEF92KhExuE4p9p92/QmY7aY= github.com/containerd/typeurl v1.0.2/go.mod h1:9trJWW2sRlGub4wZJRTW83VtbOLS6hwcDZXTn6oPz9s= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= @@ -155,6 +167,8 @@ github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964/go.mod h1:Xd9 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= github.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/dlclark/regexp2 v1.4.0 h1:F1rxgk7p4uKjwIQxBs9oAXe5CqrXlCduYEJvrF4u93E= @@ -163,8 +177,8 @@ github.com/docker/cli v20.10.17+incompatible h1:eO2KS7ZFeov5UJeaDmIs1NFEDRf32Paq github.com/docker/cli v20.10.17+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v20.10.3-0.20221006005007-99aa9bb766b5+incompatible h1:lEs5c8XzubP5AhOcbuEljKeqNmszBORctR3BbHsTOuw= -github.com/docker/docker v20.10.3-0.20221006005007-99aa9bb766b5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.3-0.20220414164044-61404de7df1a+incompatible h1:jnhU41Zm9biz6e4GPOvAtuognZ+pi8S77ZlRir/SHRA= +github.com/docker/docker v20.10.3-0.20220414164044-61404de7df1a+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.6.4 h1:axCks+yV+2MR3/kZhAmy07yC56WZ2Pwu/fKWtKuZB0o= github.com/docker/docker-credential-helpers v0.6.4/go.mod h1:ofX3UI0Gz1TteYBjtgs07O36Pyasyp66D2uKT7H8W1c= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= @@ -173,6 +187,7 @@ github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c h1:+pKlWGMw7gf6bQ github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -197,7 +212,9 @@ github.com/go-bindata/go-bindata v3.1.2+incompatible/go.mod h1:xK8Dsgwmeed+BBsSy github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= @@ -212,11 +229,14 @@ github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -288,6 +308,7 @@ github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= @@ -295,8 +316,11 @@ github.com/graphql-go/graphql v0.8.0 h1:JHRQMeQjofwqVvGwYnr8JnPTY0AxgVy1HpHSGPLd github.com/graphql-go/graphql v0.8.0/go.mod h1:nKiHzRM0qopJEwCITUuIsxk9PlVlwIiiI8pnJEhordQ= github.com/graphql-go/handler v0.2.3 h1:CANh8WPnl5M9uA25c2GBhPqJhE53Fg0Iue/fRNla71E= github.com/graphql-go/handler v0.2.3/go.mod h1:leLF6RpV5uZMN1CdImAxuiayrYYhOk33bZciaUGaXeU= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.2 h1:BqHID5W5qnMkug0Z8UmL8tN0gAy4jQ+B4WFt8cCgluU= @@ -308,6 +332,7 @@ github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+l github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= @@ -317,16 +342,19 @@ github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1: github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/in-toto/in-toto-golang v0.3.3 h1:tkkEBU5i09UEeWKnrp6Rq4fXKAfpVXYMLRO5mDfnb3I= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGARJA= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.2.2 h1:UOGuzwb1PwsrDAObMuhUnj0p5ULPj8V/xJ7Kx9qUBdQ= github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/jpillora/backoff v0.0.0-20180909062703-3050d21c67d7/go.mod h1:2iMrUgbbvHEiQClaW2NsSzMyGHqN+rDFqY705q49KG0= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/kevinmbeaulieu/eq-go v1.0.0/go.mod h1:G3S8ajA56gKBZm4UB9AOyoOS37JO3roToPzKNM8dtdM= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.11.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= @@ -354,6 +382,7 @@ github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+ github.com/logrusorgru/aurora/v3 v3.0.0/go.mod h1:vsR12bk5grlLvLXAYrBsb5Oc/N+LxAlxggSjiwMnCUc= github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/matryer/moq v0.2.3/go.mod h1:9RtPYjTnH1bSBIkpvtHkFN7nbWAnO7oRpdJkEIn6UtE= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= @@ -379,6 +408,7 @@ github.com/mattn/go-tty v0.0.3 h1:5OfyWorkyO7xP52Mq7tB36ajHDG5OHrmBGIS/DtakQI= github.com/mattn/go-tty v0.0.3/go.mod h1:ihxohKRERHTVzN+aSVRwACLCeqIoZAWpoICkkvrWyR0= github.com/mattn/go-unicodeclass v0.0.1 h1:BKdh58FOa0n4QRd39jSeVEF7ncxxV3l4GL05LxZu+XA= github.com/mattn/go-unicodeclass v0.0.1/go.mod h1:dDCkCgOKUwD3sYX4N+tVQdFh/xlFQ1+cWakbQzy98T8= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= @@ -386,13 +416,14 @@ github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.2.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mna/pigeon v1.0.1-0.20200224192238-18953b277063 h1:V7s6vhIrNeOqocziAmRoVJh6gnPPx83ovlpT7Hf5shI= github.com/mna/pigeon v1.0.1-0.20200224192238-18953b277063/go.mod h1:rkFeDZ0gc+YbnrXPw0q2RlI0QRuKBBPu67fgYIyGRNg= -github.com/moby/buildkit v0.10.1-0.20221007224755-f394afc591a5 h1:LQqevgcYPoy2Z8Q5mjfQD44ffIXVHH88xcMDsSiZ3aY= -github.com/moby/buildkit v0.10.1-0.20221007224755-f394afc591a5/go.mod h1:bnzHh/di+tPWrUsvHJf0b+GzHZgRdoDOCkRCgNxtMa8= +github.com/moby/buildkit v0.10.4 h1:FvC+buO8isGpUFZ1abdSLdGHZVqg9sqI4BbFL8tlzP4= +github.com/moby/buildkit v0.10.4/go.mod h1:Yajz9vt1Zw5q9Pp4pdb3TCSUXJBIroIQGQ3TTs/sLug= github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg= github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= github.com/moby/patternmatcher v0.5.0 h1:YCZgJOeULcxLw1Q+sVR636pmS7sPEn1Qo2iAN6M7DBo= @@ -418,12 +449,14 @@ github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKt github.com/muesli/termenv v0.11.1-0.20220204035834-5ac8409525e0/go.mod h1:Bd5NYQ7pd+SrtBSrSNoBBmXlcY8+Xj4BMJgh8qcZrvs= github.com/muesli/termenv v0.11.1-0.20220212125758-44cd13922739 h1:QANkGiGr39l1EESqrE0gZw0/AJNYzIvoGLhIoVYtluI= github.com/muesli/termenv v0.11.1-0.20220212125758-44cd13922739/go.mod h1:Bd5NYQ7pd+SrtBSrSNoBBmXlcY8+Xj4BMJgh8qcZrvs= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/neovim/go-client v1.2.2-0.20220118223211-7c85d516f28c h1:RZWK1awelvqT/WjxL/ews3cvVuG4et4WGmICXO1g2sk= github.com/neovim/go-client v1.2.2-0.20220118223211-7c85d516f28c/go.mod h1:EeqCP3z1vJd70JTaH/KXz9RMZ/nIgEFveX83hYnh/7c= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1lskyM0= @@ -449,13 +482,14 @@ github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/ github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417 h1:3snG66yBm59tKhhSPQrQ/0bCrv1LQbKt40LnUPiUxdc= github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= -github.com/opencontainers/selinux v1.10.2 h1:NFy2xCsjn7+WspbfZkUd5zyVeisV7VFbPSP96+8/ha4= +github.com/opencontainers/selinux v1.10.1 h1:09LIPVRP3uuZGQvgR+SgMSNBd1Eb3vlRbGqQpoHsF8w= github.com/opencontainers/umoci v0.4.7 h1:mbIbtMpZ3v9oMpKaLopnWoLykgmnixeLzq51EzAX5nQ= github.com/opencontainers/umoci v0.4.7/go.mod h1:lgJ4bnwJezsN1o/5d7t/xdRPvmf8TvBko5kKYJsYvgo= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/package-url/packageurl-go v0.1.0 h1:efWBc98O/dBZRg1pw2xiDzovnlMjCa9NPnfaiBduh8I= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -463,9 +497,18 @@ github.com/pkg/term v1.2.0-beta.2 h1:L3y/h2jkuBVFdWiJvNfYfKmzcCnILw7mJWm2JQuMppw github.com/pkg/term v1.2.0-beta.2/go.mod h1:E25nymQcrSllhX42Ok8MRm1+hyBdHY0dCeiKZ9jpNGw= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/protocolbuffers/txtpbfmt v0.0.0-20220608084003-fc78c767cd6a h1:AKJY61V2SQtJ2a2PdeswKk0NM1qF77X+julRNYRxPOk= github.com/protocolbuffers/txtpbfmt v0.0.0-20220608084003-fc78c767cd6a/go.mod h1:KjY0wibdYKc4DYkerHSbguaf3JeIPGhNJBp2BNiFH78= github.com/psanford/memfs v0.0.0-20210214183328-a001468d78ef h1:NKxTG6GVGbfMXc2mIk+KphcH6hagbVXhcFkbTgYleTI= @@ -473,6 +516,7 @@ github.com/psanford/memfs v0.0.0-20210214183328-a001468d78ef/go.mod h1:tcaRap0jS github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.1.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= @@ -492,9 +536,9 @@ github.com/segmentio/textio v1.2.0/go.mod h1:+Rb7v0YVODP+tK5F7FD9TCkV7gOYx9IgLHW github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/shibumi/go-pathspec v1.2.0 h1:KVKEDHYk7bQolRMs7nfzjT3SBOCgcXFJzccnj9bsGbA= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.3.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= @@ -507,13 +551,20 @@ github.com/smallstep/assert v0.0.0-20200723003110-82e2b9b3b262/go.mod h1:MyOHs9P github.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM= github.com/smartystreets/gunit v1.0.0/go.mod h1:qwPWnhz6pn0NnRBP++URONOVyNkPyr4SauJk4cUOwJs= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sourcegraph/jsonrpc2 v0.1.0 h1:ohJHjZ+PcaLxDUjqk2NC3tIGsVa5bXThe1ZheSXOjuk= github.com/sourcegraph/jsonrpc2 v0.1.0/go.mod h1:ZafdZgk/axhT1cvZAPOhw+95nz2I/Ra5qMlU4gTRwIo= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spy16/slurp v0.2.3 h1:NZGZ3MEyd0IUlnauMiGcTJe0DfpE4BVe3SMfdFvdwNU= github.com/spy16/slurp v0.2.3/go.mod h1:Omrszh5Bznh+fhYrxnR4R2XrRKRelPlbY5IwQizOui0= github.com/square/certstrap v1.3.0 h1:N9P0ZRA+DjT8pq5fGDj0z3FjafRKnBDypP0QHpMlaAk= @@ -535,12 +586,16 @@ github.com/tj/assert v0.0.3/go.mod h1:Ne6X72Q+TB1AteidzQncjw9PabbMp4PBMZ1k+vd1Pv github.com/tj/go-elastic v0.0.0-20171221160941-36157cbbebc2/go.mod h1:WjeM0Oo1eNAjXGDx2yma7uG2XoyRZTq1uv3M/o7imD0= github.com/tj/go-kinesis v0.0.0-20171128231115-08b17f58cb1b/go.mod h1:/yhzCV0xPfx6jb1bBgRFjl5lytqVqZXEaeqWP8lTEao= github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tonistiigi/fsutil v0.0.0-20220115021204-b19f7f9cb274 h1:wbyZxD6IPFp0sl5uscMOJRsz5UKGFiNiD16e+MVfKZY= +github.com/tonistiigi/fsutil v0.0.0-20220115021204-b19f7f9cb274/go.mod h1:oPAfvw32vlUJSjyDcQ3Bu0nb2ON2B+G0dtVN/SZNJiA= github.com/tonistiigi/fsutil v0.0.0-20220930225714-4638ad635be5 h1:NJ1nZs4j4XcBJKIY5sAwTGp9w5b78Zxr3+r0zXRuKnA= github.com/tonistiigi/fsutil v0.0.0-20220930225714-4638ad635be5/go.mod h1:F83XRhNblQsKQH9hcKEE45GAOkL9590mtw9KsD0Q4fE= github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea h1:SXhTLE6pb6eld/v/cCndK0AMpt1wiVFb/YYmqB3/QG0= github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea/go.mod h1:WPnis/6cRcDZSUvVmezrxJPkiO87ThFYsoUiMwWNDJk= github.com/tonistiigi/vt100 v0.0.0-20210615222946-8066bb97264f h1:DLpt6B5oaaS8jyXHa9VA4rrZloBVPVXeCtrOsrFauxc= github.com/tonistiigi/vt100 v0.0.0-20210615222946-8066bb97264f/go.mod h1:ulncasL3N9uLrVann0m+CDlJKWsIAP34MPcOJF6VRvc= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.4/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= @@ -567,6 +622,8 @@ github.com/vito/vt100 v0.0.0-20220721174540-1f9a7c0f76a9/go.mod h1:tef+Px8jpdyyU github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -578,6 +635,7 @@ github.com/zeebo/xxh3 v1.0.2 h1:xZmwmqxHZA8AI603jOQ0tMqmBr9lPeFwGg6d+xy9DC0= github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= github.com/zmb3/spotify/v2 v2.2.1 h1:5Nb8pwVDPl6CVr3jEfvYuEuWTPO69KvP2a2BzThq+WY= github.com/zmb3/spotify/v2 v2.2.1/go.mod h1:+LVh9CafHu7SedyqYmEf12Rd01dIVlEL845yNhksW0E= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -677,12 +735,15 @@ golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91 golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -750,6 +811,8 @@ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -800,6 +863,7 @@ golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210313202042-bd2e13477e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -843,6 +907,7 @@ golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 h1:ftMN5LMiBFjbzleLqtoBZk7KdJwhuybIU+FckUHgoyQ= golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 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= @@ -854,6 +919,7 @@ golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190830223141-573d9926052a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -978,6 +1044,7 @@ google.golang.org/genproto v0.0.0-20220810155839-1856144b1d9c h1:IooGDWedfLC6KLc google.golang.org/genproto v0.0.0-20220810155839-1856144b1d9c/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= @@ -1014,6 +1081,7 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +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-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1022,9 +1090,11 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntN gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.6.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -1039,6 +1109,7 @@ gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= +gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/pkg/runtimes/buildkit.go b/pkg/runtimes/buildkit.go index 73c1b649..5561fe89 100644 --- a/pkg/runtimes/buildkit.go +++ b/pkg/runtimes/buildkit.go @@ -18,7 +18,6 @@ import ( "github.com/adrg/xdg" "github.com/containerd/containerd/platforms" - dockerconfig "github.com/docker/cli/cli/config" "github.com/docker/distribution/reference" "github.com/hashicorp/go-multierror" kitdclient "github.com/moby/buildkit/client" @@ -143,7 +142,7 @@ func NewBuildkit(ctx context.Context, _ bass.RuntimePool, cfg *bass.Scope) (bass Client: client, Platform: platform, - authp: authprovider.NewDockerAuthProvider(dockerconfig.LoadDefaultConfigFile(os.Stderr)), + authp: authprovider.NewDockerAuthProvider(os.Stderr), }, nil } From bc0f019038e1daf6261be9047391f9e5b16768cd Mon Sep 17 00:00:00 2001 From: Alex Suraci Date: Mon, 10 Oct 2022 19:18:32 -0400 Subject: [PATCH 03/25] dagger: support more things * fix exec'ing before mounts are added * support thunk dir * support thunk env * support mounting thunk files * support mounting fspaths --- pkg/runtimes/dagger.go | 89 ++++++++++++++++++++++++++++++---- pkg/runtimes/dagger/api.gen.go | 11 +++++ 2 files changed, 91 insertions(+), 9 deletions(-) diff --git a/pkg/runtimes/dagger.go b/pkg/runtimes/dagger.go index 851b43c1..4a64803f 100644 --- a/pkg/runtimes/dagger.go +++ b/pkg/runtimes/dagger.go @@ -7,6 +7,9 @@ import ( "errors" "fmt" "io" + "io/fs" + "path" + "strings" kitdclient "github.com/moby/buildkit/client" ocispecs "github.com/opencontainers/image-spec/specs-go/v1" @@ -156,8 +159,7 @@ func (runtime *Dagger) container(ctx context.Context, core *dagger.Query, thunk ctr := root. WithMountedTemp("/tmp"). WithMountedTemp("/dev/shm"). - WithWorkdir(workDir). - Exec(dagger.WithContainerExecArgs(cmd.Args)) + WithWorkdir(workDir) // TODO: insecure // if thunk.Insecure { @@ -184,10 +186,32 @@ func (runtime *Dagger) container(ctx context.Context, core *dagger.Query, thunk // runOpt = append(runOpt, extraOpts...) - return ctr, nil + if cmd.Dir != nil { + ctr = ctr.WithWorkdir(*cmd.Dir) + } + + for _, env := range cmd.Env { + name, val, ok := strings.Cut(env, "=") + _ = ok // doesnt matter + ctr = ctr.WithVariable(name, val) + } + + execOpts := []dagger.ContainerExecOption{ + dagger.WithContainerExecArgs(cmd.Args), + } + + if cmd.Stdin != nil { + execOpts = append(execOpts, dagger.WithContainerExecOpts(dagger.ExecOpts{ + Stdin: string(cmd.Stdin), + })) + } + + return ctr.Exec(execOpts...), nil } func (runtime *Dagger) mount(ctx context.Context, core *dagger.Query, ctr *dagger.Container, target string, src bass.ThunkMountSource) (*dagger.Container, error) { + target = path.Join(workDir, target) + switch { case src.ThunkPath != nil: srcCtr, err := runtime.container(ctx, core, src.ThunkPath.Thunk) @@ -204,14 +228,61 @@ func (runtime *Dagger) mount(ctx context.Context, core *dagger.Query, ctr *dagge return ctr.WithMountedDirectory(target, id), nil } else { - return nil, fmt.Errorf("mounting files not implemented yet") + id, err := srcCtr.File(fsp.Slash()).ID(ctx) + if err != nil { + return nil, err + } + + return ctr.WithMountedFile(target, id), nil + } + // case src.Cache != nil: + // if src.Cache.Path.FilesystemPath().Slash() != "." { + // return nil, fmt.Errorf("mounting subpaths of cache not implemented yet: %s", src.ToValue()) + // } + + // cacheID, err := core.CacheFromTokens([]string{src.Cache.ID}).ID(ctx) + // return ctr.WithMountedCache(cacheID, target), nil + case src.FSPath != nil: + dir := core.Directory() + + root := path.Clean(src.FSPath.Path.Slash()) + err := fs.WalkDir(src.FSPath.FS, ".", func(entry string, d fs.DirEntry, err error) error { + if err != nil { + return err + } + + if d.IsDir() { + return nil + } + + content, err := fs.ReadFile(src.FSPath.FS, entry) + if err != nil { + return fmt.Errorf("read fs %s: %w", entry, err) + } + + dir = dir.WithNewFile(entry, dagger.WithDirectoryWithNewFileContents(string(content))) - // id, err := srcCtr.File(fsp.Slash()).ID(ctx) - // if err != nil { - // return nil, err - // } + return nil + }) + if err != nil { + return nil, fmt.Errorf("walk %s: %w", root, err) + } + + fsp := src.FSPath.Path.FilesystemPath() + if fsp.IsDir() { + dirID, err := dir.Directory(fsp.Slash()).ID(ctx) + if err != nil { + return nil, err + } + + return ctr.WithMountedDirectory(target, dirID), nil + } else { + fileID, err := dir.File(fsp.Slash()).ID(ctx) + if err != nil { + return nil, err + } - // return ctr.WithMountedDirectory(target, id), nil + return ctr.WithMountedFile(target, fileID), nil } default: return nil, fmt.Errorf("mounting %T not implemented yet", src.ToValue()) diff --git a/pkg/runtimes/dagger/api.gen.go b/pkg/runtimes/dagger/api.gen.go index 9e960e85..c77f802b 100644 --- a/pkg/runtimes/dagger/api.gen.go +++ b/pkg/runtimes/dagger/api.gen.go @@ -140,6 +140,17 @@ func (r *Container) ExitCode(ctx context.Context) (int, error) { return response, q.Execute(ctx, r.c) } +// Retrieve a file at the given path. Mounts are included. +func (r *Container) File(path string) *File { + q := r.q.Select("file") + q = q.Arg("path", path) + + return &File{ + q: q, + c: r.c, + } +} + // Initialize this container from the base image published at the given address func (r *Container) From(address ContainerAddress) *Container { q := r.q.Select("from") From b611bf193a7b190f529a6dab2bcf829c6ab6883a Mon Sep 17 00:00:00 2001 From: Alex Suraci Date: Tue, 11 Oct 2022 12:16:17 -0400 Subject: [PATCH 04/25] basic cache support, add hostname as env for now --- pkg/runtimes/dagger.go | 34 +++++++++++++++++++------------ pkg/runtimes/dagger/api.gen.go | 17 ++++++++++++++++ pkg/runtimes/dagger/workaround.go | 14 ------------- 3 files changed, 38 insertions(+), 27 deletions(-) delete mode 100644 pkg/runtimes/dagger/workaround.go diff --git a/pkg/runtimes/dagger.go b/pkg/runtimes/dagger.go index 4a64803f..f16416e3 100644 --- a/pkg/runtimes/dagger.go +++ b/pkg/runtimes/dagger.go @@ -147,12 +147,6 @@ func (runtime *Dagger) container(ctx context.Context, core *dagger.Query, thunk root = core.Container().From(imageRef) } - // TODO: use as hostname (also Dagger should support arbitrary labels?) - // id, err := thunk.Hash() - // if err != nil { - // return nil, err - // } - // TODO: TLS and service networking, but Dagger needs to figure that out // first @@ -161,6 +155,13 @@ func (runtime *Dagger) container(ctx context.Context, core *dagger.Query, thunk WithMountedTemp("/dev/shm"). WithWorkdir(workDir) + // TODO: set hostname instead once Dagger supports it + id, err := thunk.Hash() + if err != nil { + return nil, err + } + ctr = ctr.WithVariable("THUNK", id) + // TODO: insecure // if thunk.Insecure { // needsInsecure = true @@ -210,7 +211,9 @@ func (runtime *Dagger) container(ctx context.Context, core *dagger.Query, thunk } func (runtime *Dagger) mount(ctx context.Context, core *dagger.Query, ctr *dagger.Container, target string, src bass.ThunkMountSource) (*dagger.Container, error) { - target = path.Join(workDir, target) + if !path.IsAbs(target) { + target = path.Join(workDir, target) + } switch { case src.ThunkPath != nil: @@ -235,13 +238,18 @@ func (runtime *Dagger) mount(ctx context.Context, core *dagger.Query, ctr *dagge return ctr.WithMountedFile(target, id), nil } - // case src.Cache != nil: - // if src.Cache.Path.FilesystemPath().Slash() != "." { - // return nil, fmt.Errorf("mounting subpaths of cache not implemented yet: %s", src.ToValue()) - // } + case src.Cache != nil: + fsp := src.Cache.Path.FilesystemPath() + if fsp.Slash() != "./" { + return nil, fmt.Errorf("mounting subpaths of cache not implemented yet: %s", fsp.Slash()) + } + + cacheID, err := core.CacheFromTokens([]string{src.Cache.ID}).ID(ctx) + if err != nil { + return nil, err + } - // cacheID, err := core.CacheFromTokens([]string{src.Cache.ID}).ID(ctx) - // return ctr.WithMountedCache(cacheID, target), nil + return ctr.WithMountedCache(cacheID, target), nil case src.FSPath != nil: dir := core.Directory() diff --git a/pkg/runtimes/dagger/api.gen.go b/pkg/runtimes/dagger/api.gen.go index c77f802b..1ceae2df 100644 --- a/pkg/runtimes/dagger/api.gen.go +++ b/pkg/runtimes/dagger/api.gen.go @@ -15,6 +15,9 @@ func New(c graphql.Client) *Query { } } +// A global cache volume identifier +type CacheID string + // The address (also known as "ref") of a container published as an OCI image. // // Examples: @@ -51,6 +54,20 @@ type ExecOpts struct { Stdin string `json:"stdin"` } +// A directory whose contents persist across runs +type CacheVolume struct { + q *querybuilder.Selection + c graphql.Client +} + +func (r *CacheVolume) ID(ctx context.Context) (CacheID, error) { + q := r.q.Select("id") + + var response CacheID + q = q.Bind(&response) + return response, q.Execute(ctx, r.c) +} + // An OCI-compatible container, also known as a docker container type Container struct { q *querybuilder.Selection diff --git a/pkg/runtimes/dagger/workaround.go b/pkg/runtimes/dagger/workaround.go deleted file mode 100644 index 9040752b..00000000 --- a/pkg/runtimes/dagger/workaround.go +++ /dev/null @@ -1,14 +0,0 @@ -package dagger - -import ( - "github.com/Khan/genqlient/graphql" - "go.dagger.io/dagger/sdk/go/dagger/querybuilder" -) - -// TODO(vito): why are these not being added? -type CacheID string - -type CacheVolume struct { - q *querybuilder.Selection - c graphql.Client -} From 125c92559da05158f28188a68ab90b532548eeed Mon Sep 17 00:00:00 2001 From: Alex Suraci Date: Wed, 12 Oct 2022 21:59:01 -0400 Subject: [PATCH 05/25] support ExportPath, host paths (kinda) --- dagger | 2 +- pkg/runtimes/buildkit.go | 14 +- pkg/runtimes/dagger.go | 195 ++++++-- pkg/runtimes/dagger/api.gen.go | 883 +++++++++++++++++++++++++++------ 4 files changed, 905 insertions(+), 189 deletions(-) diff --git a/dagger b/dagger index 83b8e65a..65963f71 160000 --- a/dagger +++ b/dagger @@ -1 +1 @@ -Subproject commit 83b8e65a55cd21218cce812b45d9d534824e3eb3 +Subproject commit 65963f71f9be89cb4463ae2c4a3cb80179fd7f0d diff --git a/pkg/runtimes/buildkit.go b/pkg/runtimes/buildkit.go index 5561fe89..19bf9c4f 100644 --- a/pkg/runtimes/buildkit.go +++ b/pkg/runtimes/buildkit.go @@ -622,7 +622,7 @@ func (d *portHealthChecker) doBuild(ctx context.Context, gw gwclient.Client) (*g } } -type builder struct { +type buildkitBuilder struct { runtime *Buildkit resolver llb.ImageMetaResolver @@ -630,8 +630,8 @@ type builder struct { localDirs map[string]string } -func (runtime *Buildkit) newBuilder(ctx context.Context, resolver llb.ImageMetaResolver) *builder { - return &builder{ +func (runtime *Buildkit) newBuilder(ctx context.Context, resolver llb.ImageMetaResolver) *buildkitBuilder { + return &buildkitBuilder{ runtime: runtime, resolver: resolver, @@ -640,7 +640,7 @@ func (runtime *Buildkit) newBuilder(ctx context.Context, resolver llb.ImageMetaR } } -func (b *builder) llb(ctx context.Context, thunk bass.Thunk, extraOpts ...llb.RunOption) (llb.ExecState, string, bool, error) { +func (b *buildkitBuilder) llb(ctx context.Context, thunk bass.Thunk, extraOpts ...llb.RunOption) (llb.ExecState, string, bool, error) { cmd, err := NewCommand(ctx, b.runtime, thunk) if err != nil { return llb.ExecState{}, "", false, err @@ -823,7 +823,7 @@ func (r *Buildkit) ref(ctx context.Context, imageRef bass.ImageRef) (string, err return imageRef.Ref() } -func (b *builder) image(ctx context.Context, image *bass.ThunkImage) (llb.State, llb.State, string, bool, error) { +func (b *buildkitBuilder) image(ctx context.Context, image *bass.ThunkImage) (llb.State, llb.State, string, bool, error) { if image == nil { // TODO: test return llb.Scratch(), llb.Scratch(), "", false, nil @@ -858,7 +858,7 @@ func (b *builder) image(ctx context.Context, image *bass.ThunkImage) (llb.State, return llb.State{}, llb.State{}, "", false, fmt.Errorf("unsupported image type: %+v", image) } -func (b *builder) unpackImageArchive(ctx context.Context, thunkPath bass.ThunkPath, tag string) (llb.State, llb.State, string, bool, error) { +func (b *buildkitBuilder) unpackImageArchive(ctx context.Context, thunkPath bass.ThunkPath, tag string) (llb.State, llb.State, string, bool, error) { shimExe, err := b.runtime.shim() if err != nil { return llb.State{}, llb.State{}, "", false, err @@ -959,7 +959,7 @@ func (b *builder) unpackImageArchive(ctx context.Context, thunkPath bass.ThunkPa return image, llb.Scratch(), "", needsInsecure, nil } -func (b *builder) initializeMount(ctx context.Context, source bass.ThunkMountSource, targetPath string) (llb.RunOption, string, bool, error) { +func (b *buildkitBuilder) initializeMount(ctx context.Context, source bass.ThunkMountSource, targetPath string) (llb.RunOption, string, bool, error) { if source.ThunkPath != nil { thunkSt, baseSourcePath, needsInsecure, err := b.llb(ctx, source.ThunkPath.Thunk) if err != nil { diff --git a/pkg/runtimes/dagger.go b/pkg/runtimes/dagger.go index f16416e3..8f550c2c 100644 --- a/pkg/runtimes/dagger.go +++ b/pkg/runtimes/dagger.go @@ -8,11 +8,13 @@ import ( "fmt" "io" "io/fs" + "os" "path" "strings" kitdclient "github.com/moby/buildkit/client" ocispecs "github.com/opencontainers/image-spec/specs-go/v1" + "github.com/tonistiigi/fsutil" "github.com/vito/bass/pkg/bass" "github.com/vito/bass/pkg/runtimes/dagger" "github.com/vito/progrock" @@ -55,13 +57,20 @@ func (runtime *Dagger) Run(ctx context.Context, thunk bass.Thunk) error { defer statusProxy.Wait() opts := &engine.Config{ - Progress: statusProxy.Writer(), + Progress: statusProxy.Writer(), + LocalDirs: map[string]string{}, + } + + if err := runtime.collectLocalDirs(ctx, opts.LocalDirs, thunk); err != nil { + return err } return engine.Start(ctx, opts, func(ctx engine.Context) error { core := dagger.New(ctx.Client) - ctr, err := runtime.container(ctx, core, thunk) + builder := runtime.newBuilder(core) + + ctr, err := builder.container(ctx, thunk) if err != nil { return err } @@ -85,16 +94,25 @@ func (runtime *Dagger) Start(ctx context.Context, thunk bass.Thunk) (StartResult func (runtime *Dagger) Read(ctx context.Context, w io.Writer, thunk bass.Thunk) error { statusProxy := forwardStatus(progrock.RecorderFromContext(ctx)) - defer statusProxy.Wait() + + // XXX(vito): this is hanging for some reason + // defer statusProxy.Wait() opts := &engine.Config{ - Progress: statusProxy.Writer(), + Progress: statusProxy.Writer(), + LocalDirs: map[string]string{}, + } + + if err := runtime.collectLocalDirs(ctx, opts.LocalDirs, thunk); err != nil { + return err } return engine.Start(ctx, opts, func(ctx engine.Context) error { core := dagger.New(ctx.Client) - ctr, err := runtime.container(ctx, core, thunk) + builder := runtime.newBuilder(core) + + ctr, err := builder.container(ctx, thunk) if err != nil { return err } @@ -117,8 +135,99 @@ func (runtime *Dagger) Export(ctx context.Context, w io.Writer, thunk bass.Thunk return errors.New("Export: not implemented") } +func (runtime *Dagger) collectLocalDirs(ctx context.Context, dest map[string]string, thunk bass.Thunk) error { + cmd, err := NewCommand(ctx, runtime, thunk) + if err != nil { + return err + } + + for _, mnt := range cmd.Mounts { + if mnt.Source.HostPath != nil { + dest[mnt.Source.HostPath.Hash()] = mnt.Source.HostPath.ContextDir + } else if mnt.Source.ThunkPath != nil { + err := runtime.collectLocalDirs(ctx, dest, mnt.Source.ThunkPath.Thunk) + if err != nil { + return fmt.Errorf("collect local dirs for mount %s: %w", mnt.Target, err) + } + } + } + + return nil +} + func (runtime *Dagger) ExportPath(ctx context.Context, w io.Writer, tp bass.ThunkPath) error { - return errors.New("ExportPath: not implemented") + dir, err := os.MkdirTemp("", "bass-dagger-export*") + if err != nil { + return err + } + + defer os.RemoveAll(dir) + + statusProxy := forwardStatus(progrock.RecorderFromContext(ctx)) + defer statusProxy.Wait() + + opts := &engine.Config{ + Progress: statusProxy.Writer(), + LocalDirs: map[string]string{"export": dir}, + } + + if err := runtime.collectLocalDirs(ctx, opts.LocalDirs, tp.Thunk); err != nil { + return err + } + + walkOpts := &fsutil.WalkOpt{} + err = engine.Start(ctx, opts, func(ctx engine.Context) error { + core := dagger.New(ctx.Client) + + builder := runtime.newBuilder(core) + + ctr, err := builder.container(ctx, tp.Thunk) + if err != nil { + return err + } + + fsp := tp.Path.FilesystemPath() + if fsp.IsDir() { + srcID, err := ctr.Directory(fsp.Slash()).ID(ctx) + if err != nil { + return fmt.Errorf("get source dir ID: %w", err) + } + + ok, err := core.Host().Directory("export").Write(ctx, srcID) + if err != nil { + return fmt.Errorf("write to export dir: %w", err) + } + + if !ok { + return fmt.Errorf("write to export dir: not ok") + } + } else { + // TODO: it'd be great if I didn't have to export the entire directory! + + walkOpts.IncludePatterns = []string{fsp.Name()} + + srcID, err := ctr.Directory(fsp.Dir().Slash()).ID(ctx) + if err != nil { + return fmt.Errorf("get source dir ID: %w", err) + } + + ok, err := core.Host().Directory("export").Write(ctx, srcID) + if err != nil { + return fmt.Errorf("write to export dir: %w", err) + } + + if !ok { + return fmt.Errorf("write to export dir: not ok") + } + } + + return nil + }) + if err != nil { + return fmt.Errorf("engine: %w", err) + } + + return fsutil.WriteTar(ctx, fsutil.NewFS(dir, walkOpts), w) } func (runtime *Dagger) Prune(ctx context.Context, opts bass.PruneOpts) error { @@ -129,13 +238,25 @@ func (runtime *Dagger) Close() error { return nil } -func (runtime *Dagger) container(ctx context.Context, core *dagger.Query, thunk bass.Thunk) (*dagger.Container, error) { - cmd, err := NewCommand(ctx, runtime, thunk) +func (runtime *Dagger) newBuilder(core *dagger.Query) *daggerBuilder { + return &daggerBuilder{ + runtime: runtime, + core: core, + } +} + +type daggerBuilder struct { + runtime *Dagger + core *dagger.Query +} + +func (b *daggerBuilder) container(ctx context.Context, thunk bass.Thunk) (*dagger.Container, error) { + cmd, err := NewCommand(ctx, b.runtime, thunk) if err != nil { return nil, err } - imageRef, baseContainer, err := runtime.image(ctx, core, thunk.Image) + imageRef, baseContainer, err := b.image(ctx, thunk.Image) if err != nil { return nil, err } @@ -144,7 +265,7 @@ func (runtime *Dagger) container(ctx context.Context, core *dagger.Query, thunk if baseContainer != nil { root = baseContainer } else { - root = core.Container().From(imageRef) + root = b.core.Container().From(imageRef) } // TODO: TLS and service networking, but Dagger needs to figure that out @@ -172,7 +293,7 @@ func (runtime *Dagger) container(ctx context.Context, core *dagger.Query, thunk // } for _, mount := range cmd.Mounts { - mounted, err := runtime.mount(ctx, core, ctr, mount.Target, mount.Source) + mounted, err := b.mount(ctx, ctr, mount.Target, mount.Source) if err != nil { return nil, err } @@ -197,27 +318,22 @@ func (runtime *Dagger) container(ctx context.Context, core *dagger.Query, thunk ctr = ctr.WithVariable(name, val) } - execOpts := []dagger.ContainerExecOption{ - dagger.WithContainerExecArgs(cmd.Args), - } - - if cmd.Stdin != nil { - execOpts = append(execOpts, dagger.WithContainerExecOpts(dagger.ExecOpts{ + return ctr.Exec(dagger.ContainerExecOpts{ + Args: cmd.Args, + Opts: dagger.ExecOpts{ Stdin: string(cmd.Stdin), - })) - } - - return ctr.Exec(execOpts...), nil + }, + }), nil } -func (runtime *Dagger) mount(ctx context.Context, core *dagger.Query, ctr *dagger.Container, target string, src bass.ThunkMountSource) (*dagger.Container, error) { +func (b *daggerBuilder) mount(ctx context.Context, ctr *dagger.Container, target string, src bass.ThunkMountSource) (*dagger.Container, error) { if !path.IsAbs(target) { target = path.Join(workDir, target) } switch { case src.ThunkPath != nil: - srcCtr, err := runtime.container(ctx, core, src.ThunkPath.Thunk) + srcCtr, err := b.container(ctx, src.ThunkPath.Thunk) if err != nil { return nil, err } @@ -244,14 +360,14 @@ func (runtime *Dagger) mount(ctx context.Context, core *dagger.Query, ctr *dagge return nil, fmt.Errorf("mounting subpaths of cache not implemented yet: %s", fsp.Slash()) } - cacheID, err := core.CacheFromTokens([]string{src.Cache.ID}).ID(ctx) + cacheID, err := b.core.CacheFromTokens([]string{src.Cache.ID}).ID(ctx) if err != nil { return nil, err } return ctr.WithMountedCache(cacheID, target), nil case src.FSPath != nil: - dir := core.Directory() + dir := b.core.Directory() root := path.Clean(src.FSPath.Path.Slash()) err := fs.WalkDir(src.FSPath.FS, ".", func(entry string, d fs.DirEntry, err error) error { @@ -268,7 +384,9 @@ func (runtime *Dagger) mount(ctx context.Context, core *dagger.Query, ctr *dagge return fmt.Errorf("read fs %s: %w", entry, err) } - dir = dir.WithNewFile(entry, dagger.WithDirectoryWithNewFileContents(string(content))) + dir = dir.WithNewFile(entry, dagger.DirectoryWithNewFileOpts{ + Contents: string(content), + }) return nil }) @@ -290,6 +408,27 @@ func (runtime *Dagger) mount(ctx context.Context, core *dagger.Query, ctr *dagge return nil, err } + return ctr.WithMountedFile(target, fileID), nil + } + case src.HostPath != nil: + id := src.HostPath.Hash() + + hostDir := b.core.Host().Directory(dagger.HostDirectoryID(id)).Read() + + fsp := src.HostPath.Path.FilesystemPath() + if fsp.IsDir() { + dirID, err := hostDir.Directory(fsp.Slash()).ID(ctx) + if err != nil { + return nil, err + } + + return ctr.WithMountedDirectory(target, dirID), nil + } else { + fileID, err := hostDir.File(fsp.Slash()).ID(ctx) + if err != nil { + return nil, fmt.Errorf("get host file ID: %w", err) + } + return ctr.WithMountedFile(target, fileID), nil } default: @@ -297,7 +436,7 @@ func (runtime *Dagger) mount(ctx context.Context, core *dagger.Query, ctr *dagge } } -func (runtime *Dagger) image(ctx context.Context, core *dagger.Query, image *bass.ThunkImage) (dagger.ContainerAddress, *dagger.Container, error) { +func (b *daggerBuilder) image(ctx context.Context, image *bass.ThunkImage) (dagger.ContainerAddress, *dagger.Container, error) { if image == nil { return "", nil, nil } @@ -312,7 +451,7 @@ func (runtime *Dagger) image(ctx context.Context, core *dagger.Query, image *bas } if image.Thunk != nil { - ctr, err := runtime.container(ctx, core, *image.Thunk) + ctr, err := b.container(ctx, *image.Thunk) if err != nil { return "", nil, fmt.Errorf("image thunk llb: %w", err) } diff --git a/pkg/runtimes/dagger/api.gen.go b/pkg/runtimes/dagger/api.gen.go index 1ceae2df..592e0aab 100644 --- a/pkg/runtimes/dagger/api.gen.go +++ b/pkg/runtimes/dagger/api.gen.go @@ -1,3 +1,5 @@ +// Code generated by dagger. DO NOT EDIT. + package dagger import ( @@ -33,10 +35,59 @@ type ContainerID string // A content-addressed directory identifier type DirectoryID string +type FSID string + type FileID string +// An identifier for a directory on the host +type HostDirectoryID string + +// A unique identifier for a secret type SecretID string +type CacheMountInput struct { + // Cache mount name + Name string `json:"name"` + + // path at which the cache will be mounted + Path string `json:"path"` + + // Cache mount sharing mode (TODO: switch to enum) + SharingMode string `json:"sharingMode"` +} + +type ExecEnvInput struct { + // Env var name + Name string `json:"name"` + + // Env var value + Value string `json:"value"` +} + +type ExecInput struct { + // Command to execute + // Example: ["echo", "hello, world!"] + Args []string `json:"args"` + + // Cached mounts + CacheMounts []CacheMountInput `json:"cacheMounts"` + + // Env vars + Env []ExecEnvInput `json:"env"` + + // Filesystem mounts + Mounts []MountInput `json:"mounts"` + + // Secret env vars + SecretEnv []ExecSecretEnvInput `json:"secretEnv"` + + // Include the host's ssh agent socket in the exec at the provided path + SSHAuthSock string `json:"sshAuthSock"` + + // Working directory + Workdir string `json:"workdir"` +} + // Additional options for executing a command type ExecOpts struct { // Optionally redirect the command's standard error to a file in the container. @@ -54,6 +105,22 @@ type ExecOpts struct { Stdin string `json:"stdin"` } +type ExecSecretEnvInput struct { + // Secret env var value + ID SecretID `json:"id"` + + // Env var name + Name string `json:"name"` +} + +type MountInput struct { + // filesystem to mount + FS FSID `json:"fs"` + + // path at which the filesystem will be mounted + Path string `json:"path"` +} + // A directory whose contents persist across runs type CacheVolume struct { q *querybuilder.Selection @@ -103,42 +170,29 @@ func (r *Container) Entrypoint(ctx context.Context) ([]string, error) { return response, q.Execute(ctx, r.c) } -// ContainerExecOptions contains options for Container.Exec -type ContainerExecOptions struct { - Args *[]string +// ContainerExecOpts contains options for Container.Exec +type ContainerExecOpts struct { + Args []string - Opts *ExecOpts -} - -// ContainerExecOption represents an option handler for Container.Exec -type ContainerExecOption func(*ContainerExecOptions) - -// WithContainerExecArgs sets the "args" option for Exec -func WithContainerExecArgs(args []string) ContainerExecOption { - return func(daggerOptions *ContainerExecOptions) { - daggerOptions.Args = &args - } -} - -// WithContainerExecOpts sets the "opts" option for Exec -func WithContainerExecOpts(opts ExecOpts) ContainerExecOption { - return func(daggerOptions *ContainerExecOptions) { - daggerOptions.Opts = &opts - } + Opts ExecOpts } // This container after executing the specified command inside it -func (r *Container) Exec(options ...ContainerExecOption) *Container { - opts := &ContainerExecOptions{} - for _, fn := range options { - fn(opts) - } +func (r *Container) Exec(opts ...ContainerExecOpts) *Container { q := r.q.Select("exec") - if opts != nil && opts.Args != nil { - q = q.Arg("args", opts.Args) + // `args` optional argument + for i := len(opts) - 1; i >= 0; i-- { + if !querybuilder.IsZeroValue(opts[i].Args) { + q = q.Arg("args", opts[i].Args) + break + } } - if opts != nil && opts.Opts != nil { - q = q.Arg("opts", opts.Opts) + // `opts` optional argument + for i := len(opts) - 1; i >= 0; i-- { + if !querybuilder.IsZeroValue(opts[i].Opts) { + q = q.Arg("opts", opts[i].Opts) + break + } } return &Container{ @@ -267,30 +321,20 @@ func (r *Container) Variables(ctx context.Context) ([]string, error) { return response, q.Execute(ctx, r.c) } -// ContainerWithDefaultArgsOptions contains options for Container.WithDefaultArgs -type ContainerWithDefaultArgsOptions struct { - Args *[]string -} - -// ContainerWithDefaultArgsOption represents an option handler for Container.WithDefaultArgs -type ContainerWithDefaultArgsOption func(*ContainerWithDefaultArgsOptions) - -// WithContainerWithDefaultArgsArgs sets the "args" option for WithDefaultArgs -func WithContainerWithDefaultArgsArgs(args []string) ContainerWithDefaultArgsOption { - return func(daggerOptions *ContainerWithDefaultArgsOptions) { - daggerOptions.Args = &args - } +// ContainerWithDefaultArgsOpts contains options for Container.WithDefaultArgs +type ContainerWithDefaultArgsOpts struct { + Args []string } // Configures default arguments for future commands -func (r *Container) WithDefaultArgs(options ...ContainerWithDefaultArgsOption) *Container { - opts := &ContainerWithDefaultArgsOptions{} - for _, fn := range options { - fn(opts) - } +func (r *Container) WithDefaultArgs(opts ...ContainerWithDefaultArgsOpts) *Container { q := r.q.Select("withDefaultArgs") - if opts != nil && opts.Args != nil { - q = q.Arg("args", opts.Args) + // `args` optional argument + for i := len(opts) - 1; i >= 0; i-- { + if !querybuilder.IsZeroValue(opts[i].Args) { + q = q.Arg("args", opts[i].Args) + break + } } return &Container{ @@ -310,32 +354,22 @@ func (r *Container) WithEntrypoint(args []string) *Container { } } -// ContainerWithMountedCacheOptions contains options for Container.WithMountedCache -type ContainerWithMountedCacheOptions struct { - Source *DirectoryID -} - -// ContainerWithMountedCacheOption represents an option handler for Container.WithMountedCache -type ContainerWithMountedCacheOption func(*ContainerWithMountedCacheOptions) - -// WithContainerWithMountedCacheSource sets the "source" option for WithMountedCache -func WithContainerWithMountedCacheSource(source DirectoryID) ContainerWithMountedCacheOption { - return func(daggerOptions *ContainerWithMountedCacheOptions) { - daggerOptions.Source = &source - } +// ContainerWithMountedCacheOpts contains options for Container.WithMountedCache +type ContainerWithMountedCacheOpts struct { + Source DirectoryID } // This container plus a cache volume mounted at the given path -func (r *Container) WithMountedCache(cache CacheID, path string, options ...ContainerWithMountedCacheOption) *Container { - opts := &ContainerWithMountedCacheOptions{} - for _, fn := range options { - fn(opts) - } +func (r *Container) WithMountedCache(cache CacheID, path string, opts ...ContainerWithMountedCacheOpts) *Container { q := r.q.Select("withMountedCache") q = q.Arg("cache", cache) q = q.Arg("path", path) - if opts != nil && opts.Source != nil { - q = q.Arg("source", opts.Source) + // `source` optional argument + for i := len(opts) - 1; i >= 0; i-- { + if !querybuilder.IsZeroValue(opts[i].Source) { + q = q.Arg("source", opts[i].Source) + break + } } return &Container{ @@ -468,36 +502,76 @@ func (r *Container) Workdir(ctx context.Context) (string, error) { return response, q.Execute(ctx, r.c) } -// A directory -type Directory struct { +// Core API +type Core struct { q *querybuilder.Selection c graphql.Client } -// DirectoryContentsOptions contains options for Directory.Contents -type DirectoryContentsOptions struct { - Path *string +// Look up a filesystem by its ID +func (r *Core) Filesystem(id FSID) *Filesystem { + q := r.q.Select("filesystem") + q = q.Arg("id", id) + + return &Filesystem{ + q: q, + c: r.c, + } +} + +// CoreGitOpts contains options for Core.Git +type CoreGitOpts struct { + Ref string } -// DirectoryContentsOption represents an option handler for Directory.Contents -type DirectoryContentsOption func(*DirectoryContentsOptions) +func (r *Core) Git(remote string, opts ...CoreGitOpts) *Filesystem { + q := r.q.Select("git") + // `ref` optional argument + for i := len(opts) - 1; i >= 0; i-- { + if !querybuilder.IsZeroValue(opts[i].Ref) { + q = q.Arg("ref", opts[i].Ref) + break + } + } + q = q.Arg("remote", remote) -// WithDirectoryContentsPath sets the "path" option for Contents -func WithDirectoryContentsPath(path string) DirectoryContentsOption { - return func(daggerOptions *DirectoryContentsOptions) { - daggerOptions.Path = &path + return &Filesystem{ + q: q, + c: r.c, } } -// Return a list of files and directories at the given path -func (r *Directory) Contents(ctx context.Context, options ...DirectoryContentsOption) ([]string, error) { - opts := &DirectoryContentsOptions{} - for _, fn := range options { - fn(opts) +// Fetch an OCI image +func (r *Core) Image(ref string) *Filesystem { + q := r.q.Select("image") + q = q.Arg("ref", ref) + + return &Filesystem{ + q: q, + c: r.c, } +} + +// A directory +type Directory struct { + q *querybuilder.Selection + c graphql.Client +} + +// DirectoryContentsOpts contains options for Directory.Contents +type DirectoryContentsOpts struct { + Path string +} + +// Return a list of files and directories at the given path +func (r *Directory) Contents(ctx context.Context, opts ...DirectoryContentsOpts) ([]string, error) { q := r.q.Select("contents") - if opts != nil && opts.Path != nil { - q = q.Arg("path", opts.Path) + // `path` optional argument + for i := len(opts) - 1; i >= 0; i-- { + if !querybuilder.IsZeroValue(opts[i].Path) { + q = q.Arg("path", opts[i].Path) + break + } } var response []string @@ -547,14 +621,15 @@ func (r *Directory) ID(ctx context.Context) (DirectoryID, error) { return response, q.Execute(ctx, r.c) } -// A secret backed by the file at the given path -func (r *Directory) Secret(ctx context.Context, path string) (SecretID, error) { - q := r.q.Select("secret") - q = q.Arg("path", path) +// load a project's metadata +func (r *Directory) LoadProject(configPath string) *Project { + q := r.q.Select("loadProject") + q = q.Arg("configPath", configPath) - var response SecretID - q = q.Bind(&response) - return response, q.Execute(ctx, r.c) + return &Project{ + q: q, + c: r.c, + } } // This directory plus the contents of the given file copied to the given path @@ -581,30 +656,20 @@ func (r *Directory) WithDirectory(directory DirectoryID, path string) *Directory } } -// DirectoryWithNewFileOptions contains options for Directory.WithNewFile -type DirectoryWithNewFileOptions struct { - Contents *string -} - -// DirectoryWithNewFileOption represents an option handler for Directory.WithNewFile -type DirectoryWithNewFileOption func(*DirectoryWithNewFileOptions) - -// WithDirectoryWithNewFileContents sets the "contents" option for WithNewFile -func WithDirectoryWithNewFileContents(contents string) DirectoryWithNewFileOption { - return func(daggerOptions *DirectoryWithNewFileOptions) { - daggerOptions.Contents = &contents - } +// DirectoryWithNewFileOpts contains options for Directory.WithNewFile +type DirectoryWithNewFileOpts struct { + Contents string } // This directory plus a new file written at the given path -func (r *Directory) WithNewFile(path string, options ...DirectoryWithNewFileOption) *Directory { - opts := &DirectoryWithNewFileOptions{} - for _, fn := range options { - fn(opts) - } +func (r *Directory) WithNewFile(path string, opts ...DirectoryWithNewFileOpts) *Directory { q := r.q.Select("withNewFile") - if opts != nil && opts.Contents != nil { - q = q.Arg("contents", opts.Contents) + // `contents` optional argument + for i := len(opts) - 1; i >= 0; i-- { + if !querybuilder.IsZeroValue(opts[i].Contents) { + q = q.Arg("contents", opts[i].Contents) + break + } } q = q.Arg("path", path) @@ -636,6 +701,117 @@ func (r *Directory) WithoutFile(path string) *Directory { } } +// Command execution +type Exec struct { + q *querybuilder.Selection + c graphql.Client +} + +// Exit code of the command +func (r *Exec) ExitCode(ctx context.Context) (int, error) { + q := r.q.Select("exitCode") + + var response int + q = q.Bind(&response) + return response, q.Execute(ctx, r.c) +} + +// Modified filesystem +func (r *Exec) FS() *Filesystem { + q := r.q.Select("fs") + + return &Filesystem{ + q: q, + c: r.c, + } +} + +// Modified mounted filesystem +func (r *Exec) Mount(path string) *Filesystem { + q := r.q.Select("mount") + q = q.Arg("path", path) + + return &Filesystem{ + q: q, + c: r.c, + } +} + +// ExecStderrOpts contains options for Exec.Stderr +type ExecStderrOpts struct { + Lines int +} + +// stderr of the command +func (r *Exec) Stderr(ctx context.Context, opts ...ExecStderrOpts) (string, error) { + q := r.q.Select("stderr") + // `lines` optional argument + for i := len(opts) - 1; i >= 0; i-- { + if !querybuilder.IsZeroValue(opts[i].Lines) { + q = q.Arg("lines", opts[i].Lines) + break + } + } + + var response string + q = q.Bind(&response) + return response, q.Execute(ctx, r.c) +} + +// ExecStdoutOpts contains options for Exec.Stdout +type ExecStdoutOpts struct { + Lines int +} + +// stdout of the command +func (r *Exec) Stdout(ctx context.Context, opts ...ExecStdoutOpts) (string, error) { + q := r.q.Select("stdout") + // `lines` optional argument + for i := len(opts) - 1; i >= 0; i-- { + if !querybuilder.IsZeroValue(opts[i].Lines) { + q = q.Arg("lines", opts[i].Lines) + break + } + } + + var response string + q = q.Bind(&response) + return response, q.Execute(ctx, r.c) +} + +// A schema extension provided by a project +type Extension struct { + q *querybuilder.Selection + c graphql.Client +} + +// path to the extension's code within the project's filesystem +func (r *Extension) Path(ctx context.Context) (string, error) { + q := r.q.Select("path") + + var response string + q = q.Bind(&response) + return response, q.Execute(ctx, r.c) +} + +// schema contributed to the project by this extension +func (r *Extension) Schema(ctx context.Context) (string, error) { + q := r.q.Select("schema") + + var response string + q = q.Bind(&response) + return response, q.Execute(ctx, r.c) +} + +// sdk used to generate code for and/or execute this extension +func (r *Extension) SDK(ctx context.Context) (string, error) { + q := r.q.Select("sdk") + + var response string + q = q.Bind(&response) + return response, q.Execute(ctx, r.c) +} + // A file type File struct { q *querybuilder.Selection @@ -660,6 +836,15 @@ func (r *File) ID(ctx context.Context) (FileID, error) { return response, q.Execute(ctx, r.c) } +func (r *File) Secret() *Secret { + q := r.q.Select("secret") + + return &Secret{ + q: q, + c: r.c, + } +} + // The size of the file, in bytes func (r *File) Size(ctx context.Context) (int, error) { q := r.q.Select("size") @@ -669,6 +854,166 @@ func (r *File) Size(ctx context.Context) (int, error) { return response, q.Execute(ctx, r.c) } +// A reference to a filesystem tree. +// +// For example: +// - The root filesystem of a container +// - A source code repository +// - A directory containing binary artifacts +// +// Rule of thumb: if it fits in a tar archive, it fits in a Filesystem. +type Filesystem struct { + q *querybuilder.Selection + c graphql.Client +} + +// FilesystemCopyOpts contains options for Filesystem.Copy +type FilesystemCopyOpts struct { + DestPath string + + Exclude []string + + Include []string + + SrcPath string +} + +// copy from a filesystem +func (r *Filesystem) Copy(from FSID, opts ...FilesystemCopyOpts) *Filesystem { + q := r.q.Select("copy") + // `destPath` optional argument + for i := len(opts) - 1; i >= 0; i-- { + if !querybuilder.IsZeroValue(opts[i].DestPath) { + q = q.Arg("destPath", opts[i].DestPath) + break + } + } + // `exclude` optional argument + for i := len(opts) - 1; i >= 0; i-- { + if !querybuilder.IsZeroValue(opts[i].Exclude) { + q = q.Arg("exclude", opts[i].Exclude) + break + } + } + q = q.Arg("from", from) + // `include` optional argument + for i := len(opts) - 1; i >= 0; i-- { + if !querybuilder.IsZeroValue(opts[i].Include) { + q = q.Arg("include", opts[i].Include) + break + } + } + // `srcPath` optional argument + for i := len(opts) - 1; i >= 0; i-- { + if !querybuilder.IsZeroValue(opts[i].SrcPath) { + q = q.Arg("srcPath", opts[i].SrcPath) + break + } + } + + return &Filesystem{ + q: q, + c: r.c, + } +} + +// FilesystemDockerbuildOpts contains options for Filesystem.Dockerbuild +type FilesystemDockerbuildOpts struct { + Dockerfile string +} + +// docker build using this filesystem as context +func (r *Filesystem) Dockerbuild(opts ...FilesystemDockerbuildOpts) *Filesystem { + q := r.q.Select("dockerbuild") + // `dockerfile` optional argument + for i := len(opts) - 1; i >= 0; i-- { + if !querybuilder.IsZeroValue(opts[i].Dockerfile) { + q = q.Arg("dockerfile", opts[i].Dockerfile) + break + } + } + + return &Filesystem{ + q: q, + c: r.c, + } +} + +// execute a command inside this filesystem +func (r *Filesystem) Exec(input ExecInput) *Exec { + q := r.q.Select("exec") + q = q.Arg("input", input) + + return &Exec{ + q: q, + c: r.c, + } +} + +// FilesystemFileOpts contains options for Filesystem.File +type FilesystemFileOpts struct { + Lines int +} + +// read a file at path +func (r *Filesystem) File(ctx context.Context, path string, opts ...FilesystemFileOpts) (string, error) { + q := r.q.Select("file") + // `lines` optional argument + for i := len(opts) - 1; i >= 0; i-- { + if !querybuilder.IsZeroValue(opts[i].Lines) { + q = q.Arg("lines", opts[i].Lines) + break + } + } + q = q.Arg("path", path) + + var response string + q = q.Bind(&response) + return response, q.Execute(ctx, r.c) +} + +func (r *Filesystem) ID(ctx context.Context) (FSID, error) { + q := r.q.Select("id") + + var response FSID + q = q.Bind(&response) + return response, q.Execute(ctx, r.c) +} + +// push a filesystem as an image to a registry +func (r *Filesystem) PushImage(ctx context.Context, ref string) (bool, error) { + q := r.q.Select("pushImage") + q = q.Arg("ref", ref) + + var response bool + q = q.Bind(&response) + return response, q.Execute(ctx, r.c) +} + +// FilesystemWriteFileOpts contains options for Filesystem.WriteFile +type FilesystemWriteFileOpts struct { + Permissions string +} + +// write a file at path +func (r *Filesystem) WriteFile(contents string, path string, opts ...FilesystemWriteFileOpts) *Filesystem { + q := r.q.Select("writeFile") + q = q.Arg("contents", contents) + q = q.Arg("path", path) + // `permissions` optional argument + for i := len(opts) - 1; i >= 0; i-- { + if !querybuilder.IsZeroValue(opts[i].Permissions) { + q = q.Arg("permissions", opts[i].Permissions) + break + } + } + + return &Filesystem{ + q: q, + c: r.c, + } +} + // A git ref (tag or branch) type GitRef struct { q *querybuilder.Selection @@ -740,6 +1085,177 @@ func (r *GitRepository) Tags(ctx context.Context) ([]string, error) { return response, q.Execute(ctx, r.c) } +// Information about the host execution environment +type Host struct { + q *querybuilder.Selection + c graphql.Client +} + +// Access a directory on the host +func (r *Host) Directory(id HostDirectoryID) *HostDirectory { + q := r.q.Select("directory") + q = q.Arg("id", id) + + return &HostDirectory{ + q: q, + c: r.c, + } +} + +// Lookup the value of an environment variable. Null if the variable is not available. +func (r *Host) Variable(name string) *HostVariable { + q := r.q.Select("variable") + q = q.Arg("name", name) + + return &HostVariable{ + q: q, + c: r.c, + } +} + +// The current working directory on the host +func (r *Host) Workdir() *HostDirectory { + q := r.q.Select("workdir") + + return &HostDirectory{ + q: q, + c: r.c, + } +} + +// A directory on the host +type HostDirectory struct { + q *querybuilder.Selection + c graphql.Client +} + +// Read the contents of the directory +func (r *HostDirectory) Read() *Directory { + q := r.q.Select("read") + + return &Directory{ + q: q, + c: r.c, + } +} + +// HostDirectoryWriteOpts contains options for HostDirectory.Write +type HostDirectoryWriteOpts struct { + Path string +} + +// Write the contents of another directory to the directory +func (r *HostDirectory) Write(ctx context.Context, contents DirectoryID, opts ...HostDirectoryWriteOpts) (bool, error) { + q := r.q.Select("write") + q = q.Arg("contents", contents) + // `path` optional argument + for i := len(opts) - 1; i >= 0; i-- { + if !querybuilder.IsZeroValue(opts[i].Path) { + q = q.Arg("path", opts[i].Path) + break + } + } + + var response bool + q = q.Bind(&response) + return response, q.Execute(ctx, r.c) +} + +// An environment variable on the host environment +type HostVariable struct { + q *querybuilder.Selection + c graphql.Client +} + +// A secret referencing the value of this variable +func (r *HostVariable) Secret() *Secret { + q := r.q.Select("secret") + + return &Secret{ + q: q, + c: r.c, + } +} + +// The value of this variable +func (r *HostVariable) Value(ctx context.Context) (string, error) { + q := r.q.Select("value") + + var response string + q = q.Bind(&response) + return response, q.Execute(ctx, r.c) +} + +// A set of scripts and/or extensions +type Project struct { + q *querybuilder.Selection + c graphql.Client +} + +// other projects with schema this project depends on +func (r *Project) Dependencies(ctx context.Context) ([]Project, error) { + q := r.q.Select("dependencies") + + var response []Project + q = q.Bind(&response) + return response, q.Execute(ctx, r.c) +} + +// extensions in this project +func (r *Project) Extensions(ctx context.Context) ([]Extension, error) { + q := r.q.Select("extensions") + + var response []Extension + q = q.Bind(&response) + return response, q.Execute(ctx, r.c) +} + +// Code files generated by the SDKs in the project +func (r *Project) GeneratedCode() *Directory { + q := r.q.Select("generatedCode") + + return &Directory{ + q: q, + c: r.c, + } +} + +// install the project's schema +func (r *Project) Install(ctx context.Context) (bool, error) { + q := r.q.Select("install") + + var response bool + q = q.Bind(&response) + return response, q.Execute(ctx, r.c) +} + +// name of the project +func (r *Project) Name(ctx context.Context) (string, error) { + q := r.q.Select("name") + + var response string + q = q.Bind(&response) + return response, q.Execute(ctx, r.c) +} + +// schema provided by the project +func (r *Project) Schema(ctx context.Context) (string, error) { + q := r.q.Select("schema") + + var response string + q = q.Bind(&response) + return response, q.Execute(ctx, r.c) +} + +// scripts in this project +func (r *Project) Scripts(ctx context.Context) ([]Script, error) { + q := r.q.Select("scripts") + + var response []Script + q = q.Bind(&response) + return response, q.Execute(ctx, r.c) +} + type Query struct { q *querybuilder.Selection c graphql.Client @@ -767,31 +1283,21 @@ func (r *Query) CacheFromTokens(tokens []string) *CacheVolume { } } -// QueryContainerOptions contains options for Query.Container -type QueryContainerOptions struct { - ID *ContainerID -} - -// QueryContainerOption represents an option handler for Query.Container -type QueryContainerOption func(*QueryContainerOptions) - -// WithQueryContainerID sets the "id" option for Container -func WithQueryContainerID(id ContainerID) QueryContainerOption { - return func(daggerOptions *QueryContainerOptions) { - daggerOptions.ID = &id - } +// ContainerOpts contains options for Query.Container +type ContainerOpts struct { + ID ContainerID } // Load a container from ID. // Null ID returns an empty container (scratch). -func (r *Query) Container(options ...QueryContainerOption) *Container { - opts := &QueryContainerOptions{} - for _, fn := range options { - fn(opts) - } +func (r *Query) Container(opts ...ContainerOpts) *Container { q := r.q.Select("container") - if opts != nil && opts.ID != nil { - q = q.Arg("id", opts.ID) + // `id` optional argument + for i := len(opts) - 1; i >= 0; i-- { + if !querybuilder.IsZeroValue(opts[i].ID) { + q = q.Arg("id", opts[i].ID) + break + } } return &Container{ @@ -800,30 +1306,30 @@ func (r *Query) Container(options ...QueryContainerOption) *Container { } } -// QueryDirectoryOptions contains options for Query.Directory -type QueryDirectoryOptions struct { - ID *DirectoryID -} - -// QueryDirectoryOption represents an option handler for Query.Directory -type QueryDirectoryOption func(*QueryDirectoryOptions) +// Core API +func (r *Query) Core() *Core { + q := r.q.Select("core") -// WithQueryDirectoryID sets the "id" option for Directory -func WithQueryDirectoryID(id DirectoryID) QueryDirectoryOption { - return func(daggerOptions *QueryDirectoryOptions) { - daggerOptions.ID = &id + return &Core{ + q: q, + c: r.c, } } +// DirectoryOpts contains options for Query.Directory +type DirectoryOpts struct { + ID DirectoryID +} + // Load a directory by ID. No argument produces an empty directory. -func (r *Query) Directory(options ...QueryDirectoryOption) *Directory { - opts := &QueryDirectoryOptions{} - for _, fn := range options { - fn(opts) - } +func (r *Query) Directory(opts ...DirectoryOpts) *Directory { q := r.q.Select("directory") - if opts != nil && opts.ID != nil { - q = q.Arg("id", opts.ID) + // `id` optional argument + for i := len(opts) - 1; i >= 0; i-- { + if !querybuilder.IsZeroValue(opts[i].ID) { + q = q.Arg("id", opts[i].ID) + break + } } return &Directory{ @@ -854,6 +1360,16 @@ func (r *Query) Git(url string) *GitRepository { } } +// Query the host environment +func (r *Query) Host() *Host { + q := r.q.Select("host") + + return &Host{ + q: q, + c: r.c, + } +} + // An http remote func (r *Query) HTTP(url string) *File { q := r.q.Select("http") @@ -864,3 +1380,64 @@ func (r *Query) HTTP(url string) *File { c: r.c, } } + +// Look up a project by name +func (r *Query) Project(name string) *Project { + q := r.q.Select("project") + q = q.Arg("name", name) + + return &Project{ + q: q, + c: r.c, + } +} + +// Load a secret from its ID +func (r *Query) Secret(id SecretID) *Secret { + q := r.q.Select("secret") + q = q.Arg("id", id) + + return &Secret{ + q: q, + c: r.c, + } +} + +// An executable script that uses the project's dependencies and/or extensions +type Script struct { + q *querybuilder.Selection + c graphql.Client +} + +// path to the script's code within the project's filesystem +func (r *Script) Path(ctx context.Context) (string, error) { + q := r.q.Select("path") + + var response string + q = q.Bind(&response) + return response, q.Execute(ctx, r.c) +} + +// sdk used to generate code for and/or execute this script +func (r *Script) SDK(ctx context.Context) (string, error) { + q := r.q.Select("sdk") + + var response string + q = q.Bind(&response) + return response, q.Execute(ctx, r.c) +} + +// A reference to a secret value, which can be handled more safely than the value itself +type Secret struct { + q *querybuilder.Selection + c graphql.Client +} + +// The identifier for this secret +func (r *Secret) ID(ctx context.Context) (SecretID, error) { + q := r.q.Select("id") + + var response SecretID + q = q.Bind(&response) + return response, q.Execute(ctx, r.c) +} From 0dfc92ee0ac2f6d7dbea3273d3e960d8c58c9010 Mon Sep 17 00:00:00 2001 From: Alex Suraci Date: Sun, 23 Oct 2022 18:45:39 -0400 Subject: [PATCH 06/25] update dagger, clunkify progress impl --- cmd/bass/main.go | 61 +- dagger | 2 +- go.mod | 16 +- go.sum | 12 +- pkg/runtimes/dagger.go | 317 +++--- pkg/runtimes/dagger/.gitattributes | 1 - pkg/runtimes/dagger/api.gen.go | 1443 ---------------------------- pkg/runtimes/suite.go | 2 +- 8 files changed, 189 insertions(+), 1665 deletions(-) delete mode 100644 pkg/runtimes/dagger/.gitattributes delete mode 100644 pkg/runtimes/dagger/api.gen.go diff --git a/cmd/bass/main.go b/cmd/bass/main.go index 155c5dda..0aaa24ed 100644 --- a/cmd/bass/main.go +++ b/cmd/bass/main.go @@ -149,51 +149,52 @@ func root(ctx context.Context) error { return err } - pool, err := runtimes.NewPool(ctx, config) - if err != nil { - cli.WriteError(ctx, err) - return err + if runLSP { + return langServer(ctx) } - ctx = bass.WithRuntimePool(ctx, pool) + if flags.NArg() == 0 { + // TODO: bring progress back + return repl(ctx) + } - if runnerAddr != "" { - client, err := runnerClient(ctx, runnerAddr) + return cli.WithProgress(ctx, func(ctx context.Context) error { + pool, err := runtimes.NewPool(ctx, config) if err != nil { cli.WriteError(ctx, err) return err } - return cli.WithProgress(ctx, func(ctx context.Context) error { - return runnerLoop(ctx, client, pool.Runtimes) - }) - } + ctx = bass.WithRuntimePool(ctx, pool) - if runExport { - return cli.WithProgress(ctx, export) - } + if runnerAddr != "" { + client, err := runnerClient(ctx, runnerAddr) + if err != nil { + cli.WriteError(ctx, err) + return err + } - if runPrune { - return cli.WithProgress(ctx, prune) - } + return runnerLoop(ctx, client, pool.Runtimes) + } - if runLSP { - return langServer(ctx) - } + if runExport { + return export(ctx) + } - if runBump { - return cli.WithProgress(ctx, bump) - } + if runPrune { + return prune(ctx) + } - if runRun { - return cli.WithProgress(ctx, runThunk) - } + if runBump { + return bump(ctx) + } - if flags.NArg() == 0 { - return repl(ctx) - } + if runRun { + return runThunk(ctx) + } - return cli.WithProgress(ctx, run) + return run(ctx) + }) } func repl(ctx context.Context) error { diff --git a/dagger b/dagger index 65963f71..cdc494ad 160000 --- a/dagger +++ b/dagger @@ -1 +1 @@ -Subproject commit 65963f71f9be89cb4463ae2c4a3cb80179fd7f0d +Subproject commit cdc494adccc5b1edb9f5096cea6d93a3389ba8e4 diff --git a/go.mod b/go.mod index 941d6b1d..408bbf01 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/vito/bass go 1.18 require ( - github.com/Khan/genqlient v0.5.0 + dagger.io/dagger v0.0.0-00010101000000-000000000000 github.com/adrg/xdg v0.4.0 github.com/agext/levenshtein v1.2.3 github.com/ajstarks/svgo v0.0.0-20210406150507-75cfd577ce75 @@ -11,18 +11,17 @@ require ( github.com/c-bata/go-prompt v0.2.6 github.com/cenkalti/backoff/v4 v4.1.3 github.com/containerd/containerd v1.6.8 - github.com/docker/cli v20.10.17+incompatible github.com/docker/distribution v2.8.1+incompatible github.com/docker/docker v20.10.18+incompatible github.com/gertd/go-pluralize v0.1.7 github.com/gofrs/flock v0.8.1 - github.com/google/go-cmp v0.5.8 + github.com/google/go-cmp v0.5.9 github.com/hashicorp/go-multierror v1.1.1 github.com/jonboulle/clockwork v0.2.2 github.com/mattn/go-colorable v0.1.12 github.com/mattn/go-isatty v0.0.14 github.com/mattn/go-unicodeclass v0.0.1 - github.com/moby/buildkit v0.10.4 + github.com/moby/buildkit v0.10.5 github.com/moby/sys/mountinfo v0.6.2 github.com/morikuni/aec v1.0.0 github.com/neovim/go-client v1.2.2-0.20220118223211-7c85d516f28c @@ -37,6 +36,7 @@ require ( github.com/spf13/pflag v1.0.5 github.com/spy16/slurp v0.2.3 github.com/square/certstrap v1.3.0 + github.com/tonistiigi/fsutil v0.0.0-20220115021204-b19f7f9cb274 github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea github.com/vito/booklit v0.12.2-0.20220630023834-33787382be72 github.com/vito/go-interact v1.0.1 @@ -46,7 +46,6 @@ require ( github.com/vito/vt100 v0.0.0-20220721174540-1f9a7c0f76a9 github.com/zeebo/xxh3 v1.0.2 github.com/zmb3/spotify/v2 v2.2.1 - go.dagger.io/dagger v0.2.35 go.opentelemetry.io/otel v1.10.0 go.uber.org/zap v1.19.1 golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa @@ -61,6 +60,7 @@ require ( cloud.google.com/go v0.81.0 // indirect filippo.io/edwards25519 v1.0.0-rc.1 // indirect github.com/AdamKorcz/go-fuzz-headers v0.0.0-20210312213058-32f4d319f0d2 // indirect + github.com/Khan/genqlient v0.5.0 // indirect github.com/Microsoft/go-winio v0.5.2 // indirect github.com/apex/log v1.4.0 // indirect github.com/bhoriuchi/graphql-go-tools v1.0.0 // indirect @@ -76,6 +76,7 @@ require ( github.com/cyphar/filepath-securejoin v0.2.3 // indirect github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 // indirect github.com/dlclark/regexp2 v1.4.0 // indirect + github.com/docker/cli v20.10.17+incompatible // indirect github.com/docker/docker-credential-helpers v0.6.4 // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect @@ -105,7 +106,6 @@ require ( github.com/mitchellh/go-wordwrap v1.0.1 // indirect github.com/mna/pigeon v1.0.1-0.20200224192238-18953b277063 // indirect github.com/moby/locker v1.0.1 // indirect - github.com/moby/patternmatcher v0.5.0 // indirect github.com/moby/sys/signal v0.7.0 // indirect github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b // indirect github.com/muesli/cancelreader v0.2.1 // indirect @@ -119,7 +119,6 @@ require ( github.com/rootless-containers/proto v0.1.0 // indirect github.com/rs/zerolog v1.28.0 // indirect github.com/sirupsen/logrus v1.9.0 // indirect - github.com/tonistiigi/fsutil v0.0.0-20220115021204-b19f7f9cb274 // indirect github.com/tonistiigi/vt100 v0.0.0-20210615222946-8066bb97264f // indirect github.com/vbatts/go-mtree v0.5.0 // indirect github.com/vektah/gqlparser/v2 v2.5.1 // indirect @@ -144,7 +143,6 @@ require ( google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20220810155839-1856144b1d9c // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect ) // BEGIN SYNC buildkit @@ -152,4 +150,4 @@ replace github.com/docker/docker => github.com/docker/docker v20.10.3-0.20220414 // END SYNC -replace go.dagger.io/dagger => ./dagger +replace dagger.io/dagger => ./dagger diff --git a/go.sum b/go.sum index 3a3e9d41..05167443 100644 --- a/go.sum +++ b/go.sum @@ -282,8 +282,8 @@ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= -github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -422,12 +422,10 @@ github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mna/pigeon v1.0.1-0.20200224192238-18953b277063 h1:V7s6vhIrNeOqocziAmRoVJh6gnPPx83ovlpT7Hf5shI= github.com/mna/pigeon v1.0.1-0.20200224192238-18953b277063/go.mod h1:rkFeDZ0gc+YbnrXPw0q2RlI0QRuKBBPu67fgYIyGRNg= -github.com/moby/buildkit v0.10.4 h1:FvC+buO8isGpUFZ1abdSLdGHZVqg9sqI4BbFL8tlzP4= -github.com/moby/buildkit v0.10.4/go.mod h1:Yajz9vt1Zw5q9Pp4pdb3TCSUXJBIroIQGQ3TTs/sLug= +github.com/moby/buildkit v0.10.5 h1:d9krS/lG3dn6N7y+R8o9PTgIixlYAaDk35f3/B4jZOw= +github.com/moby/buildkit v0.10.5/go.mod h1:Yajz9vt1Zw5q9Pp4pdb3TCSUXJBIroIQGQ3TTs/sLug= github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg= github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= -github.com/moby/patternmatcher v0.5.0 h1:YCZgJOeULcxLw1Q+sVR636pmS7sPEn1Qo2iAN6M7DBo= -github.com/moby/patternmatcher v0.5.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= 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= @@ -589,8 +587,6 @@ github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKw github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tonistiigi/fsutil v0.0.0-20220115021204-b19f7f9cb274 h1:wbyZxD6IPFp0sl5uscMOJRsz5UKGFiNiD16e+MVfKZY= github.com/tonistiigi/fsutil v0.0.0-20220115021204-b19f7f9cb274/go.mod h1:oPAfvw32vlUJSjyDcQ3Bu0nb2ON2B+G0dtVN/SZNJiA= -github.com/tonistiigi/fsutil v0.0.0-20220930225714-4638ad635be5 h1:NJ1nZs4j4XcBJKIY5sAwTGp9w5b78Zxr3+r0zXRuKnA= -github.com/tonistiigi/fsutil v0.0.0-20220930225714-4638ad635be5/go.mod h1:F83XRhNblQsKQH9hcKEE45GAOkL9590mtw9KsD0Q4fE= github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea h1:SXhTLE6pb6eld/v/cCndK0AMpt1wiVFb/YYmqB3/QG0= github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea/go.mod h1:WPnis/6cRcDZSUvVmezrxJPkiO87ThFYsoUiMwWNDJk= github.com/tonistiigi/vt100 v0.0.0-20210615222946-8066bb97264f h1:DLpt6B5oaaS8jyXHa9VA4rrZloBVPVXeCtrOsrFauxc= diff --git a/pkg/runtimes/dagger.go b/pkg/runtimes/dagger.go index 8f550c2c..bea75f35 100644 --- a/pkg/runtimes/dagger.go +++ b/pkg/runtimes/dagger.go @@ -1,4 +1,4 @@ -//go:generate dagger client-gen -o ./dagger/api.gen.go +//go:generate dagger client-gen -o ./dagger/dagger.gen.go package runtimes @@ -8,17 +8,19 @@ import ( "fmt" "io" "io/fs" + "net" "os" "path" "strings" - kitdclient "github.com/moby/buildkit/client" + "dagger.io/dagger/engine" + "dagger.io/dagger/router" + "dagger.io/dagger/sdk/go/dagger" + "github.com/adrg/xdg" ocispecs "github.com/opencontainers/image-spec/specs-go/v1" "github.com/tonistiigi/fsutil" "github.com/vito/bass/pkg/bass" - "github.com/vito/bass/pkg/runtimes/dagger" "github.com/vito/progrock" - "go.dagger.io/dagger/engine" ) const DaggerName = "dagger" @@ -28,133 +30,140 @@ func init() { } type Dagger struct { - Config BuildkitConfig - Client *kitdclient.Client Platform ocispecs.Platform + + sockPath string + stop func() + stopped chan struct{} + + client *dagger.Client } var _ bass.Runtime = &Dagger{} -func NewDagger(ctx context.Context, _ bass.RuntimePool, cfg *bass.Scope) (bass.Runtime, error) { - r := &Dagger{} +type DaggerConfig struct { + Host string `json:"host,omitempty"` +} +func NewDagger(ctx context.Context, _ bass.RuntimePool, cfg *bass.Scope) (bass.Runtime, error) { + var config DaggerConfig if cfg != nil { - if err := cfg.Decode(&r.Config); err != nil { + if err := cfg.Decode(&config); err != nil { return nil, fmt.Errorf("dagger runtime config: %w", err) } } - return r, nil -} + engineCtx, cancel := context.WithCancel(ctx) -func (runtime *Dagger) Resolve(ctx context.Context, imageRef bass.ImageRef) (bass.ImageRef, error) { - // TODO - return imageRef, nil -} - -func (runtime *Dagger) Run(ctx context.Context, thunk bass.Thunk) error { - statusProxy := forwardStatus(progrock.RecorderFromContext(ctx)) - defer statusProxy.Wait() - - opts := &engine.Config{ - Progress: statusProxy.Writer(), - LocalDirs: map[string]string{}, + runtime := &Dagger{ + sockPath: fmt.Sprintf("bass/dagger.%d.sock", os.Getpid()), + stop: cancel, + stopped: make(chan struct{}), } - if err := runtime.collectLocalDirs(ctx, opts.LocalDirs, thunk); err != nil { - return err - } - - return engine.Start(ctx, opts, func(ctx engine.Context) error { - core := dagger.New(ctx.Client) - - builder := runtime.newBuilder(core) - - ctr, err := builder.container(ctx, thunk) - if err != nil { - return err + if config.Host == "" { + if err := os.RemoveAll(runtime.sockPath); err != nil { + return nil, err } - status, err := ctr.ExitCode(ctx) + sockPath, err := xdg.StateFile(runtime.sockPath) if err != nil { - return err + return nil, err } - if status != 0 { - return fmt.Errorf("exit status %d", status) + config.Host = "unix://" + sockPath + + l, err := net.Listen("unix", sockPath) + if err != nil { + return nil, fmt.Errorf("listen for dagger conns: %w", err) } - return nil - }) -} + statusProxy := forwardStatus(progrock.RecorderFromContext(ctx)) -func (runtime *Dagger) Start(ctx context.Context, thunk bass.Thunk) (StartResult, error) { - return StartResult{}, errors.New("Start: not implemented") -} + go engine.Start(engineCtx, &engine.Config{ + RawBuildkitStatus: statusProxy.Writer(), + }, func(ctx context.Context, r *router.Router) error { + go func() { + for { + conn, err := l.Accept() + if err != nil { + break + } -func (runtime *Dagger) Read(ctx context.Context, w io.Writer, thunk bass.Thunk) error { - statusProxy := forwardStatus(progrock.RecorderFromContext(ctx)) + r.ServeConn(conn) + } + }() - // XXX(vito): this is hanging for some reason - // defer statusProxy.Wait() + <-ctx.Done() - opts := &engine.Config{ - Progress: statusProxy.Writer(), - LocalDirs: map[string]string{}, + statusProxy.Wait() + close(runtime.stopped) + return nil + }) } - if err := runtime.collectLocalDirs(ctx, opts.LocalDirs, thunk); err != nil { - return err + os.Setenv("DAGGER_HOST", config.Host) + + client, err := dagger.Connect(ctx) + if err != nil { + return nil, err } - return engine.Start(ctx, opts, func(ctx engine.Context) error { - core := dagger.New(ctx.Client) + runtime.client = client - builder := runtime.newBuilder(core) + return runtime, nil +} - ctr, err := builder.container(ctx, thunk) - if err != nil { - return err - } +func (runtime *Dagger) Resolve(ctx context.Context, imageRef bass.ImageRef) (bass.ImageRef, error) { + // TODO + return imageRef, nil +} - stdout, err := ctr.Stdout().Contents(ctx) - if err != nil { - return err - } +func (runtime *Dagger) Run(ctx context.Context, thunk bass.Thunk) error { + ctr, err := runtime.container(ctx, thunk) + if err != nil { + return err + } - _, err = fmt.Fprint(w, stdout) - if err != nil { - return err - } + status, err := ctr.ExitCode(ctx) + if err != nil { + return err + } + + if status != 0 { + return fmt.Errorf("exit status %d", status) + } - return nil - }) + return nil } -func (runtime *Dagger) Export(ctx context.Context, w io.Writer, thunk bass.Thunk) error { - return errors.New("Export: not implemented") +func (runtime *Dagger) Start(ctx context.Context, thunk bass.Thunk) (StartResult, error) { + return StartResult{}, errors.New("Start: not implemented") } -func (runtime *Dagger) collectLocalDirs(ctx context.Context, dest map[string]string, thunk bass.Thunk) error { - cmd, err := NewCommand(ctx, runtime, thunk) +func (runtime *Dagger) Read(ctx context.Context, w io.Writer, thunk bass.Thunk) error { + ctr, err := runtime.container(ctx, thunk) if err != nil { return err } - for _, mnt := range cmd.Mounts { - if mnt.Source.HostPath != nil { - dest[mnt.Source.HostPath.Hash()] = mnt.Source.HostPath.ContextDir - } else if mnt.Source.ThunkPath != nil { - err := runtime.collectLocalDirs(ctx, dest, mnt.Source.ThunkPath.Thunk) - if err != nil { - return fmt.Errorf("collect local dirs for mount %s: %w", mnt.Target, err) - } - } + stdout, err := ctr.Stdout().Contents(ctx) + if err != nil { + return err + } + + _, err = fmt.Fprint(w, stdout) + if err != nil { + return err } return nil } +func (runtime *Dagger) Export(ctx context.Context, w io.Writer, thunk bass.Thunk) error { + return errors.New("Export: not implemented") +} + func (runtime *Dagger) ExportPath(ctx context.Context, w io.Writer, tp bass.ThunkPath) error { dir, err := os.MkdirTemp("", "bass-dagger-export*") if err != nil { @@ -163,68 +172,35 @@ func (runtime *Dagger) ExportPath(ctx context.Context, w io.Writer, tp bass.Thun defer os.RemoveAll(dir) - statusProxy := forwardStatus(progrock.RecorderFromContext(ctx)) - defer statusProxy.Wait() - - opts := &engine.Config{ - Progress: statusProxy.Writer(), - LocalDirs: map[string]string{"export": dir}, - } - - if err := runtime.collectLocalDirs(ctx, opts.LocalDirs, tp.Thunk); err != nil { + ctr, err := runtime.container(ctx, tp.Thunk) + if err != nil { return err } walkOpts := &fsutil.WalkOpt{} - err = engine.Start(ctx, opts, func(ctx engine.Context) error { - core := dagger.New(ctx.Client) - - builder := runtime.newBuilder(core) - ctr, err := builder.container(ctx, tp.Thunk) + fsp := tp.Path.FilesystemPath() + if fsp.IsDir() { + ok, err := ctr.Directory(fsp.Slash()).Export(ctx, dir) if err != nil { - return err + return fmt.Errorf("write to export dir: %w", err) } - fsp := tp.Path.FilesystemPath() - if fsp.IsDir() { - srcID, err := ctr.Directory(fsp.Slash()).ID(ctx) - if err != nil { - return fmt.Errorf("get source dir ID: %w", err) - } - - ok, err := core.Host().Directory("export").Write(ctx, srcID) - if err != nil { - return fmt.Errorf("write to export dir: %w", err) - } - - if !ok { - return fmt.Errorf("write to export dir: not ok") - } - } else { - // TODO: it'd be great if I didn't have to export the entire directory! - - walkOpts.IncludePatterns = []string{fsp.Name()} - - srcID, err := ctr.Directory(fsp.Dir().Slash()).ID(ctx) - if err != nil { - return fmt.Errorf("get source dir ID: %w", err) - } - - ok, err := core.Host().Directory("export").Write(ctx, srcID) - if err != nil { - return fmt.Errorf("write to export dir: %w", err) - } + if !ok { + return fmt.Errorf("write to export dir: not ok") + } + } else { + walkOpts.IncludePatterns = []string{fsp.Name()} - if !ok { - return fmt.Errorf("write to export dir: not ok") - } + // TODO: it'd be great if I didn't have to export the entire directory! + ok, err := ctr.Directory(fsp.Dir().Slash()).Export(ctx, dir) + if err != nil { + return fmt.Errorf("write to export dir: %w", err) } - return nil - }) - if err != nil { - return fmt.Errorf("engine: %w", err) + if !ok { + return fmt.Errorf("write to export dir: not ok") + } } return fsutil.WriteTar(ctx, fsutil.NewFS(dir, walkOpts), w) @@ -235,28 +211,29 @@ func (runtime *Dagger) Prune(ctx context.Context, opts bass.PruneOpts) error { } func (runtime *Dagger) Close() error { - return nil -} + err := runtime.client.Close() + if err != nil { + return fmt.Errorf("close client: %w", err) + } + + runtime.stop() -func (runtime *Dagger) newBuilder(core *dagger.Query) *daggerBuilder { - return &daggerBuilder{ - runtime: runtime, - core: core, + <-runtime.stopped + + if err := os.RemoveAll(runtime.sockPath); err != nil { + return err } -} -type daggerBuilder struct { - runtime *Dagger - core *dagger.Query + return nil } -func (b *daggerBuilder) container(ctx context.Context, thunk bass.Thunk) (*dagger.Container, error) { - cmd, err := NewCommand(ctx, b.runtime, thunk) +func (runtime *Dagger) container(ctx context.Context, thunk bass.Thunk) (*dagger.Container, error) { + cmd, err := NewCommand(ctx, runtime, thunk) if err != nil { return nil, err } - imageRef, baseContainer, err := b.image(ctx, thunk.Image) + imageRef, baseContainer, err := runtime.image(ctx, thunk.Image) if err != nil { return nil, err } @@ -265,7 +242,7 @@ func (b *daggerBuilder) container(ctx context.Context, thunk bass.Thunk) (*dagge if baseContainer != nil { root = baseContainer } else { - root = b.core.Container().From(imageRef) + root = runtime.client.Container().From(imageRef) } // TODO: TLS and service networking, but Dagger needs to figure that out @@ -274,6 +251,7 @@ func (b *daggerBuilder) container(ctx context.Context, thunk bass.Thunk) (*dagge ctr := root. WithMountedTemp("/tmp"). WithMountedTemp("/dev/shm"). + WithEntrypoint(nil). WithWorkdir(workDir) // TODO: set hostname instead once Dagger supports it @@ -281,7 +259,7 @@ func (b *daggerBuilder) container(ctx context.Context, thunk bass.Thunk) (*dagge if err != nil { return nil, err } - ctr = ctr.WithVariable("THUNK", id) + ctr = ctr.WithEnvVariable("THUNK", id) // TODO: insecure // if thunk.Insecure { @@ -293,7 +271,7 @@ func (b *daggerBuilder) container(ctx context.Context, thunk bass.Thunk) (*dagge // } for _, mount := range cmd.Mounts { - mounted, err := b.mount(ctx, ctr, mount.Target, mount.Source) + mounted, err := runtime.mount(ctx, ctr, mount.Target, mount.Source) if err != nil { return nil, err } @@ -315,25 +293,23 @@ func (b *daggerBuilder) container(ctx context.Context, thunk bass.Thunk) (*dagge for _, env := range cmd.Env { name, val, ok := strings.Cut(env, "=") _ = ok // doesnt matter - ctr = ctr.WithVariable(name, val) + ctr = ctr.WithEnvVariable(name, val) } return ctr.Exec(dagger.ContainerExecOpts{ - Args: cmd.Args, - Opts: dagger.ExecOpts{ - Stdin: string(cmd.Stdin), - }, + Args: cmd.Args, + Stdin: string(cmd.Stdin), }), nil } -func (b *daggerBuilder) mount(ctx context.Context, ctr *dagger.Container, target string, src bass.ThunkMountSource) (*dagger.Container, error) { +func (runtime *Dagger) mount(ctx context.Context, ctr *dagger.Container, target string, src bass.ThunkMountSource) (*dagger.Container, error) { if !path.IsAbs(target) { target = path.Join(workDir, target) } switch { case src.ThunkPath != nil: - srcCtr, err := b.container(ctx, src.ThunkPath.Thunk) + srcCtr, err := runtime.container(ctx, src.ThunkPath.Thunk) if err != nil { return nil, err } @@ -360,14 +336,14 @@ func (b *daggerBuilder) mount(ctx context.Context, ctr *dagger.Container, target return nil, fmt.Errorf("mounting subpaths of cache not implemented yet: %s", fsp.Slash()) } - cacheID, err := b.core.CacheFromTokens([]string{src.Cache.ID}).ID(ctx) + cacheID, err := runtime.client.CacheVolume(src.Cache.ID).ID(ctx) if err != nil { return nil, err } return ctr.WithMountedCache(cacheID, target), nil case src.FSPath != nil: - dir := b.core.Directory() + dir := runtime.client.Directory() root := path.Clean(src.FSPath.Path.Slash()) err := fs.WalkDir(src.FSPath.FS, ".", func(entry string, d fs.DirEntry, err error) error { @@ -411,22 +387,19 @@ func (b *daggerBuilder) mount(ctx context.Context, ctr *dagger.Container, target return ctr.WithMountedFile(target, fileID), nil } case src.HostPath != nil: - id := src.HostPath.Hash() - - hostDir := b.core.Host().Directory(dagger.HostDirectoryID(id)).Read() - fsp := src.HostPath.Path.FilesystemPath() + if fsp.IsDir() { - dirID, err := hostDir.Directory(fsp.Slash()).ID(ctx) + hostDir, err := runtime.client.Host().Directory(fsp.FromSlash()).ID(ctx) if err != nil { - return nil, err + return nil, fmt.Errorf("get host dir: %w", err) } - return ctr.WithMountedDirectory(target, dirID), nil + return ctr.WithMountedDirectory(target, hostDir), nil } else { - fileID, err := hostDir.File(fsp.Slash()).ID(ctx) + fileID, err := runtime.client.Host().Directory(fsp.Dir().FromSlash()).File(fsp.Name()).ID(ctx) if err != nil { - return nil, fmt.Errorf("get host file ID: %w", err) + return nil, fmt.Errorf("get host file: %w", err) } return ctr.WithMountedFile(target, fileID), nil @@ -436,7 +409,7 @@ func (b *daggerBuilder) mount(ctx context.Context, ctr *dagger.Container, target } } -func (b *daggerBuilder) image(ctx context.Context, image *bass.ThunkImage) (dagger.ContainerAddress, *dagger.Container, error) { +func (runtime *Dagger) image(ctx context.Context, image *bass.ThunkImage) (string, *dagger.Container, error) { if image == nil { return "", nil, nil } @@ -447,11 +420,11 @@ func (b *daggerBuilder) image(ctx context.Context, image *bass.ThunkImage) (dagg return "", nil, err } - return dagger.ContainerAddress(ref), nil, nil + return ref, nil, nil } if image.Thunk != nil { - ctr, err := b.container(ctx, *image.Thunk) + ctr, err := runtime.container(ctx, *image.Thunk) if err != nil { return "", nil, fmt.Errorf("image thunk llb: %w", err) } diff --git a/pkg/runtimes/dagger/.gitattributes b/pkg/runtimes/dagger/.gitattributes deleted file mode 100644 index 014859db..00000000 --- a/pkg/runtimes/dagger/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -/api.gen.go linguist-generated=true \ No newline at end of file diff --git a/pkg/runtimes/dagger/api.gen.go b/pkg/runtimes/dagger/api.gen.go deleted file mode 100644 index 592e0aab..00000000 --- a/pkg/runtimes/dagger/api.gen.go +++ /dev/null @@ -1,1443 +0,0 @@ -// Code generated by dagger. DO NOT EDIT. - -package dagger - -import ( - "context" - - "github.com/Khan/genqlient/graphql" - "go.dagger.io/dagger/sdk/go/dagger/querybuilder" -) - -// New returns a new API query object -func New(c graphql.Client) *Query { - return &Query{ - q: querybuilder.Query(), - c: c, - } -} - -// A global cache volume identifier -type CacheID string - -// The address (also known as "ref") of a container published as an OCI image. -// -// Examples: -// - "alpine" -// - "index.docker.io/alpine" -// - "index.docker.io/alpine:latest" -// - "index.docker.io/alpine:latest@sha256deadbeefdeadbeefdeadbeef" -type ContainerAddress string - -// A unique container identifier. Null designates an empty container (scratch). -type ContainerID string - -// A content-addressed directory identifier -type DirectoryID string - -type FSID string - -type FileID string - -// An identifier for a directory on the host -type HostDirectoryID string - -// A unique identifier for a secret -type SecretID string - -type CacheMountInput struct { - // Cache mount name - Name string `json:"name"` - - // path at which the cache will be mounted - Path string `json:"path"` - - // Cache mount sharing mode (TODO: switch to enum) - SharingMode string `json:"sharingMode"` -} - -type ExecEnvInput struct { - // Env var name - Name string `json:"name"` - - // Env var value - Value string `json:"value"` -} - -type ExecInput struct { - // Command to execute - // Example: ["echo", "hello, world!"] - Args []string `json:"args"` - - // Cached mounts - CacheMounts []CacheMountInput `json:"cacheMounts"` - - // Env vars - Env []ExecEnvInput `json:"env"` - - // Filesystem mounts - Mounts []MountInput `json:"mounts"` - - // Secret env vars - SecretEnv []ExecSecretEnvInput `json:"secretEnv"` - - // Include the host's ssh agent socket in the exec at the provided path - SSHAuthSock string `json:"sshAuthSock"` - - // Working directory - Workdir string `json:"workdir"` -} - -// Additional options for executing a command -type ExecOpts struct { - // Optionally redirect the command's standard error to a file in the container. - // Null means discard output. - RedirectStderr string `json:"redirectStderr"` - - // Optionally redirect the command's standard output to a file in the container. - // Null means discard output. - RedirectStdout string `json:"redirectStdout"` - - // Optionally write to the command's standard input - // - // - Null means don't touch stdin (no redirection) - // - Empty string means inject zero bytes to stdin, then send EOF - Stdin string `json:"stdin"` -} - -type ExecSecretEnvInput struct { - // Secret env var value - ID SecretID `json:"id"` - - // Env var name - Name string `json:"name"` -} - -type MountInput struct { - // filesystem to mount - FS FSID `json:"fs"` - - // path at which the filesystem will be mounted - Path string `json:"path"` -} - -// A directory whose contents persist across runs -type CacheVolume struct { - q *querybuilder.Selection - c graphql.Client -} - -func (r *CacheVolume) ID(ctx context.Context) (CacheID, error) { - q := r.q.Select("id") - - var response CacheID - q = q.Bind(&response) - return response, q.Execute(ctx, r.c) -} - -// An OCI-compatible container, also known as a docker container -type Container struct { - q *querybuilder.Selection - c graphql.Client -} - -// Default arguments for future commands -func (r *Container) DefaultArgs(ctx context.Context) ([]string, error) { - q := r.q.Select("defaultArgs") - - var response []string - q = q.Bind(&response) - return response, q.Execute(ctx, r.c) -} - -// Retrieve a directory at the given path. Mounts are included. -func (r *Container) Directory(path string) *Directory { - q := r.q.Select("directory") - q = q.Arg("path", path) - - return &Directory{ - q: q, - c: r.c, - } -} - -// Entrypoint to be prepended to the arguments of all commands -func (r *Container) Entrypoint(ctx context.Context) ([]string, error) { - q := r.q.Select("entrypoint") - - var response []string - q = q.Bind(&response) - return response, q.Execute(ctx, r.c) -} - -// ContainerExecOpts contains options for Container.Exec -type ContainerExecOpts struct { - Args []string - - Opts ExecOpts -} - -// This container after executing the specified command inside it -func (r *Container) Exec(opts ...ContainerExecOpts) *Container { - q := r.q.Select("exec") - // `args` optional argument - for i := len(opts) - 1; i >= 0; i-- { - if !querybuilder.IsZeroValue(opts[i].Args) { - q = q.Arg("args", opts[i].Args) - break - } - } - // `opts` optional argument - for i := len(opts) - 1; i >= 0; i-- { - if !querybuilder.IsZeroValue(opts[i].Opts) { - q = q.Arg("opts", opts[i].Opts) - break - } - } - - return &Container{ - q: q, - c: r.c, - } -} - -// Exit code of the last executed command. Zero means success. -// Null if no command has been executed. -func (r *Container) ExitCode(ctx context.Context) (int, error) { - q := r.q.Select("exitCode") - - var response int - q = q.Bind(&response) - return response, q.Execute(ctx, r.c) -} - -// Retrieve a file at the given path. Mounts are included. -func (r *Container) File(path string) *File { - q := r.q.Select("file") - q = q.Arg("path", path) - - return &File{ - q: q, - c: r.c, - } -} - -// Initialize this container from the base image published at the given address -func (r *Container) From(address ContainerAddress) *Container { - q := r.q.Select("from") - q = q.Arg("address", address) - - return &Container{ - q: q, - c: r.c, - } -} - -// A unique identifier for this container -func (r *Container) ID(ctx context.Context) (ContainerID, error) { - q := r.q.Select("id") - - var response ContainerID - q = q.Bind(&response) - return response, q.Execute(ctx, r.c) -} - -// List of paths where a directory is mounted -func (r *Container) Mounts(ctx context.Context) ([]string, error) { - q := r.q.Select("mounts") - - var response []string - q = q.Bind(&response) - return response, q.Execute(ctx, r.c) -} - -// Publish this container as a new image -func (r *Container) Publish(ctx context.Context, address ContainerAddress) (ContainerAddress, error) { - q := r.q.Select("publish") - q = q.Arg("address", address) - - var response ContainerAddress - q = q.Bind(&response) - return response, q.Execute(ctx, r.c) -} - -// This container's root filesystem. Mounts are not included. -func (r *Container) Rootfs() *Directory { - q := r.q.Select("rootfs") - - return &Directory{ - q: q, - c: r.c, - } -} - -// The error stream of the last executed command. -// Null if no command has been executed. -func (r *Container) Stderr() *File { - q := r.q.Select("stderr") - - return &File{ - q: q, - c: r.c, - } -} - -// The output stream of the last executed command. -// Null if no command has been executed. -func (r *Container) Stdout() *File { - q := r.q.Select("stdout") - - return &File{ - q: q, - c: r.c, - } -} - -// The user to be set for all commands -func (r *Container) User(ctx context.Context) (string, error) { - q := r.q.Select("user") - - var response string - q = q.Bind(&response) - return response, q.Execute(ctx, r.c) -} - -// The value of the specified environment variable -func (r *Container) Variable(ctx context.Context, name string) (string, error) { - q := r.q.Select("variable") - q = q.Arg("name", name) - - var response string - q = q.Bind(&response) - return response, q.Execute(ctx, r.c) -} - -// A list of environment variables passed to commands -func (r *Container) Variables(ctx context.Context) ([]string, error) { - q := r.q.Select("variables") - - var response []string - q = q.Bind(&response) - return response, q.Execute(ctx, r.c) -} - -// ContainerWithDefaultArgsOpts contains options for Container.WithDefaultArgs -type ContainerWithDefaultArgsOpts struct { - Args []string -} - -// Configures default arguments for future commands -func (r *Container) WithDefaultArgs(opts ...ContainerWithDefaultArgsOpts) *Container { - q := r.q.Select("withDefaultArgs") - // `args` optional argument - for i := len(opts) - 1; i >= 0; i-- { - if !querybuilder.IsZeroValue(opts[i].Args) { - q = q.Arg("args", opts[i].Args) - break - } - } - - return &Container{ - q: q, - c: r.c, - } -} - -// This container but with a different command entrypoint -func (r *Container) WithEntrypoint(args []string) *Container { - q := r.q.Select("withEntrypoint") - q = q.Arg("args", args) - - return &Container{ - q: q, - c: r.c, - } -} - -// ContainerWithMountedCacheOpts contains options for Container.WithMountedCache -type ContainerWithMountedCacheOpts struct { - Source DirectoryID -} - -// This container plus a cache volume mounted at the given path -func (r *Container) WithMountedCache(cache CacheID, path string, opts ...ContainerWithMountedCacheOpts) *Container { - q := r.q.Select("withMountedCache") - q = q.Arg("cache", cache) - q = q.Arg("path", path) - // `source` optional argument - for i := len(opts) - 1; i >= 0; i-- { - if !querybuilder.IsZeroValue(opts[i].Source) { - q = q.Arg("source", opts[i].Source) - break - } - } - - return &Container{ - q: q, - c: r.c, - } -} - -// This container plus a directory mounted at the given path -func (r *Container) WithMountedDirectory(path string, source DirectoryID) *Container { - q := r.q.Select("withMountedDirectory") - q = q.Arg("path", path) - q = q.Arg("source", source) - - return &Container{ - q: q, - c: r.c, - } -} - -// This container plus a file mounted at the given path -func (r *Container) WithMountedFile(path string, source FileID) *Container { - q := r.q.Select("withMountedFile") - q = q.Arg("path", path) - q = q.Arg("source", source) - - return &Container{ - q: q, - c: r.c, - } -} - -// This container plus a secret mounted into a file at the given path -func (r *Container) WithMountedSecret(path string, source SecretID) *Container { - q := r.q.Select("withMountedSecret") - q = q.Arg("path", path) - q = q.Arg("source", source) - - return &Container{ - q: q, - c: r.c, - } -} - -// This container plus a temporary directory mounted at the given path -func (r *Container) WithMountedTemp(path string) *Container { - q := r.q.Select("withMountedTemp") - q = q.Arg("path", path) - - return &Container{ - q: q, - c: r.c, - } -} - -// This container plus an env variable containing the given secret -func (r *Container) WithSecretVariable(name string, secret SecretID) *Container { - q := r.q.Select("withSecretVariable") - q = q.Arg("name", name) - q = q.Arg("secret", secret) - - return &Container{ - q: q, - c: r.c, - } -} - -// This container but with a different command user -func (r *Container) WithUser(name string) *Container { - q := r.q.Select("withUser") - q = q.Arg("name", name) - - return &Container{ - q: q, - c: r.c, - } -} - -// This container plus the given environment variable -func (r *Container) WithVariable(name string, value string) *Container { - q := r.q.Select("withVariable") - q = q.Arg("name", name) - q = q.Arg("value", value) - - return &Container{ - q: q, - c: r.c, - } -} - -// This container but with a different working directory -func (r *Container) WithWorkdir(path string) *Container { - q := r.q.Select("withWorkdir") - q = q.Arg("path", path) - - return &Container{ - q: q, - c: r.c, - } -} - -// This container after unmounting everything at the given path. -func (r *Container) WithoutMount(path string) *Container { - q := r.q.Select("withoutMount") - q = q.Arg("path", path) - - return &Container{ - q: q, - c: r.c, - } -} - -// This container minus the given environment variable -func (r *Container) WithoutVariable(name string) *Container { - q := r.q.Select("withoutVariable") - q = q.Arg("name", name) - - return &Container{ - q: q, - c: r.c, - } -} - -// The working directory for all commands -func (r *Container) Workdir(ctx context.Context) (string, error) { - q := r.q.Select("workdir") - - var response string - q = q.Bind(&response) - return response, q.Execute(ctx, r.c) -} - -// Core API -type Core struct { - q *querybuilder.Selection - c graphql.Client -} - -// Look up a filesystem by its ID -func (r *Core) Filesystem(id FSID) *Filesystem { - q := r.q.Select("filesystem") - q = q.Arg("id", id) - - return &Filesystem{ - q: q, - c: r.c, - } -} - -// CoreGitOpts contains options for Core.Git -type CoreGitOpts struct { - Ref string -} - -func (r *Core) Git(remote string, opts ...CoreGitOpts) *Filesystem { - q := r.q.Select("git") - // `ref` optional argument - for i := len(opts) - 1; i >= 0; i-- { - if !querybuilder.IsZeroValue(opts[i].Ref) { - q = q.Arg("ref", opts[i].Ref) - break - } - } - q = q.Arg("remote", remote) - - return &Filesystem{ - q: q, - c: r.c, - } -} - -// Fetch an OCI image -func (r *Core) Image(ref string) *Filesystem { - q := r.q.Select("image") - q = q.Arg("ref", ref) - - return &Filesystem{ - q: q, - c: r.c, - } -} - -// A directory -type Directory struct { - q *querybuilder.Selection - c graphql.Client -} - -// DirectoryContentsOpts contains options for Directory.Contents -type DirectoryContentsOpts struct { - Path string -} - -// Return a list of files and directories at the given path -func (r *Directory) Contents(ctx context.Context, opts ...DirectoryContentsOpts) ([]string, error) { - q := r.q.Select("contents") - // `path` optional argument - for i := len(opts) - 1; i >= 0; i-- { - if !querybuilder.IsZeroValue(opts[i].Path) { - q = q.Arg("path", opts[i].Path) - break - } - } - - var response []string - q = q.Bind(&response) - return response, q.Execute(ctx, r.c) -} - -// The difference between this directory and an another directory -func (r *Directory) Diff(other DirectoryID) *Directory { - q := r.q.Select("diff") - q = q.Arg("other", other) - - return &Directory{ - q: q, - c: r.c, - } -} - -// Retrieve a directory at the given path -func (r *Directory) Directory(path string) *Directory { - q := r.q.Select("directory") - q = q.Arg("path", path) - - return &Directory{ - q: q, - c: r.c, - } -} - -// Retrieve a file at the given path -func (r *Directory) File(path string) *File { - q := r.q.Select("file") - q = q.Arg("path", path) - - return &File{ - q: q, - c: r.c, - } -} - -// The content-addressed identifier of the directory -func (r *Directory) ID(ctx context.Context) (DirectoryID, error) { - q := r.q.Select("id") - - var response DirectoryID - q = q.Bind(&response) - return response, q.Execute(ctx, r.c) -} - -// load a project's metadata -func (r *Directory) LoadProject(configPath string) *Project { - q := r.q.Select("loadProject") - q = q.Arg("configPath", configPath) - - return &Project{ - q: q, - c: r.c, - } -} - -// This directory plus the contents of the given file copied to the given path -func (r *Directory) WithCopiedFile(path string, source FileID) *Directory { - q := r.q.Select("withCopiedFile") - q = q.Arg("path", path) - q = q.Arg("source", source) - - return &Directory{ - q: q, - c: r.c, - } -} - -// This directory plus a directory written at the given path -func (r *Directory) WithDirectory(directory DirectoryID, path string) *Directory { - q := r.q.Select("withDirectory") - q = q.Arg("directory", directory) - q = q.Arg("path", path) - - return &Directory{ - q: q, - c: r.c, - } -} - -// DirectoryWithNewFileOpts contains options for Directory.WithNewFile -type DirectoryWithNewFileOpts struct { - Contents string -} - -// This directory plus a new file written at the given path -func (r *Directory) WithNewFile(path string, opts ...DirectoryWithNewFileOpts) *Directory { - q := r.q.Select("withNewFile") - // `contents` optional argument - for i := len(opts) - 1; i >= 0; i-- { - if !querybuilder.IsZeroValue(opts[i].Contents) { - q = q.Arg("contents", opts[i].Contents) - break - } - } - q = q.Arg("path", path) - - return &Directory{ - q: q, - c: r.c, - } -} - -// This directory with the directory at the given path removed -func (r *Directory) WithoutDirectory(path string) *Directory { - q := r.q.Select("withoutDirectory") - q = q.Arg("path", path) - - return &Directory{ - q: q, - c: r.c, - } -} - -// This directory with the file at the given path removed -func (r *Directory) WithoutFile(path string) *Directory { - q := r.q.Select("withoutFile") - q = q.Arg("path", path) - - return &Directory{ - q: q, - c: r.c, - } -} - -// Command execution -type Exec struct { - q *querybuilder.Selection - c graphql.Client -} - -// Exit code of the command -func (r *Exec) ExitCode(ctx context.Context) (int, error) { - q := r.q.Select("exitCode") - - var response int - q = q.Bind(&response) - return response, q.Execute(ctx, r.c) -} - -// Modified filesystem -func (r *Exec) FS() *Filesystem { - q := r.q.Select("fs") - - return &Filesystem{ - q: q, - c: r.c, - } -} - -// Modified mounted filesystem -func (r *Exec) Mount(path string) *Filesystem { - q := r.q.Select("mount") - q = q.Arg("path", path) - - return &Filesystem{ - q: q, - c: r.c, - } -} - -// ExecStderrOpts contains options for Exec.Stderr -type ExecStderrOpts struct { - Lines int -} - -// stderr of the command -func (r *Exec) Stderr(ctx context.Context, opts ...ExecStderrOpts) (string, error) { - q := r.q.Select("stderr") - // `lines` optional argument - for i := len(opts) - 1; i >= 0; i-- { - if !querybuilder.IsZeroValue(opts[i].Lines) { - q = q.Arg("lines", opts[i].Lines) - break - } - } - - var response string - q = q.Bind(&response) - return response, q.Execute(ctx, r.c) -} - -// ExecStdoutOpts contains options for Exec.Stdout -type ExecStdoutOpts struct { - Lines int -} - -// stdout of the command -func (r *Exec) Stdout(ctx context.Context, opts ...ExecStdoutOpts) (string, error) { - q := r.q.Select("stdout") - // `lines` optional argument - for i := len(opts) - 1; i >= 0; i-- { - if !querybuilder.IsZeroValue(opts[i].Lines) { - q = q.Arg("lines", opts[i].Lines) - break - } - } - - var response string - q = q.Bind(&response) - return response, q.Execute(ctx, r.c) -} - -// A schema extension provided by a project -type Extension struct { - q *querybuilder.Selection - c graphql.Client -} - -// path to the extension's code within the project's filesystem -func (r *Extension) Path(ctx context.Context) (string, error) { - q := r.q.Select("path") - - var response string - q = q.Bind(&response) - return response, q.Execute(ctx, r.c) -} - -// schema contributed to the project by this extension -func (r *Extension) Schema(ctx context.Context) (string, error) { - q := r.q.Select("schema") - - var response string - q = q.Bind(&response) - return response, q.Execute(ctx, r.c) -} - -// sdk used to generate code for and/or execute this extension -func (r *Extension) SDK(ctx context.Context) (string, error) { - q := r.q.Select("sdk") - - var response string - q = q.Bind(&response) - return response, q.Execute(ctx, r.c) -} - -// A file -type File struct { - q *querybuilder.Selection - c graphql.Client -} - -// The contents of the file -func (r *File) Contents(ctx context.Context) (string, error) { - q := r.q.Select("contents") - - var response string - q = q.Bind(&response) - return response, q.Execute(ctx, r.c) -} - -// The content-addressed identifier of the file -func (r *File) ID(ctx context.Context) (FileID, error) { - q := r.q.Select("id") - - var response FileID - q = q.Bind(&response) - return response, q.Execute(ctx, r.c) -} - -func (r *File) Secret() *Secret { - q := r.q.Select("secret") - - return &Secret{ - q: q, - c: r.c, - } -} - -// The size of the file, in bytes -func (r *File) Size(ctx context.Context) (int, error) { - q := r.q.Select("size") - - var response int - q = q.Bind(&response) - return response, q.Execute(ctx, r.c) -} - -// A reference to a filesystem tree. -// -// For example: -// - The root filesystem of a container -// - A source code repository -// - A directory containing binary artifacts -// -// Rule of thumb: if it fits in a tar archive, it fits in a Filesystem. -type Filesystem struct { - q *querybuilder.Selection - c graphql.Client -} - -// FilesystemCopyOpts contains options for Filesystem.Copy -type FilesystemCopyOpts struct { - DestPath string - - Exclude []string - - Include []string - - SrcPath string -} - -// copy from a filesystem -func (r *Filesystem) Copy(from FSID, opts ...FilesystemCopyOpts) *Filesystem { - q := r.q.Select("copy") - // `destPath` optional argument - for i := len(opts) - 1; i >= 0; i-- { - if !querybuilder.IsZeroValue(opts[i].DestPath) { - q = q.Arg("destPath", opts[i].DestPath) - break - } - } - // `exclude` optional argument - for i := len(opts) - 1; i >= 0; i-- { - if !querybuilder.IsZeroValue(opts[i].Exclude) { - q = q.Arg("exclude", opts[i].Exclude) - break - } - } - q = q.Arg("from", from) - // `include` optional argument - for i := len(opts) - 1; i >= 0; i-- { - if !querybuilder.IsZeroValue(opts[i].Include) { - q = q.Arg("include", opts[i].Include) - break - } - } - // `srcPath` optional argument - for i := len(opts) - 1; i >= 0; i-- { - if !querybuilder.IsZeroValue(opts[i].SrcPath) { - q = q.Arg("srcPath", opts[i].SrcPath) - break - } - } - - return &Filesystem{ - q: q, - c: r.c, - } -} - -// FilesystemDockerbuildOpts contains options for Filesystem.Dockerbuild -type FilesystemDockerbuildOpts struct { - Dockerfile string -} - -// docker build using this filesystem as context -func (r *Filesystem) Dockerbuild(opts ...FilesystemDockerbuildOpts) *Filesystem { - q := r.q.Select("dockerbuild") - // `dockerfile` optional argument - for i := len(opts) - 1; i >= 0; i-- { - if !querybuilder.IsZeroValue(opts[i].Dockerfile) { - q = q.Arg("dockerfile", opts[i].Dockerfile) - break - } - } - - return &Filesystem{ - q: q, - c: r.c, - } -} - -// execute a command inside this filesystem -func (r *Filesystem) Exec(input ExecInput) *Exec { - q := r.q.Select("exec") - q = q.Arg("input", input) - - return &Exec{ - q: q, - c: r.c, - } -} - -// FilesystemFileOpts contains options for Filesystem.File -type FilesystemFileOpts struct { - Lines int -} - -// read a file at path -func (r *Filesystem) File(ctx context.Context, path string, opts ...FilesystemFileOpts) (string, error) { - q := r.q.Select("file") - // `lines` optional argument - for i := len(opts) - 1; i >= 0; i-- { - if !querybuilder.IsZeroValue(opts[i].Lines) { - q = q.Arg("lines", opts[i].Lines) - break - } - } - q = q.Arg("path", path) - - var response string - q = q.Bind(&response) - return response, q.Execute(ctx, r.c) -} - -func (r *Filesystem) ID(ctx context.Context) (FSID, error) { - q := r.q.Select("id") - - var response FSID - q = q.Bind(&response) - return response, q.Execute(ctx, r.c) -} - -// push a filesystem as an image to a registry -func (r *Filesystem) PushImage(ctx context.Context, ref string) (bool, error) { - q := r.q.Select("pushImage") - q = q.Arg("ref", ref) - - var response bool - q = q.Bind(&response) - return response, q.Execute(ctx, r.c) -} - -// FilesystemWriteFileOpts contains options for Filesystem.WriteFile -type FilesystemWriteFileOpts struct { - Permissions string -} - -// write a file at path -func (r *Filesystem) WriteFile(contents string, path string, opts ...FilesystemWriteFileOpts) *Filesystem { - q := r.q.Select("writeFile") - q = q.Arg("contents", contents) - q = q.Arg("path", path) - // `permissions` optional argument - for i := len(opts) - 1; i >= 0; i-- { - if !querybuilder.IsZeroValue(opts[i].Permissions) { - q = q.Arg("permissions", opts[i].Permissions) - break - } - } - - return &Filesystem{ - q: q, - c: r.c, - } -} - -// A git ref (tag or branch) -type GitRef struct { - q *querybuilder.Selection - c graphql.Client -} - -// The digest of the current value of this ref -func (r *GitRef) Digest(ctx context.Context) (string, error) { - q := r.q.Select("digest") - - var response string - q = q.Bind(&response) - return response, q.Execute(ctx, r.c) -} - -// The filesystem tree at this ref -func (r *GitRef) Tree() *Directory { - q := r.q.Select("tree") - - return &Directory{ - q: q, - c: r.c, - } -} - -// A git repository -type GitRepository struct { - q *querybuilder.Selection - c graphql.Client -} - -// Details on one branch -func (r *GitRepository) Branch(name string) *GitRef { - q := r.q.Select("branch") - q = q.Arg("name", name) - - return &GitRef{ - q: q, - c: r.c, - } -} - -// List of branches on the repository -func (r *GitRepository) Branches(ctx context.Context) ([]string, error) { - q := r.q.Select("branches") - - var response []string - q = q.Bind(&response) - return response, q.Execute(ctx, r.c) -} - -// Details on one tag -func (r *GitRepository) Tag(name string) *GitRef { - q := r.q.Select("tag") - q = q.Arg("name", name) - - return &GitRef{ - q: q, - c: r.c, - } -} - -// List of tags on the repository -func (r *GitRepository) Tags(ctx context.Context) ([]string, error) { - q := r.q.Select("tags") - - var response []string - q = q.Bind(&response) - return response, q.Execute(ctx, r.c) -} - -// Information about the host execution environment -type Host struct { - q *querybuilder.Selection - c graphql.Client -} - -// Access a directory on the host -func (r *Host) Directory(id HostDirectoryID) *HostDirectory { - q := r.q.Select("directory") - q = q.Arg("id", id) - - return &HostDirectory{ - q: q, - c: r.c, - } -} - -// Lookup the value of an environment variable. Null if the variable is not available. -func (r *Host) Variable(name string) *HostVariable { - q := r.q.Select("variable") - q = q.Arg("name", name) - - return &HostVariable{ - q: q, - c: r.c, - } -} - -// The current working directory on the host -func (r *Host) Workdir() *HostDirectory { - q := r.q.Select("workdir") - - return &HostDirectory{ - q: q, - c: r.c, - } -} - -// A directory on the host -type HostDirectory struct { - q *querybuilder.Selection - c graphql.Client -} - -// Read the contents of the directory -func (r *HostDirectory) Read() *Directory { - q := r.q.Select("read") - - return &Directory{ - q: q, - c: r.c, - } -} - -// HostDirectoryWriteOpts contains options for HostDirectory.Write -type HostDirectoryWriteOpts struct { - Path string -} - -// Write the contents of another directory to the directory -func (r *HostDirectory) Write(ctx context.Context, contents DirectoryID, opts ...HostDirectoryWriteOpts) (bool, error) { - q := r.q.Select("write") - q = q.Arg("contents", contents) - // `path` optional argument - for i := len(opts) - 1; i >= 0; i-- { - if !querybuilder.IsZeroValue(opts[i].Path) { - q = q.Arg("path", opts[i].Path) - break - } - } - - var response bool - q = q.Bind(&response) - return response, q.Execute(ctx, r.c) -} - -// An environment variable on the host environment -type HostVariable struct { - q *querybuilder.Selection - c graphql.Client -} - -// A secret referencing the value of this variable -func (r *HostVariable) Secret() *Secret { - q := r.q.Select("secret") - - return &Secret{ - q: q, - c: r.c, - } -} - -// The value of this variable -func (r *HostVariable) Value(ctx context.Context) (string, error) { - q := r.q.Select("value") - - var response string - q = q.Bind(&response) - return response, q.Execute(ctx, r.c) -} - -// A set of scripts and/or extensions -type Project struct { - q *querybuilder.Selection - c graphql.Client -} - -// other projects with schema this project depends on -func (r *Project) Dependencies(ctx context.Context) ([]Project, error) { - q := r.q.Select("dependencies") - - var response []Project - q = q.Bind(&response) - return response, q.Execute(ctx, r.c) -} - -// extensions in this project -func (r *Project) Extensions(ctx context.Context) ([]Extension, error) { - q := r.q.Select("extensions") - - var response []Extension - q = q.Bind(&response) - return response, q.Execute(ctx, r.c) -} - -// Code files generated by the SDKs in the project -func (r *Project) GeneratedCode() *Directory { - q := r.q.Select("generatedCode") - - return &Directory{ - q: q, - c: r.c, - } -} - -// install the project's schema -func (r *Project) Install(ctx context.Context) (bool, error) { - q := r.q.Select("install") - - var response bool - q = q.Bind(&response) - return response, q.Execute(ctx, r.c) -} - -// name of the project -func (r *Project) Name(ctx context.Context) (string, error) { - q := r.q.Select("name") - - var response string - q = q.Bind(&response) - return response, q.Execute(ctx, r.c) -} - -// schema provided by the project -func (r *Project) Schema(ctx context.Context) (string, error) { - q := r.q.Select("schema") - - var response string - q = q.Bind(&response) - return response, q.Execute(ctx, r.c) -} - -// scripts in this project -func (r *Project) Scripts(ctx context.Context) ([]Script, error) { - q := r.q.Select("scripts") - - var response []Script - q = q.Bind(&response) - return response, q.Execute(ctx, r.c) -} - -type Query struct { - q *querybuilder.Selection - c graphql.Client -} - -// Construct a cache volume from its ID -func (r *Query) Cache(id CacheID) *CacheVolume { - q := r.q.Select("cache") - q = q.Arg("id", id) - - return &CacheVolume{ - q: q, - c: r.c, - } -} - -// Create a new cache volume identified by an arbitrary set of tokens -func (r *Query) CacheFromTokens(tokens []string) *CacheVolume { - q := r.q.Select("cacheFromTokens") - q = q.Arg("tokens", tokens) - - return &CacheVolume{ - q: q, - c: r.c, - } -} - -// ContainerOpts contains options for Query.Container -type ContainerOpts struct { - ID ContainerID -} - -// Load a container from ID. -// Null ID returns an empty container (scratch). -func (r *Query) Container(opts ...ContainerOpts) *Container { - q := r.q.Select("container") - // `id` optional argument - for i := len(opts) - 1; i >= 0; i-- { - if !querybuilder.IsZeroValue(opts[i].ID) { - q = q.Arg("id", opts[i].ID) - break - } - } - - return &Container{ - q: q, - c: r.c, - } -} - -// Core API -func (r *Query) Core() *Core { - q := r.q.Select("core") - - return &Core{ - q: q, - c: r.c, - } -} - -// DirectoryOpts contains options for Query.Directory -type DirectoryOpts struct { - ID DirectoryID -} - -// Load a directory by ID. No argument produces an empty directory. -func (r *Query) Directory(opts ...DirectoryOpts) *Directory { - q := r.q.Select("directory") - // `id` optional argument - for i := len(opts) - 1; i >= 0; i-- { - if !querybuilder.IsZeroValue(opts[i].ID) { - q = q.Arg("id", opts[i].ID) - break - } - } - - return &Directory{ - q: q, - c: r.c, - } -} - -// Load a file by ID -func (r *Query) File(id FileID) *File { - q := r.q.Select("file") - q = q.Arg("id", id) - - return &File{ - q: q, - c: r.c, - } -} - -// Query a git repository -func (r *Query) Git(url string) *GitRepository { - q := r.q.Select("git") - q = q.Arg("url", url) - - return &GitRepository{ - q: q, - c: r.c, - } -} - -// Query the host environment -func (r *Query) Host() *Host { - q := r.q.Select("host") - - return &Host{ - q: q, - c: r.c, - } -} - -// An http remote -func (r *Query) HTTP(url string) *File { - q := r.q.Select("http") - q = q.Arg("url", url) - - return &File{ - q: q, - c: r.c, - } -} - -// Look up a project by name -func (r *Query) Project(name string) *Project { - q := r.q.Select("project") - q = q.Arg("name", name) - - return &Project{ - q: q, - c: r.c, - } -} - -// Load a secret from its ID -func (r *Query) Secret(id SecretID) *Secret { - q := r.q.Select("secret") - q = q.Arg("id", id) - - return &Secret{ - q: q, - c: r.c, - } -} - -// An executable script that uses the project's dependencies and/or extensions -type Script struct { - q *querybuilder.Selection - c graphql.Client -} - -// path to the script's code within the project's filesystem -func (r *Script) Path(ctx context.Context) (string, error) { - q := r.q.Select("path") - - var response string - q = q.Bind(&response) - return response, q.Execute(ctx, r.c) -} - -// sdk used to generate code for and/or execute this script -func (r *Script) SDK(ctx context.Context) (string, error) { - q := r.q.Select("sdk") - - var response string - q = q.Bind(&response) - return response, q.Execute(ctx, r.c) -} - -// A reference to a secret value, which can be handled more safely than the value itself -type Secret struct { - q *querybuilder.Selection - c graphql.Client -} - -// The identifier for this secret -func (r *Secret) ID(ctx context.Context) (SecretID, error) { - q := r.q.Select("id") - - var response SecretID - q = q.Bind(&response) - return response, q.Execute(ctx, r.c) -} diff --git a/pkg/runtimes/suite.go b/pkg/runtimes/suite.go index 2b583b50..622d38bf 100644 --- a/pkg/runtimes/suite.go +++ b/pkg/runtimes/suite.go @@ -287,7 +287,7 @@ func Suite(t *testing.T, config bass.RuntimeConfig) { res, err := test.Run(ctx, t, config, nil) if test.ErrCause != "" { is.True(err != nil) - t.Logf("error: %s", err) + t.Logf("error: %q", err.Error()) // NB: assert against the root cause of the error, not just Contains lines := strings.Split(err.Error(), "\n") is.True(strings.HasSuffix(lines[0], test.ErrCause)) From da4c3943921bc4069cc5ddf76b4f8f05dba7db5b Mon Sep 17 00:00:00 2001 From: Alex Suraci Date: Sun, 30 Oct 2022 15:11:00 -0400 Subject: [PATCH 07/25] update dagger again --- dagger | 2 +- go.mod | 9 ++++++--- go.sum | 6 +++--- pkg/runtimes/dagger.go | 6 +++--- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/dagger b/dagger index cdc494ad..cba0dd34 160000 --- a/dagger +++ b/dagger @@ -1 +1 @@ -Subproject commit cdc494adccc5b1edb9f5096cea6d93a3389ba8e4 +Subproject commit cba0dd343ad3d86abfb283ce95c2632ba23b9bfe diff --git a/go.mod b/go.mod index 408bbf01..ce5a6b1b 100644 --- a/go.mod +++ b/go.mod @@ -3,14 +3,15 @@ module github.com/vito/bass go 1.18 require ( - dagger.io/dagger v0.0.0-00010101000000-000000000000 + dagger.io/dagger v0.3.1 github.com/adrg/xdg v0.4.0 github.com/agext/levenshtein v1.2.3 github.com/ajstarks/svgo v0.0.0-20210406150507-75cfd577ce75 github.com/alecthomas/chroma v0.9.2 github.com/c-bata/go-prompt v0.2.6 github.com/cenkalti/backoff/v4 v4.1.3 - github.com/containerd/containerd v1.6.8 + github.com/containerd/containerd v1.6.9 + github.com/dagger/dagger v0.3.2 github.com/docker/distribution v2.8.1+incompatible github.com/docker/docker v20.10.18+incompatible github.com/gertd/go-pluralize v0.1.7 @@ -150,4 +151,6 @@ replace github.com/docker/docker => github.com/docker/docker v20.10.3-0.20220414 // END SYNC -replace dagger.io/dagger => ./dagger +replace github.com/dagger/dagger => ./dagger + +replace dagger.io/dagger => ./dagger/sdk/go diff --git a/go.sum b/go.sum index 05167443..15ab5507 100644 --- a/go.sum +++ b/go.sum @@ -132,8 +132,8 @@ github.com/containerd/cgroups v1.0.3 h1:ADZftAkglvCiD44c77s5YmMqaP2pzVCFZvBmAlBd github.com/containerd/console v1.0.1/go.mod h1:XUsP6YE/mKtz6bxc+I8UiKKTP04qjQL4qcS3XoQ5xkw= github.com/containerd/console v1.0.3 h1:lIr7SlA5PxZyMV30bDW0MGbiOPXwc63yRuCP0ARubLw= github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= -github.com/containerd/containerd v1.6.8 h1:h4dOFDwzHmqFEP754PgfgTeVXFnLiRc6kiqC7tplDJs= -github.com/containerd/containerd v1.6.8/go.mod h1:By6p5KqPK0/7/CgO/A6t/Gz+CUYUu2zf1hUaaymVXB0= +github.com/containerd/containerd v1.6.9 h1:IN/r8DUes/B5lEGTNfIiUkfZBtIQJGx2ai703dV6lRA= +github.com/containerd/containerd v1.6.9/go.mod h1:XVicUvkxOrftE2Q1YWUXgZwkkAxwQYNOFzYWvfVfEfQ= github.com/containerd/continuity v0.1.0/go.mod h1:ICJu0PwR54nI0yPEnJ6jcS+J7CZAUXrLh8lPo2knzsM= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= @@ -576,7 +576,7 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/tj/assert v0.0.0-20171129193455-018094318fb0/go.mod h1:mZ9/Rh9oLWpLLDRpvE+3b7gP/C2YyLFYxNmcLnPTMe0= github.com/tj/assert v0.0.3 h1:Df/BlaZ20mq6kuai7f5z2TvPFiwC3xaWJSDQNiIS3Rk= diff --git a/pkg/runtimes/dagger.go b/pkg/runtimes/dagger.go index bea75f35..3cadc8d2 100644 --- a/pkg/runtimes/dagger.go +++ b/pkg/runtimes/dagger.go @@ -13,10 +13,10 @@ import ( "path" "strings" - "dagger.io/dagger/engine" - "dagger.io/dagger/router" - "dagger.io/dagger/sdk/go/dagger" + "dagger.io/dagger" "github.com/adrg/xdg" + "github.com/dagger/dagger/engine" + "github.com/dagger/dagger/router" ocispecs "github.com/opencontainers/image-spec/specs-go/v1" "github.com/tonistiigi/fsutil" "github.com/vito/bass/pkg/bass" From ac04657f34287c65834b1a6d0fd63ed6c8d56df6 Mon Sep 17 00:00:00 2001 From: Alex Suraci Date: Sun, 30 Oct 2022 16:10:15 -0400 Subject: [PATCH 08/25] fix host paths --- pkg/runtimes/dagger.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/runtimes/dagger.go b/pkg/runtimes/dagger.go index 3cadc8d2..bc75efad 100644 --- a/pkg/runtimes/dagger.go +++ b/pkg/runtimes/dagger.go @@ -387,17 +387,18 @@ func (runtime *Dagger) mount(ctx context.Context, ctr *dagger.Container, target return ctr.WithMountedFile(target, fileID), nil } case src.HostPath != nil: + dir := runtime.client.Host().Directory(src.HostPath.ContextDir) fsp := src.HostPath.Path.FilesystemPath() if fsp.IsDir() { - hostDir, err := runtime.client.Host().Directory(fsp.FromSlash()).ID(ctx) + dirID, err := dir.Directory(fsp.FromSlash()).ID(ctx) if err != nil { return nil, fmt.Errorf("get host dir: %w", err) } - return ctr.WithMountedDirectory(target, hostDir), nil + return ctr.WithMountedDirectory(target, dirID), nil } else { - fileID, err := runtime.client.Host().Directory(fsp.Dir().FromSlash()).File(fsp.Name()).ID(ctx) + fileID, err := dir.File(fsp.FromSlash()).ID(ctx) if err != nil { return nil, fmt.Errorf("get host file: %w", err) } From d379ac64161607366ac3039b4bde4c0a8a0706aa Mon Sep 17 00:00:00 2001 From: Alex Suraci Date: Sat, 26 Nov 2022 20:06:41 -0500 Subject: [PATCH 09/25] update dagger suite test for refactor --- pkg/runtimes/dagger.go | 104 +++++++++++++++++++++++++----------- pkg/runtimes/dagger_test.go | 26 ++------- 2 files changed, 75 insertions(+), 55 deletions(-) diff --git a/pkg/runtimes/dagger.go b/pkg/runtimes/dagger.go index bc75efad..1333e056 100644 --- a/pkg/runtimes/dagger.go +++ b/pkg/runtimes/dagger.go @@ -12,9 +12,9 @@ import ( "os" "path" "strings" + "sync" "dagger.io/dagger" - "github.com/adrg/xdg" "github.com/dagger/dagger/engine" "github.com/dagger/dagger/router" ocispecs "github.com/opencontainers/image-spec/specs-go/v1" @@ -32,9 +32,11 @@ func init() { type Dagger struct { Platform ocispecs.Platform - sockPath string - stop func() - stopped chan struct{} + sockPath string + stop func() + stopped chan error + running *sync.WaitGroup + statusProxy *statusProxy client *dagger.Client } @@ -56,50 +58,72 @@ func NewDagger(ctx context.Context, _ bass.RuntimePool, cfg *bass.Scope) (bass.R engineCtx, cancel := context.WithCancel(ctx) runtime := &Dagger{ - sockPath: fmt.Sprintf("bass/dagger.%d.sock", os.Getpid()), - stop: cancel, - stopped: make(chan struct{}), + stop: cancel, + stopped: make(chan error, 1), + running: new(sync.WaitGroup), } if config.Host == "" { - if err := os.RemoveAll(runtime.sockPath); err != nil { + sockTemp, err := os.CreateTemp("", "bass-dagger.*.sock") + if err != nil { return nil, err } - sockPath, err := xdg.StateFile(runtime.sockPath) + runtime.sockPath = sockTemp.Name() + + err = sockTemp.Close() if err != nil { return nil, err } - config.Host = "unix://" + sockPath + if err := os.RemoveAll(runtime.sockPath); err != nil { + return nil, err + } + + config.Host = "unix://" + runtime.sockPath - l, err := net.Listen("unix", sockPath) + l, err := net.Listen("unix", runtime.sockPath) if err != nil { return nil, fmt.Errorf("listen for dagger conns: %w", err) } - statusProxy := forwardStatus(progrock.RecorderFromContext(ctx)) - - go engine.Start(engineCtx, &engine.Config{ - RawBuildkitStatus: statusProxy.Writer(), - }, func(ctx context.Context, r *router.Router) error { - go func() { - for { - conn, err := l.Accept() - if err != nil { - break + runtime.statusProxy = forwardStatus(progrock.RecorderFromContext(ctx)) + + started := make(chan struct{}) + go func() { + runtime.stopped <- engine.Start(engineCtx, &engine.Config{ + RawBuildkitStatus: runtime.statusProxy.Writer(), + }, func(ctx context.Context, r *router.Router) error { + go func() { + for { + conn, err := l.Accept() + if err != nil { + break + } + + r.ServeConn(conn) } + }() - r.ServeConn(conn) - } - }() + close(started) - <-ctx.Done() + <-engineCtx.Done() - statusProxy.Wait() - close(runtime.stopped) - return nil - }) + runtime.running.Wait() + + return nil + }) + }() + + select { + case <-started: + case err := <-runtime.stopped: + if err != nil { + return nil, err + } else { + return nil, fmt.Errorf("runtime stopped?") + } + } } os.Setenv("DAGGER_HOST", config.Host) @@ -120,6 +144,9 @@ func (runtime *Dagger) Resolve(ctx context.Context, imageRef bass.ImageRef) (bas } func (runtime *Dagger) Run(ctx context.Context, thunk bass.Thunk) error { + runtime.running.Add(1) + defer runtime.running.Done() + ctr, err := runtime.container(ctx, thunk) if err != nil { return err @@ -142,6 +169,9 @@ func (runtime *Dagger) Start(ctx context.Context, thunk bass.Thunk) (StartResult } func (runtime *Dagger) Read(ctx context.Context, w io.Writer, thunk bass.Thunk) error { + runtime.running.Add(1) + defer runtime.running.Done() + ctr, err := runtime.container(ctx, thunk) if err != nil { return err @@ -165,6 +195,9 @@ func (runtime *Dagger) Export(ctx context.Context, w io.Writer, thunk bass.Thunk } func (runtime *Dagger) ExportPath(ctx context.Context, w io.Writer, tp bass.ThunkPath) error { + runtime.running.Add(1) + defer runtime.running.Done() + dir, err := os.MkdirTemp("", "bass-dagger-export*") if err != nil { return err @@ -218,12 +251,19 @@ func (runtime *Dagger) Close() error { runtime.stop() - <-runtime.stopped - - if err := os.RemoveAll(runtime.sockPath); err != nil { + err = <-runtime.stopped + if err != nil && !errors.Is(err, context.Canceled) { return err } + runtime.statusProxy.Wait() + + if runtime.sockPath != "" { + if err := os.RemoveAll(runtime.sockPath); err != nil { + return err + } + } + return nil } diff --git a/pkg/runtimes/dagger_test.go b/pkg/runtimes/dagger_test.go index 75c9013e..928531bb 100644 --- a/pkg/runtimes/dagger_test.go +++ b/pkg/runtimes/dagger_test.go @@ -1,40 +1,20 @@ package runtimes_test import ( - "context" - "os" "testing" "github.com/vito/bass/pkg/bass" "github.com/vito/bass/pkg/runtimes" - "github.com/vito/bass/pkg/runtimes/util/buildkitd" - "github.com/vito/is" ) func TestDaggerRuntime(t *testing.T) { - is := is.New(t) - if testing.Short() { t.SkipNow() return } - host, err := buildkitd.Start(context.Background()) - is.NoErr(err) - - os.Setenv("BUILDKIT_HOST", host) - - ctx := context.Background() - - pool, err := runtimes.NewPool(ctx, &bass.Config{ - Runtimes: []bass.RuntimeConfig{ - { - Platform: bass.LinuxPlatform, - Runtime: runtimes.DaggerName, - }, - }, + runtimes.Suite(t, bass.RuntimeConfig{ + Platform: bass.LinuxPlatform, + Runtime: runtimes.DaggerName, }) - is.NoErr(err) - - runtimes.Suite(t, pool) } From 3e61bb966a00a7a4fa03573a1b68f368ad6f2825 Mon Sep 17 00:00:00 2001 From: Alex Suraci Date: Sun, 30 Oct 2022 19:58:16 -0400 Subject: [PATCH 10/25] back to buildkit by default this was a temporary measure, will just use config now --- cmd/bass/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/bass/main.go b/cmd/bass/main.go index 0aaa24ed..a9324102 100644 --- a/cmd/bass/main.go +++ b/cmd/bass/main.go @@ -102,7 +102,7 @@ var DefaultConfig = bass.Config{ Runtimes: []bass.RuntimeConfig{ { Platform: bass.LinuxPlatform, - Runtime: runtimes.DaggerName, + Runtime: runtimes.BuildkitName, }, }, } From a34d2583612c6ebe85d6e0c7e29e11132a4d379c Mon Sep 17 00:00:00 2001 From: Alex Suraci Date: Sun, 30 Oct 2022 19:58:44 -0400 Subject: [PATCH 11/25] fix repl setup repl had no pool, flag-only commands wouldn't run --- cmd/bass/main.go | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/cmd/bass/main.go b/cmd/bass/main.go index a9324102..4c53cb7f 100644 --- a/cmd/bass/main.go +++ b/cmd/bass/main.go @@ -153,9 +153,9 @@ func root(ctx context.Context) error { return langServer(ctx) } - if flags.NArg() == 0 { + if flags.NArg() == 0 && !runExport && !runPrune && !runBump && !runRun { // TODO: bring progress back - return repl(ctx) + return repl(ctx, config) } return cli.WithProgress(ctx, func(ctx context.Context) error { @@ -197,7 +197,15 @@ func root(ctx context.Context) error { }) } -func repl(ctx context.Context) error { +func repl(ctx context.Context, config *bass.Config) error { + pool, err := runtimes.NewPool(ctx, config) + if err != nil { + cli.WriteError(ctx, err) + return err + } + + ctx = bass.WithRuntimePool(ctx, pool) + scope := bass.NewRunScope(bass.Ground, bass.RunState{ Dir: bass.NewHostDir("."), Stdin: bass.Stdin, From 585e89d263c42423bb5193ccef36bb7c945d1e40 Mon Sep 17 00:00:00 2001 From: Alex Suraci Date: Sun, 30 Oct 2022 19:59:12 -0400 Subject: [PATCH 12/25] bump dagger --- dagger | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dagger b/dagger index cba0dd34..b7edea8e 160000 --- a/dagger +++ b/dagger @@ -1 +1 @@ -Subproject commit cba0dd343ad3d86abfb283ce95c2632ba23b9bfe +Subproject commit b7edea8e6e7aae52c49f72b5a71a303560d3020f From e8093e8651158dfb2cdb89422f2081094f2181ba Mon Sep 17 00:00:00 2001 From: Alex Suraci Date: Fri, 11 Nov 2022 17:18:14 -0500 Subject: [PATCH 13/25] bump dagger, go back to main buildkit version --- dagger | 2 +- go.mod | 16 ++++--- go.sum | 94 +++++----------------------------------- pkg/runtimes/buildkit.go | 3 +- pkg/runtimes/dagger.go | 49 +++------------------ 5 files changed, 31 insertions(+), 133 deletions(-) diff --git a/dagger b/dagger index b7edea8e..969ca0a7 160000 --- a/dagger +++ b/dagger @@ -1 +1 @@ -Subproject commit b7edea8e6e7aae52c49f72b5a71a303560d3020f +Subproject commit 969ca0a75af985ae75859e3218366f093cf75898 diff --git a/go.mod b/go.mod index ce5a6b1b..0c4c897d 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/vito/bass go 1.18 require ( - dagger.io/dagger v0.3.1 + dagger.io/dagger v0.4.1-0.20221111181432-65c2fc1d0538 github.com/adrg/xdg v0.4.0 github.com/agext/levenshtein v1.2.3 github.com/ajstarks/svgo v0.0.0-20210406150507-75cfd577ce75 @@ -11,7 +11,8 @@ require ( github.com/c-bata/go-prompt v0.2.6 github.com/cenkalti/backoff/v4 v4.1.3 github.com/containerd/containerd v1.6.9 - github.com/dagger/dagger v0.3.2 + github.com/dagger/dagger v0.0.0-00010101000000-000000000000 + github.com/docker/cli v20.10.17+incompatible github.com/docker/distribution v2.8.1+incompatible github.com/docker/docker v20.10.18+incompatible github.com/gertd/go-pluralize v0.1.7 @@ -37,7 +38,7 @@ require ( github.com/spf13/pflag v1.0.5 github.com/spy16/slurp v0.2.3 github.com/square/certstrap v1.3.0 - github.com/tonistiigi/fsutil v0.0.0-20220115021204-b19f7f9cb274 + github.com/tonistiigi/fsutil v0.0.0-20220930225714-4638ad635be5 github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea github.com/vito/booklit v0.12.2-0.20220630023834-33787382be72 github.com/vito/go-interact v1.0.1 @@ -64,7 +65,6 @@ require ( github.com/Khan/genqlient v0.5.0 // indirect github.com/Microsoft/go-winio v0.5.2 // indirect github.com/apex/log v1.4.0 // indirect - github.com/bhoriuchi/graphql-go-tools v1.0.0 // indirect github.com/charmbracelet/bubbles v0.13.0 // indirect github.com/charmbracelet/bubbletea v0.22.0 // indirect github.com/charmbracelet/lipgloss v0.5.0 // indirect @@ -75,9 +75,10 @@ require ( github.com/containerd/typeurl v1.0.2 // indirect github.com/creack/pty v1.1.11 // indirect github.com/cyphar/filepath-securejoin v0.2.3 // indirect + github.com/dagger/graphql v0.0.0-20221102000338-24d5e47d3b72 // indirect + github.com/dagger/graphql-go-tools v0.0.0-20221102001222-e68b44170936 // indirect github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 // indirect github.com/dlclark/regexp2 v1.4.0 // indirect - github.com/docker/cli v20.10.17+incompatible // indirect github.com/docker/docker-credential-helpers v0.6.4 // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect @@ -90,8 +91,6 @@ require ( github.com/golang/glog v1.0.0 // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect - github.com/graphql-go/graphql v0.8.0 // indirect - github.com/graphql-go/handler v0.2.3 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.2 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect @@ -107,6 +106,7 @@ require ( github.com/mitchellh/go-wordwrap v1.0.1 // indirect github.com/mna/pigeon v1.0.1-0.20200224192238-18953b277063 // indirect github.com/moby/locker v1.0.1 // indirect + github.com/moby/patternmatcher v0.5.0 // indirect github.com/moby/sys/signal v0.7.0 // indirect github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b // indirect github.com/muesli/cancelreader v0.2.1 // indirect @@ -146,6 +146,8 @@ require ( gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect ) +replace github.com/moby/buildkit => github.com/moby/buildkit v0.10.1-0.20220826012947-46c8b9ee45d0 + // BEGIN SYNC buildkit replace github.com/docker/docker => github.com/docker/docker v20.10.3-0.20220414164044-61404de7df1a+incompatible diff --git a/go.sum b/go.sum index 15ab5507..90c0a149 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,3 @@ -bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= @@ -75,8 +74,6 @@ github.com/alecthomas/kong v0.2.4/go.mod h1:kQOmtJgV+Lb4aj+I2LEn40cbtawdWJ9Y8QLq github.com/alecthomas/repr v0.0.0-20180818092828-117648cd9897/go.mod h1:xTS7Pm1pD1mvyM075QCDSRqH6qRLXylzS24ZTpRiSzQ= github.com/alecthomas/repr v0.0.0-20181024024818-d37bc2a10ba1 h1:GDQdwm/gAcJcLAKQQZGOJ4knlw+7rfEQQcmwTbt4p5E= github.com/alecthomas/repr v0.0.0-20181024024818-d37bc2a10ba1/go.mod h1:xTS7Pm1pD1mvyM075QCDSRqH6qRLXylzS24ZTpRiSzQ= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alexflint/go-arg v1.4.2/go.mod h1:9iRbDxne7LcR/GSvEr7ma++GLpdIU1zrghf2y2768kM= github.com/alexflint/go-scalar v1.0.0/go.mod h1:GpHzbCOZXEKMEcygYQ5n/aa4Aq84zbxjy3MxYW0gjYw= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= @@ -88,16 +85,11 @@ github.com/apex/logs v0.0.7/go.mod h1:XzxuLZ5myVHDy9SAmYpamKKRNApGj54PfYLcFrXqDw github.com/aphistic/golf v0.0.0-20180712155816-02c07f170c5a/go.mod h1:3NqKYiepwy8kCu4PNA+aP7WUV72eXWJeP9/r3/K9aLE= github.com/aphistic/sweet v0.2.0/go.mod h1:fWDlIh/isSE9n6EPsRmC0det+whmX6dJid3stzu0Xys= github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= github.com/aws/aws-sdk-go v1.20.6/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/bhoriuchi/graphql-go-tools v1.0.0 h1:viibVf33DxOzyIgO1elJHCcoVbGwlU3Ua8Mc3phsvKU= -github.com/bhoriuchi/graphql-go-tools v1.0.0/go.mod h1:4HQhkpeopRlpAn7DDBseb/Cw+7w+7D2psWAxDuTDkIY= github.com/bradleyjkemp/cupaloy/v2 v2.6.0/go.mod h1:bm7JXdkRd4BHJk9HpwqAI8BoAY1lps46Enkdqw6aRX0= github.com/c-bata/go-prompt v0.2.6 h1:POP+nrHE+DfLYx370bedwNhsqmpCUynWPxuHi0C5vZI= github.com/c-bata/go-prompt v0.2.6/go.mod h1:/LMAke8wD2FsNu9EXNdHxNLbd9MedkPnCdfpU9wwHfY= @@ -134,7 +126,6 @@ github.com/containerd/console v1.0.3 h1:lIr7SlA5PxZyMV30bDW0MGbiOPXwc63yRuCP0ARu github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= github.com/containerd/containerd v1.6.9 h1:IN/r8DUes/B5lEGTNfIiUkfZBtIQJGx2ai703dV6lRA= github.com/containerd/containerd v1.6.9/go.mod h1:XVicUvkxOrftE2Q1YWUXgZwkkAxwQYNOFzYWvfVfEfQ= -github.com/containerd/continuity v0.1.0/go.mod h1:ICJu0PwR54nI0yPEnJ6jcS+J7CZAUXrLh8lPo2knzsM= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/containerd/fifo v1.0.0 h1:6PirWBr9/L7GDamKr+XM0IeUFXu5mf3M/BPpH9gaLBU= @@ -144,13 +135,8 @@ github.com/containerd/ttrpc v1.1.0 h1:GbtyLRxb0gOLR0TYQWt3O6B0NvT8tMdorEHqIQo/lW github.com/containerd/ttrpc v1.1.0/go.mod h1:XX4ZTnoOId4HklF4edwc4DcqskFZuvXB1Evzy5KFQpQ= github.com/containerd/typeurl v1.0.2 h1:Chlt8zIieDbzQFzXzAeBEF92KhExuE4p9p92/QmY7aY= github.com/containerd/typeurl v1.0.2/go.mod h1:9trJWW2sRlGub4wZJRTW83VtbOLS6hwcDZXTn6oPz9s= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= @@ -161,14 +147,16 @@ github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= github.com/cyphar/filepath-securejoin v0.2.3 h1:YX6ebbZCZP7VkM3scTTokDgBL2TY741X51MTk3ycuNI= github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= +github.com/dagger/graphql v0.0.0-20221102000338-24d5e47d3b72 h1:0I9Y9nsFVcP42k9eOpjYmcm+NMEIFxNuJFOHfQ8MKpo= +github.com/dagger/graphql v0.0.0-20221102000338-24d5e47d3b72/go.mod h1:z9nYmunTkok2pE+Kdjpl1ICaqcCzlDxcVjwaFE0MJTc= +github.com/dagger/graphql-go-tools v0.0.0-20221102001222-e68b44170936 h1:yRwbZ5iT34iXf2Kg3my9Yclbg5Mq20b+w+uqePfbUoo= +github.com/dagger/graphql-go-tools v0.0.0-20221102001222-e68b44170936/go.mod h1:n/St2rWoBXCywBsC4Bw4Gj/Bs92X8fVd0Q8Y0aaNbH0= github.com/danieljoos/wincred v1.1.0/go.mod h1:XYlo+eRTsVA9aHGp7NGjFkPla4m+DCL7hqDjlFjiygg= github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 h1:y5HC9v93H5EPKqaS1UYVg1uYah5Xf51mBfIoWehClUQ= github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964/go.mod h1:Xd9hchkHSWYkEqJwUGisez3G1QY8Ryz0sdWrLPMGjLk= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= github.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/dlclark/regexp2 v1.4.0 h1:F1rxgk7p4uKjwIQxBs9oAXe5CqrXlCduYEJvrF4u93E= @@ -187,7 +175,6 @@ github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c h1:+pKlWGMw7gf6bQ github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -212,9 +199,7 @@ github.com/go-bindata/go-bindata v3.1.2+incompatible/go.mod h1:xK8Dsgwmeed+BBsSy github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= @@ -229,14 +214,11 @@ github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -308,19 +290,11 @@ github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/graphql-go/graphql v0.8.0 h1:JHRQMeQjofwqVvGwYnr8JnPTY0AxgVy1HpHSGPLdH0I= -github.com/graphql-go/graphql v0.8.0/go.mod h1:nKiHzRM0qopJEwCITUuIsxk9PlVlwIiiI8pnJEhordQ= -github.com/graphql-go/handler v0.2.3 h1:CANh8WPnl5M9uA25c2GBhPqJhE53Fg0Iue/fRNla71E= -github.com/graphql-go/handler v0.2.3/go.mod h1:leLF6RpV5uZMN1CdImAxuiayrYYhOk33bZciaUGaXeU= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.2 h1:BqHID5W5qnMkug0Z8UmL8tN0gAy4jQ+B4WFt8cCgluU= @@ -332,7 +306,6 @@ github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+l github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= @@ -342,19 +315,16 @@ github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1: github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/in-toto/in-toto-golang v0.3.3 h1:tkkEBU5i09UEeWKnrp6Rq4fXKAfpVXYMLRO5mDfnb3I= github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGARJA= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.2.2 h1:UOGuzwb1PwsrDAObMuhUnj0p5ULPj8V/xJ7Kx9qUBdQ= github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/jpillora/backoff v0.0.0-20180909062703-3050d21c67d7/go.mod h1:2iMrUgbbvHEiQClaW2NsSzMyGHqN+rDFqY705q49KG0= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/kevinmbeaulieu/eq-go v1.0.0/go.mod h1:G3S8ajA56gKBZm4UB9AOyoOS37JO3roToPzKNM8dtdM= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.11.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= @@ -382,7 +352,6 @@ github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+ github.com/logrusorgru/aurora/v3 v3.0.0/go.mod h1:vsR12bk5grlLvLXAYrBsb5Oc/N+LxAlxggSjiwMnCUc= github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/matryer/moq v0.2.3/go.mod h1:9RtPYjTnH1bSBIkpvtHkFN7nbWAnO7oRpdJkEIn6UtE= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= @@ -408,7 +377,6 @@ github.com/mattn/go-tty v0.0.3 h1:5OfyWorkyO7xP52Mq7tB36ajHDG5OHrmBGIS/DtakQI= github.com/mattn/go-tty v0.0.3/go.mod h1:ihxohKRERHTVzN+aSVRwACLCeqIoZAWpoICkkvrWyR0= github.com/mattn/go-unicodeclass v0.0.1 h1:BKdh58FOa0n4QRd39jSeVEF7ncxxV3l4GL05LxZu+XA= github.com/mattn/go-unicodeclass v0.0.1/go.mod h1:dDCkCgOKUwD3sYX4N+tVQdFh/xlFQ1+cWakbQzy98T8= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= @@ -416,16 +384,17 @@ github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.2.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mna/pigeon v1.0.1-0.20200224192238-18953b277063 h1:V7s6vhIrNeOqocziAmRoVJh6gnPPx83ovlpT7Hf5shI= github.com/mna/pigeon v1.0.1-0.20200224192238-18953b277063/go.mod h1:rkFeDZ0gc+YbnrXPw0q2RlI0QRuKBBPu67fgYIyGRNg= -github.com/moby/buildkit v0.10.5 h1:d9krS/lG3dn6N7y+R8o9PTgIixlYAaDk35f3/B4jZOw= -github.com/moby/buildkit v0.10.5/go.mod h1:Yajz9vt1Zw5q9Pp4pdb3TCSUXJBIroIQGQ3TTs/sLug= +github.com/moby/buildkit v0.10.1-0.20220826012947-46c8b9ee45d0 h1:LCGBQM8P/GrQ41zFuLg10ey20n0ZEPquYBxZ/LkM09U= +github.com/moby/buildkit v0.10.1-0.20220826012947-46c8b9ee45d0/go.mod h1:g7HO1tvhm/frAzTc9tjPUPkQefHWxdGAqz2hscGrOyo= github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg= github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= +github.com/moby/patternmatcher v0.5.0 h1:YCZgJOeULcxLw1Q+sVR636pmS7sPEn1Qo2iAN6M7DBo= +github.com/moby/patternmatcher v0.5.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= 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= @@ -447,14 +416,12 @@ github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKt github.com/muesli/termenv v0.11.1-0.20220204035834-5ac8409525e0/go.mod h1:Bd5NYQ7pd+SrtBSrSNoBBmXlcY8+Xj4BMJgh8qcZrvs= github.com/muesli/termenv v0.11.1-0.20220212125758-44cd13922739 h1:QANkGiGr39l1EESqrE0gZw0/AJNYzIvoGLhIoVYtluI= github.com/muesli/termenv v0.11.1-0.20220212125758-44cd13922739/go.mod h1:Bd5NYQ7pd+SrtBSrSNoBBmXlcY8+Xj4BMJgh8qcZrvs= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/neovim/go-client v1.2.2-0.20220118223211-7c85d516f28c h1:RZWK1awelvqT/WjxL/ews3cvVuG4et4WGmICXO1g2sk= github.com/neovim/go-client v1.2.2-0.20220118223211-7c85d516f28c/go.mod h1:EeqCP3z1vJd70JTaH/KXz9RMZ/nIgEFveX83hYnh/7c= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1lskyM0= @@ -484,10 +451,8 @@ github.com/opencontainers/selinux v1.10.1 h1:09LIPVRP3uuZGQvgR+SgMSNBd1Eb3vlRbGq github.com/opencontainers/umoci v0.4.7 h1:mbIbtMpZ3v9oMpKaLopnWoLykgmnixeLzq51EzAX5nQ= github.com/opencontainers/umoci v0.4.7/go.mod h1:lgJ4bnwJezsN1o/5d7t/xdRPvmf8TvBko5kKYJsYvgo= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -495,18 +460,9 @@ github.com/pkg/term v1.2.0-beta.2 h1:L3y/h2jkuBVFdWiJvNfYfKmzcCnILw7mJWm2JQuMppw github.com/pkg/term v1.2.0-beta.2/go.mod h1:E25nymQcrSllhX42Ok8MRm1+hyBdHY0dCeiKZ9jpNGw= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/protocolbuffers/txtpbfmt v0.0.0-20220608084003-fc78c767cd6a h1:AKJY61V2SQtJ2a2PdeswKk0NM1qF77X+julRNYRxPOk= github.com/protocolbuffers/txtpbfmt v0.0.0-20220608084003-fc78c767cd6a/go.mod h1:KjY0wibdYKc4DYkerHSbguaf3JeIPGhNJBp2BNiFH78= github.com/psanford/memfs v0.0.0-20210214183328-a001468d78ef h1:NKxTG6GVGbfMXc2mIk+KphcH6hagbVXhcFkbTgYleTI= @@ -514,7 +470,6 @@ github.com/psanford/memfs v0.0.0-20210214183328-a001468d78ef/go.mod h1:tcaRap0jS github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.1.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= @@ -534,9 +489,9 @@ github.com/segmentio/textio v1.2.0/go.mod h1:+Rb7v0YVODP+tK5F7FD9TCkV7gOYx9IgLHW github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/shibumi/go-pathspec v1.2.0 h1:KVKEDHYk7bQolRMs7nfzjT3SBOCgcXFJzccnj9bsGbA= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.3.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= @@ -549,20 +504,13 @@ github.com/smallstep/assert v0.0.0-20200723003110-82e2b9b3b262/go.mod h1:MyOHs9P github.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM= github.com/smartystreets/gunit v1.0.0/go.mod h1:qwPWnhz6pn0NnRBP++URONOVyNkPyr4SauJk4cUOwJs= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sourcegraph/jsonrpc2 v0.1.0 h1:ohJHjZ+PcaLxDUjqk2NC3tIGsVa5bXThe1ZheSXOjuk= github.com/sourcegraph/jsonrpc2 v0.1.0/go.mod h1:ZafdZgk/axhT1cvZAPOhw+95nz2I/Ra5qMlU4gTRwIo= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spy16/slurp v0.2.3 h1:NZGZ3MEyd0IUlnauMiGcTJe0DfpE4BVe3SMfdFvdwNU= github.com/spy16/slurp v0.2.3/go.mod h1:Omrszh5Bznh+fhYrxnR4R2XrRKRelPlbY5IwQizOui0= github.com/square/certstrap v1.3.0 h1:N9P0ZRA+DjT8pq5fGDj0z3FjafRKnBDypP0QHpMlaAk= @@ -584,14 +532,12 @@ github.com/tj/assert v0.0.3/go.mod h1:Ne6X72Q+TB1AteidzQncjw9PabbMp4PBMZ1k+vd1Pv github.com/tj/go-elastic v0.0.0-20171221160941-36157cbbebc2/go.mod h1:WjeM0Oo1eNAjXGDx2yma7uG2XoyRZTq1uv3M/o7imD0= github.com/tj/go-kinesis v0.0.0-20171128231115-08b17f58cb1b/go.mod h1:/yhzCV0xPfx6jb1bBgRFjl5lytqVqZXEaeqWP8lTEao= github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tonistiigi/fsutil v0.0.0-20220115021204-b19f7f9cb274 h1:wbyZxD6IPFp0sl5uscMOJRsz5UKGFiNiD16e+MVfKZY= -github.com/tonistiigi/fsutil v0.0.0-20220115021204-b19f7f9cb274/go.mod h1:oPAfvw32vlUJSjyDcQ3Bu0nb2ON2B+G0dtVN/SZNJiA= +github.com/tonistiigi/fsutil v0.0.0-20220930225714-4638ad635be5 h1:NJ1nZs4j4XcBJKIY5sAwTGp9w5b78Zxr3+r0zXRuKnA= +github.com/tonistiigi/fsutil v0.0.0-20220930225714-4638ad635be5/go.mod h1:F83XRhNblQsKQH9hcKEE45GAOkL9590mtw9KsD0Q4fE= github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea h1:SXhTLE6pb6eld/v/cCndK0AMpt1wiVFb/YYmqB3/QG0= github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea/go.mod h1:WPnis/6cRcDZSUvVmezrxJPkiO87ThFYsoUiMwWNDJk= github.com/tonistiigi/vt100 v0.0.0-20210615222946-8066bb97264f h1:DLpt6B5oaaS8jyXHa9VA4rrZloBVPVXeCtrOsrFauxc= github.com/tonistiigi/vt100 v0.0.0-20210615222946-8066bb97264f/go.mod h1:ulncasL3N9uLrVann0m+CDlJKWsIAP34MPcOJF6VRvc= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.4/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= @@ -618,8 +564,6 @@ github.com/vito/vt100 v0.0.0-20220721174540-1f9a7c0f76a9/go.mod h1:tef+Px8jpdyyU github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -631,7 +575,6 @@ github.com/zeebo/xxh3 v1.0.2 h1:xZmwmqxHZA8AI603jOQ0tMqmBr9lPeFwGg6d+xy9DC0= github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= github.com/zmb3/spotify/v2 v2.2.1 h1:5Nb8pwVDPl6CVr3jEfvYuEuWTPO69KvP2a2BzThq+WY= github.com/zmb3/spotify/v2 v2.2.1/go.mod h1:+LVh9CafHu7SedyqYmEf12Rd01dIVlEL845yNhksW0E= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -731,15 +674,12 @@ golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91 golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -807,8 +747,6 @@ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -859,7 +797,6 @@ golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210313202042-bd2e13477e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -903,7 +840,6 @@ golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 h1:ftMN5LMiBFjbzleLqtoBZk7KdJwhuybIU+FckUHgoyQ= golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 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= @@ -915,7 +851,6 @@ golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190830223141-573d9926052a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1040,7 +975,6 @@ google.golang.org/genproto v0.0.0-20220810155839-1856144b1d9c h1:IooGDWedfLC6KLc google.golang.org/genproto v0.0.0-20220810155839-1856144b1d9c/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= @@ -1077,7 +1011,6 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -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-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1086,11 +1019,9 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntN gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.6.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -1105,7 +1036,6 @@ gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= -gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/pkg/runtimes/buildkit.go b/pkg/runtimes/buildkit.go index 19bf9c4f..bd8b66ab 100644 --- a/pkg/runtimes/buildkit.go +++ b/pkg/runtimes/buildkit.go @@ -18,6 +18,7 @@ import ( "github.com/adrg/xdg" "github.com/containerd/containerd/platforms" + dockerconfig "github.com/docker/cli/cli/config" "github.com/docker/distribution/reference" "github.com/hashicorp/go-multierror" kitdclient "github.com/moby/buildkit/client" @@ -142,7 +143,7 @@ func NewBuildkit(ctx context.Context, _ bass.RuntimePool, cfg *bass.Scope) (bass Client: client, Platform: platform, - authp: authprovider.NewDockerAuthProvider(os.Stderr), + authp: authprovider.NewDockerAuthProvider(dockerconfig.LoadDefaultConfigFile(os.Stderr)), }, nil } diff --git a/pkg/runtimes/dagger.go b/pkg/runtimes/dagger.go index 1333e056..5788399c 100644 --- a/pkg/runtimes/dagger.go +++ b/pkg/runtimes/dagger.go @@ -356,19 +356,9 @@ func (runtime *Dagger) mount(ctx context.Context, ctr *dagger.Container, target fsp := src.ThunkPath.Path.FilesystemPath() if fsp.IsDir() { - id, err := srcCtr.Directory(fsp.Slash()).ID(ctx) - if err != nil { - return nil, err - } - - return ctr.WithMountedDirectory(target, id), nil + return ctr.WithMountedDirectory(target, srcCtr.Directory(fsp.Slash())), nil } else { - id, err := srcCtr.File(fsp.Slash()).ID(ctx) - if err != nil { - return nil, err - } - - return ctr.WithMountedFile(target, id), nil + return ctr.WithMountedFile(target, srcCtr.File(fsp.Slash())), nil } case src.Cache != nil: fsp := src.Cache.Path.FilesystemPath() @@ -376,12 +366,7 @@ func (runtime *Dagger) mount(ctx context.Context, ctr *dagger.Container, target return nil, fmt.Errorf("mounting subpaths of cache not implemented yet: %s", fsp.Slash()) } - cacheID, err := runtime.client.CacheVolume(src.Cache.ID).ID(ctx) - if err != nil { - return nil, err - } - - return ctr.WithMountedCache(cacheID, target), nil + return ctr.WithMountedCache(target, runtime.client.CacheVolume(src.Cache.ID)), nil case src.FSPath != nil: dir := runtime.client.Directory() @@ -412,38 +397,18 @@ func (runtime *Dagger) mount(ctx context.Context, ctr *dagger.Container, target fsp := src.FSPath.Path.FilesystemPath() if fsp.IsDir() { - dirID, err := dir.Directory(fsp.Slash()).ID(ctx) - if err != nil { - return nil, err - } - - return ctr.WithMountedDirectory(target, dirID), nil + return ctr.WithMountedDirectory(target, dir.Directory(fsp.Slash())), nil } else { - fileID, err := dir.File(fsp.Slash()).ID(ctx) - if err != nil { - return nil, err - } - - return ctr.WithMountedFile(target, fileID), nil + return ctr.WithMountedFile(target, dir.File(fsp.Slash())), nil } case src.HostPath != nil: dir := runtime.client.Host().Directory(src.HostPath.ContextDir) fsp := src.HostPath.Path.FilesystemPath() if fsp.IsDir() { - dirID, err := dir.Directory(fsp.FromSlash()).ID(ctx) - if err != nil { - return nil, fmt.Errorf("get host dir: %w", err) - } - - return ctr.WithMountedDirectory(target, dirID), nil + return ctr.WithMountedDirectory(target, dir.Directory(fsp.FromSlash())), nil } else { - fileID, err := dir.File(fsp.FromSlash()).ID(ctx) - if err != nil { - return nil, fmt.Errorf("get host file: %w", err) - } - - return ctr.WithMountedFile(target, fileID), nil + return ctr.WithMountedFile(target, dir.File(fsp.FromSlash())), nil } default: return nil, fmt.Errorf("mounting %T not implemented yet", src.ToValue()) From 2b43b8e4ba862647ee91df8825c39bd418d7cc54 Mon Sep 17 00:00:00 2001 From: Alex Suraci Date: Tue, 22 Nov 2022 23:11:56 -0500 Subject: [PATCH 14/25] bass/bass.bass: respect submodules when subgit'ing --- bass/bass.bass | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/bass/bass.bass b/bass/bass.bass index bfd51c87..1bc46658 100644 --- a/bass/bass.bass +++ b/bass/bass.bass @@ -29,6 +29,13 @@ (defn latest-commit [src paths] (git-out src ($ git log -n1 "--pretty=format:%H" -- & $paths)))) +(defn git-submodules [src] + (map (fn [[_ path]] (string->dir path)) + (-> ($ git config --file src/.gitmodules --get-regexp path) + (with-image (linux/alpine/git)) + (read :unix-table) + take-all))) + (provide [deps deps+go] ; monolithic image containing dependencies for building and testing (defn deps [src] @@ -45,9 +52,12 @@ ; deps with Go dependencies pre-fetched (defn deps+go [src] - (from (deps src) - ($ cp src/go.mod src/go.sum ./) - ($ go mod download)))) + (let [submodule-paths (map src/ (git-submodules src)) + submodule-cp-args (conj submodule-paths ./)] + (from (deps src) + ($ cp src/go.mod src/go.sum ./) + ($ cp -a & $submodule-cp-args) + ($ go mod download))))) (provide [build smoke-test tests docs coverage] (use (*dir*/buildkit.bass)) @@ -69,7 +79,8 @@ (archive src (dist src version os arch) os arch)) (defn with-deps-and-shims [thunk src] - (let [only-shim (subgit src ./pkg/runtimes/shim/ ./Makefile ./go.mod ./go.sum) + (let [submodules (git-submodules src) + only-shim (subgit src ./pkg/runtimes/shim/ ./Makefile ./go.mod ./go.sum & submodules) built-shims (make-shims only-shim)] (-> thunk (with-mount src ./) From 975c63ae8b0ff32ea242fc67a5d54c667e0e6188 Mon Sep 17 00:00:00 2001 From: Alex Suraci Date: Tue, 22 Nov 2022 23:17:24 -0500 Subject: [PATCH 15/25] don't depend on unreleased stdlib --- bass/bass.bass | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/bass/bass.bass b/bass/bass.bass index 1bc46658..3aec7634 100644 --- a/bass/bass.bass +++ b/bass/bass.bass @@ -29,12 +29,24 @@ (defn latest-commit [src paths] (git-out src ($ git log -n1 "--pretty=format:%H" -- & $paths)))) -(defn git-submodules [src] - (map (fn [[_ path]] (string->dir path)) - (-> ($ git config --file src/.gitmodules --get-regexp path) - (with-image (linux/alpine/git)) - (read :unix-table) - take-all))) +(provide [git-submodules] + ; TODO: remove once this ships and bass-loop is upgraded + ; + ; reads all values from the source into a list + ; + ; => (take-all (list->source [1 2 3])) + (defn take-all [source] + (let [val (next source _)] + (if (ignore? val) + [] + (cons val (take-all source))))) + + (defn git-submodules [src] + (map (fn [[_ path]] (string->dir path)) + (-> ($ git config --file src/.gitmodules --get-regexp path) + (with-image (linux/alpine/git)) + (read :unix-table) + take-all)))) (provide [deps deps+go] ; monolithic image containing dependencies for building and testing From 8c5ab3eb7e6482a4b1fcc2d26f68b8ff7039d231 Mon Sep 17 00:00:00 2001 From: Alex Suraci Date: Tue, 22 Nov 2022 23:46:54 -0500 Subject: [PATCH 16/25] fix inability to run runner knew this would backfire immediately --- cmd/bass/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/bass/main.go b/cmd/bass/main.go index 4c53cb7f..5da3c9a2 100644 --- a/cmd/bass/main.go +++ b/cmd/bass/main.go @@ -153,7 +153,7 @@ func root(ctx context.Context) error { return langServer(ctx) } - if flags.NArg() == 0 && !runExport && !runPrune && !runBump && !runRun { + if flags.NArg() == 0 && !runExport && !runPrune && !runBump && !runRun && runnerAddr == "" { // TODO: bring progress back return repl(ctx, config) } From b82a1c4faeb8b137dd469c60a9bebbcb1fca70e8 Mon Sep 17 00:00:00 2001 From: Alex Suraci Date: Wed, 23 Nov 2022 18:52:30 -0500 Subject: [PATCH 17/25] bump dagger, give up on progress for now totally not worth trying to do the old engine stuff anymore now that the engine runs in a separate image with special OCI runtimes and etc. --- .gitmodules | 4 -- dagger | 1 - go.mod | 7 +- go.sum | 2 + pkg/runtimes/dagger.go | 127 ++---------------------------------- pkg/runtimes/dagger_test.go | 7 ++ 6 files changed, 16 insertions(+), 132 deletions(-) delete mode 160000 dagger diff --git a/.gitmodules b/.gitmodules index 0eeb2516..57680b3f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,7 +1,3 @@ [submodule "lsp/testdata/bundle/nvim-lspconfig"] path = pkg/lsp/testdata/bundle/nvim-lspconfig url = https://github.com/neovim/nvim-lspconfig -[submodule "dagger"] - path = dagger - url = https://github.com/vito/dagger - branch = with-qb diff --git a/dagger b/dagger deleted file mode 160000 index 969ca0a7..00000000 --- a/dagger +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 969ca0a75af985ae75859e3218366f093cf75898 diff --git a/go.mod b/go.mod index 0c4c897d..764c1b1a 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/vito/bass go 1.18 require ( - dagger.io/dagger v0.4.1-0.20221111181432-65c2fc1d0538 + dagger.io/dagger v0.4.1 github.com/adrg/xdg v0.4.0 github.com/agext/levenshtein v1.2.3 github.com/ajstarks/svgo v0.0.0-20210406150507-75cfd577ce75 @@ -11,7 +11,6 @@ require ( github.com/c-bata/go-prompt v0.2.6 github.com/cenkalti/backoff/v4 v4.1.3 github.com/containerd/containerd v1.6.9 - github.com/dagger/dagger v0.0.0-00010101000000-000000000000 github.com/docker/cli v20.10.17+incompatible github.com/docker/distribution v2.8.1+incompatible github.com/docker/docker v20.10.18+incompatible @@ -152,7 +151,3 @@ replace github.com/moby/buildkit => github.com/moby/buildkit v0.10.1-0.202208260 replace github.com/docker/docker => github.com/docker/docker v20.10.3-0.20220414164044-61404de7df1a+incompatible // END SYNC - -replace github.com/dagger/dagger => ./dagger - -replace dagger.io/dagger => ./dagger/sdk/go diff --git a/go.sum b/go.sum index 90c0a149..eab34935 100644 --- a/go.sum +++ b/go.sum @@ -36,6 +36,8 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +dagger.io/dagger v0.4.1 h1:aMdARz/5bDh3Jc7dHmGdjsHIidJj0rVnIdKgQPkHbdU= +dagger.io/dagger v0.4.1/go.mod h1:sW7eoYNclrZTSZE+2XJATAob1MdG80kqjgV4xbPet0Q= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.0.0-rc.1 h1:m0VOOB23frXZvAOK44usCgLWvtsxIoMCTBGJZlpmGfU= filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= diff --git a/pkg/runtimes/dagger.go b/pkg/runtimes/dagger.go index 5788399c..7066cf0c 100644 --- a/pkg/runtimes/dagger.go +++ b/pkg/runtimes/dagger.go @@ -8,19 +8,14 @@ import ( "fmt" "io" "io/fs" - "net" "os" "path" "strings" - "sync" "dagger.io/dagger" - "github.com/dagger/dagger/engine" - "github.com/dagger/dagger/router" ocispecs "github.com/opencontainers/image-spec/specs-go/v1" "github.com/tonistiigi/fsutil" "github.com/vito/bass/pkg/bass" - "github.com/vito/progrock" ) const DaggerName = "dagger" @@ -32,12 +27,6 @@ func init() { type Dagger struct { Platform ocispecs.Platform - sockPath string - stop func() - stopped chan error - running *sync.WaitGroup - statusProxy *statusProxy - client *dagger.Client } @@ -55,87 +44,14 @@ func NewDagger(ctx context.Context, _ bass.RuntimePool, cfg *bass.Scope) (bass.R } } - engineCtx, cancel := context.WithCancel(ctx) - - runtime := &Dagger{ - stop: cancel, - stopped: make(chan error, 1), - running: new(sync.WaitGroup), - } - - if config.Host == "" { - sockTemp, err := os.CreateTemp("", "bass-dagger.*.sock") - if err != nil { - return nil, err - } - - runtime.sockPath = sockTemp.Name() - - err = sockTemp.Close() - if err != nil { - return nil, err - } - - if err := os.RemoveAll(runtime.sockPath); err != nil { - return nil, err - } - - config.Host = "unix://" + runtime.sockPath - - l, err := net.Listen("unix", runtime.sockPath) - if err != nil { - return nil, fmt.Errorf("listen for dagger conns: %w", err) - } - - runtime.statusProxy = forwardStatus(progrock.RecorderFromContext(ctx)) - - started := make(chan struct{}) - go func() { - runtime.stopped <- engine.Start(engineCtx, &engine.Config{ - RawBuildkitStatus: runtime.statusProxy.Writer(), - }, func(ctx context.Context, r *router.Router) error { - go func() { - for { - conn, err := l.Accept() - if err != nil { - break - } - - r.ServeConn(conn) - } - }() - - close(started) - - <-engineCtx.Done() - - runtime.running.Wait() - - return nil - }) - }() - - select { - case <-started: - case err := <-runtime.stopped: - if err != nil { - return nil, err - } else { - return nil, fmt.Errorf("runtime stopped?") - } - } - } - - os.Setenv("DAGGER_HOST", config.Host) - client, err := dagger.Connect(ctx) if err != nil { return nil, err } - runtime.client = client - - return runtime, nil + return &Dagger{ + client: client, + }, nil } func (runtime *Dagger) Resolve(ctx context.Context, imageRef bass.ImageRef) (bass.ImageRef, error) { @@ -144,9 +60,6 @@ func (runtime *Dagger) Resolve(ctx context.Context, imageRef bass.ImageRef) (bas } func (runtime *Dagger) Run(ctx context.Context, thunk bass.Thunk) error { - runtime.running.Add(1) - defer runtime.running.Done() - ctr, err := runtime.container(ctx, thunk) if err != nil { return err @@ -169,15 +82,12 @@ func (runtime *Dagger) Start(ctx context.Context, thunk bass.Thunk) (StartResult } func (runtime *Dagger) Read(ctx context.Context, w io.Writer, thunk bass.Thunk) error { - runtime.running.Add(1) - defer runtime.running.Done() - ctr, err := runtime.container(ctx, thunk) if err != nil { return err } - stdout, err := ctr.Stdout().Contents(ctx) + stdout, err := ctr.Stdout(ctx) if err != nil { return err } @@ -195,9 +105,6 @@ func (runtime *Dagger) Export(ctx context.Context, w io.Writer, thunk bass.Thunk } func (runtime *Dagger) ExportPath(ctx context.Context, w io.Writer, tp bass.ThunkPath) error { - runtime.running.Add(1) - defer runtime.running.Done() - dir, err := os.MkdirTemp("", "bass-dagger-export*") if err != nil { return err @@ -244,27 +151,7 @@ func (runtime *Dagger) Prune(ctx context.Context, opts bass.PruneOpts) error { } func (runtime *Dagger) Close() error { - err := runtime.client.Close() - if err != nil { - return fmt.Errorf("close client: %w", err) - } - - runtime.stop() - - err = <-runtime.stopped - if err != nil && !errors.Is(err, context.Canceled) { - return err - } - - runtime.statusProxy.Wait() - - if runtime.sockPath != "" { - if err := os.RemoveAll(runtime.sockPath); err != nil { - return err - } - } - - return nil + return runtime.client.Close() } func (runtime *Dagger) container(ctx context.Context, thunk bass.Thunk) (*dagger.Container, error) { @@ -385,9 +272,7 @@ func (runtime *Dagger) mount(ctx context.Context, ctr *dagger.Container, target return fmt.Errorf("read fs %s: %w", entry, err) } - dir = dir.WithNewFile(entry, dagger.DirectoryWithNewFileOpts{ - Contents: string(content), - }) + dir = dir.WithNewFile(entry, string(content)) return nil }) diff --git a/pkg/runtimes/dagger_test.go b/pkg/runtimes/dagger_test.go index 928531bb..828c7e19 100644 --- a/pkg/runtimes/dagger_test.go +++ b/pkg/runtimes/dagger_test.go @@ -1,6 +1,7 @@ package runtimes_test import ( + "os" "testing" "github.com/vito/bass/pkg/bass" @@ -13,6 +14,12 @@ func TestDaggerRuntime(t *testing.T) { return } + daggerHost := os.Getenv("DAGGER_HOST") + if daggerHost == "" { + t.Skipf("$DAGGER_HOST not set; skipping!") + return + } + runtimes.Suite(t, bass.RuntimeConfig{ Platform: bass.LinuxPlatform, Runtime: runtimes.DaggerName, From 83f2deabd8f46213adbdc9ab22ac6004c486c119 Mon Sep 17 00:00:00 2001 From: Alex Suraci Date: Wed, 23 Nov 2022 19:03:07 -0500 Subject: [PATCH 18/25] skip dagger tests can probably do this by running a dagger session in bass once we figure that out --- bass/bass.bass | 1 + pkg/runtimes/dagger_test.go | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bass/bass.bass b/bass/bass.bass index 3aec7634..d8f40a3d 100644 --- a/bass/bass.bass +++ b/bass/bass.bass @@ -190,6 +190,7 @@ ; returns a thunk that runs the tests (defn tests [src testflags] (-> ($ go test & $testflags) + (with-env {:SKIP_DAGGER_TESTS "true"}) (with-bass-and-buildkitd src))) ; returns a thunk that will run the tests and return cover.html diff --git a/pkg/runtimes/dagger_test.go b/pkg/runtimes/dagger_test.go index 828c7e19..da8f9d35 100644 --- a/pkg/runtimes/dagger_test.go +++ b/pkg/runtimes/dagger_test.go @@ -14,9 +14,8 @@ func TestDaggerRuntime(t *testing.T) { return } - daggerHost := os.Getenv("DAGGER_HOST") - if daggerHost == "" { - t.Skipf("$DAGGER_HOST not set; skipping!") + if os.Getenv("SKIP_DAGGER_TESTS") != "" { + t.Skipf("$SKIP_DAGGER_TESTS set; skipping!") return } From d58bc1e2ea4a32381f7d4d92619e05e7a55b6164 Mon Sep 17 00:00:00 2001 From: Alex Suraci Date: Wed, 23 Nov 2022 19:20:44 -0500 Subject: [PATCH 19/25] bump nix vendorsha --- nix/vendorSha256.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/vendorSha256.txt b/nix/vendorSha256.txt index a4e18484..61ee9bf8 100644 --- a/nix/vendorSha256.txt +++ b/nix/vendorSha256.txt @@ -1 +1 @@ -sha256-O41vov8FQLY0/mOR8Zdqmg7D2vWRgHfam/qkMSB8VF0= +sha256-d3YaCCAiOBUjZ91ObwvbUxr0l/YRV3aKgRveYvSzPTs= From b9f54f6723dee57183bfde7a51df62901736e94d Mon Sep 17 00:00:00 2001 From: Alex Suraci Date: Wed, 23 Nov 2022 20:04:02 -0500 Subject: [PATCH 20/25] tidy up --- cloak.yaml | 2 -- cmd/bass/main.go | 1 - 2 files changed, 3 deletions(-) delete mode 100644 cloak.yaml diff --git a/cloak.yaml b/cloak.yaml deleted file mode 100644 index 00f737a3..00000000 --- a/cloak.yaml +++ /dev/null @@ -1,2 +0,0 @@ -name: bass -extensions: diff --git a/cmd/bass/main.go b/cmd/bass/main.go index 5da3c9a2..bff674f8 100644 --- a/cmd/bass/main.go +++ b/cmd/bass/main.go @@ -154,7 +154,6 @@ func root(ctx context.Context) error { } if flags.NArg() == 0 && !runExport && !runPrune && !runBump && !runRun && runnerAddr == "" { - // TODO: bring progress back return repl(ctx, config) } From 86996478678d03260a8619054f28fb9555301dd0 Mon Sep 17 00:00:00 2001 From: Alex Suraci Date: Wed, 23 Nov 2022 23:44:13 -0500 Subject: [PATCH 21/25] roll back some complexity from global runtime progress this was caused by the need to hook up a progress sink as soon as creating the Dagger runtime, rather than on each call. --- cmd/bass/main.go | 68 +++++++++++++++++++------------------------ pkg/runtimes/suite.go | 39 +++++++++++++------------ 2 files changed, 50 insertions(+), 57 deletions(-) diff --git a/cmd/bass/main.go b/cmd/bass/main.go index bff674f8..0f98fe23 100644 --- a/cmd/bass/main.go +++ b/cmd/bass/main.go @@ -149,62 +149,54 @@ func root(ctx context.Context) error { return err } - if runLSP { - return langServer(ctx) + pool, err := runtimes.NewPool(ctx, config) + if err != nil { + cli.WriteError(ctx, err) + return err } - if flags.NArg() == 0 && !runExport && !runPrune && !runBump && !runRun && runnerAddr == "" { - return repl(ctx, config) - } + ctx = bass.WithRuntimePool(ctx, pool) - return cli.WithProgress(ctx, func(ctx context.Context) error { - pool, err := runtimes.NewPool(ctx, config) + if runnerAddr != "" { + client, err := runnerClient(ctx, runnerAddr) if err != nil { cli.WriteError(ctx, err) return err } - ctx = bass.WithRuntimePool(ctx, pool) - - if runnerAddr != "" { - client, err := runnerClient(ctx, runnerAddr) - if err != nil { - cli.WriteError(ctx, err) - return err - } - + return cli.WithProgress(ctx, func(ctx context.Context) error { return runnerLoop(ctx, client, pool.Runtimes) - } + }) + } - if runExport { - return export(ctx) - } + if runExport { + return cli.WithProgress(ctx, export) + } - if runPrune { - return prune(ctx) - } + if runPrune { + return cli.WithProgress(ctx, prune) + } - if runBump { - return bump(ctx) - } + if runLSP { + return langServer(ctx) + } - if runRun { - return runThunk(ctx) - } + if runBump { + return cli.WithProgress(ctx, bump) + } - return run(ctx) - }) -} + if runRun { + return cli.WithProgress(ctx, runThunk) + } -func repl(ctx context.Context, config *bass.Config) error { - pool, err := runtimes.NewPool(ctx, config) - if err != nil { - cli.WriteError(ctx, err) - return err + if flags.NArg() == 0 { + return repl(ctx) } - ctx = bass.WithRuntimePool(ctx, pool) + return cli.WithProgress(ctx, run) +} +func repl(ctx context.Context) error { scope := bass.NewRunScope(bass.Ground, bass.RunState{ Dir: bass.NewHostDir("."), Stdin: bass.Stdin, diff --git a/pkg/runtimes/suite.go b/pkg/runtimes/suite.go index 622d38bf..9df766a6 100644 --- a/pkg/runtimes/suite.go +++ b/pkg/runtimes/suite.go @@ -50,6 +50,24 @@ type SuiteTest struct { } func Suite(t *testing.T, config bass.RuntimeConfig) { + ctx := context.Background() + + pool, err := NewPool(ctx, &bass.Config{ + Runtimes: []bass.RuntimeConfig{ + config, + }, + }) + is.New(t).NoErr(err) + + t.Cleanup(func() { + err := pool.Close() + if err != nil && !strings.Contains(err.Error(), "context canceled") { + t.Logf("close pool: %s", err) + } + }) + + ctx = bass.WithRuntimePool(ctx, pool) + for _, test := range []SuiteTest{ { File: "error.bass", @@ -282,9 +300,7 @@ func Suite(t *testing.T, config bass.RuntimeConfig) { is := is.New(t) t.Parallel() - ctx := context.Background() - - res, err := test.Run(ctx, t, config, nil) + res, err := test.Run(ctx, t, nil) if test.ErrCause != "" { is.True(err != nil) t.Logf("error: %q", err.Error()) @@ -300,7 +316,7 @@ func Suite(t *testing.T, config bass.RuntimeConfig) { } } -func (test SuiteTest) Run(ctx context.Context, t *testing.T, runtimeConfig bass.RuntimeConfig, env *bass.Scope) (bass.Value, error) { +func (test SuiteTest) Run(ctx context.Context, t *testing.T, env *bass.Scope) (bass.Value, error) { is := is.New(t) ctx = zapctx.ToContext(ctx, zaptest.NewLogger(t)) @@ -322,21 +338,6 @@ func (test SuiteTest) Run(ctx context.Context, t *testing.T, runtimeConfig bass. trace := &bass.Trace{} ctx = bass.WithTrace(ctx, trace) - pool, err := NewPool(ctx, &bass.Config{ - Runtimes: []bass.RuntimeConfig{ - runtimeConfig, - }, - }) - is.NoErr(err) - ctx = bass.WithRuntimePool(ctx, pool) - - defer func() { - err := pool.Close() - if err != nil && !strings.Contains(err.Error(), "context canceled") { - t.Logf("close pool: %s", err) - } - }() - dir, err := filepath.Abs(filepath.Dir(filepath.Join("testdata", test.File))) is.NoErr(err) From 5578ced80ef096a2b34334f7206cf14917c3070a Mon Sep 17 00:00:00 2001 From: Alex Suraci Date: Fri, 25 Nov 2022 19:41:54 -0500 Subject: [PATCH 22/25] dagger ExportPath: export individual file --- pkg/runtimes/dagger.go | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/pkg/runtimes/dagger.go b/pkg/runtimes/dagger.go index 7066cf0c..a879def3 100644 --- a/pkg/runtimes/dagger.go +++ b/pkg/runtimes/dagger.go @@ -10,6 +10,7 @@ import ( "io/fs" "os" "path" + "path/filepath" "strings" "dagger.io/dagger" @@ -117,33 +118,23 @@ func (runtime *Dagger) ExportPath(ctx context.Context, w io.Writer, tp bass.Thun return err } - walkOpts := &fsutil.WalkOpt{} - fsp := tp.Path.FilesystemPath() - if fsp.IsDir() { - ok, err := ctr.Directory(fsp.Slash()).Export(ctx, dir) - if err != nil { - return fmt.Errorf("write to export dir: %w", err) - } - if !ok { - return fmt.Errorf("write to export dir: not ok") - } + var ok bool + if fsp.IsDir() { + ok, err = ctr.Directory(fsp.Slash()).Export(ctx, dir) } else { - walkOpts.IncludePatterns = []string{fsp.Name()} - - // TODO: it'd be great if I didn't have to export the entire directory! - ok, err := ctr.Directory(fsp.Dir().Slash()).Export(ctx, dir) - if err != nil { - return fmt.Errorf("write to export dir: %w", err) - } + ok, err = ctr.File(fsp.Slash()).Export(ctx, filepath.Join(dir, fsp.Name())) + } + if err != nil { + return fmt.Errorf("export file: %w", err) + } - if !ok { - return fmt.Errorf("write to export dir: not ok") - } + if !ok { + return fmt.Errorf("export failed: not ok") } - return fsutil.WriteTar(ctx, fsutil.NewFS(dir, walkOpts), w) + return fsutil.WriteTar(ctx, fsutil.NewFS(dir, &fsutil.WalkOpt{}), w) } func (runtime *Dagger) Prune(ctx context.Context, opts bass.PruneOpts) error { From a0fa13ca3cabdc024ccd18fc9e5a51fd53591726 Mon Sep 17 00:00:00 2001 From: Alex Suraci Date: Sat, 26 Nov 2022 19:47:56 -0500 Subject: [PATCH 23/25] Dagger runtime: implement Export --- pkg/runtimes/dagger.go | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/pkg/runtimes/dagger.go b/pkg/runtimes/dagger.go index a879def3..babcb179 100644 --- a/pkg/runtimes/dagger.go +++ b/pkg/runtimes/dagger.go @@ -102,7 +102,37 @@ func (runtime *Dagger) Read(ctx context.Context, w io.Writer, thunk bass.Thunk) } func (runtime *Dagger) Export(ctx context.Context, w io.Writer, thunk bass.Thunk) error { - return errors.New("Export: not implemented") + ctr, err := runtime.container(ctx, thunk) + if err != nil { + return err + } + + dir, err := os.MkdirTemp("", "bass-dagger-export*") + if err != nil { + return err + } + + defer os.RemoveAll(dir) + + image := filepath.Join(dir, "image.tar") + ok, err := ctr.Export(ctx, image) + if err != nil { + return err + } + + if !ok { + return fmt.Errorf("write to export dir: not ok") + } + + f, err := os.Open(image) + if err != nil { + return err + } + + defer f.Close() + + _, err = io.Copy(w, f) + return err } func (runtime *Dagger) ExportPath(ctx context.Context, w io.Writer, tp bass.ThunkPath) error { From 72c21b431c15aa427e85b01e77268b51a0af8b66 Mon Sep 17 00:00:00 2001 From: Alex Suraci Date: Sat, 26 Nov 2022 19:48:54 -0500 Subject: [PATCH 24/25] go mod tidy --- go.mod | 12 +----------- go.sum | 29 +---------------------------- 2 files changed, 2 insertions(+), 39 deletions(-) diff --git a/go.mod b/go.mod index 764c1b1a..fba20973 100644 --- a/go.mod +++ b/go.mod @@ -70,16 +70,12 @@ require ( github.com/containerd/console v1.0.3 // indirect github.com/containerd/continuity v0.3.0 // indirect github.com/containerd/go-runc v1.0.0 // indirect - github.com/containerd/ttrpc v1.1.0 // indirect github.com/containerd/typeurl v1.0.2 // indirect github.com/creack/pty v1.1.11 // indirect github.com/cyphar/filepath-securejoin v0.2.3 // indirect - github.com/dagger/graphql v0.0.0-20221102000338-24d5e47d3b72 // indirect - github.com/dagger/graphql-go-tools v0.0.0-20221102001222-e68b44170936 // indirect github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 // indirect github.com/dlclark/regexp2 v1.4.0 // indirect github.com/docker/docker-credential-helpers v0.6.4 // indirect - github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/fogleman/ease v0.0.0-20170301025033-8da417bf1776 // indirect github.com/go-bindata/go-bindata v3.1.2+incompatible // indirect @@ -101,10 +97,8 @@ require ( github.com/lucasb-eyer/go-colorful v1.2.0 // indirect github.com/mattn/go-runewidth v0.0.13 // indirect github.com/mattn/go-tty v0.0.3 // indirect - github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-wordwrap v1.0.1 // indirect github.com/mna/pigeon v1.0.1-0.20200224192238-18953b277063 // indirect - github.com/moby/locker v1.0.1 // indirect github.com/moby/patternmatcher v0.5.0 // indirect github.com/moby/sys/signal v0.7.0 // indirect github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b // indirect @@ -117,22 +111,18 @@ require ( github.com/pkg/term v1.2.0-beta.2 // indirect github.com/rivo/uniseg v0.2.0 // indirect github.com/rootless-containers/proto v0.1.0 // indirect - github.com/rs/zerolog v1.28.0 // indirect github.com/sirupsen/logrus v1.9.0 // indirect github.com/tonistiigi/vt100 v0.0.0-20210615222946-8066bb97264f // indirect github.com/vbatts/go-mtree v0.5.0 // indirect github.com/vektah/gqlparser/v2 v2.5.1 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.34.0 // indirect - go.opentelemetry.io/otel/exporters/jaeger v1.4.1 // indirect - go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.9.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.9.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.9.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.9.0 // indirect go.opentelemetry.io/otel/sdk v1.9.0 // indirect go.opentelemetry.io/otel/trace v1.10.0 // indirect go.opentelemetry.io/proto/otlp v0.18.0 // indirect go.step.sm/crypto v0.16.2 // indirect go.uber.org/atomic v1.7.0 // indirect + go.uber.org/goleak v1.1.12 // indirect go.uber.org/multierr v1.6.0 // indirect golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect golang.org/x/net v0.0.0-20220906165146-f3363e06e74c // indirect diff --git a/go.sum b/go.sum index eab34935..7ba4c714 100644 --- a/go.sum +++ b/go.sum @@ -134,11 +134,9 @@ github.com/containerd/fifo v1.0.0 h1:6PirWBr9/L7GDamKr+XM0IeUFXu5mf3M/BPpH9gaLBU github.com/containerd/go-runc v1.0.0 h1:oU+lLv1ULm5taqgV/CJivypVODI4SUz1znWjv3nNYS0= github.com/containerd/go-runc v1.0.0/go.mod h1:cNU0ZbCgCQVZK4lgG3P+9tn9/PaJNmoDXPpoJhDR+Ok= github.com/containerd/ttrpc v1.1.0 h1:GbtyLRxb0gOLR0TYQWt3O6B0NvT8tMdorEHqIQo/lWI= -github.com/containerd/ttrpc v1.1.0/go.mod h1:XX4ZTnoOId4HklF4edwc4DcqskFZuvXB1Evzy5KFQpQ= github.com/containerd/typeurl v1.0.2 h1:Chlt8zIieDbzQFzXzAeBEF92KhExuE4p9p92/QmY7aY= github.com/containerd/typeurl v1.0.2/go.mod h1:9trJWW2sRlGub4wZJRTW83VtbOLS6hwcDZXTn6oPz9s= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= @@ -149,10 +147,6 @@ github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= github.com/cyphar/filepath-securejoin v0.2.3 h1:YX6ebbZCZP7VkM3scTTokDgBL2TY741X51MTk3ycuNI= github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= -github.com/dagger/graphql v0.0.0-20221102000338-24d5e47d3b72 h1:0I9Y9nsFVcP42k9eOpjYmcm+NMEIFxNuJFOHfQ8MKpo= -github.com/dagger/graphql v0.0.0-20221102000338-24d5e47d3b72/go.mod h1:z9nYmunTkok2pE+Kdjpl1ICaqcCzlDxcVjwaFE0MJTc= -github.com/dagger/graphql-go-tools v0.0.0-20221102001222-e68b44170936 h1:yRwbZ5iT34iXf2Kg3my9Yclbg5Mq20b+w+uqePfbUoo= -github.com/dagger/graphql-go-tools v0.0.0-20221102001222-e68b44170936/go.mod h1:n/St2rWoBXCywBsC4Bw4Gj/Bs92X8fVd0Q8Y0aaNbH0= github.com/danieljoos/wincred v1.1.0/go.mod h1:XYlo+eRTsVA9aHGp7NGjFkPla4m+DCL7hqDjlFjiygg= github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 h1:y5HC9v93H5EPKqaS1UYVg1uYah5Xf51mBfIoWehClUQ= github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964/go.mod h1:Xd9hchkHSWYkEqJwUGisez3G1QY8Ryz0sdWrLPMGjLk= @@ -172,7 +166,6 @@ github.com/docker/docker v20.10.3-0.20220414164044-61404de7df1a+incompatible/go. github.com/docker/docker-credential-helpers v0.6.4 h1:axCks+yV+2MR3/kZhAmy07yC56WZ2Pwu/fKWtKuZB0o= github.com/docker/docker-credential-helpers v0.6.4/go.mod h1:ofX3UI0Gz1TteYBjtgs07O36Pyasyp66D2uKT7H8W1c= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= -github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c h1:+pKlWGMw7gf6bQ+oDZB4KHQFypsfjYlq/C4rfL7D3g8= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= @@ -382,8 +375,6 @@ github.com/mattn/go-unicodeclass v0.0.1/go.mod h1:dDCkCgOKUwD3sYX4N+tVQdFh/xlFQ1 github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= github.com/mitchellh/mapstructure v1.2.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= @@ -394,7 +385,6 @@ github.com/mna/pigeon v1.0.1-0.20200224192238-18953b277063/go.mod h1:rkFeDZ0gc+Y github.com/moby/buildkit v0.10.1-0.20220826012947-46c8b9ee45d0 h1:LCGBQM8P/GrQ41zFuLg10ey20n0ZEPquYBxZ/LkM09U= github.com/moby/buildkit v0.10.1-0.20220826012947-46c8b9ee45d0/go.mod h1:g7HO1tvhm/frAzTc9tjPUPkQefHWxdGAqz2hscGrOyo= github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg= -github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= github.com/moby/patternmatcher v0.5.0 h1:YCZgJOeULcxLw1Q+sVR636pmS7sPEn1Qo2iAN6M7DBo= github.com/moby/patternmatcher v0.5.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= @@ -463,8 +453,6 @@ github.com/pkg/term v1.2.0-beta.2/go.mod h1:E25nymQcrSllhX42Ok8MRm1+hyBdHY0dCeiK github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= github.com/protocolbuffers/txtpbfmt v0.0.0-20220608084003-fc78c767cd6a h1:AKJY61V2SQtJ2a2PdeswKk0NM1qF77X+julRNYRxPOk= github.com/protocolbuffers/txtpbfmt v0.0.0-20220608084003-fc78c767cd6a/go.mod h1:KjY0wibdYKc4DYkerHSbguaf3JeIPGhNJBp2BNiFH78= github.com/psanford/memfs v0.0.0-20210214183328-a001468d78ef h1:NKxTG6GVGbfMXc2mIk+KphcH6hagbVXhcFkbTgYleTI= @@ -477,9 +465,6 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rootless-containers/proto v0.1.0 h1:gS1JOMEtk1YDYHCzBAf/url+olMJbac7MTrgSeP6zh4= github.com/rootless-containers/proto v0.1.0/go.mod h1:vgkUFZbQd0gcE/K/ZwtE4MYjZPu0UNHLXIQxhyqAFh8= -github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.28.0 h1:MirSo27VyNi7RJYP3078AA1+Cyzd2GB66qy3aUHvsWY= -github.com/rs/zerolog v1.28.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6usyD0= github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -518,7 +503,6 @@ github.com/spy16/slurp v0.2.3/go.mod h1:Omrszh5Bznh+fhYrxnR4R2XrRKRelPlbY5IwQizO github.com/square/certstrap v1.3.0 h1:N9P0ZRA+DjT8pq5fGDj0z3FjafRKnBDypP0QHpMlaAk= github.com/square/certstrap v1.3.0/go.mod h1:wGZo9eE1B7WX2GKBn0htJ+B3OuRl2UsdCFySNooy9hU= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -587,23 +571,12 @@ go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.34.0 h1:PNEMW4EvpNQ7SuoPFNkvbZqi1STkTPKq+8vfoMl/6AE= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.34.0/go.mod h1:fk1+icoN47ytLSgkoWHLJrtVTSQ+HgmkNgPTKrk/Nsc= -go.opentelemetry.io/otel v1.4.1/go.mod h1:StM6F/0fSwpd8dKWDCdRr7uRvEPYdW0hBSlbdTiUde4= go.opentelemetry.io/otel v1.10.0 h1:Y7DTJMR6zs1xkS/upamJYk0SxxN4C9AqRd77jmZnyY4= go.opentelemetry.io/otel v1.10.0/go.mod h1:NbvWjCthWHKBEUMpf0/v8ZRZlni86PpGFEMA9pnQSnQ= -go.opentelemetry.io/otel/exporters/jaeger v1.4.1 h1:VHCK+2yTZDqDaVXj7JH2Z/khptuydo6C0ttBh2bxAbc= -go.opentelemetry.io/otel/exporters/jaeger v1.4.1/go.mod h1:ZW7vkOu9nC1CxsD8bHNHCia5JUbwP39vxgd1q4Z5rCI= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.9.0 h1:ggqApEjDKczicksfvZUCxuvoyDmR6Sbm56LwiK8DVR0= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.9.0/go.mod h1:78XhIg8Ht9vR4tbLNUhXsiOnE2HOuSeKAiAcoVQEpOY= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.9.0 h1:NN90Cuna0CnBg8YNu1Q0V35i2E8LDByFOwHRCq/ZP9I= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.9.0/go.mod h1:0EsCXjZAiiZGnLdEUXM9YjCKuuLZMYyglh2QDXcYKVA= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.9.0 h1:M0/hqGuJBLeIEu20f89H74RGtqV2dn+SFWEz9ATAAwY= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.9.0/go.mod h1:K5G92gbtCrYJ0mn6zj9Pst7YFsDFuvSYEhYKRMcufnM= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.9.0 h1:FAF9l8Wjxi9Ad2k/vLTfHZyzXYX72C62wBGpV3G6AIo= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.9.0/go.mod h1:smUdtylgc0YQiUr2PuifS4hBXhAS5xtR6WQhxP1wiNA= -go.opentelemetry.io/otel/sdk v1.4.1/go.mod h1:NBwHDgDIBYjwK2WNu1OPgsIc2IJzmBXNnvIJxJc8BpE= go.opentelemetry.io/otel/sdk v1.9.0 h1:LNXp1vrr83fNXTHgU8eO89mhzxb/bbWAsHG6fNf3qWo= go.opentelemetry.io/otel/sdk v1.9.0/go.mod h1:AEZc8nt5bd2F7BC24J5R0mrjYnpEgYHyTcM/vrSple4= -go.opentelemetry.io/otel/trace v1.4.1/go.mod h1:iYEVbroFCNut9QkwEczV9vMRPHNKSSwYZjulEtsmhFc= go.opentelemetry.io/otel/trace v1.10.0 h1:npQMbR8o7mum8uF95yFbOEJffhs1sbCOfDh8zAJiH5E= go.opentelemetry.io/otel/trace v1.10.0/go.mod h1:Sij3YYczqAdz+EhmGhE6TpTxUO5/F/AzrK+kxfGqySM= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= @@ -616,6 +589,7 @@ go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= +go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= @@ -803,7 +777,6 @@ golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= From 38210004ad29d9b24429973a8f73098b5c9d02db Mon Sep 17 00:00:00 2001 From: Alex Suraci Date: Sun, 27 Nov 2022 13:33:48 -0500 Subject: [PATCH 25/25] bump nix vendorsha --- nix/vendorSha256.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/vendorSha256.txt b/nix/vendorSha256.txt index 61ee9bf8..3749dec1 100644 --- a/nix/vendorSha256.txt +++ b/nix/vendorSha256.txt @@ -1 +1 @@ -sha256-d3YaCCAiOBUjZ91ObwvbUxr0l/YRV3aKgRveYvSzPTs= +sha256-DLq4CygLamf85DlcT35444zBGrgXRJfGxQPTuv8ssZc=