From cbcb198dce951305c77ff4b265709fea957a4efe Mon Sep 17 00:00:00 2001 From: Guillaume de Rouville Date: Tue, 6 Jul 2021 11:49:47 +0200 Subject: [PATCH 01/41] git package - add keepGitDir option Signed-off-by: Guillaume de Rouville --- stdlib/git/git.cue | 12 +++++++++--- stdlib/git/tests/git.cue | 29 +++++++++++++++++++++-------- 2 files changed, 30 insertions(+), 11 deletions(-) diff --git a/stdlib/git/git.cue b/stdlib/git/git.cue index 82d58b5e..ee852ee8 100644 --- a/stdlib/git/git.cue +++ b/stdlib/git/git.cue @@ -11,19 +11,25 @@ import ( #Repository: { // Git remote. // Example: `"https://github.com/dagger/dagger"` - remote: string @dagger(input) + remote: string & dagger.#Input // Git ref: can be a commit, tag or branch. // Example: "main" - ref: string @dagger(input) + ref: string & dagger.#Input // (optional) Subdirectory - subdir: string | *null @dagger(input) + subdir: *null | string & dagger.#Input + + // (optional) Keep .git directory + keepGitDir: *false | bool #up: [ op.#FetchGit & { "remote": remote "ref": ref + if (keepGitDir) { + keepGitDir: true + } }, if subdir != null { op.#Subdir & { diff --git a/stdlib/git/tests/git.cue b/stdlib/git/tests/git.cue index 59e65d47..f266223a 100644 --- a/stdlib/git/tests/git.cue +++ b/stdlib/git/tests/git.cue @@ -6,18 +6,19 @@ import ( "alpha.dagger.io/git" "alpha.dagger.io/alpine" "alpha.dagger.io/os" - "alpha.dagger.io/dagger/op" ) repo: git.#Repository & { - remote: "https://github.com/blocklayerhq/acme-clothing.git" - ref: "master" + remote: "https://github.com/blocklayerhq/acme-clothing.git" + ref: "master" + keepGitDir: true +} - #up: [ - op.#FetchGit & { - keepGitDir: true - }, - ] +repoSubDir: git.#Repository & { + remote: "https://github.com/dagger/examples.git" + ref: "main" + subdir: "todoapp" + keepGitDir: true } branch: git.#CurrentBranch & { @@ -40,6 +41,18 @@ TestRepository: os.#Container & { """ } +TestSubRepository: os.#Container & { + image: alpine.#Image & { + package: bash: "=5.1.0-r0" + package: git: true + } + mount: "/repo1": from: repoSubDir + dir: "/repo1" + command: """ + [ -d src ] + """ +} + TestCurrentBranch: os.#Container & { image: alpine.#Image & { package: bash: "=5.1.0-r0" From a4f86f5ef2989e0722a1f626dd2b19f13695018d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Jul 2021 19:14:42 +0000 Subject: [PATCH 02/41] build(deps): bump sass from 1.35.2 to 1.36.0 in /website Bumps [sass](https://github.com/sass/dart-sass) from 1.35.2 to 1.36.0. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md) - [Commits](https://github.com/sass/dart-sass/compare/1.35.2...1.36.0) --- updated-dependencies: - dependency-name: sass dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- website/package.json | 2 +- website/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/website/package.json b/website/package.json index 0760ec85..96a5503d 100644 --- a/website/package.json +++ b/website/package.json @@ -28,7 +28,7 @@ "react": "^17.0.1", "react-dom": "^17.0.1", "react-social-login-buttons": "^3.5.0", - "sass": "^1.35.2", + "sass": "^1.36.0", "url-loader": "^4.1.1" }, "browserslist": { diff --git a/website/yarn.lock b/website/yarn.lock index 1dac5492..c74bb25a 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -7409,10 +7409,10 @@ sass-loader@^10.1.1: schema-utils "^3.0.0" semver "^7.3.2" -sass@^1.35.2: - version "1.35.2" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.35.2.tgz#b732314fcdaf7ef8d0f1698698adc378043cb821" - integrity sha512-jhO5KAR+AMxCEwIH3v+4zbB2WB0z67V1X0jbapfVwQQdjHZUGUyukpnoM6+iCMfsIUC016w9OPKQ5jrNOS9uXw== +sass@^1.36.0: + version "1.36.0" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.36.0.tgz#5912ef9d5d16714171ba11cb17edb274c4bbc07e" + integrity sha512-fQzEjipfOv5kh930nu3Imzq3ie/sGDc/4KtQMJlt7RRdrkQSfe37Bwi/Rf/gfuYHsIuE1fIlDMvpyMcEwjnPvg== dependencies: chokidar ">=3.0.0 <4.0.0" From 67d5609aee296507da170051ba2db66ec6bcf35b Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Fri, 23 Jul 2021 16:05:49 +0200 Subject: [PATCH 03/41] support buildkit cache export/import - Add support for buildkit cache export/import - Enable GHA cache for universe test (using buildkit v0.9 GHA support) Signed-off-by: Andrea Luzzardi --- .github/workflows/ci.yml | 13 +++++++ client/client.go | 21 +++++++--- cmd/dagger/cmd/common/common.go | 18 ++++++++- cmd/dagger/cmd/compute.go | 3 +- cmd/dagger/cmd/edit.go | 2 +- cmd/dagger/cmd/input/list.go | 9 +---- cmd/dagger/cmd/input/root.go | 2 +- cmd/dagger/cmd/output/list.go | 2 +- cmd/dagger/cmd/query.go | 2 +- cmd/dagger/cmd/root.go | 7 ++++ cmd/dagger/cmd/up.go | 3 +- go.mod | 1 + go.sum | 68 ++++++++++++++++++++++++++++++++- 13 files changed, 127 insertions(+), 24 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5782d24a..0b9a7d2b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -89,8 +89,15 @@ jobs: mkdir -p ~/.config/dagger echo "$DAGGER_AGE_KEY" > ~/.config/dagger/keys.txt + - name: Expose GitHub Runtime + uses: crazy-max/ghaction-github-runtime@v1 + - name: Integration test + env: + DAGGER_CACHE_TO: "type=gha,scope=integration" + DAGGER_CACHE_FROM: "type=gha,scope=integration" run: | + env make core-integration universe: @@ -116,6 +123,12 @@ jobs: mkdir -p ~/.config/dagger echo "$DAGGER_AGE_KEY" > ~/.config/dagger/keys.txt + - name: Expose GitHub Runtime + uses: crazy-max/ghaction-github-runtime@v1 + - name: Universe Test + env: + DAGGER_CACHE_TO: "type=gha,scope=universe" + DAGGER_CACHE_FROM: "type=gha,scope=universe" run: | make universe-test diff --git a/client/client.go b/client/client.go index 8267849e..63a8e3f7 100644 --- a/client/client.go +++ b/client/client.go @@ -33,11 +33,18 @@ import ( // A dagger client type Client struct { - c *bk.Client - noCache bool + c *bk.Client + cfg Config } -func New(ctx context.Context, host string, noCache bool) (*Client, error) { +type Config struct { + NoCache bool + + CacheExports []bk.CacheOptionsEntry + CacheImports []bk.CacheOptionsEntry +} + +func New(ctx context.Context, host string, cfg Config) (*Client, error) { if host == "" { host = os.Getenv("BUILDKIT_HOST") } @@ -61,8 +68,8 @@ func New(ctx context.Context, host string, noCache bool) (*Client, error) { return nil, fmt.Errorf("buildkit client: %w", err) } return &Client{ - c: c, - noCache: noCache, + c: c, + cfg: cfg, }, nil } @@ -122,6 +129,8 @@ func (c *Client) buildfn(ctx context.Context, st *state.State, env *environment. secrets, solver.NewDockerSocketProvider(), }, + CacheExports: c.cfg.CacheExports, + CacheImports: c.cfg.CacheImports, } // Call buildkit solver @@ -137,7 +146,7 @@ func (c *Client) buildfn(ctx context.Context, st *state.State, env *environment. Events: ch, Auth: auth, Secrets: secrets, - NoCache: c.noCache, + NoCache: c.cfg.NoCache, }) lg.Debug().Msg("loading configuration") diff --git a/cmd/dagger/cmd/common/common.go b/cmd/dagger/cmd/common/common.go index 7969e1e9..081ad6ae 100644 --- a/cmd/dagger/cmd/common/common.go +++ b/cmd/dagger/cmd/common/common.go @@ -5,6 +5,7 @@ import ( "fmt" "strings" + "github.com/docker/buildx/util/buildflags" "github.com/rs/zerolog/log" "github.com/spf13/viper" "go.dagger.io/dagger/client" @@ -145,10 +146,23 @@ func ValueDocOneLine(val *compiler.Value) string { } // NewClient creates a new client -func NewClient(ctx context.Context, noCache bool) *client.Client { +func NewClient(ctx context.Context) *client.Client { lg := log.Ctx(ctx) - cl, err := client.New(ctx, "", noCache) + cacheExports, err := buildflags.ParseCacheEntry(viper.GetStringSlice("cache-to")) + if err != nil { + lg.Fatal().Err(err).Msg("unable to parse --export-cache options") + } + cacheImports, err := buildflags.ParseCacheEntry(viper.GetStringSlice("cache-fron")) + if err != nil { + lg.Fatal().Err(err).Msg("unable to parse --import-cache options") + } + + cl, err := client.New(ctx, "", client.Config{ + CacheExports: cacheExports, + CacheImports: cacheImports, + NoCache: viper.GetBool("no-cache"), + }) if err != nil { lg.Fatal().Err(err).Msg("unable to create client") } diff --git a/cmd/dagger/cmd/compute.go b/cmd/dagger/cmd/compute.go index 2557f0de..12164ec9 100644 --- a/cmd/dagger/cmd/compute.go +++ b/cmd/dagger/cmd/compute.go @@ -168,7 +168,7 @@ var computeCmd = &cobra.Command{ } } - cl := common.NewClient(ctx, viper.GetBool("no-cache")) + cl := common.NewClient(ctx) err := cl.Do(ctx, st, func(ctx context.Context, env *environment.Environment, s solver.Solver) error { // check that all inputs are set @@ -208,7 +208,6 @@ func init() { computeCmd.Flags().StringSlice("input-git", []string{}, "TARGET=REMOTE#REF") computeCmd.Flags().String("input-json", "", "JSON") computeCmd.Flags().String("input-yaml", "", "YAML") - computeCmd.Flags().Bool("no-cache", false, "disable cache") if err := viper.BindPFlags(computeCmd.Flags()); err != nil { panic(err) diff --git a/cmd/dagger/cmd/edit.go b/cmd/dagger/cmd/edit.go index ab37dbdc..768f2d4b 100644 --- a/cmd/dagger/cmd/edit.go +++ b/cmd/dagger/cmd/edit.go @@ -76,7 +76,7 @@ var editCmd = &cobra.Command{ st.Plan = newState.Plan st.Inputs = newState.Inputs - cl := common.NewClient(ctx, false) + cl := common.NewClient(ctx) err = cl.Do(ctx, st, func(ctx context.Context, env *environment.Environment, s solver.Solver) error { // check for cue errors by scanning all the inputs _, err := env.ScanInputs(ctx, true) diff --git a/cmd/dagger/cmd/input/list.go b/cmd/dagger/cmd/input/list.go index 6221ae0c..b242031e 100644 --- a/cmd/dagger/cmd/input/list.go +++ b/cmd/dagger/cmd/input/list.go @@ -6,7 +6,6 @@ import ( "os" "text/tabwriter" - "go.dagger.io/dagger/client" "go.dagger.io/dagger/cmd/dagger/cmd/common" "go.dagger.io/dagger/cmd/dagger/logger" "go.dagger.io/dagger/compiler" @@ -42,12 +41,8 @@ var listCmd = &cobra.Command{ doneCh := common.TrackWorkspaceCommand(ctx, cmd, workspace, st) - c, err := client.New(ctx, "", false) - if err != nil { - lg.Fatal().Err(err).Msg("unable to create client") - } - - err = c.Do(ctx, st, func(ctx context.Context, env *environment.Environment, s solver.Solver) error { + c := common.NewClient(ctx) + err := c.Do(ctx, st, func(ctx context.Context, env *environment.Environment, s solver.Solver) error { inputs, err := env.ScanInputs(ctx, false) if err != nil { return err diff --git a/cmd/dagger/cmd/input/root.go b/cmd/dagger/cmd/input/root.go index 44d9e2e1..c2e52bd4 100644 --- a/cmd/dagger/cmd/input/root.go +++ b/cmd/dagger/cmd/input/root.go @@ -50,7 +50,7 @@ func updateEnvironmentInput(ctx context.Context, cmd *cobra.Command, target stri Value: target, }) - cl := common.NewClient(ctx, false) + cl := common.NewClient(ctx) st.SetInput(target, input) diff --git a/cmd/dagger/cmd/output/list.go b/cmd/dagger/cmd/output/list.go index 6d39e3ee..d594a1b0 100644 --- a/cmd/dagger/cmd/output/list.go +++ b/cmd/dagger/cmd/output/list.go @@ -40,7 +40,7 @@ var listCmd = &cobra.Command{ doneCh := common.TrackWorkspaceCommand(ctx, cmd, workspace, st) - cl := common.NewClient(ctx, false) + cl := common.NewClient(ctx) err := cl.Do(ctx, st, func(ctx context.Context, env *environment.Environment, s solver.Solver) error { return ListOutputs(ctx, env, true) }) diff --git a/cmd/dagger/cmd/query.go b/cmd/dagger/cmd/query.go index afc569f0..45802a75 100644 --- a/cmd/dagger/cmd/query.go +++ b/cmd/dagger/cmd/query.go @@ -45,7 +45,7 @@ var queryCmd = &cobra.Command{ doneCh := common.TrackWorkspaceCommand(ctx, cmd, workspace, state) - cl := common.NewClient(ctx, false) + cl := common.NewClient(ctx) cueVal := compiler.NewValue() err := cl.Do(ctx, state, func(ctx context.Context, env *environment.Environment, s solver.Solver) error { diff --git a/cmd/dagger/cmd/root.go b/cmd/dagger/cmd/root.go index d3ade03b..4c533003 100644 --- a/cmd/dagger/cmd/root.go +++ b/cmd/dagger/cmd/root.go @@ -25,6 +25,13 @@ var rootCmd = &cobra.Command{ func init() { rootCmd.PersistentFlags().String("log-format", "", "Log format (json, pretty). Defaults to json if the terminal is not a tty") rootCmd.PersistentFlags().StringP("log-level", "l", "info", "Log level") + + rootCmd.PersistentFlags().Bool("no-cache", false, "Disable caching") + rootCmd.PersistentFlags().StringArray("cache-to", []string{}, + "Cache export destinations (eg. user/app:cache, type=local,dest=path/to/dir)") + rootCmd.PersistentFlags().StringArray("cache-from", []string{}, + "External cache sources (eg. user/app:cache, type=local,src=path/to/dir)") + rootCmd.PersistentFlags().StringP("environment", "e", "", "Select an environment") rootCmd.PersistentFlags().StringP("workspace", "w", "", "Specify a workspace (defaults to current git repository)") diff --git a/cmd/dagger/cmd/up.go b/cmd/dagger/cmd/up.go index 51a1c552..d528de31 100644 --- a/cmd/dagger/cmd/up.go +++ b/cmd/dagger/cmd/up.go @@ -43,7 +43,7 @@ var upCmd = &cobra.Command{ doneCh := common.TrackWorkspaceCommand(ctx, cmd, workspace, st) - cl := common.NewClient(ctx, viper.GetBool("no-cache")) + cl := common.NewClient(ctx) err := cl.Do(ctx, st, func(ctx context.Context, env *environment.Environment, s solver.Solver) error { // check that all inputs are set @@ -104,7 +104,6 @@ func checkInputs(ctx context.Context, env *environment.Environment) error { } func init() { - upCmd.Flags().Bool("no-cache", false, "Disable all run cache") upCmd.Flags().BoolP("force", "f", false, "Force up, disable inputs check") if err := viper.BindPFlags(upCmd.Flags()); err != nil { diff --git a/go.mod b/go.mod index e7638d66..91a356fa 100644 --- a/go.mod +++ b/go.mod @@ -7,6 +7,7 @@ require ( filippo.io/age v1.0.0-rc.3 github.com/KromDaniel/jonson v0.0.0-20180630143114-d2f9c3c389db github.com/containerd/console v1.0.2 + github.com/docker/buildx v0.6.0 github.com/docker/distribution v2.7.1+incompatible github.com/emicklei/proto v1.9.0 // indirect github.com/go-git/go-git/v5 v5.4.2 diff --git a/go.sum b/go.sum index 1f7f2112..ff6e5168 100644 --- a/go.sum +++ b/go.sum @@ -184,8 +184,10 @@ github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMx github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk= github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= +github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= +github.com/agl/ed25519 v0.0.0-20170116200512-5312a6153412/go.mod h1:WPjqKcmVOxf0XSf3YxCJs6N6AOSrOx3obionmG7T0y0= github.com/alecthomas/kingpin v2.2.6+incompatible/go.mod h1:59OFYbFVLKQKq+mqrL6Rw5bR0c3ACQaawgXx0QYndlE= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -202,6 +204,10 @@ github.com/apex/log v1.3.0/go.mod h1:jd8Vpsr46WAe3EZSQ/IUMs2qQD/GOycT5rPWCO1yGcs github.com/apex/logs v0.0.4/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/apparentlymart/go-cidr v1.0.1/go.mod h1:EBcsNrHc3zQeuaeCeCtQruQm+n9/YjEn/vI25Lg7Gwc= +github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM= +github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk= +github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= @@ -219,6 +225,7 @@ github.com/aws/aws-sdk-go v1.20.6/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN github.com/aws/aws-sdk-go v1.25.11/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.27.1/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.31.6/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= +github.com/aws/aws-sdk-go v1.34.9/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/aws/aws-sdk-go v1.37.18 h1:SRdWLg+DqMFWX8HB3UvXyAoZpw9IDIUYnSTwgzOYbqg= github.com/aws/aws-sdk-go v1.37.18/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I= @@ -227,6 +234,7 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24 github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932/go.mod h1:NOuUCSz6Q9T7+igc/hlvDOUdtWKryOrtFyIVABv/p7k= github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= @@ -235,6 +243,7 @@ github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnweb github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/bmatcuk/doublestar v1.1.5/go.mod h1:wiQtGV+rzVYxB7WIlirSN++5HPtPlXEo9MEoZQC/PmE= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/bombsimon/wsl/v2 v2.0.0/go.mod h1:mf25kr/SqFEPhhcxW1+7pxzGlW+hIl/hYTKY95VwV8U= github.com/bombsimon/wsl/v2 v2.2.0/go.mod h1:Azh8c3XGEJl9LyX0/sFC+CKMc7Ssgua0g+6abzXN4Pg= @@ -242,13 +251,17 @@ github.com/bombsimon/wsl/v3 v3.0.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2 github.com/bombsimon/wsl/v3 v3.1.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc= github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= +github.com/bshuster-repo/logrus-logstash-hook v1.0.0/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= +github.com/bugsnag/bugsnag-go v1.4.1/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50= github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= +github.com/bugsnag/panicwrap v1.2.0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= github.com/caarlos0/ctrlc v1.0.0/go.mod h1:CdXpj4rmq0q/1Eb44M9zi2nKB0QraNKuRGYGrrHhcQw= github.com/campoy/unique v0.0.0-20180121183637-88950e537e7e/go.mod h1:9IOqJGCPMSc6E5ydlp5NIonxObaeu/Iub/X03EKPVYo= github.com/cavaliercoder/go-cpio v0.0.0-20180626203310-925f9528c45e/go.mod h1:oDpT4efm8tSYHXV5tHSdRvBet/b/QzxZ+XyyPehvm3A= +github.com/cenkalti/backoff v2.1.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= @@ -265,6 +278,7 @@ github.com/cilium/ebpf v0.0.0-20200702112145-1c8d4c9ef775/go.mod h1:7cR51M8ViRLI github.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX2Qs= github.com/cilium/ebpf v0.4.0/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cloudflare/cfssl v0.0.0-20181213083726-b94e044bb51e/go.mod h1:yMWuSON2oQp+43nFtAV/uvKQIFpSPerB57DCt9t8sSA= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= 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= @@ -275,6 +289,7 @@ github.com/cockroachdb/apd/v2 v2.0.1 h1:y1Rh3tEU89D+7Tgbw+lp52T6p/GJLpDmNvr10UWq github.com/cockroachdb/apd/v2 v2.0.1/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/hdrhistogram v0.0.0-20160425231609-f8ad88b59a58/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/compose-spec/compose-go v0.0.0-20210706130854-69459d4976b5/go.mod h1:5V65rPnTvvQagtoMxTneJ2QicLq6ZRQQ7fOgPN226fo= github.com/containerd/aufs v0.0.0-20200908144142-dab0cbea06f4/go.mod h1:nukgQABAEopAHvB6j7cnP5zJ+/3aVcE7hCYqvIwAHyE= github.com/containerd/aufs v0.0.0-20201003224125-76a6863f2989/go.mod h1:AkGGQs9NM2vtYHaUen+NljV0/baGCAPELGm2q9ZXpWU= github.com/containerd/aufs v0.0.0-20210316121734-20793ff83c97/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU= @@ -402,10 +417,12 @@ github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1S github.com/d2g/dhcp4client v1.0.0/go.mod h1:j0hNfjhrt2SxUOw55nL0ATM/z4Yt3t2Kd1mW34z5W5s= github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5/go.mod h1:Eo87+Kg/IX2hfWJfwxMzLyuSZyxSoAug2nGa1G2QAi8= github.com/d2g/hardwareaddr v0.0.0-20190221164911-e7d9fbe030e4/go.mod h1:bMl4RjIciD2oAxI7DmWRx6gbeqrkoLqv3MV0vzNad+I= +github.com/danieljoos/wincred v1.1.0/go.mod h1:XYlo+eRTsVA9aHGp7NGjFkPla4m+DCL7hqDjlFjiygg= github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/denisenkom/go-mssqldb v0.0.0-20190315220205-a8ed825ac853/go.mod h1:xN/JuLBIz4bjkxNmByTiV1IbhfnYb6oo99phBn4Eqhc= github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= github.com/devigned/tab v0.1.1/go.mod h1:XG9mPq0dFghrYvoBF3xdRrJzSTX1b7IQrvaL9mzjeJY= github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= @@ -413,13 +430,17 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZm github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dimchansky/utfbom v1.1.0 h1:FcM3g+nofKgUteL8dm/UpdRXNC9KmADgTpLKsu0TRo4= github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= +github.com/distribution/distribution/v3 v3.0.0-20210316161203-a01c71e2477e/go.mod h1:xpWTC2KnJMiDLkoawhsPQcXjvwATEBcbq0xevG2YR9M= github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= +github.com/docker/buildx v0.6.0 h1:UuJvtuK8SQX/7Y9i1fJR3Jq6kXBSFcSJtudlALu9iV8= +github.com/docker/buildx v0.6.0/go.mod h1:ue0mOStExTp8vSb1wrvbpL9VoL0e66EK9etSCCIhuFM= github.com/docker/cli v0.0.0-20190925022749-754388324470/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/cli v0.0.0-20191017083524-a8ff7f821017/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/cli v20.10.0-beta1.0.20201029214301-1d20b15adc38+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/cli v20.10.6+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/cli v20.10.7+incompatible h1:pv/3NqibQKphWZiAskMzdz8w0PRbtTaEB+f6NwdU7Is= github.com/docker/cli v20.10.7+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/compose-on-kubernetes v0.4.19-0.20190128150448-356b2919c496/go.mod h1:iT2pYfi580XlpaV4KmK0T6+4/9+XoKmk/fhoDod1emE= github.com/docker/distribution v0.0.0-20190905152932-14b96e55d84c/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY= github.com/docker/distribution v2.6.0-rc.1.0.20180327202408-83389a148052+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= @@ -436,6 +457,8 @@ github.com/docker/docker v20.10.6+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05b github.com/docker/docker v20.10.7+incompatible h1:Z6O9Nhsjv+ayUEeI1IojKbYcsGdgYSNqxe1s2MYzUhQ= github.com/docker/docker v20.10.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.6.3/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y= +github.com/docker/docker-credential-helpers v0.6.4-0.20210125172408-38bea2ce277a/go.mod h1:ofX3UI0Gz1TteYBjtgs07O36Pyasyp66D2uKT7H8W1c= +github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c/go.mod h1:CADgU4DSXK5QUlFslkQu2yW2TKzFZcXq/leZfM0UH5Q= 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-20170721190031-9461782956ad/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= @@ -449,7 +472,9 @@ github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDD github.com/docker/libnetwork v0.8.0-dev.2.0.20200917202933-d0951081b35f h1:jC/ZXgYdzCUuKFkKGNiekhnIkGfUrdelEqvg4Miv440= github.com/docker/libnetwork v0.8.0-dev.2.0.20200917202933-d0951081b35f/go.mod h1:93m0aTqz6z+g32wla4l4WxTrdtvBRmVzYRkYvasA5Z8= github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= +github.com/docker/libtrust v0.0.0-20150526203908-9cbd2a1374f4/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= +github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -458,6 +483,8 @@ github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1 github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/elazarl/goproxy v0.0.0-20191011121108-aa519ddbe484/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= +github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/proto v1.6.15/go.mod h1:rn1FgRS/FANiZdD2djyH7TMA9jdRDcYQ9IEN9yvjX0A= @@ -473,12 +500,14 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5/go.mod h1:a2zkGnVExMxdzMo3M0Hi/3sEU+cWnZpSni0O6/Yb/P0= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk= @@ -490,6 +519,7 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA= +github.com/fvbommel/sortorder v1.0.1/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0= github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -536,6 +566,7 @@ github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= github.com/go-toolsmith/astcopy v1.0.0/go.mod h1:vrgyG+5Bxrnz4MZWPF+pI4R8h3qKRjjyvV/DSez4WVQ= github.com/go-toolsmith/astequal v0.0.0-20180903214952-dcb477bfacd6/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= @@ -560,6 +591,7 @@ github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5x github.com/gofrs/flock v0.0.0-20190320160742-5135e617513b/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/flock v0.7.3 h1:I0EKY9l8HZCXTMYC4F80vwT6KNypV9uYKP3Alm/hjmQ= github.com/gofrs/flock v0.7.3/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= +github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/googleapis v1.2.0/go.mod h1:Njal3psf3qN6dwBtQfUmBZh2ybovJ0tlu3o/AC7HYjU= github.com/gogo/googleapis v1.3.2/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.0 h1:zgVt4UpGxcqVOw97aRGxT4svlcmdK35fynLNctY32zI= @@ -589,6 +621,7 @@ github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -631,9 +664,11 @@ github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21/go.mod h1:tf5+bz github.com/golangci/revgrep v0.0.0-20180526074752-d9c87f5ffaf0/go.mod h1:qOQCunEYvmd/TLamH+7LlVccLvUH5kZNhbCgTHoBbp4= github.com/golangci/revgrep v0.0.0-20180812185044-276a5c0a1039/go.mod h1:qOQCunEYvmd/TLamH+7LlVccLvUH5kZNhbCgTHoBbp4= github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= +github.com/gomodule/redigo v1.8.2/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0= github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/certificate-transparency-go v1.0.21/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg= github.com/google/crfs v0.0.0-20191108021818-71d77da419c9/go.mod h1:etGhoOqfwPkooV6aqoX3eBGQOJblqdoc9XvWOeuxpPw= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -706,6 +741,7 @@ github.com/goreleaser/nfpm v1.2.1/go.mod h1:TtWrABZozuLOttX2uDlYyECfQX7x5XYkVxhj github.com/goreleaser/nfpm v1.3.0/go.mod h1:w0p7Kc9TAUgWMyrub63ex3M2Mgw88M4GZXoTq5UCb40= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= +github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= @@ -733,6 +769,7 @@ github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t 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-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= +github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4= github.com/hanwen/go-fuse v1.0.0/go.mod h1:unqXarDXqzAk0rt98O2tVndEPIpUgLD9+rwFisZH3Ok= github.com/hanwen/go-fuse/v2 v2.0.3/go.mod h1:0EQM6aH2ctVpvZ6a+onrQ/vaykxh2GH7hy3e13vzTUY= github.com/hanwen/go-fuse/v2 v2.1.0/go.mod h1:oRyA5eK+pvJyv5otpO/DgccS8y/RvYMaO00GgRLGryc= @@ -744,6 +781,7 @@ github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brv github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cty-funcs v0.0.0-20200930094925-2721b1e36840/go.mod h1:Abjk0jbRkDaNCzsRhOv2iDCofYpX1eVsjozoiK63qLA= github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= github.com/hashicorp/go-hclog v0.8.0/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v0.9.2 h1:CG6TE5H9/JXsFWJCfoIVpKFIkFe6ysEuHirp4DxCsHI= @@ -776,6 +814,7 @@ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/hcl/v2 v2.8.2/go.mod h1:bQTN5mpo+jewjJgh8jr0JUguIi7qPHUF6yIfAEN3jqY= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= @@ -810,6 +849,9 @@ github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU= github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= github.com/jingyugao/rowserrcheck v0.0.0-20191204022205-72ab7603b68a/go.mod h1:xRskid8CManxVta/ALEhJha/pweKBaVG6fWgc0yH25s= +github.com/jinzhu/gorm v1.9.2/go.mod h1:Vla75njaFJ8clLU1W44h34PjIkijhjHIYnZxMqCdxqo= +github.com/jinzhu/inflection v0.0.0-20180308033659-04140366298a/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= +github.com/jinzhu/now v1.0.0/go.mod h1:oHTiXerJ20+SfYcrdlBO7rzZRJWGwSTQ0iUY2jI6Gfc= github.com/jirfag/go-printf-func-name v0.0.0-20191110105641-45db9963cdd3/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= @@ -837,6 +879,7 @@ github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/X github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 h1:DowS9hvgyYSX4TO5NpyC606/Z4SxnNYbT+WX27or6Ck= github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= @@ -872,8 +915,9 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0 github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.2.0 h1:LXpIM/LZ5xGFhOpXAQUIMM1HdyqzVYM13zNdjCEEcA0= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.10.0 h1:Zx5DJFEYQXio93kgXnQ09fXNiUKsqv4OUEu2UtGcB1E= +github.com/lib/pq v1.10.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/logrusorgru/aurora v0.0.0-20181002194514-a7b3b318ed4e/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= @@ -908,7 +952,9 @@ github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Ky github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= github.com/mattn/go-shellwords v1.0.10/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y= +github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y= github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-zglob v0.0.1/go.mod h1:9fxibJccNxU2cnpIKLRRFA7zX7qhkJIQWBb449FYHOo= github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= @@ -928,6 +974,7 @@ github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrk github.com/mitchellh/go-ps v0.0.0-20190716172923-621e5597135b/go.mod h1:r1VsdOzOPt1ZSrGZWFoNhsAedKnEd6r9Np1+5blZCWk= github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9Gns0u4= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= @@ -941,6 +988,7 @@ github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/moby/buildkit v0.8.1/go.mod h1:/kyU1hKy/aYCuP39GZA9MaKioovHku57N6cqlKZIaiQ= +github.com/moby/buildkit v0.8.2-0.20210702160134-1a7543a10527/go.mod h1:5aezz3QnP1mhzkju3GbsjN0Sh/awZ8AxmH7vLLmJj0M= github.com/moby/buildkit v0.9.0 h1:PcdyqIOidDySJnMNaWh96ZMKtrRWuu4QEpFGjIXhC+E= github.com/moby/buildkit v0.9.0/go.mod h1:S9ceObCS/yMHsJD7FQx4fUCe3E7HHYjYVvk0CtynxOw= github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg= @@ -1112,6 +1160,7 @@ github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uY 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-charset v0.0.0-20180617210344-2471d30d28b4/go.mod h1:qgYeAmZ5ZIpBWTGllZSQnw97Dj+woV0toclVaRGI8pc= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.5.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8= @@ -1179,6 +1228,7 @@ github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKv github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= +github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/cobra v1.2.1 h1:+KmjbUw1hriSNMF55oPrkZcb27aECyrj8V2ytv7kWDw= github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= @@ -1187,6 +1237,7 @@ github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0 github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= 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= @@ -1222,6 +1273,7 @@ github.com/tdakkota/asciicheck v0.0.0-20200416190851-d7f85be797a2/go.mod h1:yHp0 github.com/tdakkota/asciicheck v0.0.0-20200416200610-e657995f937b/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM= github.com/tetafro/godot v0.3.7/go.mod h1:/7NLHhv08H1+8DNj0MElpAACw1ajsCuf3TKNQxA5S+0= github.com/tetafro/godot v0.4.2/go.mod h1:/7NLHhv08H1+8DNj0MElpAACw1ajsCuf3TKNQxA5S+0= +github.com/theupdateframework/notary v0.6.1/go.mod h1:MOfgIfmox8s7/7fduvB2xyPPMJCrjRLRizA8OFwpnKY= github.com/timakin/bodyclose v0.0.0-20190930140734-f7f2e9bca95e/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= github.com/timakin/bodyclose v0.0.0-20200424151742-cb6215831a94/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= github.com/tj/assert v0.0.0-20171129193455-018094318fb0/go.mod h1:mZ9/Rh9oLWpLLDRpvE+3b7gP/C2YyLFYxNmcLnPTMe0= @@ -1266,6 +1318,9 @@ github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852/go.mod h1:tw github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc/go.mod h1:ZjcWmFBXmLKZu9Nxj3WKYEafiSqer2rnvPr0en9UNpI= github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= +github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= +github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= +github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= github.com/vmware/govmomi v0.20.3/go.mod h1:URlwyTFZX72RmxtxuaFL2Uj3fD1JTvZdx59bHWk6aFU= github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/willf/bitset v1.1.11 h1:N7Z7E9UvjW+sGsEl7k/SJrvY2reP1A07MrGuCjIOjRE= @@ -1277,6 +1332,7 @@ github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6e 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 v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= +github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8/go.mod h1:HUYIGzjTL3rfEspMxjDjgmT5uz5wzYJKVo23qUhYTos= 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= @@ -1287,6 +1343,9 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= +github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8= +github.com/zclconf/go-cty v1.4.0/go.mod h1:nHzOclRkoj++EU9ZjSrZvRG0BXIWt8c7loYc0qXAFGQ= +github.com/zclconf/go-cty v1.7.1/go.mod h1:VDR4+I79ubFBGm1uJac1226K5yANQFHeauxPBoP54+o= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= @@ -1370,8 +1429,10 @@ golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20191002192127-34f69633bfdc/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200128174031-69ecbb4d6d5d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200422194213-44a606286825/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -1424,6 +1485,7 @@ 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/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180811021610-c39426892332/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-20180911220305-26e67e76b6c3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1531,6 +1593,7 @@ golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190522044717-8097e1b27ff5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1817,10 +1880,13 @@ gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/dancannon/gorethink.v3 v3.0.5/go.mod h1:GXsi1e3N2OcKhcP6nsYABTiUejbWMFO4GY5a4pEaeEc= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fatih/pool.v2 v2.0.0/go.mod h1:8xVGeu1/2jr2wm5V9SPuMht2H5AEmf5aFMGSQixtjTY= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.0/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= +gopkg.in/gorethink/gorethink.v3 v3.0.5/go.mod h1:+3yIIHJUGMBK+wyPH+iN5TP+88ikFDfZdqTlK3Y9q8I= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.44.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= From 4a84f322800c50bd22b60d57f23f6b2768a43ac4 Mon Sep 17 00:00:00 2001 From: Solomon Hykes Date: Thu, 29 Jul 2021 10:13:37 +0000 Subject: [PATCH 04/41] Fix typos in docs Signed-off-by: Solomon Hykes --- docs/introduction/what_is.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/introduction/what_is.md b/docs/introduction/what_is.md index e738bdc5..57556f85 100644 --- a/docs/introduction/what_is.md +++ b/docs/introduction/what_is.md @@ -22,7 +22,7 @@ Dagger works by integrating all your tools and infrastructure into a unified gra Each node in your DAG represents an integration: for example a source repository, build script, artifact registry or deployment API. Each connection represents a flow of data between integrations: for example from source to build; from build to registry; etc. What makes Dagger special is how much of your existing stack it can integrate in the DAG (probably all of it); how much -of your existing data flows it can manage (probably all of them); and composable your DAG is (as much as regular software). +of your existing data flows it can manage (probably all of them); and how composable your DAG is (as much as regular software). ### Integrations From 9f90aca2b7288358ba710e1d508f2870891d04c8 Mon Sep 17 00:00:00 2001 From: Guillaume de Rouville Date: Thu, 29 Jul 2021 13:29:15 +0200 Subject: [PATCH 05/41] op.#Exec hack: improve performance by 100x on big configs Signed-off-by: Guillaume de Rouville --- environment/pipeline.go | 4 ++++ stdlib/dagger/op/op.cue | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/environment/pipeline.go b/environment/pipeline.go index d94507dd..ceea712f 100644 --- a/environment/pipeline.go +++ b/environment/pipeline.go @@ -512,6 +512,10 @@ func (p *Pipeline) mount(ctx context.Context, dest string, mnt *compiler.Value) } // eg. mount: "/foo": { from: www.source } + if !mnt.Lookup("from").Exists() { + return nil, fmt.Errorf("invalid mount: should have %s structure", + "{from: _, path: string | *\"/\"}") + } from := NewPipeline(mnt.Lookup("from"), p.s) if err := from.Run(ctx); err != nil { return nil, err diff --git a/stdlib/dagger/op/op.cue b/stdlib/dagger/op/op.cue index 9e492089..44c2f7dd 100644 --- a/stdlib/dagger/op/op.cue +++ b/stdlib/dagger/op/op.cue @@ -50,7 +50,13 @@ package op // `true` means also ignoring the mount cache volumes always?: true | *false dir: string | *"/" - mount: [string]: "tmpfs" | "cache" | {from: _, path: string | *"/"} | {secret: _} + // HACK: FIXME later [Performance related] + // mount: [string]: "tmpfs" | "cache" | {from: _, path: string | *"/"} | {secret: _} + // https://github.com/dagger/dagger/issues/856 + mount: [string]: { + _ + ... + } // Map of hostnames to ip hosts?: [string]: string // User to exec with (if left empty, will default to the set user in the image) From 6976e32290b98e9e6fe06bb68a14f958c5c6e9e5 Mon Sep 17 00:00:00 2001 From: Tom Chauveau Date: Thu, 29 Jul 2021 18:29:45 +0200 Subject: [PATCH 06/41] Fix typo in CONTRIBUTING.md Signed-off-by: Tom Chauveau --- CONTRIBUTING.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ec81c8ff..bda8cfd9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -29,7 +29,7 @@ git remote add fork git@github.com:MYFORK/dagger.git # create a branch git checkout -b mybranch -# make chances to your branch, use `git commit -s`, ... +# make changes to your branch, use `git commit -s`, ... # ... # push the branch to your own fork @@ -71,9 +71,8 @@ Guidelines: - Group Commits: Each commit should represent a meaningful change (e.g. implement feature X, fix bug Y, ...). -- For instance, a PR should not look like _1) Add Feature X 2) Fix Typo 3) Changes to features X 5) Bugfix for feature X 6) Fix Linter 7) ..._ -- Instead, these commits should be squashed together into a single "Add Feature" - commit. +- For instance, a PR should not look like _1) Add Feature X 2) Fix Typo 3) Changes to features X 5) Bugfix for feature X 6) Fix Linter 7) ..._
+ Instead, these commits should be squashed together into a single "Add Feature" commit. - Each commit should work on its own: it must compile, pass the linter and so on. - This makes life much easier when using `git log`, `git blame`, `git bisect`, etc. - For instance, when doing a `git blame` on a file to figure out why a change From cfcaaee39b12c851beed9bde4aef3fd0628d30ec Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 29 Jul 2021 19:15:24 +0000 Subject: [PATCH 07/41] build(deps): bump @docusaurus/core in /website Bumps [@docusaurus/core](https://github.com/facebook/docusaurus/tree/HEAD/packages/docusaurus) from 2.0.0-beta.2 to 2.0.0-beta.4. - [Release notes](https://github.com/facebook/docusaurus/releases) - [Changelog](https://github.com/facebook/docusaurus/blob/master/CHANGELOG.md) - [Commits](https://github.com/facebook/docusaurus/commits/v2.0.0-beta.4/packages/docusaurus) --- updated-dependencies: - dependency-name: "@docusaurus/core" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- website/package.json | 2 +- website/yarn.lock | 156 ++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 146 insertions(+), 12 deletions(-) diff --git a/website/package.json b/website/package.json index 96a5503d..c48bf2c1 100644 --- a/website/package.json +++ b/website/package.json @@ -16,7 +16,7 @@ "write-heading-ids": "docusaurus write-heading-ids" }, "dependencies": { - "@docusaurus/core": "2.0.0-beta.2", + "@docusaurus/core": "2.0.0-beta.4", "@docusaurus/preset-classic": "2.0.0-beta.2", "@mdx-js/react": "^1.6.21", "@svgr/webpack": "^5.5.0", diff --git a/website/yarn.lock b/website/yarn.lock index c74bb25a..402971e5 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -1262,6 +1262,90 @@ webpack-merge "^5.8.0" webpackbar "^5.0.0-3" +"@docusaurus/core@2.0.0-beta.4": + version "2.0.0-beta.4" + resolved "https://registry.yarnpkg.com/@docusaurus/core/-/core-2.0.0-beta.4.tgz#b41c5064c8737405cfceb1a373c9c5aa3410fd95" + integrity sha512-ITa976MPFl9KbYchMOWCCX6SU6EFDSdGeGOHtpaNcrJ9e9Sj7o77fKmMH/ciShwz1g8brTm3VxZ0FwleU8lTig== + dependencies: + "@babel/core" "^7.12.16" + "@babel/generator" "^7.12.15" + "@babel/plugin-syntax-dynamic-import" "^7.8.3" + "@babel/plugin-transform-runtime" "^7.12.15" + "@babel/preset-env" "^7.12.16" + "@babel/preset-react" "^7.12.13" + "@babel/preset-typescript" "^7.12.16" + "@babel/runtime" "^7.12.5" + "@babel/runtime-corejs3" "^7.12.13" + "@babel/traverse" "^7.12.13" + "@docusaurus/cssnano-preset" "2.0.0-beta.4" + "@docusaurus/react-loadable" "5.5.0" + "@docusaurus/types" "2.0.0-beta.4" + "@docusaurus/utils" "2.0.0-beta.4" + "@docusaurus/utils-common" "2.0.0-beta.4" + "@docusaurus/utils-validation" "2.0.0-beta.4" + "@slorber/static-site-generator-webpack-plugin" "^4.0.0" + "@svgr/webpack" "^5.5.0" + autoprefixer "^10.2.5" + babel-loader "^8.2.2" + babel-plugin-dynamic-import-node "2.3.0" + boxen "^5.0.1" + chalk "^4.1.1" + chokidar "^3.5.1" + clean-css "^5.1.2" + commander "^5.1.0" + copy-webpack-plugin "^9.0.0" + core-js "^3.9.1" + css-loader "^5.1.1" + css-minimizer-webpack-plugin "^3.0.1" + cssnano "^5.0.4" + del "^6.0.0" + detect-port "^1.3.0" + escape-html "^1.0.3" + eta "^1.12.1" + express "^4.17.1" + file-loader "^6.2.0" + fs-extra "^10.0.0" + github-slugger "^1.3.0" + globby "^11.0.2" + html-minifier-terser "^5.1.1" + html-tags "^3.1.0" + html-webpack-plugin "^5.3.2" + import-fresh "^3.3.0" + is-root "^2.1.0" + leven "^3.1.0" + lodash "^4.17.20" + mini-css-extract-plugin "^1.6.0" + module-alias "^2.2.2" + nprogress "^0.2.0" + postcss "^8.2.15" + postcss-loader "^5.3.0" + prompts "^2.4.1" + react-dev-utils "^11.0.1" + react-error-overlay "^6.0.9" + react-helmet "^6.1.0" + react-loadable "^5.5.0" + react-loadable-ssr-addon-v5-slorber "^1.0.1" + react-router "^5.2.0" + react-router-config "^5.1.1" + react-router-dom "^5.2.0" + resolve-pathname "^3.0.0" + rtl-detect "^1.0.3" + semver "^7.3.4" + serve-handler "^6.1.3" + shelljs "^0.8.4" + std-env "^2.2.1" + strip-ansi "^6.0.0" + terser-webpack-plugin "^5.1.3" + tslib "^2.2.0" + update-notifier "^5.1.0" + url-loader "^4.1.1" + wait-on "^5.3.0" + webpack "^5.40.0" + webpack-bundle-analyzer "^4.4.2" + webpack-dev-server "^3.11.2" + webpack-merge "^5.8.0" + webpackbar "^5.0.0-3" + "@docusaurus/cssnano-preset@2.0.0-beta.2": version "2.0.0-beta.2" resolved "https://registry.yarnpkg.com/@docusaurus/cssnano-preset/-/cssnano-preset-2.0.0-beta.2.tgz#2da6ef240c7842f9a56575c8e8c3293c6e857213" @@ -1271,6 +1355,15 @@ postcss "^8.2.15" postcss-sort-media-queries "^3.10.11" +"@docusaurus/cssnano-preset@2.0.0-beta.4": + version "2.0.0-beta.4" + resolved "https://registry.yarnpkg.com/@docusaurus/cssnano-preset/-/cssnano-preset-2.0.0-beta.4.tgz#a40c0bee39143a531ca4dde05bb3a84bec416668" + integrity sha512-KsmFEob0ElffnFFbz93wcYH4IncU4LDnKBerdomU0Wdg/vXTLo3Q7no8df9yjbcBXVRaSX+/tNFapY9Iu/4Cew== + dependencies: + cssnano-preset-advanced "^5.1.1" + postcss "^8.2.15" + postcss-sort-media-queries "^3.10.11" + "@docusaurus/mdx-loader@2.0.0-beta.2": version "2.0.0-beta.2" resolved "https://registry.yarnpkg.com/@docusaurus/mdx-loader/-/mdx-loader-2.0.0-beta.2.tgz#6bd42ea069bd0ba57fa0ab5b2b65357c9fa1e88f" @@ -1492,6 +1585,17 @@ webpack "^5.40.0" webpack-merge "^5.8.0" +"@docusaurus/types@2.0.0-beta.4": + version "2.0.0-beta.4" + resolved "https://registry.yarnpkg.com/@docusaurus/types/-/types-2.0.0-beta.4.tgz#9eef0a88b008ebd65bb9870b7ff0050de0e620c4" + integrity sha512-2aMCliUCBYhZO8UiiPIKpRu2KECtqt0nRu44EbN6rj1STf695AIOhJC1Zo5TiuW2WbiljSbkJTgG3XdBZ3FUBw== + dependencies: + commander "^5.1.0" + joi "^17.4.0" + querystring "0.2.0" + webpack "^5.40.0" + webpack-merge "^5.8.0" + "@docusaurus/utils-common@2.0.0-beta.2": version "2.0.0-beta.2" resolved "https://registry.yarnpkg.com/@docusaurus/utils-common/-/utils-common-2.0.0-beta.2.tgz#b3c7ab1bae138ce0c99963e2ff0f276c2a2a4108" @@ -1500,6 +1604,14 @@ "@docusaurus/types" "2.0.0-beta.2" tslib "^2.2.0" +"@docusaurus/utils-common@2.0.0-beta.4": + version "2.0.0-beta.4" + resolved "https://registry.yarnpkg.com/@docusaurus/utils-common/-/utils-common-2.0.0-beta.4.tgz#eb2e5876f5f79d037fa7e1867177658661b9c1c2" + integrity sha512-QaKs96/95ztKgZqHMUS/vNl+GzZ/6vKVEPjBXWt7Fdhg2soT1Iu4cShnibEO5HaVlwSfnJbVmDLVm8phQRdr0A== + dependencies: + "@docusaurus/types" "2.0.0-beta.4" + tslib "^2.2.0" + "@docusaurus/utils-validation@2.0.0-beta.2": version "2.0.0-beta.2" resolved "https://registry.yarnpkg.com/@docusaurus/utils-validation/-/utils-validation-2.0.0-beta.2.tgz#4254a0dfd91c5a1fe00cbd1f8e134d8cd5dd963d" @@ -1510,6 +1622,16 @@ joi "^17.4.0" tslib "^2.1.0" +"@docusaurus/utils-validation@2.0.0-beta.4": + version "2.0.0-beta.4" + resolved "https://registry.yarnpkg.com/@docusaurus/utils-validation/-/utils-validation-2.0.0-beta.4.tgz#417ff389d61aab4c6544f169e31bb86573b518df" + integrity sha512-t1sxSeyVU02NkcFhPvE7eQFA0CFUst68hTnie6ZS3ToY3nlzdbYRPOAZY5MPr3zRMwum6yFAXgqVA+5fnR0OGg== + dependencies: + "@docusaurus/utils" "2.0.0-beta.4" + chalk "^4.1.1" + joi "^17.4.0" + tslib "^2.1.0" + "@docusaurus/utils@2.0.0-beta.2": version "2.0.0-beta.2" resolved "https://registry.yarnpkg.com/@docusaurus/utils/-/utils-2.0.0-beta.2.tgz#7746b371d813ed3fc7928de3e524914c0abfd20c" @@ -1525,6 +1647,23 @@ resolve-pathname "^3.0.0" tslib "^2.2.0" +"@docusaurus/utils@2.0.0-beta.4": + version "2.0.0-beta.4" + resolved "https://registry.yarnpkg.com/@docusaurus/utils/-/utils-2.0.0-beta.4.tgz#6e572371b0a59360b49102d014579f5364f1d8da" + integrity sha512-6nI3ETBp0ZSt5yp5Fc5nthQjR1MmLgl2rXC3hcscrSUZx0QvzJFzTiRgD9EAIJtR/i2JkUK18eaFiBjMBoXEbQ== + dependencies: + "@docusaurus/types" "2.0.0-beta.4" + "@types/github-slugger" "^1.3.0" + chalk "^4.1.1" + escape-string-regexp "^4.0.0" + fs-extra "^10.0.0" + globby "^11.0.4" + gray-matter "^4.0.3" + lodash "^4.17.20" + micromatch "^4.0.4" + resolve-pathname "^3.0.0" + tslib "^2.2.0" + "@hapi/hoek@^9.0.0": version "9.2.0" resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-9.2.0.tgz#f3933a44e365864f4dad5db94158106d511e8131" @@ -4278,10 +4417,10 @@ globby@11.0.1: merge2 "^1.3.0" slash "^3.0.0" -globby@^11.0.1, globby@^11.0.2, globby@^11.0.3: - version "11.0.3" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.3.tgz#9b1f0cb523e171dd1ad8c7b2a9fb4b644b9593cb" - integrity sha512-ffdmosjA807y7+lA1NM0jELARVmYul/715xiILEjo3hBLPTcirgQNnXECn5g3mtR8TOLCVbkfua1Hpen25/Xcg== +globby@^11.0.1, globby@^11.0.2, globby@^11.0.3, globby@^11.0.4: + version "11.0.4" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.4.tgz#2cbaff77c2f2a62e71e9b2813a67b97a3a3001a5" + integrity sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg== dependencies: array-union "^2.1.0" dir-glob "^3.0.1" @@ -5665,7 +5804,7 @@ micromatch@^3.1.10, micromatch@^3.1.4: snapdragon "^0.8.1" to-regex "^3.0.2" -micromatch@^4.0.2: +micromatch@^4.0.2, micromatch@^4.0.4: version "4.0.4" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.4.tgz#896d519dfe9db25fce94ceb7a500919bf881ebf9" integrity sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg== @@ -8182,12 +8321,7 @@ tslib@^1.9.0, tslib@^1.9.3: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.0.3, tslib@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.2.0.tgz#fb2c475977e35e241311ede2693cee1ec6698f5c" - integrity sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w== - -tslib@^2.2.0: +tslib@^2.0.3, tslib@^2.1.0, tslib@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.0.tgz#803b8cdab3e12ba581a4ca41c8839bbb0dacb09e" integrity sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg== From c84f79b12a2d4a311ad5d530f6a429205199fcb7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 30 Jul 2021 19:23:04 +0000 Subject: [PATCH 08/41] build(deps): bump github.com/docker/buildx from 0.6.0 to 0.6.1 Bumps [github.com/docker/buildx](https://github.com/docker/buildx) from 0.6.0 to 0.6.1. - [Release notes](https://github.com/docker/buildx/releases) - [Commits](https://github.com/docker/buildx/compare/v0.6.0...v0.6.1) --- updated-dependencies: - dependency-name: github.com/docker/buildx dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 91a356fa..1b8c6613 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( filippo.io/age v1.0.0-rc.3 github.com/KromDaniel/jonson v0.0.0-20180630143114-d2f9c3c389db github.com/containerd/console v1.0.2 - github.com/docker/buildx v0.6.0 + github.com/docker/buildx v0.6.1 github.com/docker/distribution v2.7.1+incompatible github.com/emicklei/proto v1.9.0 // indirect github.com/go-git/go-git/v5 v5.4.2 diff --git a/go.sum b/go.sum index ff6e5168..1e6524ea 100644 --- a/go.sum +++ b/go.sum @@ -289,7 +289,7 @@ github.com/cockroachdb/apd/v2 v2.0.1 h1:y1Rh3tEU89D+7Tgbw+lp52T6p/GJLpDmNvr10UWq github.com/cockroachdb/apd/v2 v2.0.1/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/hdrhistogram v0.0.0-20160425231609-f8ad88b59a58/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/compose-spec/compose-go v0.0.0-20210706130854-69459d4976b5/go.mod h1:5V65rPnTvvQagtoMxTneJ2QicLq6ZRQQ7fOgPN226fo= +github.com/compose-spec/compose-go v0.0.0-20210729195839-de56f4f0cb3c/go.mod h1:5V65rPnTvvQagtoMxTneJ2QicLq6ZRQQ7fOgPN226fo= github.com/containerd/aufs v0.0.0-20200908144142-dab0cbea06f4/go.mod h1:nukgQABAEopAHvB6j7cnP5zJ+/3aVcE7hCYqvIwAHyE= github.com/containerd/aufs v0.0.0-20201003224125-76a6863f2989/go.mod h1:AkGGQs9NM2vtYHaUen+NljV0/baGCAPELGm2q9ZXpWU= github.com/containerd/aufs v0.0.0-20210316121734-20793ff83c97/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU= @@ -328,8 +328,9 @@ github.com/containerd/containerd v1.5.0-beta.4/go.mod h1:GmdgZd2zA2GYIBZ0w09Zvgq github.com/containerd/containerd v1.5.0-rc.0/go.mod h1:V/IXoMqNGgBlabz3tHD2TWDoTJseu1FGOKuoA4nNb2s= github.com/containerd/containerd v1.5.1/go.mod h1:0DOxVqwDy2iZvrZp2JUx/E+hS0UNTVn7dJnIOwtYR4g= github.com/containerd/containerd v1.5.2/go.mod h1:0DOxVqwDy2iZvrZp2JUx/E+hS0UNTVn7dJnIOwtYR4g= -github.com/containerd/containerd v1.5.3 h1:mfKOepNDIJ3EiBTEyHFpEqB6YSOSkGcjPDIu7cD+YzY= github.com/containerd/containerd v1.5.3/go.mod h1:sx18RgvW6ABJ4iYUw7Q5x7bgFOAB9B6G7+yO0XBc4zw= +github.com/containerd/containerd v1.5.4 h1:uPF0og3ByFzDnaStfiQj3fVGTEtaSNyU+bW7GR/nqGA= +github.com/containerd/containerd v1.5.4/go.mod h1:sx18RgvW6ABJ4iYUw7Q5x7bgFOAB9B6G7+yO0XBc4zw= github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= github.com/containerd/continuity v0.0.0-20191127005431-f65d91d395eb/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= @@ -432,8 +433,8 @@ github.com/dimchansky/utfbom v1.1.0 h1:FcM3g+nofKgUteL8dm/UpdRXNC9KmADgTpLKsu0TR github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= github.com/distribution/distribution/v3 v3.0.0-20210316161203-a01c71e2477e/go.mod h1:xpWTC2KnJMiDLkoawhsPQcXjvwATEBcbq0xevG2YR9M= github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= -github.com/docker/buildx v0.6.0 h1:UuJvtuK8SQX/7Y9i1fJR3Jq6kXBSFcSJtudlALu9iV8= -github.com/docker/buildx v0.6.0/go.mod h1:ue0mOStExTp8vSb1wrvbpL9VoL0e66EK9etSCCIhuFM= +github.com/docker/buildx v0.6.1 h1:NMWmVT2rs4/MZ1+l56LpCzkjRtPiLQy2LwHY6lS19AU= +github.com/docker/buildx v0.6.1/go.mod h1:7gkFFXWFWo+vfXMNijFRBO0KwEDITP10TUWty5ZJNz0= github.com/docker/cli v0.0.0-20190925022749-754388324470/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/cli v0.0.0-20191017083524-a8ff7f821017/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/cli v20.10.0-beta1.0.20201029214301-1d20b15adc38+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= From 3ace7f6bd22ccd6877dc0bf5402c6fc43f052021 Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Wed, 4 Aug 2021 16:44:01 +0200 Subject: [PATCH 09/41] docs: add the CI use case Signed-off-by: Andrea Luzzardi --- docs/use-cases/1012-ci.md | 203 +++++++++++++++++++++++++++++++++ docs/use-cases/_category_.json | 5 + 2 files changed, 208 insertions(+) create mode 100644 docs/use-cases/1012-ci.md create mode 100644 docs/use-cases/_category_.json diff --git a/docs/use-cases/1012-ci.md b/docs/use-cases/1012-ci.md new file mode 100644 index 00000000..8d4c3fd8 --- /dev/null +++ b/docs/use-cases/1012-ci.md @@ -0,0 +1,203 @@ +--- +slug: /1012/ci +--- + +# Continuous Integration + +Dagger is the perfect tool for CI workflows. + +## Benefits + +- **Develop and run your CI pipeline locally.** No need to create a Pull Request + to trigger CI, you can run the pipeline locally. Since dagger workflows + are containerized, you can expect the same results no matter where the pipeline + is executed. +- **Write once, Run anywhere.** The same pipeline can run in any CI, goodbye + vendor lock in. +- **Blazing Fast**: Dagger will automatically build an optimized execution + graph, completing the job as fast as possible. Spend less time staring at CI to + complete and reduce costs. +- **Effortless Cache Optimizations**. Dagger will automatically + re-use cached execution results if no changes are detected. Made a change to the + frontend? The backend won't be built again. +- **Composable & Reusable**. Define re-usable steps and [share](../learn/1010-dev-cue-package.md) them across all + your projects. Or with the world. Dagger + ships with [dozens of re-usable components](../reference/universe/README.md) + +## Example + +This example illustrates how to use Dagger to test and lint a Go project. The +use of Go is irrelevant and the example can be easily adapted to other languages. + +From the project repository, create a file named `ci/main.cue` and add the +following configuration to it. + +```cue title="ci/main.cue" +package main + +import ( + "alpha.dagger.io/dagger" + "alpha.dagger.io/os" + "alpha.dagger.io/docker" +) + +// Source directory of the repository. We'll connect this from the CLI using `dagger input` +source: dagger.#Artifact + +// Here we define a test phase. +// We're using `os.#Container`, a built-in package that will spawn a container +// We're also using `docker.#Pull` to execute the container from a Docker image +// comifrom a registry. +test: os.#Container & { + image: docker.#Pull & { + from: "golang:1.16-alpine" + } + mount: "/app": from: source + command: "go test -v ./..." + dir: "/app" +} + +// Likewise, here we define a lint phase. +lint: os.#Container & { + image: docker.#Pull & { + from: "golangci/golangci-lint:v1.39.0" + } + mount: "/app": from: source + command: "golangci-lint run -v" + dir: "/app" +} +``` + +The configuration above defines: + +- **source** code of the project. More on this later. +- **test** *task* which executes `go test` inside the source artifact + using the `golang` Docker image +- **lint** *task* which executes `golangci-lint` inside the source artifact + using the `golangci-lint` Docker image. + +Before we can execute the configuration, we need to set up the Dagger workspace and environment. + +```shell +# Initialize a dagger workspace at the root of your project +dagger init + +# Create a CI environment using the CUE files in the `./ci` directory +dagger new ci -p ./ci + +# Link the `source` artifact defined in the configuration with the project +# source code. +dagger input dir source . +``` + +Next, bring up the CI environment (e.g. execute the CI configuration): + +```shell +$ dagger up +# ... +7:15PM INF test | computing environment=ci +7:15PM INF lint | computing environment=ci +# ... +``` + +Since `test` and `lint` do not depend on each other, they are executed in +parallel. + +Running `dagger up` a second time will return almost immediately: since no +changes were made to `source`, Dagger will re-use the cached results for both `test` nor `lint`. + +## Integrating with CI + +All it takes to execute a Dagger workflow in CI is to run `dagger up`. + +We provide a [GitHub Actions](../learn/1009-github-actions.md) to make +integration with GitHub easier. + +## Monorepos + +Dagger workflows scale really well with CI complexity. + +The following example illustrates how to test two different projects in the same +repository: a *Node* frontend (located in *./frontend*) along with a *Go* backend (located in *./backend*). + +From the project repository, update the file named `ci/main.cue` with the +following configuration. + +```cue title="ci/main.cue" +package main + +import ( + "alpha.dagger.io/dagger" + "alpha.dagger.io/os" + "alpha.dagger.io/docker" +) + +// Source directory of the repository. We'll connect this from the CLI using `dagger input` +source: dagger.#Artifact + +backend: { + // We use `os.#Dir` to grab a sub-directory of `source` + code: os.#Dir & { + from: source + path: "." + } + + test: os.#Container & { + image: docker.#Pull & { + from: "golang:1.16-alpine" + } + mount: "/app": from: code + command: "go test -v ./..." + dir: "/app" + } +} + +frontend: { + // We use `os.#Dir` to grab a sub-directory of `source` + code: os.#Dir & { + from: source + path: "./frontend" + } + + test: os.#Container & { + image: docker.#Pull & { + from: "node:16-alpine" + } + mount: "/app": from: code + command: """ + # Install Dependencies + yarn + + # Run the test script + yarn test + """ + dir: "/app" + } +} +``` + +:::tip +Larger configurations can be split into multiple files, for example `backend.cue` and `frontend.cue` +::: + +The configuration above defines a *frontend* and *backend* structure, each +containing: + +- A **code** directory, defined as a subdirectory of **source** +- A language specific **test** task using either `yarn` or `go` + +```shell +$ dagger up +7:15PM INF frontend.test | computing environment=ci +7:15PM INF backend.test | computing environment=ci +7:15PM INF frontend.test | #8 0.370 yarn install v1.22.5 environment=ci +7:15PM INF frontend.test | #8 0.689 [1/4] Resolving packages... environment=ci +7:15PM INF frontend.test | #8 1.626 [2/4] Fetching packages... environment=ci +... +``` + +`frontend.test` and `backend.test` are running in parallel since there are no +dependencies between each other. + +If you were to make changes to the *./frontend* directory, only +`frontend.test` will be executed. diff --git a/docs/use-cases/_category_.json b/docs/use-cases/_category_.json new file mode 100644 index 00000000..4f3296a5 --- /dev/null +++ b/docs/use-cases/_category_.json @@ -0,0 +1,5 @@ +{ + "label": "Use Cases", + "position": 2, + "collapsed": false +} From db459ae04da9a384eeaba8907ae4ec0084b7bc80 Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Wed, 4 Aug 2021 16:56:52 +0200 Subject: [PATCH 10/41] os.#Container: inherit PATH from the container image Signed-off-by: Andrea Luzzardi --- stdlib/go/go.cue | 3 --- stdlib/os/container.cue | 15 --------------- 2 files changed, 18 deletions(-) diff --git a/stdlib/go/go.cue b/stdlib/go/go.cue index 423dd947..4928b7ee 100644 --- a/stdlib/go/go.cue +++ b/stdlib/go/go.cue @@ -34,9 +34,6 @@ import ( let cachePath = "/root/.cache/gocache" cache: "\(cachePath)": true env: GOMODCACHE: cachePath - - // Add go to search path (FIXME: should be inherited from image metadata) - shell: search: "/usr/local/go/bin": true } } diff --git a/stdlib/os/container.cue b/stdlib/os/container.cue index ede2ccbc..4e537205 100644 --- a/stdlib/os/container.cue +++ b/stdlib/os/container.cue @@ -1,8 +1,6 @@ package os import ( - "strings" - "alpha.dagger.io/dagger" "alpha.dagger.io/dagger/op" @@ -68,20 +66,7 @@ import ( path: string | *"/bin/sh" // Arguments to pass to the shell prior to the command args: [...string] | *["-c"] - // Map of directories to search for commands - // In POSIX shells this is used to generate the $PATH - // environment variable. - search: [string]: bool - search: { - "/sbin": true - "/bin": true - "/usr/sbin": true - "/usr/bin": true - "/usr/local/sbin": true - "/usr/local/bin": true - } } - env: PATH: string | *strings.Join([ for p, v in shell.search if v {p}], ":") #up: [ op.#Load & {from: image}, From 5cc1a0f84a9bbcef378e39c80b26296a590171ef Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Fri, 6 Aug 2021 15:08:12 +0200 Subject: [PATCH 11/41] ci: disable GHA cache for buildkit Signed-off-by: Andrea Luzzardi --- .github/workflows/ci.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0b9a7d2b..d469981b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -89,13 +89,7 @@ jobs: mkdir -p ~/.config/dagger echo "$DAGGER_AGE_KEY" > ~/.config/dagger/keys.txt - - name: Expose GitHub Runtime - uses: crazy-max/ghaction-github-runtime@v1 - - name: Integration test - env: - DAGGER_CACHE_TO: "type=gha,scope=integration" - DAGGER_CACHE_FROM: "type=gha,scope=integration" run: | env make core-integration @@ -123,12 +117,6 @@ jobs: mkdir -p ~/.config/dagger echo "$DAGGER_AGE_KEY" > ~/.config/dagger/keys.txt - - name: Expose GitHub Runtime - uses: crazy-max/ghaction-github-runtime@v1 - - name: Universe Test - env: - DAGGER_CACHE_TO: "type=gha,scope=universe" - DAGGER_CACHE_FROM: "type=gha,scope=universe" run: | make universe-test From ea14025e85ce735e98d30ba69a7eb90b536aa439 Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Fri, 6 Aug 2021 15:29:23 +0200 Subject: [PATCH 12/41] docs: collect feedback form Signed-off-by: Andrea Luzzardi --- website/docusaurus.config.js | 13 ++++-- .../plugins/docusaurus-plugin-hotjar/index.js | 46 +++++++++++++++++++ 2 files changed, 55 insertions(+), 4 deletions(-) create mode 100644 website/plugins/docusaurus-plugin-hotjar/index.js diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 174aa755..f055d3f8 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -30,6 +30,9 @@ module.exports = { apiKey: "b2324f1ac8932ab80916382521473115", indexName: "daggosaurus", }, + hotjar: { + siteId: "2541514", + }, colorMode: { // "light" | "dark" defaultMode: "light", @@ -40,7 +43,7 @@ module.exports = { }, }, gtag: { - trackingID: 'G-RDXG80F635', + trackingID: "G-RDXG80F635", anonymizeIP: true, }, }, @@ -63,10 +66,12 @@ module.exports = { plugins: [ "docusaurus-plugin-sass", [ - "docusaurus2-dotenv", { + "docusaurus2-dotenv", + { systemvars: true, expand: true, }, - ] + ], + path.resolve(__dirname, "plugins/docusaurus-plugin-hotjar"), ], -}; \ No newline at end of file +}; diff --git a/website/plugins/docusaurus-plugin-hotjar/index.js b/website/plugins/docusaurus-plugin-hotjar/index.js new file mode 100644 index 00000000..ee1dae89 --- /dev/null +++ b/website/plugins/docusaurus-plugin-hotjar/index.js @@ -0,0 +1,46 @@ +const path = require("path"); + +module.exports = function (context) { + const { siteConfig } = context; + const { themeConfig } = siteConfig; + const { hotjar } = themeConfig || {}; + + if (!hotjar) { + throw new Error( + `Create a 'hotjar' object containing a 'siteId' property in 'themeConfig'.` + ); + } + + const { siteId } = hotjar; + + if (!siteId) { + throw new Error( + "Error in `themeConfig`. `hotjar` object found but `siteId` prop is missing." + ); + } + + return { + name: "docusaurus-plugin-hotjar", + + injectHtmlTags() { + return { + headTags: [ + { + tagName: "script", + innerHTML: ` + + (function(h,o,t,j,a,r){ + h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)}; + h._hjSettings={hjid:${siteId},hjsv:6}; + a=o.getElementsByTagName('head')[0]; + r=o.createElement('script');r.async=1; + r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv; + a.appendChild(r); + })(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv='); + `, + }, + ], + }; + }, + }; +}; From 2b5e789b899f53883ec6d0f3e44bb6d55a7b480c Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Fri, 6 Aug 2021 15:39:54 +0200 Subject: [PATCH 13/41] docs: hotjar Signed-off-by: Andrea Luzzardi --- website/src/theme/DocPage/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/website/src/theme/DocPage/index.js b/website/src/theme/DocPage/index.js index 506b7ffc..40d08637 100644 --- a/website/src/theme/DocPage/index.js +++ b/website/src/theme/DocPage/index.js @@ -170,6 +170,10 @@ function DocPage(props) { apiEndpoint: `${window.location.hostname}/t` }); amplitude.getInstance().logEvent('Docs Viewed', { "hostname": window.location.hostname, "path": location.pathname }); + + if (window?.hj) { + window.hj("identify", userAccessStatus?.login.toLowerCase(), {}); + } } }) }, [location.pathname, userAccessStatus]) From 31d36e529325c2f91a91ff5d183b981f1e77b9a3 Mon Sep 17 00:00:00 2001 From: jffarge Date: Mon, 9 Aug 2021 11:54:28 +0200 Subject: [PATCH 14/41] fix: :bug: display target blank icon only for sidebar menu Signed-off-by: jffarge --- website/src/css/custom.scss | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/src/css/custom.scss b/website/src/css/custom.scss index 17170f8b..bd962faa 100644 --- a/website/src/css/custom.scss +++ b/website/src/css/custom.scss @@ -129,15 +129,15 @@ p { line-height: 24px; } -a[target="_blank"]:not(.edit-this-page) { +a.menu__link[target="_blank"] { svg { display: none; } - &:after { + &:after { background: var(--ifm-color-primary-darker); mask: url("/img/Dagger_Icons_External-link.svg") no-repeat; position: absolute; - content:''; + content: ""; right: var(--ifm-menu-link-padding-horizontal); top: var(--ifm-menu-link-padding-vertical); height: 1.25rem; From 22095554a9d2d5e52453d0f6bebfd2f2ec7ebec7 Mon Sep 17 00:00:00 2001 From: jffarge Date: Tue, 10 Aug 2021 15:16:08 +0200 Subject: [PATCH 15/41] docs: :memo: change menu order Signed-off-by: jffarge --- docs/learn/_category_.json | 2 +- docs/use-cases/_category_.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/learn/_category_.json b/docs/learn/_category_.json index 3ac3d109..23ba8b53 100644 --- a/docs/learn/_category_.json +++ b/docs/learn/_category_.json @@ -1,5 +1,5 @@ { "label": "Learn Dagger", - "position": 3, + "position": 2, "collapsed": false } diff --git a/docs/use-cases/_category_.json b/docs/use-cases/_category_.json index 4f3296a5..0a1635c2 100644 --- a/docs/use-cases/_category_.json +++ b/docs/use-cases/_category_.json @@ -1,5 +1,5 @@ { "label": "Use Cases", - "position": 2, + "position": 3, "collapsed": false } From 8d8a108a759248d7ba49374a81dfb5549429929f Mon Sep 17 00:00:00 2001 From: jffarge Date: Tue, 10 Aug 2021 16:40:28 +0200 Subject: [PATCH 16/41] docs: :alien: change algolia apikey + add conf file Signed-off-by: jffarge --- website/docsearch.config.json | 39 +++++++++++++++++++++++++++++++++++ website/docusaurus.config.js | 4 ++-- 2 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 website/docsearch.config.json diff --git a/website/docsearch.config.json b/website/docsearch.config.json new file mode 100644 index 00000000..3b083b8a --- /dev/null +++ b/website/docsearch.config.json @@ -0,0 +1,39 @@ +{ + "index_name": "Dagger_docs", + "start_urls": ["https://docs.dagger.io/", "https://devel.docs.dagger.io/"], + "sitemap_urls": [ + "https://docs.dagger.io/sitemap.xml", + "https://devel.docs.dagger.io/sitemap.xml" + ], + "sitemap_alternate_links": true, + "stop_urls": [], + "selectors": { + "lvl0": { + "selector": "(//ul[contains(@class,'menu__list')]//a[contains(@class, 'menu__link menu__link--sublist menu__link--active')]/text() | //nav[contains(@class, 'navbar')]//a[contains(@class, 'navbar__link--active')]/text())[last()]", + "type": "xpath", + "global": true, + "default_value": "Documentation" + }, + "lvl1": "header h1", + "lvl2": "article h2", + "lvl3": "article h3", + "lvl4": "article h4", + "lvl5": "article h5, article td:first-child", + "text": "article p, article li, article td:last-child" + }, + "strip_chars": " .,;:#", + "custom_settings": { + "separatorsToIndex": "_", + "attributesForFaceting": ["language", "version", "type", "docusaurus_tag"], + "attributesToRetrieve": [ + "hierarchy", + "content", + "anchor", + "url", + "url_without_anchor", + "type" + ] + }, + "conversation_id": ["1531673588"], + "nb_hits": 128 +} diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index f055d3f8..40bdfd25 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -27,8 +27,8 @@ module.exports = { }, }, algolia: { - apiKey: "b2324f1ac8932ab80916382521473115", - indexName: "daggosaurus", + apiKey: "d2ccc43b51a4b3b1a66b4b4c70ae6069", + indexName: "Dagger_docs", }, hotjar: { siteId: "2541514", From 5908aa628eaebbd078b4ef159031d5e1214dc86f Mon Sep 17 00:00:00 2001 From: Sujay Pillai Date: Wed, 11 Aug 2021 01:20:16 +0800 Subject: [PATCH 17/41] Adding support for azure and create a resource group Signed-off-by: Sujay Pillai --- docs/reference/universe/README.md | 2 + docs/reference/universe/azure/README.md | 45 +++++++++++++++++++ .../reference/universe/azure/resourcegroup.md | 34 ++++++++++++++ .../azure-resourcegroup/cue.mod/module.cue | 1 + .../cue.mod/pkg/.gitignore | 2 + stdlib/.dagger/env/azure-resourcegroup/rg.cue | 17 +++++++ stdlib/azure/azure.cue | 44 ++++++++++++++++++ stdlib/azure/resourcegroup/rg.cue | 42 +++++++++++++++++ stdlib/azure/resourcegroup/tests/rg.cue | 17 +++++++ stdlib/universe.bats | 4 ++ 10 files changed, 208 insertions(+) create mode 100644 docs/reference/universe/azure/README.md create mode 100644 docs/reference/universe/azure/resourcegroup.md create mode 100644 stdlib/.dagger/env/azure-resourcegroup/cue.mod/module.cue create mode 100644 stdlib/.dagger/env/azure-resourcegroup/cue.mod/pkg/.gitignore create mode 100644 stdlib/.dagger/env/azure-resourcegroup/rg.cue create mode 100644 stdlib/azure/azure.cue create mode 100644 stdlib/azure/resourcegroup/rg.cue create mode 100644 stdlib/azure/resourcegroup/tests/rg.cue diff --git a/docs/reference/universe/README.md b/docs/reference/universe/README.md index c0458a15..f6657b91 100644 --- a/docs/reference/universe/README.md +++ b/docs/reference/universe/README.md @@ -9,6 +9,8 @@ - [aws/elb](./aws/elb.md) - AWS Elastic Load Balancer (ELBv2) - [aws/rds](./aws/rds.md) - AWS Relational Database Service (RDS) - [aws/s3](./aws/s3.md) - AWS Simple Storage Service +- [azure](./azure/README.md) - Azure base package +- [azure/resourcegroup](./azure/resourcegroup.md) - - - [dagger](./dagger/README.md) - Dagger core types - [dagger/op](./dagger/op.md) - op: low-level operations for Dagger processing pipelines - [docker](./docker/README.md) - Docker container operations diff --git a/docs/reference/universe/azure/README.md b/docs/reference/universe/azure/README.md new file mode 100644 index 00000000..5b54802d --- /dev/null +++ b/docs/reference/universe/azure/README.md @@ -0,0 +1,45 @@ +--- +sidebar_label: azure +--- + +# alpha.dagger.io/azure + +Azure base package + +```cue +import "alpha.dagger.io/azure" +``` + +## azure.#CLI + +Azure Cli to be used by all Azure packages + +### azure.#CLI Inputs + +| Name | Type | Description | +| ------------- |:-------------: |:-------------: | +|*config.tenantId* | `dagger.#Secret` |AZURE tenant id | +|*config.subscriptionId* | `dagger.#Secret` |AZURE subscription id | +|*config.appId* | `dagger.#Secret` |AZURE app id for the service principal used | +|*config.password* | `dagger.#Secret` |AZURE password for the service principal used | + +### azure.#CLI Outputs + +_No output._ + +## azure.#Config + +Azure Config shared by all Azure packages + +### azure.#Config Inputs + +| Name | Type | Description | +| ------------- |:-------------: |:-------------: | +|*tenantId* | `dagger.#Secret` |AZURE tenant id | +|*subscriptionId* | `dagger.#Secret` |AZURE subscription id | +|*appId* | `dagger.#Secret` |AZURE app id for the service principal used | +|*password* | `dagger.#Secret` |AZURE password for the service principal used | + +### azure.#Config Outputs + +_No output._ diff --git a/docs/reference/universe/azure/resourcegroup.md b/docs/reference/universe/azure/resourcegroup.md new file mode 100644 index 00000000..e6a9b670 --- /dev/null +++ b/docs/reference/universe/azure/resourcegroup.md @@ -0,0 +1,34 @@ +--- +sidebar_label: resourcegroup +--- + +# alpha.dagger.io/azure/resourcegroup + +```cue +import "alpha.dagger.io/azure/resourcegroup" +``` + +## resourcegroup.#ResourceGroup + +Create a resource group + +### resourcegroup.#ResourceGroup Inputs + +| Name | Type | Description | +| ------------- |:-------------: |:-------------: | +|*config.tenantId* | `dagger.#Secret` |AZURE tenant id | +|*config.subscriptionId* | `dagger.#Secret` |AZURE subscription id | +|*config.appId* | `dagger.#Secret` |AZURE app id for the service principal used | +|*config.password* | `dagger.#Secret` |AZURE password for the service principal used | +|*rgName* | `string` |ResourceGroup name | +|*rgLocation* | `string` |ResourceGroup location | +|*ctr.image.config.tenantId* | `dagger.#Secret` |AZURE tenant id | +|*ctr.image.config.subscriptionId* | `dagger.#Secret` |AZURE subscription id | +|*ctr.image.config.appId* | `dagger.#Secret` |AZURE app id for the service principal used | +|*ctr.image.config.password* | `dagger.#Secret` |AZURE password for the service principal used | + +### resourcegroup.#ResourceGroup Outputs + +| Name | Type | Description | +| ------------- |:-------------: |:-------------: | +|*id* | `string` |Resource Id | diff --git a/stdlib/.dagger/env/azure-resourcegroup/cue.mod/module.cue b/stdlib/.dagger/env/azure-resourcegroup/cue.mod/module.cue new file mode 100644 index 00000000..f8af9cef --- /dev/null +++ b/stdlib/.dagger/env/azure-resourcegroup/cue.mod/module.cue @@ -0,0 +1 @@ +module: "" diff --git a/stdlib/.dagger/env/azure-resourcegroup/cue.mod/pkg/.gitignore b/stdlib/.dagger/env/azure-resourcegroup/cue.mod/pkg/.gitignore new file mode 100644 index 00000000..a572e9ee --- /dev/null +++ b/stdlib/.dagger/env/azure-resourcegroup/cue.mod/pkg/.gitignore @@ -0,0 +1,2 @@ +# dagger universe +alpha.dagger.io diff --git a/stdlib/.dagger/env/azure-resourcegroup/rg.cue b/stdlib/.dagger/env/azure-resourcegroup/rg.cue new file mode 100644 index 00000000..86b07df6 --- /dev/null +++ b/stdlib/.dagger/env/azure-resourcegroup/rg.cue @@ -0,0 +1,17 @@ +package rg + +import ( + "alpha.dagger.io/azure" + "alpha.dagger.io/azure/resourcegroup" + "alpha.dagger.io/random" +) + +suffix: random.#String & { + seed: "azrg" +} + +rg: resourcegroup.#ResourceGroup & { + config: azure.#Config + rgName: "rg-test-\(suffix.out)" + rgLocation: "eastus2" +} diff --git a/stdlib/azure/azure.cue b/stdlib/azure/azure.cue new file mode 100644 index 00000000..23429454 --- /dev/null +++ b/stdlib/azure/azure.cue @@ -0,0 +1,44 @@ +// Azure base package +package azure + +import ( + "alpha.dagger.io/dagger" + "alpha.dagger.io/dagger/op" +) + +//Azure Config shared by all Azure packages +#Config: { + // AZURE tenant id + tenantId: dagger.#Secret @dagger(input) + // AZURE subscription id + subscriptionId: dagger.#Secret @dagger(input) + // AZURE app id for the service principal used + appId: dagger.#Secret @dagger(input) + // AZURE password for the service principal used + password: dagger.#Secret @dagger(input) +} + +// Azure Cli to be used by all Azure packages +#CLI: { + // Azure Config + config: #Config + + #up: [ + op.#FetchContainer & { + ref: "mcr.microsoft.com/azure-cli" + }, + + op.#Exec & { + args: ["sh", "-c", + #""" + az login --service-principal -u "$(cat /run/secrets/appId)" -p "$(cat /run/secrets/password)" -t "$(cat /run/secrets/tenantId)" + az account set -s "$(cat /run/secrets/subscriptionId)" + """#, + ] + mount: "/run/secrets/appId": secret: config.appId + mount: "/run/secrets/password": secret: config.password + mount: "/run/secrets/tenantId": secret: config.tenantId + mount: "/run/secrets/subscriptionId": secret: config.subscriptionId + }, + ] +} diff --git a/stdlib/azure/resourcegroup/rg.cue b/stdlib/azure/resourcegroup/rg.cue new file mode 100644 index 00000000..26a3ae96 --- /dev/null +++ b/stdlib/azure/resourcegroup/rg.cue @@ -0,0 +1,42 @@ +package resourcegroup + +import ( + "alpha.dagger.io/os" + "alpha.dagger.io/azure" +) + +// Create a resource group +#ResourceGroup: { + // Azure Config + config: azure.#Config + + // ResourceGroup name + rgName: string @dagger(input) + + // ResourceGroup location + rgLocation: string @dagger(input) + + // Container image + ctr: os.#Container & { + image: azure.#CLI & { + "config": config + } + // Path of the shell to execute + shell: path: "/bin/bash" + + always: true + + command: """ + az group create -l "\(rgLocation)" -n "\(rgName)" + az group show -n "\(rgName)" --query "id" -o json | jq -r . | tr -d "\n" > /resourceGroupId + """ + } + + // Resource Id + id: { + os.#File & { + from: ctr + path: "/resourceGroupId" + } + }.contents @dagger(output) +} diff --git a/stdlib/azure/resourcegroup/tests/rg.cue b/stdlib/azure/resourcegroup/tests/rg.cue new file mode 100644 index 00000000..ac5aaca8 --- /dev/null +++ b/stdlib/azure/resourcegroup/tests/rg.cue @@ -0,0 +1,17 @@ +package resourcegroup + +import ( + "alpha.dagger.io/azure" + "alpha.dagger.io/azure/resourcegroup" + "alpha.dagger.io/random" +) + +suffix: random.#String & { + seed: "azrg" +} + +rg: resourcegroup.#ResourceGroup & { + config: azure.#Config + rgName: "rg-test-\(suffix.out)" + rgLocation: "eastus2" +} diff --git a/stdlib/universe.bats b/stdlib/universe.bats index 79a0e680..54de3063 100644 --- a/stdlib/universe.bats +++ b/stdlib/universe.bats @@ -184,3 +184,7 @@ setup() { run dagger -w "$DAGGER_SANDBOX" -e terraform input unset TestTerraform.apply.tfvars.input assert_success } + +# @test "azure-resourcegroup" { +# dagger -e azure-resourcegroup up +# } \ No newline at end of file From d30b729b0c3a8a5d6563e85c825deab30000db86 Mon Sep 17 00:00:00 2001 From: jffarge Date: Tue, 10 Aug 2021 23:47:31 +0200 Subject: [PATCH 18/41] docs: :alien: add algolia app ID Signed-off-by: jffarge --- website/docusaurus.config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 40bdfd25..e2cb8b3f 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -29,6 +29,7 @@ module.exports = { algolia: { apiKey: "d2ccc43b51a4b3b1a66b4b4c70ae6069", indexName: "Dagger_docs", + appId: 'XSSC1LRN4S', }, hotjar: { siteId: "2541514", From e9f829d99d1905ed399dec8681dea1a26fcb6eb4 Mon Sep 17 00:00:00 2001 From: jffarge Date: Tue, 10 Aug 2021 23:52:15 +0200 Subject: [PATCH 19/41] docs: Signed-off-by: jffarge --- website/docusaurus.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index e2cb8b3f..92290006 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -27,7 +27,7 @@ module.exports = { }, }, algolia: { - apiKey: "d2ccc43b51a4b3b1a66b4b4c70ae6069", + apiKey: "559dcddb4378b889baa48352394616ec", indexName: "Dagger_docs", appId: 'XSSC1LRN4S', }, From bdd6b5a56eccf60da05157fbbdee7c949dbac045 Mon Sep 17 00:00:00 2001 From: Guillaume de Rouville Date: Wed, 11 Aug 2021 15:16:56 +0200 Subject: [PATCH 20/41] Port azure.#CLI from `up` to `os.#Container` + manual testing + integrate bats test Signed-off-by: Guillaume de Rouville --- docs/reference/universe/azure/README.md | 13 +++---- .../reference/universe/azure/resourcegroup.md | 25 ++++++------- .../env/azure-resourcegroup/.gitignore | 2 ++ .../azure-resourcegroup/cue.mod/module.cue | 1 - .../cue.mod/pkg/.gitignore | 2 -- stdlib/.dagger/env/azure-resourcegroup/rg.cue | 17 --------- .../env/azure-resourcegroup/values.yaml | 23 ++++++++++++ stdlib/azure/azure.cue | 36 +++++++++---------- stdlib/azure/resourcegroup/rg.cue | 5 +-- stdlib/universe.bats | 7 ++-- 10 files changed, 68 insertions(+), 63 deletions(-) create mode 100644 stdlib/.dagger/env/azure-resourcegroup/.gitignore delete mode 100644 stdlib/.dagger/env/azure-resourcegroup/cue.mod/module.cue delete mode 100644 stdlib/.dagger/env/azure-resourcegroup/cue.mod/pkg/.gitignore delete mode 100644 stdlib/.dagger/env/azure-resourcegroup/rg.cue create mode 100644 stdlib/.dagger/env/azure-resourcegroup/values.yaml diff --git a/docs/reference/universe/azure/README.md b/docs/reference/universe/azure/README.md index 5b54802d..1f2e288d 100644 --- a/docs/reference/universe/azure/README.md +++ b/docs/reference/universe/azure/README.md @@ -16,12 +16,13 @@ Azure Cli to be used by all Azure packages ### azure.#CLI Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*config.tenantId* | `dagger.#Secret` |AZURE tenant id | -|*config.subscriptionId* | `dagger.#Secret` |AZURE subscription id | -|*config.appId* | `dagger.#Secret` |AZURE app id for the service principal used | -|*config.password* | `dagger.#Secret` |AZURE password for the service principal used | +| Name | Type | Description | +| ------------- |:-------------: |:-------------: | +|*config.tenantId* | `dagger.#Secret` |AZURE tenant id | +|*config.subscriptionId* | `dagger.#Secret` |AZURE subscription id | +|*config.appId* | `dagger.#Secret` |AZURE app id for the service principal used | +|*config.password* | `dagger.#Secret` |AZURE password for the service principal used | +|*image.from* | `"mcr.microsoft.com/azure-cli"` |Remote ref (example: "index.docker.io/alpine:latest") | ### azure.#CLI Outputs diff --git a/docs/reference/universe/azure/resourcegroup.md b/docs/reference/universe/azure/resourcegroup.md index e6a9b670..9de772be 100644 --- a/docs/reference/universe/azure/resourcegroup.md +++ b/docs/reference/universe/azure/resourcegroup.md @@ -14,18 +14,19 @@ Create a resource group ### resourcegroup.#ResourceGroup Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*config.tenantId* | `dagger.#Secret` |AZURE tenant id | -|*config.subscriptionId* | `dagger.#Secret` |AZURE subscription id | -|*config.appId* | `dagger.#Secret` |AZURE app id for the service principal used | -|*config.password* | `dagger.#Secret` |AZURE password for the service principal used | -|*rgName* | `string` |ResourceGroup name | -|*rgLocation* | `string` |ResourceGroup location | -|*ctr.image.config.tenantId* | `dagger.#Secret` |AZURE tenant id | -|*ctr.image.config.subscriptionId* | `dagger.#Secret` |AZURE subscription id | -|*ctr.image.config.appId* | `dagger.#Secret` |AZURE app id for the service principal used | -|*ctr.image.config.password* | `dagger.#Secret` |AZURE password for the service principal used | +| Name | Type | Description | +| ------------- |:-------------: |:-------------: | +|*config.tenantId* | `dagger.#Secret` |AZURE tenant id | +|*config.subscriptionId* | `dagger.#Secret` |AZURE subscription id | +|*config.appId* | `dagger.#Secret` |AZURE app id for the service principal used | +|*config.password* | `dagger.#Secret` |AZURE password for the service principal used | +|*rgName* | `string` |ResourceGroup name | +|*rgLocation* | `string` |ResourceGroup location | +|*ctr.image.config.tenantId* | `dagger.#Secret` |AZURE tenant id | +|*ctr.image.config.subscriptionId* | `dagger.#Secret` |AZURE subscription id | +|*ctr.image.config.appId* | `dagger.#Secret` |AZURE app id for the service principal used | +|*ctr.image.config.password* | `dagger.#Secret` |AZURE password for the service principal used | +|*ctr.image.image.from* | `"mcr.microsoft.com/azure-cli"` |Remote ref (example: "index.docker.io/alpine:latest") | ### resourcegroup.#ResourceGroup Outputs diff --git a/stdlib/.dagger/env/azure-resourcegroup/.gitignore b/stdlib/.dagger/env/azure-resourcegroup/.gitignore new file mode 100644 index 00000000..01ec19b0 --- /dev/null +++ b/stdlib/.dagger/env/azure-resourcegroup/.gitignore @@ -0,0 +1,2 @@ +# dagger state +state/** diff --git a/stdlib/.dagger/env/azure-resourcegroup/cue.mod/module.cue b/stdlib/.dagger/env/azure-resourcegroup/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/stdlib/.dagger/env/azure-resourcegroup/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/stdlib/.dagger/env/azure-resourcegroup/cue.mod/pkg/.gitignore b/stdlib/.dagger/env/azure-resourcegroup/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/stdlib/.dagger/env/azure-resourcegroup/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/stdlib/.dagger/env/azure-resourcegroup/rg.cue b/stdlib/.dagger/env/azure-resourcegroup/rg.cue deleted file mode 100644 index 86b07df6..00000000 --- a/stdlib/.dagger/env/azure-resourcegroup/rg.cue +++ /dev/null @@ -1,17 +0,0 @@ -package rg - -import ( - "alpha.dagger.io/azure" - "alpha.dagger.io/azure/resourcegroup" - "alpha.dagger.io/random" -) - -suffix: random.#String & { - seed: "azrg" -} - -rg: resourcegroup.#ResourceGroup & { - config: azure.#Config - rgName: "rg-test-\(suffix.out)" - rgLocation: "eastus2" -} diff --git a/stdlib/.dagger/env/azure-resourcegroup/values.yaml b/stdlib/.dagger/env/azure-resourcegroup/values.yaml new file mode 100644 index 00000000..8edd915a --- /dev/null +++ b/stdlib/.dagger/env/azure-resourcegroup/values.yaml @@ -0,0 +1,23 @@ +plan: + package: ./azure/resourcegroup/tests +name: azure-resourcegroup +sops: + kms: [] + gcp_kms: [] + azure_kv: [] + hc_vault: [] + age: + - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk + enc: | + -----BEGIN AGE ENCRYPTED FILE----- + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAwcVNxbzdlRHczM3hoSlFB + OCtid2ZyNDZsMmRYeXRJM0hmY09rUWFjanpFClNjUnFXT09yb3BJMmJKNXN1MUIw + eTNIcmZKTG5YR0h6a0UxL0lIeFRBQkEKLS0tIHk4TFRYZkdmVGFWM3lWQ0pwcmx1 + TWlwSE9KTFlod21qbm5jQUdsZXVTT3cK7HMCg+rmRPy3d+uihLMPg7SvxVI7Xyr5 + Jv6BZJovEyX8PaB/dozzCwGMsGB4fALG2TRNbgskjR0LTGUgzv+yhQ== + -----END AGE ENCRYPTED FILE----- + lastmodified: "2021-08-11T13:13:45Z" + mac: ENC[AES256_GCM,data:lldSGzZoJV4V56chs0Iue+gCBqvwViRY4ZeY4MajyeNBTH6i/k3YXGEZ1lI4suXLyf4BABILMQz0Y34G9oPk8cBWgPx4ZP0iCpvVa/H06xVkBVfntym7p/GWkNsOGiU3KpdGwD/0LLdjDOmL3vKbxNrpS7RvvTgQQtI4+jXtKEc=,iv:vB6P7SPT77ZOEAjTyOO6oSWRWUUWTrC4ekgT5kXvofQ=,tag:ucfzyP9V6HIfIlI8pMDROg==,type:str] + pgp: [] + encrypted_suffix: secret + version: 3.7.1 diff --git a/stdlib/azure/azure.cue b/stdlib/azure/azure.cue index 23429454..e7cffd71 100644 --- a/stdlib/azure/azure.cue +++ b/stdlib/azure/azure.cue @@ -3,7 +3,8 @@ package azure import ( "alpha.dagger.io/dagger" - "alpha.dagger.io/dagger/op" + "alpha.dagger.io/docker" + "alpha.dagger.io/os" ) //Azure Config shared by all Azure packages @@ -23,22 +24,21 @@ import ( // Azure Config config: #Config - #up: [ - op.#FetchContainer & { - ref: "mcr.microsoft.com/azure-cli" - }, + // Container image + os.#Container & { + image: docker.#Pull & { + from: "mcr.microsoft.com/azure-cli" + } + always: true - op.#Exec & { - args: ["sh", "-c", - #""" - az login --service-principal -u "$(cat /run/secrets/appId)" -p "$(cat /run/secrets/password)" -t "$(cat /run/secrets/tenantId)" - az account set -s "$(cat /run/secrets/subscriptionId)" - """#, - ] - mount: "/run/secrets/appId": secret: config.appId - mount: "/run/secrets/password": secret: config.password - mount: "/run/secrets/tenantId": secret: config.tenantId - mount: "/run/secrets/subscriptionId": secret: config.subscriptionId - }, - ] + command: """ + az login --service-principal -u "$(cat /run/secrets/appId)" -p "$(cat /run/secrets/password)" -t "$(cat /run/secrets/tenantId)" + az account set -s "$(cat /run/secrets/subscriptionId)" + """ + + secret: "/run/secrets/appId": config.appId + secret: "/run/secrets/password": config.password + secret: "/run/secrets/tenantId": config.tenantId + secret: "/run/secrets/subscriptionId": config.subscriptionId + } } diff --git a/stdlib/azure/resourcegroup/rg.cue b/stdlib/azure/resourcegroup/rg.cue index 26a3ae96..0099ca6a 100644 --- a/stdlib/azure/resourcegroup/rg.cue +++ b/stdlib/azure/resourcegroup/rg.cue @@ -1,8 +1,8 @@ package resourcegroup import ( - "alpha.dagger.io/os" "alpha.dagger.io/azure" + "alpha.dagger.io/os" ) // Create a resource group @@ -21,9 +21,6 @@ import ( image: azure.#CLI & { "config": config } - // Path of the shell to execute - shell: path: "/bin/bash" - always: true command: """ diff --git a/stdlib/universe.bats b/stdlib/universe.bats index 54de3063..02760c06 100644 --- a/stdlib/universe.bats +++ b/stdlib/universe.bats @@ -185,6 +185,7 @@ setup() { assert_success } -# @test "azure-resourcegroup" { -# dagger -e azure-resourcegroup up -# } \ No newline at end of file +@test "azure-resourcegroup" { + skip "Azure CI infra not implemented yet - manually tested and working" + #dagger -e azure-resourcegroup up +} \ No newline at end of file From d74753bca71c1e0796696fb2dd83869d71cbf7da Mon Sep 17 00:00:00 2001 From: Sujay Pillai Date: Thu, 12 Aug 2021 01:37:17 +0800 Subject: [PATCH 21/41] Amending changes from @TomChv Signed-off-by: Sujay Pillai --- stdlib/azure/azure.cue | 29 ++++++++++++++++--------- stdlib/azure/resourcegroup/rg.cue | 21 +++++++++++++----- stdlib/azure/resourcegroup/tests/rg.cue | 6 ++--- 3 files changed, 37 insertions(+), 19 deletions(-) diff --git a/stdlib/azure/azure.cue b/stdlib/azure/azure.cue index e7cffd71..53948ffd 100644 --- a/stdlib/azure/azure.cue +++ b/stdlib/azure/azure.cue @@ -7,16 +7,19 @@ import ( "alpha.dagger.io/os" ) +// Default Azure CLI version +let defaultVersion = "2.27.1@sha256:1e117183100c9fce099ebdc189d73e506e7b02d2b73d767d3fc07caee72f9fb1" + //Azure Config shared by all Azure packages #Config: { // AZURE tenant id - tenantId: dagger.#Secret @dagger(input) + tenantId: dagger.#Secret & dagger.#Input // AZURE subscription id - subscriptionId: dagger.#Secret @dagger(input) + subscriptionId: dagger.#Secret & dagger.#Input // AZURE app id for the service principal used - appId: dagger.#Secret @dagger(input) + appId: dagger.#Secret & dagger.#Input // AZURE password for the service principal used - password: dagger.#Secret @dagger(input) + password: dagger.#Secret & dagger.#Input } // Azure Cli to be used by all Azure packages @@ -24,21 +27,27 @@ import ( // Azure Config config: #Config + // Azure CLI version to install + version: string | *defaultVersion + // Container image os.#Container & { image: docker.#Pull & { - from: "mcr.microsoft.com/azure-cli" + from: "mcr.microsoft.com/azure-cli:\(version)" } + always: true command: """ az login --service-principal -u "$(cat /run/secrets/appId)" -p "$(cat /run/secrets/password)" -t "$(cat /run/secrets/tenantId)" az account set -s "$(cat /run/secrets/subscriptionId)" """ - - secret: "/run/secrets/appId": config.appId - secret: "/run/secrets/password": config.password - secret: "/run/secrets/tenantId": config.tenantId - secret: "/run/secrets/subscriptionId": config.subscriptionId + + secret: { + "/run/secrets/appId": config.appId + "/run/secrets/password": config.password + "/run/secrets/tenantId": config.tenantId + "/run/secrets/subscriptionId": config.subscriptionId + } } } diff --git a/stdlib/azure/resourcegroup/rg.cue b/stdlib/azure/resourcegroup/rg.cue index 0099ca6a..b2645b0b 100644 --- a/stdlib/azure/resourcegroup/rg.cue +++ b/stdlib/azure/resourcegroup/rg.cue @@ -3,6 +3,7 @@ package resourcegroup import ( "alpha.dagger.io/azure" "alpha.dagger.io/os" + "alpha.dagger.io/dagger" ) // Create a resource group @@ -11,10 +12,13 @@ import ( config: azure.#Config // ResourceGroup name - rgName: string @dagger(input) + rgName: string & dagger.#Input // ResourceGroup location - rgLocation: string @dagger(input) + rgLocation: string & dagger.#Input + + // ResourceGroup Id + id: string & dagger.#Output // Container image ctr: os.#Container & { @@ -24,16 +28,21 @@ import ( always: true command: """ - az group create -l "\(rgLocation)" -n "\(rgName)" - az group show -n "\(rgName)" --query "id" -o json | jq -r . | tr -d "\n" > /resourceGroupId + az group create -l "$AZURE_DEFAULTS_LOCATION" -n "$AZURE_DEFAULTS_GROUP" + az group show -n "$AZURE_DEFAULTS_GROUP" --query "id" -o json | jq -r . | tr -d "\n" > /resourceGroupId """ + + env: { + AZURE_DEFAULTS_GROUP: rgName + AZURE_DEFAULTS_LOCATION: rgLocation + } } // Resource Id - id: { + id: ({ os.#File & { from: ctr path: "/resourceGroupId" } - }.contents @dagger(output) + }).contents } diff --git a/stdlib/azure/resourcegroup/tests/rg.cue b/stdlib/azure/resourcegroup/tests/rg.cue index ac5aaca8..dc2eda0b 100644 --- a/stdlib/azure/resourcegroup/tests/rg.cue +++ b/stdlib/azure/resourcegroup/tests/rg.cue @@ -6,12 +6,12 @@ import ( "alpha.dagger.io/random" ) -suffix: random.#String & { +TestSuffix: random.#String & { seed: "azrg" } -rg: resourcegroup.#ResourceGroup & { +TestRG: resourcegroup.#ResourceGroup & { config: azure.#Config - rgName: "rg-test-\(suffix.out)" + rgName: "rg-test-\(TestSuffix.out)" rgLocation: "eastus2" } From a99fc52eeb4f4cca57baa932584b7182e03f2462 Mon Sep 17 00:00:00 2001 From: Sujay Pillai Date: Thu, 12 Aug 2021 01:44:03 +0800 Subject: [PATCH 22/41] Amending changes from @TomChv Signed-off-by: Sujay Pillai --- stdlib/azure/azure.cue | 4 ++-- stdlib/azure/resourcegroup/rg.cue | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/stdlib/azure/azure.cue b/stdlib/azure/azure.cue index 53948ffd..b98bef5d 100644 --- a/stdlib/azure/azure.cue +++ b/stdlib/azure/azure.cue @@ -35,14 +35,14 @@ let defaultVersion = "2.27.1@sha256:1e117183100c9fce099ebdc189d73e506e7b02d2b73d image: docker.#Pull & { from: "mcr.microsoft.com/azure-cli:\(version)" } - + always: true command: """ az login --service-principal -u "$(cat /run/secrets/appId)" -p "$(cat /run/secrets/password)" -t "$(cat /run/secrets/tenantId)" az account set -s "$(cat /run/secrets/subscriptionId)" """ - + secret: { "/run/secrets/appId": config.appId "/run/secrets/password": config.password diff --git a/stdlib/azure/resourcegroup/rg.cue b/stdlib/azure/resourcegroup/rg.cue index b2645b0b..5f2e7215 100644 --- a/stdlib/azure/resourcegroup/rg.cue +++ b/stdlib/azure/resourcegroup/rg.cue @@ -33,7 +33,7 @@ import ( """ env: { - AZURE_DEFAULTS_GROUP: rgName + AZURE_DEFAULTS_GROUP: rgName AZURE_DEFAULTS_LOCATION: rgLocation } } @@ -41,8 +41,8 @@ import ( // Resource Id id: ({ os.#File & { - from: ctr - path: "/resourceGroupId" - } + from: ctr + path: "/resourceGroupId" + } }).contents } From f979135961586b38a9d8f1d768de249297bd3731 Mon Sep 17 00:00:00 2001 From: Sujay Pillai Date: Thu, 12 Aug 2021 01:51:41 +0800 Subject: [PATCH 23/41] Amending changes from @TomChv Signed-off-by: Sujay Pillai --- docs/reference/universe/azure/README.md | 18 +++++---- .../reference/universe/azure/resourcegroup.md | 38 +++++++++++-------- 2 files changed, 33 insertions(+), 23 deletions(-) diff --git a/docs/reference/universe/azure/README.md b/docs/reference/universe/azure/README.md index 1f2e288d..fc887bbb 100644 --- a/docs/reference/universe/azure/README.md +++ b/docs/reference/universe/azure/README.md @@ -16,13 +16,17 @@ Azure Cli to be used by all Azure packages ### azure.#CLI Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*config.tenantId* | `dagger.#Secret` |AZURE tenant id | -|*config.subscriptionId* | `dagger.#Secret` |AZURE subscription id | -|*config.appId* | `dagger.#Secret` |AZURE app id for the service principal used | -|*config.password* | `dagger.#Secret` |AZURE password for the service principal used | -|*image.from* | `"mcr.microsoft.com/azure-cli"` |Remote ref (example: "index.docker.io/alpine:latest") | +| Name | Type | Description | +| ------------- |:-------------: |:-------------: | +|*config.tenantId* | `dagger.#Secret` |AZURE tenant id | +|*config.subscriptionId* | `dagger.#Secret` |AZURE subscription id | +|*config.appId* | `dagger.#Secret` |AZURE app id for the service principal used | +|*config.password* | `dagger.#Secret` |AZURE password for the service principal used | +|*image.from* | `"mcr.microsoft.com/azure-cli:2.27.1@sha256:1e117183100c9fce099ebdc189d73e506e7b02d2b73d767d3fc07caee72f9fb1"` |Remote ref (example: "index.docker.io/alpine:latest") | +|*secret."/run/secrets/appId"* | `dagger.#Secret` |- | +|*secret."/run/secrets/password"* | `dagger.#Secret` |- | +|*secret."/run/secrets/tenantId"* | `dagger.#Secret` |- | +|*secret."/run/secrets/subscriptionId"* | `dagger.#Secret` |- | ### azure.#CLI Outputs diff --git a/docs/reference/universe/azure/resourcegroup.md b/docs/reference/universe/azure/resourcegroup.md index 9de772be..d23a64c5 100644 --- a/docs/reference/universe/azure/resourcegroup.md +++ b/docs/reference/universe/azure/resourcegroup.md @@ -14,22 +14,28 @@ Create a resource group ### resourcegroup.#ResourceGroup Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*config.tenantId* | `dagger.#Secret` |AZURE tenant id | -|*config.subscriptionId* | `dagger.#Secret` |AZURE subscription id | -|*config.appId* | `dagger.#Secret` |AZURE app id for the service principal used | -|*config.password* | `dagger.#Secret` |AZURE password for the service principal used | -|*rgName* | `string` |ResourceGroup name | -|*rgLocation* | `string` |ResourceGroup location | -|*ctr.image.config.tenantId* | `dagger.#Secret` |AZURE tenant id | -|*ctr.image.config.subscriptionId* | `dagger.#Secret` |AZURE subscription id | -|*ctr.image.config.appId* | `dagger.#Secret` |AZURE app id for the service principal used | -|*ctr.image.config.password* | `dagger.#Secret` |AZURE password for the service principal used | -|*ctr.image.image.from* | `"mcr.microsoft.com/azure-cli"` |Remote ref (example: "index.docker.io/alpine:latest") | +| Name | Type | Description | +| ------------- |:-------------: |:-------------: | +|*config.tenantId* | `dagger.#Secret` |AZURE tenant id | +|*config.subscriptionId* | `dagger.#Secret` |AZURE subscription id | +|*config.appId* | `dagger.#Secret` |AZURE app id for the service principal used | +|*config.password* | `dagger.#Secret` |AZURE password for the service principal used | +|*rgName* | `string` |ResourceGroup name | +|*rgLocation* | `string` |ResourceGroup location | +|*ctr.image.config.tenantId* | `dagger.#Secret` |AZURE tenant id | +|*ctr.image.config.subscriptionId* | `dagger.#Secret` |AZURE subscription id | +|*ctr.image.config.appId* | `dagger.#Secret` |AZURE app id for the service principal used | +|*ctr.image.config.password* | `dagger.#Secret` |AZURE password for the service principal used | +|*ctr.image.image.from* | `"mcr.microsoft.com/azure-cli:2.27.1@sha256:1e117183100c9fce099ebdc189d73e506e7b02d2b73d767d3fc07caee72f9fb1"` |Remote ref (example: "index.docker.io/alpine:latest") | +|*ctr.image.secret."/run/secrets/appId"* | `dagger.#Secret` |- | +|*ctr.image.secret."/run/secrets/password"* | `dagger.#Secret` |- | +|*ctr.image.secret."/run/secrets/tenantId"* | `dagger.#Secret` |- | +|*ctr.image.secret."/run/secrets/subscriptionId"* | `dagger.#Secret` |- | +|*ctr.env.AZURE_DEFAULTS_GROUP* | `string` |- | +|*ctr.env.AZURE_DEFAULTS_LOCATION* | `string` |- | ### resourcegroup.#ResourceGroup Outputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*id* | `string` |Resource Id | +| Name | Type | Description | +| ------------- |:-------------: |:-------------: | +|*id* | `string` |ResourceGroup Id Resource Id | From 35fb7e0cfcd68acb6bb17d838b747bd939caa91e Mon Sep 17 00:00:00 2001 From: Sam Alba Date: Fri, 13 Aug 2021 13:37:24 -0700 Subject: [PATCH 24/41] stdlib/aws/s3: replaced sync with cp by default to avoid cache issues Signed-off-by: Sam Alba --- stdlib/aws/s3/s3.cue | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/stdlib/aws/s3/s3.cue b/stdlib/aws/s3/s3.cue index 06772388..3235f713 100644 --- a/stdlib/aws/s3/s3.cue +++ b/stdlib/aws/s3/s3.cue @@ -28,6 +28,9 @@ import ( // Always write the object to S3 always: *true | false @dagger(input) + // Upload method + uploadMethod: *"cp" | "sync" + // URL of the uploaded S3 object url: { string @@ -49,6 +52,7 @@ import ( if delete { OPT_DELETE: "1" } + UPLOAD_METHOD: uploadMethod } mount: "/source": from: source @@ -62,12 +66,22 @@ import ( "-c", #""" opts=() - if [ -d /source ]; then - op=sync - fi + case "$UPLOAD_METHOD" in + sync) + [ -n "$OPT_DELETE" ] && opts+="--delete" + opts+="--exact-timestamps" + ;; + cp) + opts+="--recursive" + ;; + *) + echo "not supported command" + exit 1 + ;; + esac [ -n "$OPT_CONTENT_TYPE" ] && opts+="--content-type $OPT_CONTENT_TYPE" [ -n "$OPT_DELETE" ] && opts+="--delete" - aws s3 sync ${opts[@]} /source "$TARGET" + aws s3 "$UPLOAD_METHOD" ${opts[@]} /source "$TARGET" echo -n "$TARGET" \ | sed -E 's=^s3://([^/]*)/=https://\1.s3.amazonaws.com/=' \ > /url From f17a930fcf9ce9b5fbca8dd1f1638ed677044deb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Aug 2021 19:12:56 +0000 Subject: [PATCH 25/41] build(deps): bump amplitude-js from 8.3.1 to 8.5.0 in /website Bumps [amplitude-js](https://github.com/amplitude/amplitude-javascript) from 8.3.1 to 8.5.0. - [Release notes](https://github.com/amplitude/amplitude-javascript/releases) - [Changelog](https://github.com/amplitude/Amplitude-JavaScript/blob/main/CHANGELOG.md) - [Commits](https://github.com/amplitude/amplitude-javascript/compare/v8.3.1...v8.5.0) --- updated-dependencies: - dependency-name: amplitude-js dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- website/package.json | 2 +- website/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/website/package.json b/website/package.json index 96a5503d..5665b27c 100644 --- a/website/package.json +++ b/website/package.json @@ -20,7 +20,7 @@ "@docusaurus/preset-classic": "2.0.0-beta.2", "@mdx-js/react": "^1.6.21", "@svgr/webpack": "^5.5.0", - "amplitude-js": "^8.3.1", + "amplitude-js": "^8.5.0", "clsx": "^1.1.1", "docusaurus-plugin-sass": "^0.2.1", "docusaurus2-dotenv": "^1.4.0", diff --git a/website/yarn.lock b/website/yarn.lock index c74bb25a..7fe81d5c 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -2060,10 +2060,10 @@ alphanum-sort@^1.0.2: resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" integrity sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM= -amplitude-js@^8.3.1: - version "8.3.1" - resolved "https://registry.yarnpkg.com/amplitude-js/-/amplitude-js-8.3.1.tgz#8ce73aa0e5bf327eae571b93602b25cc82d3a1f4" - integrity sha512-mo1qm3h5vkKkSNJQqvcg/2d06ay348BBi0ma94nx239iMlzlL3XQJ16xgg4a2z62cOsoqn91CRJDmjD39dx9aQ== +amplitude-js@^8.5.0: + version "8.5.0" + resolved "https://registry.yarnpkg.com/amplitude-js/-/amplitude-js-8.5.0.tgz#17f75ca84f5ebee7dab212f4a0a100d606dbd989" + integrity sha512-qRt5JghdluTGyaSGJ4Ae1DKX5ObZj46OJPTlI66ewxFCyOPbkxeO22LybIfxDoL6ZylnXVIuICNp0BbzZ6A4tg== dependencies: "@amplitude/ua-parser-js" "0.7.24" "@amplitude/utils" "^1.0.5" From 7481294a8c68489dc4d034e071661e2e67397e61 Mon Sep 17 00:00:00 2001 From: Sujay Pillai Date: Tue, 17 Aug 2021 17:23:01 +0800 Subject: [PATCH 26/41] Adding support for azure storage Signed-off-by: Sujay Pillai --- docs/reference/universe/README.md | 1 + docs/reference/universe/azure/storage.md | 43 ++++++++++++++++++++ stdlib/azure/storage/st.cue | 52 ++++++++++++++++++++++++ stdlib/azure/storage/tests/st.cue | 28 +++++++++++++ stdlib/universe.bats | 5 +++ 5 files changed, 129 insertions(+) create mode 100644 docs/reference/universe/azure/storage.md create mode 100644 stdlib/azure/storage/st.cue create mode 100644 stdlib/azure/storage/tests/st.cue diff --git a/docs/reference/universe/README.md b/docs/reference/universe/README.md index f6657b91..7d3223a2 100644 --- a/docs/reference/universe/README.md +++ b/docs/reference/universe/README.md @@ -11,6 +11,7 @@ - [aws/s3](./aws/s3.md) - AWS Simple Storage Service - [azure](./azure/README.md) - Azure base package - [azure/resourcegroup](./azure/resourcegroup.md) - - +- [azure/storage](./azure/storage.md) - - - [dagger](./dagger/README.md) - Dagger core types - [dagger/op](./dagger/op.md) - op: low-level operations for Dagger processing pipelines - [docker](./docker/README.md) - Docker container operations diff --git a/docs/reference/universe/azure/storage.md b/docs/reference/universe/azure/storage.md new file mode 100644 index 00000000..2dde70c0 --- /dev/null +++ b/docs/reference/universe/azure/storage.md @@ -0,0 +1,43 @@ +--- +sidebar_label: storage +--- + +# alpha.dagger.io/azure/storage + +```cue +import "alpha.dagger.io/azure/storage" +``` + +## storage.#StorageAccount + +Create a storage account + +### storage.#StorageAccount Inputs + +| Name | Type | Description | +| ------------- |:-------------: |:-------------: | +|*config.tenantId* | `dagger.#Secret` |AZURE tenant id | +|*config.subscriptionId* | `dagger.#Secret` |AZURE subscription id | +|*config.appId* | `dagger.#Secret` |AZURE app id for the service principal used | +|*config.password* | `dagger.#Secret` |AZURE password for the service principal used | +|*rgName* | `string` |ResourceGroup name | +|*stLocation* | `string` |StorageAccount location | +|*stName* | `string` |StorageAccount name | +|*ctr.image.config.tenantId* | `dagger.#Secret` |AZURE tenant id | +|*ctr.image.config.subscriptionId* | `dagger.#Secret` |AZURE subscription id | +|*ctr.image.config.appId* | `dagger.#Secret` |AZURE app id for the service principal used | +|*ctr.image.config.password* | `dagger.#Secret` |AZURE password for the service principal used | +|*ctr.image.image.from* | `"mcr.microsoft.com/azure-cli:2.27.1@sha256:1e117183100c9fce099ebdc189d73e506e7b02d2b73d767d3fc07caee72f9fb1"` |Remote ref (example: "index.docker.io/alpine:latest") | +|*ctr.image.secret."/run/secrets/appId"* | `dagger.#Secret` |- | +|*ctr.image.secret."/run/secrets/password"* | `dagger.#Secret` |- | +|*ctr.image.secret."/run/secrets/tenantId"* | `dagger.#Secret` |- | +|*ctr.image.secret."/run/secrets/subscriptionId"* | `dagger.#Secret` |- | +|*ctr.env.AZURE_DEFAULTS_GROUP* | `string` |- | +|*ctr.env.AZURE_DEFAULTS_LOCATION* | `string` |- | +|*ctr.env.AZURE_STORAGE_ACCOUNT* | `string` |- | + +### storage.#StorageAccount Outputs + +| Name | Type | Description | +| ------------- |:-------------: |:-------------: | +|*id* | `string` |StorageAccount Id | diff --git a/stdlib/azure/storage/st.cue b/stdlib/azure/storage/st.cue new file mode 100644 index 00000000..40e3ee2e --- /dev/null +++ b/stdlib/azure/storage/st.cue @@ -0,0 +1,52 @@ +package storage + +import ( + "alpha.dagger.io/azure" + "alpha.dagger.io/os" + "alpha.dagger.io/dagger" +) + +// Create a storage account +#StorageAccount: { + // Azure Config + config: azure.#Config + + // ResourceGroup name + rgName: string & dagger.#Input + + // StorageAccount location + stLocation: string & dagger.#Input + + // StorageAccount name + stName: string & dagger.#Input + + // StorageAccount Id + id: string & dagger.#Output + + // Container image + ctr: os.#Container & { + image: azure.#CLI & { + "config": config + } + always: true + + command: """ + az storage account create -n "$AZURE_STORAGE_ACCOUNT" -g "$AZURE_DEFAULTS_GROUP" -l "$AZURE_DEFAULTS_LOCATION" + az storage account show -n "$AZURE_STORAGE_ACCOUNT" -g "$AZURE_DEFAULTS_GROUP" --query "id" -o json | jq -r . | tr -d "\n" > /storageAccountId + """ + + env: { + AZURE_DEFAULTS_GROUP: rgName + AZURE_DEFAULTS_LOCATION: stLocation + AZURE_STORAGE_ACCOUNT: stName + } + } + + // StorageAccount Id + id: ({ + os.#File & { + from: ctr + path: "/storageAccountId" + } + }).contents +} diff --git a/stdlib/azure/storage/tests/st.cue b/stdlib/azure/storage/tests/st.cue new file mode 100644 index 00000000..4c1b2480 --- /dev/null +++ b/stdlib/azure/storage/tests/st.cue @@ -0,0 +1,28 @@ +package storage + +import ( + "alpha.dagger.io/azure" + "alpha.dagger.io/azure/resourcegroup" + "alpha.dagger.io/azure/storage" + "alpha.dagger.io/random" +) + +TestConfig: azureConfig: azure.#Config & { +} + +TestSuffix: random.#String & { + seed: "azst" +} + +TestRG: resourcegroup.#ResourceGroup & { + config: TestConfig.azureConfig + rgName: "rg-test-\(TestSuffix.out)" + rgLocation: "eastus2" +} + +TestStorage: storage.#StorageAccount & { + config: TestConfig.azureConfig + rgName: "rg-test-ahkkzwyoaucw" + stLocation: "eastus2" + stName: "st\(TestSuffix.out)001" +} diff --git a/stdlib/universe.bats b/stdlib/universe.bats index 02760c06..c43df8cb 100644 --- a/stdlib/universe.bats +++ b/stdlib/universe.bats @@ -188,4 +188,9 @@ setup() { @test "azure-resourcegroup" { skip "Azure CI infra not implemented yet - manually tested and working" #dagger -e azure-resourcegroup up +} + +@test "azure-storage" { + skip "Azure CI infra not implemented yet - manually tested and working" + #dagger -e azure-storage up } \ No newline at end of file From 30f1e0f41ed7b6c327048c46cc50b485f5219c20 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Aug 2021 12:18:37 +0000 Subject: [PATCH 27/41] build(deps): bump url-parse from 1.5.1 to 1.5.3 in /website Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.1 to 1.5.3. - [Release notes](https://github.com/unshiftio/url-parse/releases) - [Commits](https://github.com/unshiftio/url-parse/compare/1.5.1...1.5.3) --- updated-dependencies: - dependency-name: url-parse dependency-type: indirect ... Signed-off-by: dependabot[bot] --- website/yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/yarn.lock b/website/yarn.lock index c74bb25a..9b85784d 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -8443,9 +8443,9 @@ url-parse-lax@^3.0.0: prepend-http "^2.0.0" url-parse@^1.4.3, url-parse@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.1.tgz#d5fa9890af8a5e1f274a2c98376510f6425f6e3b" - integrity sha512-HOfCOUJt7iSYzEx/UqgtwKRMC6EU91NFhsCHMv9oM03VJcVo2Qrp8T8kI9D7amFf1cu+/3CEhgb3rF9zL7k85Q== + version "1.5.3" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.3.tgz#71c1303d38fb6639ade183c2992c8cc0686df862" + integrity sha512-IIORyIQD9rvj0A4CLWsHkBBJuNqWpFQe224b6j9t/ABmquIS0qDU2pY6kl6AuOrL5OkCXHMCFNe1jBcuAggjvQ== dependencies: querystringify "^2.1.1" requires-port "^1.0.0" From c637549b15fa0426a5011387e48e0e7286528003 Mon Sep 17 00:00:00 2001 From: Tom Chauveau Date: Tue, 17 Aug 2021 15:06:28 +0200 Subject: [PATCH 28/41] Fix input git to correctly handle subdir argument (solve #884) Previously, the subdir argument wa ignored by dagger input git. I've fix that behavior and add a test. Signed-off-by: Tom Chauveau --- state/input.go | 8 +++++++- tests/cli.bats | 26 +++++++++++++++++++------- tests/cli/input/git/main.cue | 18 ++++++++++++++++++ 3 files changed, 44 insertions(+), 8 deletions(-) create mode 100644 tests/cli/input/git/main.cue diff --git a/state/input.go b/state/input.go index 4506a24f..6072f6fd 100644 --- a/state/input.go +++ b/state/input.go @@ -139,10 +139,16 @@ func (git gitInput) Compile(_ string, _ *State) (*compiler.Value, error) { ref = git.Ref } + dir := "" + if git.Dir != "" { + dir = fmt.Sprintf(`,{do:"subdir", dir:"%s"}`, git.Dir) + } + return compiler.Compile("", fmt.Sprintf( - `#up: [{do:"fetch-git", remote:"%s", ref:"%s"}]`, + `#up: [{do:"fetch-git", remote:"%s", ref:"%s"}%s]`, git.Remote, ref, + dir, )) } diff --git a/tests/cli.bats b/tests/cli.bats index 01041356..94a90dff 100644 --- a/tests/cli.bats +++ b/tests/cli.bats @@ -336,12 +336,15 @@ setup() { @test "dagger input git" { "$DAGGER" init - dagger_new_with_plan input "$TESTDIR"/cli/input/artifact + ## Test simple input git + dagger_new_with_plan "input-simple-git" "$TESTDIR"/cli/input/artifact # input git - "$DAGGER" input -e "input" git "source" https://github.com/samalba/dagger-test-simple.git - "$DAGGER" up -e "input" - run "$DAGGER" -l error query -e "input" + "$DAGGER" -e "input-simple-git" input list + "$DAGGER" -e "input-simple-git" input git source "https://github.com/samalba/dagger-test-simple" + "$DAGGER" -e "input-simple-git" input list + "$DAGGER" -e "input-simple-git" up --no-cache + run "$DAGGER" -l error query -e "input-simple-git" assert_output '{ "bar": "testgit\n", "foo": "bar", @@ -349,12 +352,21 @@ setup() { }' # unset input git - "$DAGGER" input -e "input" unset "source" - "$DAGGER" up -e "input" - run "$DAGGER" -l error query -e "input" + "$DAGGER" input -e "input-simple-git" unset "source" + "$DAGGER" up -e "input-simple-git" + run "$DAGGER" -l error query -e "input-simple-git" assert_output '{ "foo": "bar" }' + + ## Test input git with subdir + dagger_new_with_plan "input-subdir-git" "$TESTDIR"/cli/input/git + + # input git + "$DAGGER" -e "input-subdir-git" input git TestRepo "https://github.com/dagger/examples" "main" "todoapp" + + # Assert success (test is directly in the cue file) + "$DAGGER" -e "input-subdir-git" up } @test "dagger input list" { diff --git a/tests/cli/input/git/main.cue b/tests/cli/input/git/main.cue new file mode 100644 index 00000000..bbdad7a8 --- /dev/null +++ b/tests/cli/input/git/main.cue @@ -0,0 +1,18 @@ +package testing + +import ( + "alpha.dagger.io/dagger" + "alpha.dagger.io/os" +) + +// Input https://github.com/dagger/examples/tree/main/todoapp +TestRepo: dagger.#Input & {dagger.#Artifact} + +// Check README.md +TestFolder: os.#Container & { + always: true + command: #""" + grep -q "Todo APP" /input/repo/README.md + """# + mount: "/input/repo": from: TestRepo +} From 3c1c0f13f6620f2fb01ed76f9cb199a4c95f8802 Mon Sep 17 00:00:00 2001 From: Tom Chauveau Date: Tue, 17 Aug 2021 16:58:29 +0200 Subject: [PATCH 29/41] Improve dagger input UX (solve #874) Add new argument `--show-optional` to `dagger input list`. Now by default, `dagger input list` will only show required input. To get all inputs (including those with default value), you can use that new argument. Test has been updated to support changes. Signed-off-by: Tom Chauveau --- cmd/dagger/cmd/input/list.go | 8 ++++++++ tests/cli.bats | 17 +++++++++++++++-- tests/core.bats | 2 +- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/cmd/dagger/cmd/input/list.go b/cmd/dagger/cmd/input/list.go index b242031e..c37983f6 100644 --- a/cmd/dagger/cmd/input/list.go +++ b/cmd/dagger/cmd/input/list.go @@ -62,6 +62,13 @@ var listCmd = &cobra.Command{ } } + if !viper.GetBool("show-optional") && !viper.GetBool("all") { + // skip input if there is already a default value + if hasDefault { + continue + } + } + fmt.Fprintf(w, "%s\t%s\t%t\t%s\n", inp.Path(), common.FormatValue(inp), @@ -95,6 +102,7 @@ func isUserSet(env *state.State, val *compiler.Value) bool { func init() { listCmd.Flags().BoolP("all", "a", false, "List all inputs (include non-overridable)") + listCmd.Flags().Bool("show-optional", false, "List optional inputs (those with default values)") if err := viper.BindPFlags(listCmd.Flags()); err != nil { panic(err) diff --git a/tests/cli.bats b/tests/cli.bats index 01041356..0697ede3 100644 --- a/tests/cli.bats +++ b/tests/cli.bats @@ -364,28 +364,41 @@ setup() { "$DAGGER" input text cfg.str "foobar" -e "list" out="$("$DAGGER" input list -e "list")" + outOpt="$("$DAGGER" input list --show-optional -e "list")" outAll="$("$DAGGER" input list --all -e "list")" #note: this is the recommended way to use pipes with bats - run bash -c "echo \"$out\" | grep awsConfig.accessKey | grep 'dagger.#Secret' | grep 'AWS access key'" + run bash -c "echo \"$out\" | grep awsConfig.accessKey | grep 'dagger.#Secret' | grep false | grep 'AWS access key'" assert_success run bash -c "echo \"$out\" | grep cfgInline.source | grep 'dagger.#Artifact' | grep false | grep 'source dir'" assert_success + run bash -c "echo \"$outOpt\" | grep awsConfig.accessKey | grep 'dagger.#Secret' | grep 'AWS access key'" + assert_success + + run bash -c "echo \"$outOpt\" | grep cfgInline.source | grep 'dagger.#Artifact' | grep false | grep 'source dir'" + assert_success + run bash -c "echo \"$outAll\" | grep cfg2" assert_failure run bash -c "echo \"$out\" | grep cfgInline.strDef | grep '*yolo | string' | grep false" + assert_failure + + run bash -c "echo \"$outOpt\" | grep cfgInline.strDef | grep '*yolo | string' | grep false" assert_success run bash -c "echo \"$out\" | grep cfg.num" assert_failure + run bash -c "echo \"$outOpt\" | grep cfg.num" + assert_failure + run bash -c "echo \"$outAll\" | grep cfg.num | grep 21 | grep -v int" assert_success - run bash -c "echo \"$out\" | grep cfg.strSet" + run bash -c "echo \"$outOpt\" | grep cfg.strSet" assert_failure run bash -c "echo \"$outAll\" | grep cfg.strSet | grep pipo" diff --git a/tests/core.bats b/tests/core.bats index 503bf7b5..597817e5 100644 --- a/tests/core.bats +++ b/tests/core.bats @@ -20,7 +20,7 @@ setup() { dagger_new_with_plan test-core "$TESTDIR"/core/inputs-outputs # List available inputs - run dagger -e test-core input list + run dagger -e test-core input list --show-optional assert_success assert_output --partial 'name' assert_output --partial 'dir' From dded846a821794959382600f9ce247e57f1540da Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 19 Aug 2021 19:15:06 +0000 Subject: [PATCH 30/41] build(deps): bump react-social-login-buttons in /website Bumps [react-social-login-buttons](https://github.com/MichalSzorad/react-social-login-buttons) from 3.5.0 to 3.5.1. - [Release notes](https://github.com/MichalSzorad/react-social-login-buttons/releases) - [Commits](https://github.com/MichalSzorad/react-social-login-buttons/commits) --- updated-dependencies: - dependency-name: react-social-login-buttons dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- website/package.json | 2 +- website/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/website/package.json b/website/package.json index 96a5503d..620d8ac1 100644 --- a/website/package.json +++ b/website/package.json @@ -27,7 +27,7 @@ "file-loader": "^6.2.0", "react": "^17.0.1", "react-dom": "^17.0.1", - "react-social-login-buttons": "^3.5.0", + "react-social-login-buttons": "^3.5.1", "sass": "^1.36.0", "url-loader": "^4.1.1" }, diff --git a/website/yarn.lock b/website/yarn.lock index c74bb25a..4879eed1 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -6982,10 +6982,10 @@ react-side-effect@^2.1.0: resolved "https://registry.yarnpkg.com/react-side-effect/-/react-side-effect-2.1.1.tgz#66c5701c3e7560ab4822a4ee2742dee215d72eb3" integrity sha512-2FoTQzRNTncBVtnzxFOk2mCpcfxQpenBMbk5kSVBg5UcPqV9fRbgY2zhb7GTWWOlpFmAxhClBDlIq8Rsubz1yQ== -react-social-login-buttons@^3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/react-social-login-buttons/-/react-social-login-buttons-3.5.0.tgz#079b3aebcd5d92ccfdcd38fe80d2c56a7fa765c3" - integrity sha512-4oDkEpY3M8h3+MkqYq6xpfzvumnVE4DDars0xNCLJNZ7MikT+YN/IaZRFXCM0vV250iPrHpk+b6juw1HXOmWsw== +react-social-login-buttons@^3.5.1: + version "3.5.1" + resolved "https://registry.yarnpkg.com/react-social-login-buttons/-/react-social-login-buttons-3.5.1.tgz#10c08885fb0c5280e2ca74d49734ac1f66ab8765" + integrity sha512-3TjHYARN9cOfEEl6uQeeB1oMV/dJ2lyxqK98Y+HuvP0E9Q0HJoFvNps6h6EYKE6Yw6LMllUeR5264tSqalM/ww== react-textarea-autosize@^8.3.2: version "8.3.2" From 970a1988eb404e027d0fe533afbe63fac7fb0fae Mon Sep 17 00:00:00 2001 From: Tom Chauveau Date: Fri, 2 Jul 2021 19:03:39 +0200 Subject: [PATCH 31/41] Remove skip for docker.#Push tests Signed-off-by: Tom Chauveau --- stdlib/universe.bats | 2 -- 1 file changed, 2 deletions(-) diff --git a/stdlib/universe.bats b/stdlib/universe.bats index c43df8cb..bfb92323 100644 --- a/stdlib/universe.bats +++ b/stdlib/universe.bats @@ -63,7 +63,6 @@ setup() { } @test "docker push and pull" { - skip "An occasional data race condition happen in the CI. Must be fix before execute that test" # Push image dagger -e docker-push up @@ -75,7 +74,6 @@ setup() { } @test "docker push: multi registry" { - skip "An occasional data race condition happen in the CI. Must be fix before execute that test" run dagger -e docker-push-multi-registry up } From 22a944545581348378cb6a45493e96888a256176 Mon Sep 17 00:00:00 2001 From: Tom Chauveau Date: Thu, 19 Aug 2021 20:10:33 +0200 Subject: [PATCH 32/41] Track data race error Signed-off-by: Tom Chauveau --- client/client.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/client/client.go b/client/client.go index 63a8e3f7..07bd73e8 100644 --- a/client/client.go +++ b/client/client.go @@ -139,11 +139,20 @@ func (c *Client) buildfn(ctx context.Context, st *state.State, env *environment. Interface("attrs", opts.FrontendAttrs). Msg("spawning buildkit job") + solverCh := make(chan *bk.SolveStatus) + defer close(solverCh) + go func() { + for e := range solverCh { + fmt.Println("J'envoie un event depuis pushContainer") + ch <- e + } + }() + resp, err := c.c.Build(ctx, opts, "", func(ctx context.Context, gw bkgw.Client) (*bkgw.Result, error) { s := solver.New(solver.Opts{ Control: c.c, Gateway: gw, - Events: ch, + Events: solverCh, Auth: auth, Secrets: secrets, NoCache: c.cfg.NoCache, From 9adeecd005424a7b341cf851cd390565992c3cd3 Mon Sep 17 00:00:00 2001 From: Tom Chauveau Date: Fri, 20 Aug 2021 14:07:04 +0200 Subject: [PATCH 33/41] Fix data race issue by synchronizing events channel through waiting group Previously, there was a data race condition error when `op .#PushContainer` was called. It was because of the `Export` func in `solver.go` that create a sub build pipeline and forward his events to the main events channel (that catch all events that we log). To fix it, channel are now split between build pipeline and centralize into the old output channel (`ch`). Signed-off-by: Tom Chauveau --- client/client.go | 38 ++++++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/client/client.go b/client/client.go index 07bd73e8..c549ee09 100644 --- a/client/client.go +++ b/client/client.go @@ -6,6 +6,7 @@ import ( "os" "path/filepath" "strings" + "sync" "go.opentelemetry.io/otel" "golang.org/x/sync/errgroup" @@ -103,6 +104,9 @@ func (c *Client) Do(ctx context.Context, state *state.State, fn DoFunc) error { } func (c *Client) buildfn(ctx context.Context, st *state.State, env *environment.Environment, fn DoFunc, ch chan *bk.SolveStatus) error { + // Close output channel + defer close(ch) + lg := log.Ctx(ctx) // Scan local dirs to grant access @@ -139,20 +143,35 @@ func (c *Client) buildfn(ctx context.Context, st *state.State, env *environment. Interface("attrs", opts.FrontendAttrs). Msg("spawning buildkit job") - solverCh := make(chan *bk.SolveStatus) - defer close(solverCh) - go func() { - for e := range solverCh { - fmt.Println("J'envoie un event depuis pushContainer") + wg := sync.WaitGroup{} + // Catch output from events + catchOutput := func(inCh chan *bk.SolveStatus) { + for e := range inCh { ch <- e } - }() + wg.Done() + } + + // Catch solver's events + // Closed manually + eventsCh := make(chan *bk.SolveStatus) + wg.Add(1) + go catchOutput(eventsCh) + + // Catch build events + // Closed by buildkit + buildCh := make(chan *bk.SolveStatus) + wg.Add(1) + go catchOutput(buildCh) resp, err := c.c.Build(ctx, opts, "", func(ctx context.Context, gw bkgw.Client) (*bkgw.Result, error) { + // Close events channel + defer close(eventsCh) + s := solver.New(solver.Opts{ Control: c.c, Gateway: gw, - Events: solverCh, + Events: eventsCh, Auth: auth, Secrets: secrets, NoCache: c.cfg.NoCache, @@ -193,7 +212,7 @@ func (c *Client) buildfn(ctx context.Context, st *state.State, env *environment. res := bkgw.NewResult() res.SetRef(ref) return res, nil - }, ch) + }, buildCh) if err != nil { return solver.CleanError(err) } @@ -205,6 +224,9 @@ func (c *Client) buildfn(ctx context.Context, st *state.State, env *environment. Str("value", v). Msg("exporter response") } + + // Wait until all the events are caught + wg.Wait() return nil } From b8dcc02bb8c683ffec760a183b42309f74628402 Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Fri, 20 Aug 2021 15:52:58 +0200 Subject: [PATCH 34/41] performance: compile CUE client side Restructured the compile logic to happen on the CLI instead of the BuildKit frontend. - Avoid uploading the entire workspace to BuildKit on every compilation - Let the CUE loader scan the files instead of going through the BuildKit filesystem gRPC APIs. Signed-off-by: Andrea Luzzardi --- client/client.go | 5 -- cmd/dagger/cmd/compute.go | 27 ++++-- cmd/dagger/cmd/doc.go | 2 +- cmd/dagger/cmd/query.go | 40 ++++----- compiler/build.go | 9 +- environment/environment.go | 153 ++++++++------------------------ environment/environment_test.go | 26 ------ environment/inputs_scan.go | 6 -- state/state.go | 47 +++++++++- 9 files changed, 125 insertions(+), 190 deletions(-) delete mode 100644 environment/environment_test.go diff --git a/client/client.go b/client/client.go index c549ee09..b75d325c 100644 --- a/client/client.go +++ b/client/client.go @@ -177,11 +177,6 @@ func (c *Client) buildfn(ctx context.Context, st *state.State, env *environment. NoCache: c.cfg.NoCache, }) - lg.Debug().Msg("loading configuration") - if err := env.LoadPlan(ctx, s); err != nil { - return nil, err - } - // Compute output overlay if fn != nil { if err := fn(ctx, env, s); err != nil { diff --git a/cmd/dagger/cmd/compute.go b/cmd/dagger/cmd/compute.go index 12164ec9..80243a9a 100644 --- a/cmd/dagger/cmd/compute.go +++ b/cmd/dagger/cmd/compute.go @@ -170,7 +170,25 @@ var computeCmd = &cobra.Command{ cl := common.NewClient(ctx) - err := cl.Do(ctx, st, func(ctx context.Context, env *environment.Environment, s solver.Solver) error { + v := compiler.NewValue() + plan, err := st.CompilePlan(ctx) + if err != nil { + lg.Fatal().Err(err).Msg("failed to compile plan") + } + if err := v.FillPath(cue.MakePath(), plan); err != nil { + lg.Fatal().Err(err).Msg("failed to compile plan") + } + + inputs, err := st.CompileInputs() + if err != nil { + lg.Fatal().Err(err).Msg("failed to compile inputs") + } + + if err := v.FillPath(cue.MakePath(), inputs); err != nil { + lg.Fatal().Err(err).Msg("failed to compile inputs") + } + + err = cl.Do(ctx, st, func(ctx context.Context, env *environment.Environment, s solver.Solver) error { // check that all inputs are set checkInputs(ctx, env) @@ -178,13 +196,6 @@ var computeCmd = &cobra.Command{ return err } - v := compiler.NewValue() - if err := v.FillPath(cue.MakePath(), env.Plan()); err != nil { - return err - } - if err := v.FillPath(cue.MakePath(), env.Input()); err != nil { - return err - } if err := v.FillPath(cue.MakePath(), env.Computed()); err != nil { return err } diff --git a/cmd/dagger/cmd/doc.go b/cmd/dagger/cmd/doc.go index 932f2d3b..049536e2 100644 --- a/cmd/dagger/cmd/doc.go +++ b/cmd/dagger/cmd/doc.go @@ -318,7 +318,7 @@ func loadCode(packageName string) (*compiler.Value, error) { stdlib.Path: stdlib.FS, } - src, err := compiler.Build(sources, packageName) + src, err := compiler.Build("/config", sources, packageName) if err != nil { return nil, err } diff --git a/cmd/dagger/cmd/query.go b/cmd/dagger/cmd/query.go index 45802a75..3a0b8223 100644 --- a/cmd/dagger/cmd/query.go +++ b/cmd/dagger/cmd/query.go @@ -1,15 +1,12 @@ package cmd import ( - "context" "fmt" "cuelang.org/go/cue" "go.dagger.io/dagger/cmd/dagger/cmd/common" "go.dagger.io/dagger/cmd/dagger/logger" "go.dagger.io/dagger/compiler" - "go.dagger.io/dagger/environment" - "go.dagger.io/dagger/solver" "github.com/spf13/cobra" "github.com/spf13/viper" @@ -45,28 +42,27 @@ var queryCmd = &cobra.Command{ doneCh := common.TrackWorkspaceCommand(ctx, cmd, workspace, state) - cl := common.NewClient(ctx) cueVal := compiler.NewValue() - err := cl.Do(ctx, state, func(ctx context.Context, env *environment.Environment, s solver.Solver) error { - if !viper.GetBool("no-plan") { - if err := cueVal.FillPath(cue.MakePath(), env.Plan()); err != nil { - return err - } + if !viper.GetBool("no-plan") { + plan, err := state.CompilePlan(ctx) + if err != nil { + lg.Fatal().Err(err).Msg("failed to compile plan") + } + if err := cueVal.FillPath(cue.MakePath(), plan); err != nil { + lg.Fatal().Err(err).Msg("failed to compile plan") + } + } + + if !viper.GetBool("no-input") { + inputs, err := state.CompileInputs() + if err != nil { + lg.Fatal().Err(err).Msg("failed to compile inputs") } - if !viper.GetBool("no-input") { - if err := cueVal.FillPath(cue.MakePath(), env.Input()); err != nil { - return err - } + if err := cueVal.FillPath(cue.MakePath(), inputs); err != nil { + lg.Fatal().Err(err).Msg("failed to compile inputs") } - return nil - }) - - <-doneCh - - if err != nil { - lg.Fatal().Err(err).Msg("failed to query environment") } if !viper.GetBool("no-computed") && state.Computed != "" { @@ -79,6 +75,8 @@ var queryCmd = &cobra.Command{ } } + <-doneCh + cueVal = cueVal.LookupPath(cuePath) if viper.GetBool("concrete") { @@ -98,7 +96,7 @@ var queryCmd = &cobra.Command{ case "json": fmt.Println(cueVal.JSON().PrettyString()) case "yaml": - lg.Fatal().Err(err).Msg("yaml format not yet implemented") + lg.Fatal().Msg("yaml format not yet implemented") case "text": out, err := cueVal.String() if err != nil { diff --git a/compiler/build.go b/compiler/build.go index 33056e06..44b0a53b 100644 --- a/compiler/build.go +++ b/compiler/build.go @@ -12,19 +12,16 @@ import ( ) // Build a cue configuration tree from the files in fs. -func Build(sources map[string]fs.FS, args ...string) (*Value, error) { +func Build(src string, overlays map[string]fs.FS, args ...string) (*Value, error) { c := DefaultCompiler buildConfig := &cueload.Config{ - // The CUE overlay needs to be prefixed by a non-conflicting path with the - // local filesystem, otherwise Cue will merge the Overlay with whatever Cue - // files it finds locally. - Dir: "/config", + Dir: src, Overlay: map[string]cueload.Source{}, } // Map the source files into the overlay - for mnt, f := range sources { + for mnt, f := range overlays { f := f mnt := mnt err := fs.WalkDir(f, ".", func(p string, entry fs.DirEntry, err error) error { diff --git a/environment/environment.go b/environment/environment.go index 3034dd58..0e434286 100644 --- a/environment/environment.go +++ b/environment/environment.go @@ -3,7 +3,6 @@ package environment import ( "context" "fmt" - "io/fs" "strings" "time" @@ -29,33 +28,38 @@ type Environment struct { // Layer 2: user inputs input *compiler.Value + // plan + inputs + src *compiler.Value + // Layer 3: computed values computed *compiler.Value } func New(st *state.State) (*Environment, error) { + var err error + e := &Environment{ state: st, - - plan: compiler.NewValue(), - input: compiler.NewValue(), - computed: compiler.NewValue(), } - // Prepare inputs - for key, input := range st.Inputs { - v, err := input.Compile(key, st) - if err != nil { - return nil, err - } - if key == "" { - err = e.input.FillPath(cue.MakePath(), v) - } else { - err = e.input.FillPath(cue.ParsePath(key), v) - } - if err != nil { - return nil, err - } + e.plan, err = st.CompilePlan(context.TODO()) + if err != nil { + return nil, err + } + + e.input, err = st.CompileInputs() + if err != nil { + return nil, err + } + + e.computed = compiler.NewValue() + + e.src = compiler.NewValue() + if err := e.src.FillPath(cue.MakePath(), e.plan); err != nil { + return nil, err + } + if err := e.src.FillPath(cue.MakePath(), e.input); err != nil { + return nil, err } return e, nil @@ -65,64 +69,10 @@ func (e *Environment) Name() string { return e.state.Name } -func (e *Environment) Plan() *compiler.Value { - return e.plan -} - -func (e *Environment) Input() *compiler.Value { - return e.input -} - func (e *Environment) Computed() *compiler.Value { return e.computed } -// LoadPlan loads the plan -func (e *Environment) LoadPlan(ctx context.Context, s solver.Solver) error { - tr := otel.Tracer("environment") - ctx, span := tr.Start(ctx, "environment.LoadPlan") - defer span.End() - - // FIXME: universe vendoring - // This is already done on `dagger init` and shouldn't be done here too. - // However: - // 1) As of right now, there's no way to update universe through the - // CLI, so we are lazily updating on `dagger up` using the embedded `universe` - // 2) For backward compatibility: if the workspace was `dagger - // init`-ed before we added support for vendoring universe, it might not - // contain a `cue.mod`. - if err := e.state.VendorUniverse(ctx); err != nil { - return err - } - - planSource, err := e.state.Source().Compile("", e.state) - if err != nil { - return err - } - - p := NewPipeline(planSource, s).WithCustomName("[internal] source") - // execute updater script - if err := p.Run(ctx); err != nil { - return err - } - - // Build a Cue config by overlaying the source with the stdlib - sources := map[string]fs.FS{ - "/": p.FS(), - } - args := []string{} - if pkg := e.state.Plan.Package; pkg != "" { - args = append(args, pkg) - } - plan, err := compiler.Build(sources, args...) - if err != nil { - return fmt.Errorf("plan config: %w", compiler.Err(err)) - } - e.plan = plan - - return nil -} - // Scan all scripts in the environment for references to local directories (do:"local"), // and return all referenced directory names. // This is used by clients to grant access to local directories when they are referenced @@ -168,58 +118,33 @@ func (e *Environment) LocalDirs() map[string]string { localdirs(v.Lookup("#up")) } - // 2. Scan the plan - plan, err := e.state.Source().Compile("", e.state) - if err != nil { - panic(err) - } - localdirs(plan) return dirs } -// prepare initializes the Environment with inputs and plan code -func (e *Environment) prepare(ctx context.Context) (*compiler.Value, error) { - tr := otel.Tracer("environment") - _, span := tr.Start(ctx, "environment.Prepare") - defer span.End() - - // Reset the computed values - e.computed = compiler.NewValue() - - src := compiler.NewValue() - if err := src.FillPath(cue.MakePath(), e.plan); err != nil { - return nil, err - } - if err := src.FillPath(cue.MakePath(), e.input); err != nil { - return nil, err - } - - return src, nil -} - // Up missing values in environment configuration, and write them to state. func (e *Environment) Up(ctx context.Context, s solver.Solver) error { tr := otel.Tracer("environment") ctx, span := tr.Start(ctx, "environment.Up") defer span.End() - // Set user inputs and plan code - src, err := e.prepare(ctx) - if err != nil { - return err - } - // Orchestrate execution with cueflow flow := cueflow.New( &cueflow.Config{}, - src.Cue(), + e.src.Cue(), newTaskFunc(newPipelineRunner(e.computed, s)), ) if err := flow.Run(ctx); err != nil { return err } - return nil + // FIXME: canceling the context makes flow return `nil` + // Check explicitly if the context is canceled. + select { + case <-ctx.Done(): + return ctx.Err() + default: + return nil + } } type DownOpts struct{} @@ -328,20 +253,18 @@ func (e *Environment) ScanInputs(ctx context.Context, mergeUserInputs bool) ([]* src := e.plan if mergeUserInputs { - // Set user inputs and plan code - var err error - src, err = e.prepare(ctx) - if err != nil { - return nil, err - } + src = e.src } return ScanInputs(ctx, src), nil } func (e *Environment) ScanOutputs(ctx context.Context) ([]*compiler.Value, error) { - src, err := e.prepare(ctx) - if err != nil { + src := compiler.NewValue() + if err := src.FillPath(cue.MakePath(), e.plan); err != nil { + return nil, err + } + if err := src.FillPath(cue.MakePath(), e.input); err != nil { return nil, err } diff --git a/environment/environment_test.go b/environment/environment_test.go deleted file mode 100644 index c811c569..00000000 --- a/environment/environment_test.go +++ /dev/null @@ -1,26 +0,0 @@ -package environment - -import ( - "testing" - - "github.com/stretchr/testify/require" - "go.dagger.io/dagger/state" -) - -func TestLocalDirs(t *testing.T) { - st := &state.State{ - Path: "/tmp/source", - Plan: state.Plan{ - Module: "/tmp/source/plan", - }, - } - require.NoError(t, st.SetInput("www.source", state.DirInput("/", []string{}, []string{}))) - - environment, err := New(st) - require.NoError(t, err) - - localdirs := environment.LocalDirs() - require.Len(t, localdirs, 2) - require.Contains(t, localdirs, "/") - require.Contains(t, localdirs, "/tmp/source/plan") -} diff --git a/environment/inputs_scan.go b/environment/inputs_scan.go index 7b3a3648..ddb6d91d 100644 --- a/environment/inputs_scan.go +++ b/environment/inputs_scan.go @@ -4,7 +4,6 @@ import ( "context" "cuelang.org/go/cue" - "github.com/rs/zerolog/log" "go.dagger.io/dagger/compiler" ) @@ -43,13 +42,11 @@ func isReference(val cue.Value) bool { } func ScanInputs(ctx context.Context, value *compiler.Value) []*compiler.Value { - lg := log.Ctx(ctx) inputs := []*compiler.Value{} value.Walk( func(val *compiler.Value) bool { if isReference(val.Cue()) { - lg.Debug().Str("value.Path", val.Path().String()).Msg("found reference, stop walk") return false } @@ -57,7 +54,6 @@ func ScanInputs(ctx context.Context, value *compiler.Value) []*compiler.Value { return true } - lg.Debug().Str("value.Path", val.Path().String()).Msg("found input") inputs = append(inputs, val) return true @@ -68,7 +64,6 @@ func ScanInputs(ctx context.Context, value *compiler.Value) []*compiler.Value { } func ScanOutputs(ctx context.Context, value *compiler.Value) []*compiler.Value { - lg := log.Ctx(ctx) inputs := []*compiler.Value{} value.Walk( @@ -77,7 +72,6 @@ func ScanOutputs(ctx context.Context, value *compiler.Value) []*compiler.Value { return true } - lg.Debug().Str("value.Path", val.Path().String()).Msg("found output") inputs = append(inputs, val) return true diff --git a/state/state.go b/state/state.go index 16a5a9e5..0bf0bd2f 100644 --- a/state/state.go +++ b/state/state.go @@ -3,6 +3,9 @@ package state import ( "context" "path" + + "cuelang.org/go/cue" + "go.dagger.io/dagger/compiler" ) // Contents of an environment serialized to a file @@ -29,13 +32,53 @@ type State struct { } // Cue module containing the environment plan -func (s *State) Source() Input { +func (s *State) CompilePlan(ctx context.Context) (*compiler.Value, error) { w := s.Workspace // FIXME: backward compatibility if mod := s.Plan.Module; mod != "" { w = path.Join(w, mod) } - return DirInput(w, []string{}, []string{}) + + // FIXME: universe vendoring + // This is already done on `dagger init` and shouldn't be done here too. + // However: + // 1) As of right now, there's no way to update universe through the + // CLI, so we are lazily updating on `dagger up` using the embedded `universe` + // 2) For backward compatibility: if the workspace was `dagger + // init`-ed before we added support for vendoring universe, it might not + // contain a `cue.mod`. + if err := vendorUniverse(ctx, w); err != nil { + return nil, err + } + + args := []string{} + if pkg := s.Plan.Package; pkg != "" { + args = append(args, pkg) + } + + return compiler.Build(w, nil, args...) +} + +func (s *State) CompileInputs() (*compiler.Value, error) { + v := compiler.NewValue() + + // Prepare inputs + for key, input := range s.Inputs { + i, err := input.Compile(key, s) + if err != nil { + return nil, err + } + if key == "" { + err = v.FillPath(cue.MakePath(), i) + } else { + err = v.FillPath(cue.ParsePath(key), i) + } + if err != nil { + return nil, err + } + } + + return v, nil } // VendorUniverse vendors the latest (built-in) version of the universe into the From 969d0cd5dac39e8b000efd4d3579a60176679d41 Mon Sep 17 00:00:00 2001 From: Tom Chauveau Date: Fri, 20 Aug 2021 16:36:48 +0200 Subject: [PATCH 35/41] Fix README documentation dead link Signed-off-by: Tom Chauveau --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f6f84ed4..b4c76065 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,6 @@ Using Dagger, software builders can automate the deployment of any application t ## Useful links - [Join the Dagger community on Discord](https://discord.gg/ufnyBtc8uY) -- [Install from a binary release](https://docs.dagger.io/install) -- [Build from source](https://docs.dagger.io/install#option-4-install-from-source) +- [Install from a binary release](https://docs.dagger.io/1001/install/) +- [Build from source](https://docs.dagger.io/1001/install/#option-4-install-from-source) - [How to contribute](CONTRIBUTING.md) From 36418846507d551e3a5fdaf5f48afab2e9af7740 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 20 Aug 2021 14:37:54 +0000 Subject: [PATCH 36/41] build(deps): bump golang from 1.16.6-alpine to 1.16.7-alpine Bumps golang from 1.16.6-alpine to 1.16.7-alpine. --- updated-dependencies: - dependency-name: golang dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ee3e35b4..f56b35a8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # syntax = docker/dockerfile:1.2 -FROM golang:1.16.6-alpine AS build +FROM golang:1.16.7-alpine AS build WORKDIR /src RUN apk add --no-cache file ENV GOMODCACHE /root/.cache/gocache From ee663f96a1073a4f8246db79988c9c107192b6b6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 20 Aug 2021 14:54:12 +0000 Subject: [PATCH 37/41] build(deps): bump google.golang.org/grpc from 1.39.0 to 1.40.0 Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.39.0 to 1.40.0. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.39.0...v1.40.0) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 1b8c6613..4572ebef 100644 --- a/go.mod +++ b/go.mod @@ -36,7 +36,7 @@ require ( golang.org/x/sync v0.0.0-20210220032951-036812b2e83c golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e - google.golang.org/grpc v1.39.0 + google.golang.org/grpc v1.40.0 gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b ) diff --git a/go.sum b/go.sum index 1e6524ea..ad1dd1f9 100644 --- a/go.sum +++ b/go.sum @@ -1856,8 +1856,8 @@ google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAG google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.39.0 h1:Klz8I9kdtkIN6EpHHUOMLCYhTn/2WAe5a0s1hcBkdTI= -google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.40.0 h1:AGJ0Ih4mHjSeibYkFGh1dD9KJ/eOtZ93I6hoHhukQ5Q= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= 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= From 8a7b5e1b6303970908b34a07fd70e6a27b3d8c74 Mon Sep 17 00:00:00 2001 From: Tom Chauveau Date: Fri, 20 Aug 2021 17:06:22 +0200 Subject: [PATCH 38/41] Fix env & log global flags are no longer hidden. There was a hack in `version.go` that was hiding unused flag from that command. The problem is that the effect has spread to all commands. I've removed that trick to correctly display all flags because it's important for users to know how select an environment and configure log format. Signed-off-by: Tom Chauveau --- cmd/dagger/cmd/version.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cmd/dagger/cmd/version.go b/cmd/dagger/cmd/version.go index 3537cc95..7979e252 100644 --- a/cmd/dagger/cmd/version.go +++ b/cmd/dagger/cmd/version.go @@ -59,10 +59,6 @@ var versionCmd = &cobra.Command{ func init() { versionCmd.Flags().Bool("check", false, "check if dagger is up to date") - versionCmd.InheritedFlags().MarkHidden("environment") - versionCmd.InheritedFlags().MarkHidden("log-level") - versionCmd.InheritedFlags().MarkHidden("log-format") - if err := viper.BindPFlags(versionCmd.Flags()); err != nil { panic(err) } From c63617040ff4634f60f2df472ee70d32ac01d374 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 20 Aug 2021 15:16:34 +0000 Subject: [PATCH 39/41] build(deps): bump sass from 1.36.0 to 1.38.0 in /website Bumps [sass](https://github.com/sass/dart-sass) from 1.36.0 to 1.38.0. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md) - [Commits](https://github.com/sass/dart-sass/compare/1.36.0...1.38.0) --- updated-dependencies: - dependency-name: sass dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- website/package.json | 2 +- website/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/website/package.json b/website/package.json index 43dcf4df..965f83e6 100644 --- a/website/package.json +++ b/website/package.json @@ -28,7 +28,7 @@ "react": "^17.0.1", "react-dom": "^17.0.1", "react-social-login-buttons": "^3.5.1", - "sass": "^1.36.0", + "sass": "^1.38.0", "url-loader": "^4.1.1" }, "browserslist": { diff --git a/website/yarn.lock b/website/yarn.lock index 46cd5b1b..76391ad4 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -7548,10 +7548,10 @@ sass-loader@^10.1.1: schema-utils "^3.0.0" semver "^7.3.2" -sass@^1.36.0: - version "1.36.0" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.36.0.tgz#5912ef9d5d16714171ba11cb17edb274c4bbc07e" - integrity sha512-fQzEjipfOv5kh930nu3Imzq3ie/sGDc/4KtQMJlt7RRdrkQSfe37Bwi/Rf/gfuYHsIuE1fIlDMvpyMcEwjnPvg== +sass@^1.38.0: + version "1.38.0" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.38.0.tgz#2f3e60a1efdcdc910586fa79dc89d3399a145b4f" + integrity sha512-WBccZeMigAGKoI+NgD7Adh0ab1HUq+6BmyBUEaGxtErbUtWUevEbdgo5EZiJQofLUGcKtlNaO2IdN73AHEua5g== dependencies: chokidar ">=3.0.0 <4.0.0" From 201d3e3b68b4b903b93524ac179ce8ec18182a3d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 20 Aug 2021 15:31:26 +0000 Subject: [PATCH 40/41] build(deps): bump github.com/containerd/console from 1.0.2 to 1.0.3 Bumps [github.com/containerd/console](https://github.com/containerd/console) from 1.0.2 to 1.0.3. - [Release notes](https://github.com/containerd/console/releases) - [Commits](https://github.com/containerd/console/compare/v1.0.2...v1.0.3) --- updated-dependencies: - dependency-name: github.com/containerd/console dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 4 ++-- go.sum | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 1b8c6613..eda5287f 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( cuelang.org/go v0.4.0 filippo.io/age v1.0.0-rc.3 github.com/KromDaniel/jonson v0.0.0-20180630143114-d2f9c3c389db - github.com/containerd/console v1.0.2 + github.com/containerd/console v1.0.3 github.com/docker/buildx v0.6.1 github.com/docker/distribution v2.7.1+incompatible github.com/emicklei/proto v1.9.0 // indirect @@ -36,7 +36,7 @@ require ( golang.org/x/sync v0.0.0-20210220032951-036812b2e83c golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e - google.golang.org/grpc v1.39.0 + google.golang.org/grpc v1.40.0 gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b ) diff --git a/go.sum b/go.sum index 1e6524ea..7e9e18b0 100644 --- a/go.sum +++ b/go.sum @@ -310,8 +310,9 @@ github.com/containerd/console v0.0.0-20181022165439-0650fd9eeb50/go.mod h1:Tj/on github.com/containerd/console v0.0.0-20191206165004-02ecf6a7291e/go.mod h1:8Pf4gM6VEbTNRIT26AyyU7hxdQU3MvAvxVI0sc00XBE= github.com/containerd/console v1.0.0/go.mod h1:8Pf4gM6VEbTNRIT26AyyU7hxdQU3MvAvxVI0sc00XBE= github.com/containerd/console v1.0.1/go.mod h1:XUsP6YE/mKtz6bxc+I8UiKKTP04qjQL4qcS3XoQ5xkw= -github.com/containerd/console v1.0.2 h1:Pi6D+aZXM+oUw1czuKgH5IJ+y0jhYcwBJfx5/Ghn9dE= github.com/containerd/console v1.0.2/go.mod h1:ytZPjGgY2oeTkAONYafi2kSj0aYggsf8acV1PGKCbzQ= +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.2.10/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.3.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= @@ -1856,8 +1857,8 @@ google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAG google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.39.0 h1:Klz8I9kdtkIN6EpHHUOMLCYhTn/2WAe5a0s1hcBkdTI= -google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.40.0 h1:AGJ0Ih4mHjSeibYkFGh1dD9KJ/eOtZ93I6hoHhukQ5Q= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= 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= From 39ec4a0a2f96651e85e10d30283ae4b20341a578 Mon Sep 17 00:00:00 2001 From: Tom Chauveau Date: Fri, 20 Aug 2021 18:39:12 +0200 Subject: [PATCH 41/41] Fix waiting group in client runner Signed-off-by: Tom Chauveau --- client/client.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/client/client.go b/client/client.go index b75d325c..4709fa98 100644 --- a/client/client.go +++ b/client/client.go @@ -104,8 +104,14 @@ func (c *Client) Do(ctx context.Context, state *state.State, fn DoFunc) error { } func (c *Client) buildfn(ctx context.Context, st *state.State, env *environment.Environment, fn DoFunc, ch chan *bk.SolveStatus) error { + wg := sync.WaitGroup{} + // Close output channel - defer close(ch) + defer func() { + // Wait until all the events are caught + wg.Wait() + close(ch) + }() lg := log.Ctx(ctx) @@ -143,7 +149,6 @@ func (c *Client) buildfn(ctx context.Context, st *state.State, env *environment. Interface("attrs", opts.FrontendAttrs). Msg("spawning buildkit job") - wg := sync.WaitGroup{} // Catch output from events catchOutput := func(inCh chan *bk.SolveStatus) { for e := range inCh { @@ -220,8 +225,6 @@ func (c *Client) buildfn(ctx context.Context, st *state.State, env *environment. Msg("exporter response") } - // Wait until all the events are caught - wg.Wait() return nil }