status
stringclasses
1 value
repo_name
stringclasses
31 values
repo_url
stringclasses
31 values
issue_id
int64
1
104k
title
stringlengths
4
369
body
stringlengths
0
254k
issue_url
stringlengths
37
56
pull_url
stringlengths
37
54
before_fix_sha
stringlengths
40
40
after_fix_sha
stringlengths
40
40
report_datetime
unknown
language
stringclasses
5 values
commit_datetime
unknown
updated_file
stringlengths
4
188
file_content
stringlengths
0
5.12M
closed
dagger/dagger
https://github.com/dagger/dagger
3,588
Directory: rename `withCopiedFile` to `withFile`
See https://github.com/dagger/dagger/issues/3567#issuecomment-1294368392
https://github.com/dagger/dagger/issues/3588
https://github.com/dagger/dagger/pull/3590
530446113eeeeffb2aa0388641ba30d9a1435158
027d0c09d20c3900da341686699b4da3525034d7
"2022-10-28T20:36:31Z"
go
"2022-11-01T20:14:00Z"
core/directory.go
package core import ( "context" "fmt" "path" "reflect" bkclient "github.com/moby/buildkit/client" "github.com/moby/buildkit/client/llb" bkgw "github.com/moby/buildkit/frontend/gateway/client" "github.com/moby/buildkit/solver/pb" specs "github.com/opencontainers/image-spec/specs-go/v1" fstypes "github.com/tonistiigi/fsutil/types" ) // Directory is a content-addressed directory. type Directory struct { ID DirectoryID `json:"id"` } // DirectoryID is an opaque value representing a content-addressed directory. type DirectoryID string // directoryIDPayload is the inner content of a DirectoryID. type directoryIDPayload struct { LLB *pb.Definition `json:"llb"` Dir string `json:"dir"` Platform specs.Platform `json:"platform"` } // Decode returns the private payload of a DirectoryID. // // NB(vito): Ideally this would not be exported, but it's currently needed for // the project/ package. I left the return type private as a compromise. func (id DirectoryID) Decode() (*directoryIDPayload, error) { if id == "" { return &directoryIDPayload{}, nil } var payload directoryIDPayload if err := decodeID(&payload, id); err != nil { return nil, err } return &payload, nil } func (payload *directoryIDPayload) State() (llb.State, error) { if payload.LLB == nil { return llb.Scratch(), nil } return defToState(payload.LLB) } func (payload *directoryIDPayload) SetState(ctx context.Context, st llb.State) error { def, err := st.Marshal(ctx, llb.Platform(payload.Platform)) if err != nil { return nil } payload.LLB = def.ToPB() return nil } func (payload *directoryIDPayload) ToDirectory() (*Directory, error) { id, err := encodeID(payload) if err != nil { return nil, err } return &Directory{ ID: DirectoryID(id), }, nil } func NewDirectory(ctx context.Context, st llb.State, cwd string, platform specs.Platform) (*Directory, error) { payload := directoryIDPayload{ Dir: cwd, Platform: platform, } def, err := st.Marshal(ctx, llb.Platform(platform)) if err != nil { return nil, err } payload.LLB = def.ToPB() return payload.ToDirectory() } func (dir *Directory) Stat(ctx context.Context, gw bkgw.Client, src string) (*fstypes.Stat, error) { payload, err := dir.ID.Decode() if err != nil { return nil, err } src = path.Join(payload.Dir, src) // empty directory, i.e. llb.Scratch() if payload.LLB == nil { if path.Clean(src) == "." { // fake out a reasonable response return &fstypes.Stat{Path: src}, nil } return nil, fmt.Errorf("%s: no such file or directory", src) } res, err := gw.Solve(ctx, bkgw.SolveRequest{ Definition: payload.LLB, }) if err != nil { return nil, err } ref, err := res.SingleRef() if err != nil { return nil, err } stat, err := ref.StatFile(ctx, bkgw.StatRequest{ Path: src, }) if err != nil { return nil, err } return stat, nil } func (dir *Directory) Entries(ctx context.Context, gw bkgw.Client, src string) ([]string, error) { payload, err := dir.ID.Decode() if err != nil { return nil, err } src = path.Join(payload.Dir, src) // empty directory, i.e. llb.Scratch() if payload.LLB == nil { if path.Clean(src) == "." { return []string{}, nil } return nil, fmt.Errorf("%s: no such file or directory", src) } res, err := gw.Solve(ctx, bkgw.SolveRequest{ Definition: payload.LLB, }) if err != nil { return nil, err } ref, err := res.SingleRef() if err != nil { return nil, err } entries, err := ref.ReadDir(ctx, bkgw.ReadDirRequest{ Path: src, }) if err != nil { return nil, err } paths := []string{} for _, entry := range entries { paths = append(paths, entry.GetPath()) } return paths, nil } func (dir *Directory) WithNewFile(ctx context.Context, gw bkgw.Client, dest string, content []byte) (*Directory, error) { payload, err := dir.ID.Decode() if err != nil { return nil, err } // be sure to create the file under the working directory dest = path.Join(payload.Dir, dest) st, err := payload.State() if err != nil { return nil, err } parent, _ := path.Split(dest) if parent != "" { st = st.File(llb.Mkdir(parent, 0755, llb.WithParents(true))) } st = st.File( llb.Mkfile( dest, 0644, // TODO(vito): expose, issue: #3167 content, ), ) err = payload.SetState(ctx, st) if err != nil { return nil, err } return payload.ToDirectory() } func (dir *Directory) Directory(ctx context.Context, subdir string) (*Directory, error) { payload, err := dir.ID.Decode() if err != nil { return nil, err } payload.Dir = path.Join(payload.Dir, subdir) return payload.ToDirectory() } func (dir *Directory) File(ctx context.Context, file string) (*File, error) { payload, err := dir.ID.Decode() if err != nil { return nil, err } return (&fileIDPayload{ LLB: payload.LLB, File: path.Join(payload.Dir, file), Platform: payload.Platform, }).ToFile() } func (dir *Directory) WithDirectory(ctx context.Context, subdir string, src *Directory, filter CopyFilter) (*Directory, error) { destPayload, err := dir.ID.Decode() if err != nil { return nil, err } srcPayload, err := src.ID.Decode() if err != nil { return nil, err } st, err := destPayload.State() if err != nil { return nil, err } srcSt, err := srcPayload.State() if err != nil { return nil, err } st = st.File(llb.Copy(srcSt, srcPayload.Dir, path.Join(destPayload.Dir, subdir), &llb.CopyInfo{ CreateDestPath: true, CopyDirContentsOnly: true, IncludePatterns: filter.Include, ExcludePatterns: filter.Exclude, })) err = destPayload.SetState(ctx, st) if err != nil { return nil, err } return destPayload.ToDirectory() } func (dir *Directory) WithCopiedFile(ctx context.Context, subdir string, src *File) (*Directory, error) { destPayload, err := dir.ID.Decode() if err != nil { return nil, err } srcPayload, err := src.ID.decode() if err != nil { return nil, err } st, err := destPayload.State() if err != nil { return nil, err } srcSt, err := srcPayload.State() if err != nil { return nil, err } st = st.File(llb.Copy(srcSt, srcPayload.File, path.Join(destPayload.Dir, subdir), &llb.CopyInfo{ CreateDestPath: true, })) err = destPayload.SetState(ctx, st) if err != nil { return nil, err } return destPayload.ToDirectory() } func MergeDirectories(ctx context.Context, dirs []*Directory, platform specs.Platform) (*Directory, error) { states := make([]llb.State, 0, len(dirs)) for _, fs := range dirs { payload, err := fs.ID.Decode() if err != nil { return nil, err } if !reflect.DeepEqual(platform, payload.Platform) { // TODO(vito): work around with llb.Copy shenanigans? return nil, fmt.Errorf("TODO: cannot merge across platforms: %+v != %+v", platform, payload.Platform) } state, err := payload.State() if err != nil { return nil, err } states = append(states, state) } return NewDirectory(ctx, llb.Merge(states), "", platform) } func (dir *Directory) Diff(ctx context.Context, other *Directory) (*Directory, error) { lowerPayload, err := dir.ID.Decode() if err != nil { return nil, err } upperPayload, err := other.ID.Decode() if err != nil { return nil, err } if lowerPayload.Dir != upperPayload.Dir { // TODO(vito): work around with llb.Copy shenanigans? return nil, fmt.Errorf("TODO: cannot diff with different relative paths: %q != %q", lowerPayload.Dir, upperPayload.Dir) } if !reflect.DeepEqual(lowerPayload.Platform, upperPayload.Platform) { // TODO(vito): work around with llb.Copy shenanigans? return nil, fmt.Errorf("TODO: cannot diff across platforms: %+v != %+v", lowerPayload.Platform, upperPayload.Platform) } lowerSt, err := lowerPayload.State() if err != nil { return nil, err } upperSt, err := upperPayload.State() if err != nil { return nil, err } err = lowerPayload.SetState(ctx, llb.Diff(lowerSt, upperSt)) if err != nil { return nil, err } return lowerPayload.ToDirectory() } func (dir *Directory) Without(ctx context.Context, path string) (*Directory, error) { payload, err := dir.ID.Decode() if err != nil { return nil, err } st, err := payload.State() if err != nil { return nil, err } err = payload.SetState(ctx, st.File(llb.Rm(path))) if err != nil { return nil, err } return payload.ToDirectory() } func (dir *Directory) Export( ctx context.Context, host *Host, dest string, bkClient *bkclient.Client, solveOpts bkclient.SolveOpt, solveCh chan<- *bkclient.SolveStatus, ) error { srcPayload, err := dir.ID.Decode() if err != nil { return err } return host.Export(ctx, dest, bkClient, solveOpts, solveCh, func(ctx context.Context, gw bkgw.Client) (*bkgw.Result, error) { src, err := srcPayload.State() if err != nil { return nil, err } var defPB *pb.Definition if srcPayload.Dir != "" { src = llb.Scratch().File(llb.Copy(src, srcPayload.Dir, ".", &llb.CopyInfo{ CopyDirContentsOnly: true, })) def, err := src.Marshal(ctx, llb.Platform(srcPayload.Platform)) if err != nil { return nil, err } defPB = def.ToPB() } else { defPB = srcPayload.LLB } return gw.Solve(ctx, bkgw.SolveRequest{ Evaluate: true, Definition: defPB, }) }) }
closed
dagger/dagger
https://github.com/dagger/dagger
3,588
Directory: rename `withCopiedFile` to `withFile`
See https://github.com/dagger/dagger/issues/3567#issuecomment-1294368392
https://github.com/dagger/dagger/issues/3588
https://github.com/dagger/dagger/pull/3590
530446113eeeeffb2aa0388641ba30d9a1435158
027d0c09d20c3900da341686699b4da3525034d7
"2022-10-28T20:36:31Z"
go
"2022-11-01T20:14:00Z"
core/integration/directory_test.go
package core import ( "testing" "dagger.io/dagger" "github.com/dagger/dagger/core" "github.com/dagger/dagger/internal/testutil" "github.com/stretchr/testify/require" ) func TestEmptyDirectory(t *testing.T) { t.Parallel() var res struct { Directory struct { ID core.DirectoryID Entries []string } } err := testutil.Query( `{ directory { id entries } }`, &res, nil) require.NoError(t, err) require.Empty(t, res.Directory.ID) require.Empty(t, res.Directory.Entries) } func TestDirectoryWithNewFile(t *testing.T) { t.Parallel() var res struct { Directory struct { WithNewFile struct { ID core.DirectoryID Entries []string } } } err := testutil.Query( `{ directory { withNewFile(path: "some-file", contents: "some-content") { id entries } } }`, &res, nil) require.NoError(t, err) require.NotEmpty(t, res.Directory.WithNewFile.ID) require.Equal(t, []string{"some-file"}, res.Directory.WithNewFile.Entries) } func TestDirectoryEntries(t *testing.T) { t.Parallel() var res struct { Directory struct { WithNewFile struct { WithNewFile struct { Entries []string } } } } err := testutil.Query( `{ directory { withNewFile(path: "some-file", contents: "some-content") { withNewFile(path: "some-dir/sub-file", contents: "some-content") { entries } } } }`, &res, nil) require.NoError(t, err) require.ElementsMatch(t, []string{"some-file", "some-dir"}, res.Directory.WithNewFile.WithNewFile.Entries) } func TestDirectoryEntriesOfPath(t *testing.T) { t.Parallel() var res struct { Directory struct { WithNewFile struct { WithNewFile struct { Entries []string } } } } err := testutil.Query( `{ directory { withNewFile(path: "some-file", contents: "some-content") { withNewFile(path: "some-dir/sub-file", contents: "some-content") { entries(path: "some-dir") } } } }`, &res, nil) require.NoError(t, err) require.Equal(t, []string{"sub-file"}, res.Directory.WithNewFile.WithNewFile.Entries) } func TestDirectoryDirectory(t *testing.T) { t.Parallel() var res struct { Directory struct { WithNewFile struct { WithNewFile struct { Directory struct { Entries []string } } } } } err := testutil.Query( `{ directory { withNewFile(path: "some-file", contents: "some-content") { withNewFile(path: "some-dir/sub-file", contents: "some-content") { directory(path: "some-dir") { entries } } } } }`, &res, nil) require.NoError(t, err) require.Equal(t, []string{"sub-file"}, res.Directory.WithNewFile.WithNewFile.Directory.Entries) } func TestDirectoryDirectoryWithNewFile(t *testing.T) { t.Parallel() var res struct { Directory struct { WithNewFile struct { WithNewFile struct { Directory struct { WithNewFile struct { Entries []string } } } } } } err := testutil.Query( `{ directory { withNewFile(path: "some-file", contents: "some-content") { withNewFile(path: "some-dir/sub-file", contents: "some-content") { directory(path: "some-dir") { withNewFile(path: "another-file", contents: "more-content") { entries } } } } } }`, &res, nil) require.NoError(t, err) require.ElementsMatch(t, []string{"sub-file", "another-file"}, res.Directory.WithNewFile.WithNewFile.Directory.WithNewFile.Entries) } func TestDirectoryWithDirectory(t *testing.T) { t.Parallel() c, ctx := connect(t) defer c.Close() dirID, err := c.Directory(). WithNewFile("some-file", dagger.DirectoryWithNewFileOpts{ Contents: "some-content", }). WithNewFile("some-dir/sub-file", dagger.DirectoryWithNewFileOpts{ Contents: "sub-content", }). Directory("some-dir").ID(ctx) require.NoError(t, err) entries, err := c.Directory().WithDirectory(dirID, "with-dir").Entries(ctx, dagger.DirectoryEntriesOpts{ Path: "with-dir", }) require.NoError(t, err) require.Equal(t, []string{"sub-file"}, entries) entries, err = c.Directory().WithDirectory(dirID, "sub-dir/sub-sub-dir/with-dir").Entries(ctx, dagger.DirectoryEntriesOpts{ Path: "sub-dir/sub-sub-dir/with-dir", }) require.NoError(t, err) require.Equal(t, []string{"sub-file"}, entries) t.Run("copies directory contents to .", func(t *testing.T) { entries, err := c.Directory().WithDirectory(dirID, ".").Entries(ctx) require.NoError(t, err) require.Equal(t, []string{"sub-file"}, entries) }) } func TestDirectoryWithDirectoryIncludeExclude(t *testing.T) { t.Parallel() c, ctx := connect(t) defer c.Close() dir := c.Directory(). WithNewFile("a.txt"). WithNewFile("b.txt"). WithNewFile("c.txt.rar"). WithNewFile("subdir/d.txt"). WithNewFile("subdir/e.txt"). WithNewFile("subdir/f.txt.rar") dirID, err := dir.ID(ctx) require.NoError(t, err) t.Run("exclude", func(t *testing.T) { entries, err := c.Directory().WithDirectory(dirID, ".", dagger.DirectoryWithDirectoryOpts{ Exclude: []string{"*.rar"}, }).Entries(ctx) require.NoError(t, err) require.Equal(t, []string{"a.txt", "b.txt", "subdir"}, entries) }) t.Run("include", func(t *testing.T) { entries, err := c.Directory().WithDirectory(dirID, ".", dagger.DirectoryWithDirectoryOpts{ Include: []string{"*.rar"}, }).Entries(ctx) require.NoError(t, err) require.Equal(t, []string{"c.txt.rar"}, entries) }) t.Run("exclude overrides include", func(t *testing.T) { entries, err := c.Directory().WithDirectory(dirID, ".", dagger.DirectoryWithDirectoryOpts{ Include: []string{"*.txt"}, Exclude: []string{"b.txt"}, }).Entries(ctx) require.NoError(t, err) require.Equal(t, []string{"a.txt"}, entries) }) t.Run("include does not override exclude", func(t *testing.T) { entries, err := c.Directory().WithDirectory(dirID, ".", dagger.DirectoryWithDirectoryOpts{ Include: []string{"a.txt"}, Exclude: []string{"*.txt"}, }).Entries(ctx) require.NoError(t, err) require.Equal(t, []string{}, entries) }) subdirID, err := dir.Directory("subdir").ID(ctx) require.NoError(t, err) t.Run("exclude respects subdir", func(t *testing.T) { entries, err := c.Directory().WithDirectory(subdirID, ".", dagger.DirectoryWithDirectoryOpts{ Exclude: []string{"*.rar"}, }).Entries(ctx) require.NoError(t, err) require.Equal(t, []string{"d.txt", "e.txt"}, entries) }) } func TestDirectoryWithCopiedFile(t *testing.T) { var fileRes struct { Directory struct { WithNewFile struct { File struct { ID core.DirectoryID } } } } err := testutil.Query( `{ directory { withNewFile(path: "some-file", contents: "some-content") { file(path: "some-file") { id } } } }`, &fileRes, nil) require.NoError(t, err) require.NotEmpty(t, fileRes.Directory.WithNewFile.File.ID) var res struct { Directory struct { WithCopiedFile struct { File struct { ID core.DirectoryID Contents string } } } } err = testutil.Query( `query Test($src: FileID!) { directory { withCopiedFile(path: "target-file", source: $src) { file(path: "target-file") { id contents } } } }`, &res, &testutil.QueryOptions{ Variables: map[string]any{ "src": fileRes.Directory.WithNewFile.File.ID, }, }) require.NoError(t, err) require.NotEmpty(t, res.Directory.WithCopiedFile.File.ID) require.Equal(t, "some-content", res.Directory.WithCopiedFile.File.Contents) } func TestDirectoryWithoutDirectory(t *testing.T) { t.Parallel() dirID := newDirWithFiles(t, "some-file", "some-content", "some-dir/sub-file", "sub-content") var res2 struct { Directory struct { WithDirectory struct { WithoutDirectory struct { Entries []string } } } } err := testutil.Query( `query Test($src: DirectoryID!) { directory { withDirectory(path: "with-dir", directory: $src) { withoutDirectory(path: "with-dir/some-dir") { entries(path: "with-dir") } } } }`, &res2, &testutil.QueryOptions{ Variables: map[string]any{ "src": dirID, }, }) require.NoError(t, err) require.Equal(t, []string{"some-file"}, res2.Directory.WithDirectory.WithoutDirectory.Entries) } func TestDirectoryWithoutFile(t *testing.T) { t.Parallel() dirID := newDirWithFiles(t, "some-file", "some-content", "some-dir/sub-file", "sub-content") var res2 struct { Directory struct { WithDirectory struct { WithoutFile struct { Entries []string } } } } err := testutil.Query( `query Test($src: DirectoryID!) { directory { withDirectory(path: "with-dir", directory: $src) { withoutFile(path: "with-dir/some-file") { entries(path: "with-dir") } } } }`, &res2, &testutil.QueryOptions{ Variables: map[string]any{ "src": dirID, }, }) require.NoError(t, err) require.Equal(t, []string{"some-dir"}, res2.Directory.WithDirectory.WithoutFile.Entries) } func TestDirectoryDiff(t *testing.T) { t.Parallel() aID := newDirWithFile(t, "a-file", "a-content") bID := newDirWithFile(t, "b-file", "b-content") var res struct { Directory struct { Diff struct { Entries []string } } } diff := `query Diff($id: DirectoryID!, $other: DirectoryID!) { directory(id: $id) { diff(other: $other) { entries } } }` err := testutil.Query(diff, &res, &testutil.QueryOptions{ Variables: map[string]any{ "id": aID, "other": bID, }, }) require.NoError(t, err) require.Equal(t, []string{"b-file"}, res.Directory.Diff.Entries) err = testutil.Query(diff, &res, &testutil.QueryOptions{ Variables: map[string]any{ "id": bID, "other": aID, }, }) require.NoError(t, err) require.Equal(t, []string{"a-file"}, res.Directory.Diff.Entries) /* This triggers a nil panic in Buildkit! Issue: https://github.com/dagger/dagger/issues/3337 This might be fixed once we update Buildkit. err = testutil.Query(diff, &res, &testutil.QueryOptions{ Variables: map[string]any{ "id": aID, "other": aID, }, }) require.NoError(t, err) require.Empty(t, res.Directory.Diff.Entries) */ }
closed
dagger/dagger
https://github.com/dagger/dagger
3,588
Directory: rename `withCopiedFile` to `withFile`
See https://github.com/dagger/dagger/issues/3567#issuecomment-1294368392
https://github.com/dagger/dagger/issues/3588
https://github.com/dagger/dagger/pull/3590
530446113eeeeffb2aa0388641ba30d9a1435158
027d0c09d20c3900da341686699b4da3525034d7
"2022-10-28T20:36:31Z"
go
"2022-11-01T20:14:00Z"
core/schema/README.md
# Core API proposal This directory contains a proposal for a complete GraphQL API for Dagger. It is written with the following goals in mind: 1. Feature parity with Dagger 0.2 2. Close to feature parity with Buildkit, with an incremental path to reaching full parity in the future 3. Follow established graphql best practices 4. Sove as many outstanding DX problems as possible ## Reference - [Environment](host.graphqls) - [Container](container.graphqls) - [Directory](directory.graphqls) - [File](file.graphqls) - [Git](git.graphqls) - [HTTP](http.graphqls) - [Secret](secret.graphqls) ## DX problems solved Some problems in the DX that are not yet resolved, and this proposal would help solve, include: - Uncertainty as to how to express uploads in a graphql-friendly way (deployment, image push, git push, etc) - Chaining of FS operations greatly reduces verbosity, but cannot be applied all the time - Transitioning a script to an extension requires non-trivial refactoring, to tease apart the script-specific code from the underlying "API". - The API sandbox is amazing for prototyping small queries, but of limited use when multiple queries must reference each other. This is because the native code doing the stitching cannot be run by the playground, so filesystem IDs must be manually copy-pasted between queries. ## Design highlights ### `withX` and `withoutX` To avoid the use of rpc-style verbs (a graphql best practice) and maximize chaining (a strength of our DX), we use the terminology `withX` and `withoutX`. A field of the form _withX_ returns the same object with content _X_ added or changed. Example: ```graphql "An empty directory with a README copied to it" query readmeDir($readme: FileID!) { directory { withCopiedFile(source: $readme, path: "README.md") { id } } "An empty container with an app directory mounted into it" query appContainer($app: DirectoryID!) { container { withMountedDirectory(source: $app, path: "/app") { id } } } ``` A field of the form _withoutX_ returns the same object with content _X_ removed. ```graphql "Remove node_modules from a JS project" query removeNodeModules($dir: DirectoryID!) { directory(id: $dir) { withoutDirectory(path: "node_modules") { id } } } ``` ### Secrets Secret handling has been simplified and made more consistent with Directory handling. - Secrets have an ID, and can be loaded by ID in the standard graphql manner - Secrets can be created in one of two ways: 1. From an environment variable: `type Environment { secret }` 2. From a file: `type Directory { secret }` ### Embrace the llb / Dockerfile model The `Container` type proposes an expansive definition of the container, similar to the Buildkit/Dockerfile model. A `Container` is: 1. A filesystem state 2. An OCI artifact which can be pulled from, and pushed to a repository at any time 3. A persistent configuration to be applied to all commands executed inside it This is similar to how buildkit models llb state, and how the Dockerfile language models stage state. Note that Dagger extends this model to include even mount configuration (which are scoped to exec in buildkit, but scoped to container in dagger). Examples: ```graphql """ Download a file over HTTP in a very convoluted way: 1. Download a base linux container 2. Install curl 3. Download the file into the container 4. Load and return the file """ query convolutedDownload($url: String!) { container { from(address: "index.docker.io/alpine:latest") { exec(args: ["apk", "add", "curl"]) { exec(args: ["curl", "-o", "/tmp/download", $url) { file(path: "/tmp/download") { id } } } } } """ Specialize two containers from a common base """ query twoContainers { container { from(address: "alpine") { debug: withVariable(name: "DEBUG", value: "1") { id exec(args: ["env"]) { stdout } } noDebug: withVariable(name: "DEBUG", value: "0") { id exec(args: ["env"]) { stdout } } } } } ```
closed
dagger/dagger
https://github.com/dagger/dagger
3,588
Directory: rename `withCopiedFile` to `withFile`
See https://github.com/dagger/dagger/issues/3567#issuecomment-1294368392
https://github.com/dagger/dagger/issues/3588
https://github.com/dagger/dagger/pull/3590
530446113eeeeffb2aa0388641ba30d9a1435158
027d0c09d20c3900da341686699b4da3525034d7
"2022-10-28T20:36:31Z"
go
"2022-11-01T20:14:00Z"
core/schema/directory.go
package schema import ( "github.com/dagger/dagger/core" "github.com/dagger/dagger/router" ) type directorySchema struct { *baseSchema host *core.Host } var _ router.ExecutableSchema = &directorySchema{} func (s *directorySchema) Name() string { return "directory" } func (s *directorySchema) Schema() string { return Directory } var directoryIDResolver = stringResolver(core.DirectoryID("")) func (s *directorySchema) Resolvers() router.Resolvers { return router.Resolvers{ "DirectoryID": directoryIDResolver, "Query": router.ObjectResolver{ "directory": router.ToResolver(s.directory), }, "Directory": router.ObjectResolver{ "entries": router.ToResolver(s.entries), "file": router.ToResolver(s.file), "withNewFile": router.ToResolver(s.withNewFile), "withCopiedFile": router.ToResolver(s.withCopiedFile), "withoutFile": router.ToResolver(s.withoutFile), "directory": router.ToResolver(s.subdirectory), "withDirectory": router.ToResolver(s.withDirectory), "withoutDirectory": router.ToResolver(s.withoutDirectory), "diff": router.ToResolver(s.diff), "export": router.ToResolver(s.export), }, } } func (s *directorySchema) Dependencies() []router.ExecutableSchema { return nil } type directoryArgs struct { ID core.DirectoryID } func (s *directorySchema) directory(ctx *router.Context, parent any, args directoryArgs) (*core.Directory, error) { return &core.Directory{ ID: args.ID, }, nil } type subdirectoryArgs struct { Path string } func (s *directorySchema) subdirectory(ctx *router.Context, parent *core.Directory, args subdirectoryArgs) (*core.Directory, error) { return parent.Directory(ctx, args.Path) } type withDirectoryArgs struct { Path string Directory core.DirectoryID core.CopyFilter } func (s *directorySchema) withDirectory(ctx *router.Context, parent *core.Directory, args withDirectoryArgs) (*core.Directory, error) { return parent.WithDirectory(ctx, args.Path, &core.Directory{ID: args.Directory}, args.CopyFilter) } type entriesArgs struct { Path string } func (s *directorySchema) entries(ctx *router.Context, parent *core.Directory, args entriesArgs) ([]string, error) { return parent.Entries(ctx, s.gw, args.Path) } type dirFileArgs struct { Path string } func (s *directorySchema) file(ctx *router.Context, parent *core.Directory, args dirFileArgs) (*core.File, error) { return parent.File(ctx, args.Path) } type withNewFileArgs struct { Path string Contents string } func (s *directorySchema) withNewFile(ctx *router.Context, parent *core.Directory, args withNewFileArgs) (*core.Directory, error) { return parent.WithNewFile(ctx, s.gw, args.Path, []byte(args.Contents)) } type withCopiedFileArgs struct { Path string Source core.FileID } func (s *directorySchema) withCopiedFile(ctx *router.Context, parent *core.Directory, args withCopiedFileArgs) (*core.Directory, error) { return parent.WithCopiedFile(ctx, args.Path, &core.File{ID: args.Source}) } type withoutDirectoryArgs struct { Path string } func (s *directorySchema) withoutDirectory(ctx *router.Context, parent *core.Directory, args withoutDirectoryArgs) (*core.Directory, error) { return parent.Without(ctx, args.Path) } type withoutFileArgs struct { Path string } func (s *directorySchema) withoutFile(ctx *router.Context, parent *core.Directory, args withoutFileArgs) (*core.Directory, error) { return parent.Without(ctx, args.Path) } type diffArgs struct { Other core.DirectoryID } func (s *directorySchema) diff(ctx *router.Context, parent *core.Directory, args diffArgs) (*core.Directory, error) { return parent.Diff(ctx, &core.Directory{ID: args.Other}) } type exportArgs struct { Path string } func (s *directorySchema) export(ctx *router.Context, parent *core.Directory, args exportArgs) (bool, error) { err := parent.Export(ctx, s.host, args.Path, s.bkClient, s.solveOpts, s.solveCh) if err != nil { return false, err } return true, nil }
closed
dagger/dagger
https://github.com/dagger/dagger
3,588
Directory: rename `withCopiedFile` to `withFile`
See https://github.com/dagger/dagger/issues/3567#issuecomment-1294368392
https://github.com/dagger/dagger/issues/3588
https://github.com/dagger/dagger/pull/3590
530446113eeeeffb2aa0388641ba30d9a1435158
027d0c09d20c3900da341686699b4da3525034d7
"2022-10-28T20:36:31Z"
go
"2022-11-01T20:14:00Z"
core/schema/directory.graphqls
extend type Query { "Load a directory by ID. No argument produces an empty directory." directory(id: DirectoryID): Directory! } "A content-addressed directory identifier" scalar DirectoryID "A directory" type Directory { "The content-addressed identifier of the directory" id: DirectoryID! "Return a list of files and directories at the given path" entries(path: String): [String!]! "Retrieve a file at the given path" file(path: String!): File! "This directory plus a new file written at the given path" withNewFile(path: String!, contents: String): Directory! "This directory plus the contents of the given file copied to the given path" withCopiedFile(path: String!, source: FileID!): Directory! "This directory with the file at the given path removed" withoutFile(path: String!): Directory! "Retrieve a directory at the given path" directory(path: String!): Directory! "This directory plus a directory written at the given path" withDirectory( path: String! directory: DirectoryID! exclude: [String!] include: [String!] ): Directory! "This directory with the directory at the given path removed" withoutDirectory(path: String!): Directory! "The difference between this directory and an another directory" diff(other: DirectoryID!): Directory! "Write the contents of the directory to a path on the host" export(path: String!): Boolean! }
closed
dagger/dagger
https://github.com/dagger/dagger
3,588
Directory: rename `withCopiedFile` to `withFile`
See https://github.com/dagger/dagger/issues/3567#issuecomment-1294368392
https://github.com/dagger/dagger/issues/3588
https://github.com/dagger/dagger/pull/3590
530446113eeeeffb2aa0388641ba30d9a1435158
027d0c09d20c3900da341686699b4da3525034d7
"2022-10-28T20:36:31Z"
go
"2022-11-01T20:14:00Z"
magefile.go
//go:build mage // +build mage package main import ( "context" "errors" "fmt" "os" "runtime" "dagger.io/dagger" "github.com/dagger/dagger/codegen/generator" "github.com/google/go-cmp/cmp" "github.com/magefile/mage/mg" // mg contains helpful utility functions, like Deps ) type Lint mg.Namespace // All runs all lint targets func (t Lint) All(ctx context.Context) error { mg.Deps( t.Codegen, t.Markdown, ) return nil } // Markdown lints the markdown files func (Lint) Markdown(ctx context.Context) error { c, err := dagger.Connect(ctx, dagger.WithLogOutput(os.Stderr)) if err != nil { return err } defer c.Close() workdir := c.Host().Workdir() src, err := workdir.ID(ctx) if err != nil { return err } cfg, err := workdir.File(".markdownlint.yaml").ID(ctx) if err != nil { return err } _, err = c.Container(). From("tmknom/markdownlint:0.31.1"). WithMountedDirectory("/src", src). WithMountedFile("/src/.markdownlint.yaml", cfg). WithWorkdir("/src"). Exec(dagger.ContainerExecOpts{ Args: []string{ "-c", ".markdownlint.yaml", "--", "./docs", "README.md", }, }).ExitCode(ctx) return err } // Codegen ensure the SDK code was re-generated func (Lint) Codegen(ctx context.Context) error { c, err := dagger.Connect(ctx, dagger.WithLogOutput(os.Stderr)) if err != nil { return err } defer c.Close() generated, err := generator.IntrospectAndGenerate(ctx, c, generator.Config{ Package: "dagger", }) if err != nil { return err } // grab the file from the repo src, err := c. Host(). Workdir(). File("sdk/go/api.gen.go"). Contents(ctx) if err != nil { return err } // compare the two diff := cmp.Diff(string(generated), src) if diff != "" { return fmt.Errorf("generated api mismatch. please run `go generate ./...`:\n%s", diff) } return nil } // Build builds the binary func Build(ctx context.Context) error { c, err := dagger.Connect(ctx, dagger.WithLogOutput(os.Stderr)) if err != nil { return err } defer c.Close() workdir := c.Host().Workdir() builder := c.Container(). From("golang:1.19-alpine"). WithEnvVariable("CGO_ENABLED", "0"). WithEnvVariable("GOOS", runtime.GOOS). WithEnvVariable("GOARCH", runtime.GOARCH). WithWorkdir("/app") // install dependencies modules := c.Directory() for _, f := range []string{"go.mod", "go.sum", "sdk/go/go.mod", "sdk/go/go.sum"} { fileID, err := workdir.File(f).ID(ctx) if err != nil { return err } modules = modules.WithCopiedFile(f, fileID) } modID, err := modules.ID(ctx) if err != nil { return err } builder = builder. WithMountedDirectory("/app", modID). Exec(dagger.ContainerExecOpts{ Args: []string{"go", "mod", "download"}, }) src, err := workdir.ID(ctx) if err != nil { return err } builder = builder. WithMountedDirectory("/app", src).WithWorkdir("/app"). Exec(dagger.ContainerExecOpts{ Args: []string{"go", "build", "-o", "./bin/cloak", "-ldflags", "-s -w", "/app/cmd/cloak"}, }) ok, err := builder.Directory("./bin").Export(ctx, "./bin") if err != nil { return err } if !ok { return errors.New("HostDirectoryWrite not ok") } return nil }
closed
dagger/dagger
https://github.com/dagger/dagger
3,588
Directory: rename `withCopiedFile` to `withFile`
See https://github.com/dagger/dagger/issues/3567#issuecomment-1294368392
https://github.com/dagger/dagger/issues/3588
https://github.com/dagger/dagger/pull/3590
530446113eeeeffb2aa0388641ba30d9a1435158
027d0c09d20c3900da341686699b4da3525034d7
"2022-10-28T20:36:31Z"
go
"2022-11-01T20:14:00Z"
sdk/go/api.gen.go
// Code generated by dagger. DO NOT EDIT. package dagger import ( "context" "dagger.io/dagger/internal/querybuilder" "github.com/Khan/genqlient/graphql" ) // graphqlMarshaller is an interface for marshalling an object into GraphQL. type graphqlMarshaller interface { // GraphQLType returns the native GraphQL type name graphqlType() string // GraphQLMarshal serializes the structure into GraphQL graphqlMarshal(ctx context.Context) (any, error) } // A global cache volume identifier type CacheID string // graphqlType returns the native GraphQL type name func (s CacheID) graphqlType() string { return "CacheID" } // graphqlMarshal serializes the structure into GraphQL func (s CacheID) graphqlMarshal(ctx context.Context) (any, error) { return string(s), nil } // A unique container identifier. Null designates an empty container (scratch). type ContainerID string // graphqlType returns the native GraphQL type name func (s ContainerID) graphqlType() string { return "ContainerID" } // graphqlMarshal serializes the structure into GraphQL func (s ContainerID) graphqlMarshal(ctx context.Context) (any, error) { return string(s), nil } // A content-addressed directory identifier type DirectoryID string // graphqlType returns the native GraphQL type name func (s DirectoryID) graphqlType() string { return "DirectoryID" } // graphqlMarshal serializes the structure into GraphQL func (s DirectoryID) graphqlMarshal(ctx context.Context) (any, error) { return string(s), nil } type FileID string // graphqlType returns the native GraphQL type name func (s FileID) graphqlType() string { return "FileID" } // graphqlMarshal serializes the structure into GraphQL func (s FileID) graphqlMarshal(ctx context.Context) (any, error) { return string(s), nil } type Platform string // graphqlType returns the native GraphQL type name func (s Platform) graphqlType() string { return "Platform" } // graphqlMarshal serializes the structure into GraphQL func (s Platform) graphqlMarshal(ctx context.Context) (any, error) { return string(s), nil } // A unique identifier for a secret type SecretID string // graphqlType returns the native GraphQL type name func (s SecretID) graphqlType() string { return "SecretID" } // graphqlMarshal serializes the structure into GraphQL func (s SecretID) graphqlMarshal(ctx context.Context) (any, error) { return string(s), nil } // A directory whose contents persist across runs type CacheVolume struct { q *querybuilder.Selection c graphql.Client } func (r *CacheVolume) ID(ctx context.Context) (CacheID, error) { q := r.q.Select("id") var response CacheID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // graphqlType returns the native GraphQL type name func (r *CacheVolume) graphqlType() string { return "CacheVolume" } // graphqlMarshal serializes the structure into GraphQL func (r *CacheVolume) graphqlMarshal(ctx context.Context) (any, error) { id, err := r.ID(ctx) if err != nil { return nil, err } return map[string]any{"id": id}, nil } // An OCI-compatible container, also known as a docker container type Container struct { q *querybuilder.Selection c graphql.Client } // ContainerBuildOpts contains options for Container.Build type ContainerBuildOpts struct { Dockerfile string } // Initialize this container from a Dockerfile build func (r *Container) Build(context DirectoryID, opts ...ContainerBuildOpts) *Container { q := r.q.Select("build") q = q.Arg("context", context) // `dockerfile` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Dockerfile) { q = q.Arg("dockerfile", opts[i].Dockerfile) break } } return &Container{ q: q, c: r.c, } } // Default arguments for future commands func (r *Container) DefaultArgs(ctx context.Context) ([]string, error) { q := r.q.Select("defaultArgs") var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Retrieve a directory at the given path. Mounts are included. func (r *Container) Directory(path string) *Directory { q := r.q.Select("directory") q = q.Arg("path", path) return &Directory{ q: q, c: r.c, } } // Entrypoint to be prepended to the arguments of all commands func (r *Container) Entrypoint(ctx context.Context) ([]string, error) { q := r.q.Select("entrypoint") var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The value of the specified environment variable func (r *Container) EnvVariable(ctx context.Context, name string) (string, error) { q := r.q.Select("envVariable") q = q.Arg("name", name) var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // A list of environment variables passed to commands func (r *Container) EnvVariables(ctx context.Context) ([]EnvVariable, error) { q := r.q.Select("envVariables") var response []EnvVariable q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // ContainerExecOpts contains options for Container.Exec type ContainerExecOpts struct { Args []string RedirectStderr string RedirectStdout string Stdin string } // This container after executing the specified command inside it func (r *Container) Exec(opts ...ContainerExecOpts) *Container { q := r.q.Select("exec") // `args` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Args) { q = q.Arg("args", opts[i].Args) break } } // `redirectStderr` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].RedirectStderr) { q = q.Arg("redirectStderr", opts[i].RedirectStderr) break } } // `redirectStdout` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].RedirectStdout) { q = q.Arg("redirectStdout", opts[i].RedirectStdout) break } } // `stdin` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Stdin) { q = q.Arg("stdin", opts[i].Stdin) break } } return &Container{ q: q, c: r.c, } } // Exit code of the last executed command. Zero means success. // Null if no command has been executed. func (r *Container) ExitCode(ctx context.Context) (int, error) { q := r.q.Select("exitCode") var response int q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Retrieve a file at the given path. Mounts are included. func (r *Container) File(path string) *File { q := r.q.Select("file") q = q.Arg("path", path) return &File{ q: q, c: r.c, } } // Initialize this container from the base image published at the given address func (r *Container) From(address string) *Container { q := r.q.Select("from") q = q.Arg("address", address) return &Container{ q: q, c: r.c, } } // This container's root filesystem. Mounts are not included. func (r *Container) FS() *Directory { q := r.q.Select("fs") return &Directory{ q: q, c: r.c, } } // A unique identifier for this container func (r *Container) ID(ctx context.Context) (ContainerID, error) { q := r.q.Select("id") var response ContainerID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // graphqlType returns the native GraphQL type name func (r *Container) graphqlType() string { return "Container" } // graphqlMarshal serializes the structure into GraphQL func (r *Container) graphqlMarshal(ctx context.Context) (any, error) { id, err := r.ID(ctx) if err != nil { return nil, err } return map[string]any{"id": id}, nil } // List of paths where a directory is mounted func (r *Container) Mounts(ctx context.Context) ([]string, error) { q := r.q.Select("mounts") var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The platform this container executes and publishes as func (r *Container) Platform(ctx context.Context) (Platform, error) { q := r.q.Select("platform") var response Platform q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // ContainerPublishOpts contains options for Container.Publish type ContainerPublishOpts struct { PlatformVariants []ContainerID } // Publish this container as a new image, returning a fully qualified ref func (r *Container) Publish(ctx context.Context, address string, opts ...ContainerPublishOpts) (string, error) { q := r.q.Select("publish") q = q.Arg("address", address) // `platformVariants` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].PlatformVariants) { q = q.Arg("platformVariants", opts[i].PlatformVariants) break } } var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The error stream of the last executed command. // Null if no command has been executed. func (r *Container) Stderr() *File { q := r.q.Select("stderr") return &File{ q: q, c: r.c, } } // The output stream of the last executed command. // Null if no command has been executed. func (r *Container) Stdout() *File { q := r.q.Select("stdout") return &File{ q: q, c: r.c, } } // The user to be set for all commands func (r *Container) User(ctx context.Context) (string, error) { q := r.q.Select("user") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // ContainerWithDefaultArgsOpts contains options for Container.WithDefaultArgs type ContainerWithDefaultArgsOpts struct { Args []string } // Configures default arguments for future commands func (r *Container) WithDefaultArgs(opts ...ContainerWithDefaultArgsOpts) *Container { q := r.q.Select("withDefaultArgs") // `args` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Args) { q = q.Arg("args", opts[i].Args) break } } return &Container{ q: q, c: r.c, } } // This container but with a different command entrypoint func (r *Container) WithEntrypoint(args []string) *Container { q := r.q.Select("withEntrypoint") q = q.Arg("args", args) return &Container{ q: q, c: r.c, } } // This container plus the given environment variable func (r *Container) WithEnvVariable(name string, value string) *Container { q := r.q.Select("withEnvVariable") q = q.Arg("name", name) q = q.Arg("value", value) return &Container{ q: q, c: r.c, } } // Initialize this container from this DirectoryID func (r *Container) WithFS(id DirectoryID) *Container { q := r.q.Select("withFS") q = q.Arg("id", id) return &Container{ q: q, c: r.c, } } // ContainerWithMountedCacheOpts contains options for Container.WithMountedCache type ContainerWithMountedCacheOpts struct { Source DirectoryID } // This container plus a cache volume mounted at the given path func (r *Container) WithMountedCache(cache CacheID, path string, opts ...ContainerWithMountedCacheOpts) *Container { q := r.q.Select("withMountedCache") q = q.Arg("cache", cache) q = q.Arg("path", path) // `source` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Source) { q = q.Arg("source", opts[i].Source) break } } return &Container{ q: q, c: r.c, } } // This container plus a directory mounted at the given path func (r *Container) WithMountedDirectory(path string, source DirectoryID) *Container { q := r.q.Select("withMountedDirectory") q = q.Arg("path", path) q = q.Arg("source", source) return &Container{ q: q, c: r.c, } } // This container plus a file mounted at the given path func (r *Container) WithMountedFile(path string, source FileID) *Container { q := r.q.Select("withMountedFile") q = q.Arg("path", path) q = q.Arg("source", source) return &Container{ q: q, c: r.c, } } // This container plus a secret mounted into a file at the given path func (r *Container) WithMountedSecret(path string, source SecretID) *Container { q := r.q.Select("withMountedSecret") q = q.Arg("path", path) q = q.Arg("source", source) return &Container{ q: q, c: r.c, } } // This container plus a temporary directory mounted at the given path func (r *Container) WithMountedTemp(path string) *Container { q := r.q.Select("withMountedTemp") q = q.Arg("path", path) return &Container{ q: q, c: r.c, } } // This container plus an env variable containing the given secret func (r *Container) WithSecretVariable(name string, secret SecretID) *Container { q := r.q.Select("withSecretVariable") q = q.Arg("name", name) q = q.Arg("secret", secret) return &Container{ q: q, c: r.c, } } // This container but with a different command user func (r *Container) WithUser(name string) *Container { q := r.q.Select("withUser") q = q.Arg("name", name) return &Container{ q: q, c: r.c, } } // This container but with a different working directory func (r *Container) WithWorkdir(path string) *Container { q := r.q.Select("withWorkdir") q = q.Arg("path", path) return &Container{ q: q, c: r.c, } } // This container minus the given environment variable func (r *Container) WithoutEnvVariable(name string) *Container { q := r.q.Select("withoutEnvVariable") q = q.Arg("name", name) return &Container{ q: q, c: r.c, } } // This container after unmounting everything at the given path. func (r *Container) WithoutMount(path string) *Container { q := r.q.Select("withoutMount") q = q.Arg("path", path) return &Container{ q: q, c: r.c, } } // The working directory for all commands func (r *Container) Workdir(ctx context.Context) (string, error) { q := r.q.Select("workdir") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // A directory type Directory struct { q *querybuilder.Selection c graphql.Client } // The difference between this directory and an another directory func (r *Directory) Diff(other DirectoryID) *Directory { q := r.q.Select("diff") q = q.Arg("other", other) return &Directory{ q: q, c: r.c, } } // Retrieve a directory at the given path func (r *Directory) Directory(path string) *Directory { q := r.q.Select("directory") q = q.Arg("path", path) return &Directory{ q: q, c: r.c, } } // DirectoryEntriesOpts contains options for Directory.Entries type DirectoryEntriesOpts struct { Path string } // Return a list of files and directories at the given path func (r *Directory) Entries(ctx context.Context, opts ...DirectoryEntriesOpts) ([]string, error) { q := r.q.Select("entries") // `path` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Path) { q = q.Arg("path", opts[i].Path) break } } var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Write the contents of the directory to a path on the host func (r *Directory) Export(ctx context.Context, path string) (bool, error) { q := r.q.Select("export") q = q.Arg("path", path) var response bool q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Retrieve a file at the given path func (r *Directory) File(path string) *File { q := r.q.Select("file") q = q.Arg("path", path) return &File{ q: q, c: r.c, } } // The content-addressed identifier of the directory func (r *Directory) ID(ctx context.Context) (DirectoryID, error) { q := r.q.Select("id") var response DirectoryID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // graphqlType returns the native GraphQL type name func (r *Directory) graphqlType() string { return "Directory" } // graphqlMarshal serializes the structure into GraphQL func (r *Directory) graphqlMarshal(ctx context.Context) (any, error) { id, err := r.ID(ctx) if err != nil { return nil, err } return map[string]any{"id": id}, nil } // load a project's metadata func (r *Directory) LoadProject(configPath string) *Project { q := r.q.Select("loadProject") q = q.Arg("configPath", configPath) return &Project{ q: q, c: r.c, } } // This directory plus the contents of the given file copied to the given path func (r *Directory) WithCopiedFile(path string, source FileID) *Directory { q := r.q.Select("withCopiedFile") q = q.Arg("path", path) q = q.Arg("source", source) return &Directory{ q: q, c: r.c, } } // DirectoryWithDirectoryOpts contains options for Directory.WithDirectory type DirectoryWithDirectoryOpts struct { Exclude []string Include []string } // This directory plus a directory written at the given path func (r *Directory) WithDirectory(directory DirectoryID, path string, opts ...DirectoryWithDirectoryOpts) *Directory { q := r.q.Select("withDirectory") q = q.Arg("directory", directory) // `exclude` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Exclude) { q = q.Arg("exclude", opts[i].Exclude) break } } // `include` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Include) { q = q.Arg("include", opts[i].Include) break } } q = q.Arg("path", path) return &Directory{ q: q, c: r.c, } } // DirectoryWithNewFileOpts contains options for Directory.WithNewFile type DirectoryWithNewFileOpts struct { Contents string } // This directory plus a new file written at the given path func (r *Directory) WithNewFile(path string, opts ...DirectoryWithNewFileOpts) *Directory { q := r.q.Select("withNewFile") // `contents` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Contents) { q = q.Arg("contents", opts[i].Contents) break } } q = q.Arg("path", path) return &Directory{ q: q, c: r.c, } } // This directory with the directory at the given path removed func (r *Directory) WithoutDirectory(path string) *Directory { q := r.q.Select("withoutDirectory") q = q.Arg("path", path) return &Directory{ q: q, c: r.c, } } // This directory with the file at the given path removed func (r *Directory) WithoutFile(path string) *Directory { q := r.q.Select("withoutFile") q = q.Arg("path", path) return &Directory{ q: q, c: r.c, } } // EnvVariable is a simple key value object that represents an environment variable. type EnvVariable struct { q *querybuilder.Selection c graphql.Client } // name is the environment variable name. func (r *EnvVariable) Name(ctx context.Context) (string, error) { q := r.q.Select("name") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // value is the environment variable value func (r *EnvVariable) Value(ctx context.Context) (string, error) { q := r.q.Select("value") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // A file type File struct { q *querybuilder.Selection c graphql.Client } // The contents of the file func (r *File) Contents(ctx context.Context) (string, error) { q := r.q.Select("contents") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The content-addressed identifier of the file func (r *File) ID(ctx context.Context) (FileID, error) { q := r.q.Select("id") var response FileID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // graphqlType returns the native GraphQL type name func (r *File) graphqlType() string { return "File" } // graphqlMarshal serializes the structure into GraphQL func (r *File) graphqlMarshal(ctx context.Context) (any, error) { id, err := r.ID(ctx) if err != nil { return nil, err } return map[string]any{"id": id}, nil } func (r *File) Secret() *Secret { q := r.q.Select("secret") return &Secret{ q: q, c: r.c, } } // The size of the file, in bytes func (r *File) Size(ctx context.Context) (int, error) { q := r.q.Select("size") var response int q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // A git ref (tag or branch) type GitRef struct { q *querybuilder.Selection c graphql.Client } // The digest of the current value of this ref func (r *GitRef) Digest(ctx context.Context) (string, error) { q := r.q.Select("digest") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The filesystem tree at this ref func (r *GitRef) Tree() *Directory { q := r.q.Select("tree") return &Directory{ q: q, c: r.c, } } // A git repository type GitRepository struct { q *querybuilder.Selection c graphql.Client } // Details on one branch func (r *GitRepository) Branch(name string) *GitRef { q := r.q.Select("branch") q = q.Arg("name", name) return &GitRef{ q: q, c: r.c, } } // List of branches on the repository func (r *GitRepository) Branches(ctx context.Context) ([]string, error) { q := r.q.Select("branches") var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Details on one tag func (r *GitRepository) Tag(name string) *GitRef { q := r.q.Select("tag") q = q.Arg("name", name) return &GitRef{ q: q, c: r.c, } } // List of tags on the repository func (r *GitRepository) Tags(ctx context.Context) ([]string, error) { q := r.q.Select("tags") var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Information about the host execution environment type Host struct { q *querybuilder.Selection c graphql.Client } // HostDirectoryOpts contains options for Host.Directory type HostDirectoryOpts struct { Exclude []string Include []string } // Access a directory on the host func (r *Host) Directory(path string, opts ...HostDirectoryOpts) *Directory { q := r.q.Select("directory") // `exclude` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Exclude) { q = q.Arg("exclude", opts[i].Exclude) break } } // `include` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Include) { q = q.Arg("include", opts[i].Include) break } } q = q.Arg("path", path) return &Directory{ q: q, c: r.c, } } // Lookup the value of an environment variable. Null if the variable is not available. func (r *Host) EnvVariable(name string) *HostVariable { q := r.q.Select("envVariable") q = q.Arg("name", name) return &HostVariable{ q: q, c: r.c, } } // HostWorkdirOpts contains options for Host.Workdir type HostWorkdirOpts struct { Exclude []string Include []string } // The current working directory on the host func (r *Host) Workdir(opts ...HostWorkdirOpts) *Directory { q := r.q.Select("workdir") // `exclude` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Exclude) { q = q.Arg("exclude", opts[i].Exclude) break } } // `include` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Include) { q = q.Arg("include", opts[i].Include) break } } return &Directory{ q: q, c: r.c, } } // An environment variable on the host environment type HostVariable struct { q *querybuilder.Selection c graphql.Client } // A secret referencing the value of this variable func (r *HostVariable) Secret() *Secret { q := r.q.Select("secret") return &Secret{ q: q, c: r.c, } } // The value of this variable func (r *HostVariable) Value(ctx context.Context) (string, error) { q := r.q.Select("value") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // A set of scripts and/or extensions type Project struct { q *querybuilder.Selection c graphql.Client } // extensions in this project func (r *Project) Extensions(ctx context.Context) ([]Project, error) { q := r.q.Select("extensions") var response []Project q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Code files generated by the SDKs in the project func (r *Project) GeneratedCode() *Directory { q := r.q.Select("generatedCode") return &Directory{ q: q, c: r.c, } } // install the project's schema func (r *Project) Install(ctx context.Context) (bool, error) { q := r.q.Select("install") var response bool q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // name of the project func (r *Project) Name(ctx context.Context) (string, error) { q := r.q.Select("name") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // schema provided by the project func (r *Project) Schema(ctx context.Context) (string, error) { q := r.q.Select("schema") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // sdk used to generate code for and/or execute this project func (r *Project) SDK(ctx context.Context) (string, error) { q := r.q.Select("sdk") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } type Query struct { q *querybuilder.Selection c graphql.Client } // Construct a cache volume for a given cache key func (r *Query) CacheVolume(key string) *CacheVolume { q := r.q.Select("cacheVolume") q = q.Arg("key", key) return &CacheVolume{ q: q, c: r.c, } } // ContainerOpts contains options for Query.Container type ContainerOpts struct { ID ContainerID Platform Platform } // Load a container from ID. // Null ID returns an empty container (scratch). // Optional platform argument initializes new containers to execute and publish as that platform. Platform defaults to that of the builder's host. func (r *Query) Container(opts ...ContainerOpts) *Container { q := r.q.Select("container") // `id` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].ID) { q = q.Arg("id", opts[i].ID) break } } // `platform` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Platform) { q = q.Arg("platform", opts[i].Platform) break } } return &Container{ q: q, c: r.c, } } // The default platform of the builder. func (r *Query) DefaultPlatform(ctx context.Context) (Platform, error) { q := r.q.Select("defaultPlatform") var response Platform q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // DirectoryOpts contains options for Query.Directory type DirectoryOpts struct { ID DirectoryID } // Load a directory by ID. No argument produces an empty directory. func (r *Query) Directory(opts ...DirectoryOpts) *Directory { q := r.q.Select("directory") // `id` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].ID) { q = q.Arg("id", opts[i].ID) break } } return &Directory{ q: q, c: r.c, } } // Load a file by ID func (r *Query) File(id FileID) *File { q := r.q.Select("file") q = q.Arg("id", id) return &File{ q: q, c: r.c, } } // Query a git repository func (r *Query) Git(url string) *GitRepository { q := r.q.Select("git") q = q.Arg("url", url) return &GitRepository{ q: q, c: r.c, } } // Query the host environment func (r *Query) Host() *Host { q := r.q.Select("host") return &Host{ q: q, c: r.c, } } // An http remote func (r *Query) HTTP(url string) *File { q := r.q.Select("http") q = q.Arg("url", url) return &File{ q: q, c: r.c, } } // Look up a project by name func (r *Query) Project(name string) *Project { q := r.q.Select("project") q = q.Arg("name", name) return &Project{ q: q, c: r.c, } } // Load a secret from its ID func (r *Query) Secret(id SecretID) *Secret { q := r.q.Select("secret") q = q.Arg("id", id) return &Secret{ q: q, c: r.c, } } // A reference to a secret value, which can be handled more safely than the value itself type Secret struct { q *querybuilder.Selection c graphql.Client } // The identifier for this secret func (r *Secret) ID(ctx context.Context) (SecretID, error) { q := r.q.Select("id") var response SecretID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // graphqlType returns the native GraphQL type name func (r *Secret) graphqlType() string { return "Secret" } // graphqlMarshal serializes the structure into GraphQL func (r *Secret) graphqlMarshal(ctx context.Context) (any, error) { id, err := r.ID(ctx) if err != nil { return nil, err } return map[string]any{"id": id}, nil } // The value of this secret func (r *Secret) Plaintext(ctx context.Context) (string, error) { q := r.q.Select("plaintext") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) }
closed
dagger/dagger
https://github.com/dagger/dagger
3,567
Directory: add `withNewDirectory` for creating an empty dir
New naming scheme for copying files/dirs vs creating files/dirs: https://github.com/dagger/dagger/issues/3567#issuecomment-1294368392 > * `withDirectory`, `withFile`: copy a directory/file (source always required) > > * `withNewDirectory`, `withNewFile`: create a new directory/file This issue is for adding `withNewDirectory` since `withNewFile` already exists.
https://github.com/dagger/dagger/issues/3567
https://github.com/dagger/dagger/pull/3590
530446113eeeeffb2aa0388641ba30d9a1435158
027d0c09d20c3900da341686699b4da3525034d7
"2022-10-26T22:43:16Z"
go
"2022-11-01T20:14:00Z"
core/directory.go
package core import ( "context" "fmt" "path" "reflect" bkclient "github.com/moby/buildkit/client" "github.com/moby/buildkit/client/llb" bkgw "github.com/moby/buildkit/frontend/gateway/client" "github.com/moby/buildkit/solver/pb" specs "github.com/opencontainers/image-spec/specs-go/v1" fstypes "github.com/tonistiigi/fsutil/types" ) // Directory is a content-addressed directory. type Directory struct { ID DirectoryID `json:"id"` } // DirectoryID is an opaque value representing a content-addressed directory. type DirectoryID string // directoryIDPayload is the inner content of a DirectoryID. type directoryIDPayload struct { LLB *pb.Definition `json:"llb"` Dir string `json:"dir"` Platform specs.Platform `json:"platform"` } // Decode returns the private payload of a DirectoryID. // // NB(vito): Ideally this would not be exported, but it's currently needed for // the project/ package. I left the return type private as a compromise. func (id DirectoryID) Decode() (*directoryIDPayload, error) { if id == "" { return &directoryIDPayload{}, nil } var payload directoryIDPayload if err := decodeID(&payload, id); err != nil { return nil, err } return &payload, nil } func (payload *directoryIDPayload) State() (llb.State, error) { if payload.LLB == nil { return llb.Scratch(), nil } return defToState(payload.LLB) } func (payload *directoryIDPayload) SetState(ctx context.Context, st llb.State) error { def, err := st.Marshal(ctx, llb.Platform(payload.Platform)) if err != nil { return nil } payload.LLB = def.ToPB() return nil } func (payload *directoryIDPayload) ToDirectory() (*Directory, error) { id, err := encodeID(payload) if err != nil { return nil, err } return &Directory{ ID: DirectoryID(id), }, nil } func NewDirectory(ctx context.Context, st llb.State, cwd string, platform specs.Platform) (*Directory, error) { payload := directoryIDPayload{ Dir: cwd, Platform: platform, } def, err := st.Marshal(ctx, llb.Platform(platform)) if err != nil { return nil, err } payload.LLB = def.ToPB() return payload.ToDirectory() } func (dir *Directory) Stat(ctx context.Context, gw bkgw.Client, src string) (*fstypes.Stat, error) { payload, err := dir.ID.Decode() if err != nil { return nil, err } src = path.Join(payload.Dir, src) // empty directory, i.e. llb.Scratch() if payload.LLB == nil { if path.Clean(src) == "." { // fake out a reasonable response return &fstypes.Stat{Path: src}, nil } return nil, fmt.Errorf("%s: no such file or directory", src) } res, err := gw.Solve(ctx, bkgw.SolveRequest{ Definition: payload.LLB, }) if err != nil { return nil, err } ref, err := res.SingleRef() if err != nil { return nil, err } stat, err := ref.StatFile(ctx, bkgw.StatRequest{ Path: src, }) if err != nil { return nil, err } return stat, nil } func (dir *Directory) Entries(ctx context.Context, gw bkgw.Client, src string) ([]string, error) { payload, err := dir.ID.Decode() if err != nil { return nil, err } src = path.Join(payload.Dir, src) // empty directory, i.e. llb.Scratch() if payload.LLB == nil { if path.Clean(src) == "." { return []string{}, nil } return nil, fmt.Errorf("%s: no such file or directory", src) } res, err := gw.Solve(ctx, bkgw.SolveRequest{ Definition: payload.LLB, }) if err != nil { return nil, err } ref, err := res.SingleRef() if err != nil { return nil, err } entries, err := ref.ReadDir(ctx, bkgw.ReadDirRequest{ Path: src, }) if err != nil { return nil, err } paths := []string{} for _, entry := range entries { paths = append(paths, entry.GetPath()) } return paths, nil } func (dir *Directory) WithNewFile(ctx context.Context, gw bkgw.Client, dest string, content []byte) (*Directory, error) { payload, err := dir.ID.Decode() if err != nil { return nil, err } // be sure to create the file under the working directory dest = path.Join(payload.Dir, dest) st, err := payload.State() if err != nil { return nil, err } parent, _ := path.Split(dest) if parent != "" { st = st.File(llb.Mkdir(parent, 0755, llb.WithParents(true))) } st = st.File( llb.Mkfile( dest, 0644, // TODO(vito): expose, issue: #3167 content, ), ) err = payload.SetState(ctx, st) if err != nil { return nil, err } return payload.ToDirectory() } func (dir *Directory) Directory(ctx context.Context, subdir string) (*Directory, error) { payload, err := dir.ID.Decode() if err != nil { return nil, err } payload.Dir = path.Join(payload.Dir, subdir) return payload.ToDirectory() } func (dir *Directory) File(ctx context.Context, file string) (*File, error) { payload, err := dir.ID.Decode() if err != nil { return nil, err } return (&fileIDPayload{ LLB: payload.LLB, File: path.Join(payload.Dir, file), Platform: payload.Platform, }).ToFile() } func (dir *Directory) WithDirectory(ctx context.Context, subdir string, src *Directory, filter CopyFilter) (*Directory, error) { destPayload, err := dir.ID.Decode() if err != nil { return nil, err } srcPayload, err := src.ID.Decode() if err != nil { return nil, err } st, err := destPayload.State() if err != nil { return nil, err } srcSt, err := srcPayload.State() if err != nil { return nil, err } st = st.File(llb.Copy(srcSt, srcPayload.Dir, path.Join(destPayload.Dir, subdir), &llb.CopyInfo{ CreateDestPath: true, CopyDirContentsOnly: true, IncludePatterns: filter.Include, ExcludePatterns: filter.Exclude, })) err = destPayload.SetState(ctx, st) if err != nil { return nil, err } return destPayload.ToDirectory() } func (dir *Directory) WithCopiedFile(ctx context.Context, subdir string, src *File) (*Directory, error) { destPayload, err := dir.ID.Decode() if err != nil { return nil, err } srcPayload, err := src.ID.decode() if err != nil { return nil, err } st, err := destPayload.State() if err != nil { return nil, err } srcSt, err := srcPayload.State() if err != nil { return nil, err } st = st.File(llb.Copy(srcSt, srcPayload.File, path.Join(destPayload.Dir, subdir), &llb.CopyInfo{ CreateDestPath: true, })) err = destPayload.SetState(ctx, st) if err != nil { return nil, err } return destPayload.ToDirectory() } func MergeDirectories(ctx context.Context, dirs []*Directory, platform specs.Platform) (*Directory, error) { states := make([]llb.State, 0, len(dirs)) for _, fs := range dirs { payload, err := fs.ID.Decode() if err != nil { return nil, err } if !reflect.DeepEqual(platform, payload.Platform) { // TODO(vito): work around with llb.Copy shenanigans? return nil, fmt.Errorf("TODO: cannot merge across platforms: %+v != %+v", platform, payload.Platform) } state, err := payload.State() if err != nil { return nil, err } states = append(states, state) } return NewDirectory(ctx, llb.Merge(states), "", platform) } func (dir *Directory) Diff(ctx context.Context, other *Directory) (*Directory, error) { lowerPayload, err := dir.ID.Decode() if err != nil { return nil, err } upperPayload, err := other.ID.Decode() if err != nil { return nil, err } if lowerPayload.Dir != upperPayload.Dir { // TODO(vito): work around with llb.Copy shenanigans? return nil, fmt.Errorf("TODO: cannot diff with different relative paths: %q != %q", lowerPayload.Dir, upperPayload.Dir) } if !reflect.DeepEqual(lowerPayload.Platform, upperPayload.Platform) { // TODO(vito): work around with llb.Copy shenanigans? return nil, fmt.Errorf("TODO: cannot diff across platforms: %+v != %+v", lowerPayload.Platform, upperPayload.Platform) } lowerSt, err := lowerPayload.State() if err != nil { return nil, err } upperSt, err := upperPayload.State() if err != nil { return nil, err } err = lowerPayload.SetState(ctx, llb.Diff(lowerSt, upperSt)) if err != nil { return nil, err } return lowerPayload.ToDirectory() } func (dir *Directory) Without(ctx context.Context, path string) (*Directory, error) { payload, err := dir.ID.Decode() if err != nil { return nil, err } st, err := payload.State() if err != nil { return nil, err } err = payload.SetState(ctx, st.File(llb.Rm(path))) if err != nil { return nil, err } return payload.ToDirectory() } func (dir *Directory) Export( ctx context.Context, host *Host, dest string, bkClient *bkclient.Client, solveOpts bkclient.SolveOpt, solveCh chan<- *bkclient.SolveStatus, ) error { srcPayload, err := dir.ID.Decode() if err != nil { return err } return host.Export(ctx, dest, bkClient, solveOpts, solveCh, func(ctx context.Context, gw bkgw.Client) (*bkgw.Result, error) { src, err := srcPayload.State() if err != nil { return nil, err } var defPB *pb.Definition if srcPayload.Dir != "" { src = llb.Scratch().File(llb.Copy(src, srcPayload.Dir, ".", &llb.CopyInfo{ CopyDirContentsOnly: true, })) def, err := src.Marshal(ctx, llb.Platform(srcPayload.Platform)) if err != nil { return nil, err } defPB = def.ToPB() } else { defPB = srcPayload.LLB } return gw.Solve(ctx, bkgw.SolveRequest{ Evaluate: true, Definition: defPB, }) }) }
closed
dagger/dagger
https://github.com/dagger/dagger
3,567
Directory: add `withNewDirectory` for creating an empty dir
New naming scheme for copying files/dirs vs creating files/dirs: https://github.com/dagger/dagger/issues/3567#issuecomment-1294368392 > * `withDirectory`, `withFile`: copy a directory/file (source always required) > > * `withNewDirectory`, `withNewFile`: create a new directory/file This issue is for adding `withNewDirectory` since `withNewFile` already exists.
https://github.com/dagger/dagger/issues/3567
https://github.com/dagger/dagger/pull/3590
530446113eeeeffb2aa0388641ba30d9a1435158
027d0c09d20c3900da341686699b4da3525034d7
"2022-10-26T22:43:16Z"
go
"2022-11-01T20:14:00Z"
core/integration/directory_test.go
package core import ( "testing" "dagger.io/dagger" "github.com/dagger/dagger/core" "github.com/dagger/dagger/internal/testutil" "github.com/stretchr/testify/require" ) func TestEmptyDirectory(t *testing.T) { t.Parallel() var res struct { Directory struct { ID core.DirectoryID Entries []string } } err := testutil.Query( `{ directory { id entries } }`, &res, nil) require.NoError(t, err) require.Empty(t, res.Directory.ID) require.Empty(t, res.Directory.Entries) } func TestDirectoryWithNewFile(t *testing.T) { t.Parallel() var res struct { Directory struct { WithNewFile struct { ID core.DirectoryID Entries []string } } } err := testutil.Query( `{ directory { withNewFile(path: "some-file", contents: "some-content") { id entries } } }`, &res, nil) require.NoError(t, err) require.NotEmpty(t, res.Directory.WithNewFile.ID) require.Equal(t, []string{"some-file"}, res.Directory.WithNewFile.Entries) } func TestDirectoryEntries(t *testing.T) { t.Parallel() var res struct { Directory struct { WithNewFile struct { WithNewFile struct { Entries []string } } } } err := testutil.Query( `{ directory { withNewFile(path: "some-file", contents: "some-content") { withNewFile(path: "some-dir/sub-file", contents: "some-content") { entries } } } }`, &res, nil) require.NoError(t, err) require.ElementsMatch(t, []string{"some-file", "some-dir"}, res.Directory.WithNewFile.WithNewFile.Entries) } func TestDirectoryEntriesOfPath(t *testing.T) { t.Parallel() var res struct { Directory struct { WithNewFile struct { WithNewFile struct { Entries []string } } } } err := testutil.Query( `{ directory { withNewFile(path: "some-file", contents: "some-content") { withNewFile(path: "some-dir/sub-file", contents: "some-content") { entries(path: "some-dir") } } } }`, &res, nil) require.NoError(t, err) require.Equal(t, []string{"sub-file"}, res.Directory.WithNewFile.WithNewFile.Entries) } func TestDirectoryDirectory(t *testing.T) { t.Parallel() var res struct { Directory struct { WithNewFile struct { WithNewFile struct { Directory struct { Entries []string } } } } } err := testutil.Query( `{ directory { withNewFile(path: "some-file", contents: "some-content") { withNewFile(path: "some-dir/sub-file", contents: "some-content") { directory(path: "some-dir") { entries } } } } }`, &res, nil) require.NoError(t, err) require.Equal(t, []string{"sub-file"}, res.Directory.WithNewFile.WithNewFile.Directory.Entries) } func TestDirectoryDirectoryWithNewFile(t *testing.T) { t.Parallel() var res struct { Directory struct { WithNewFile struct { WithNewFile struct { Directory struct { WithNewFile struct { Entries []string } } } } } } err := testutil.Query( `{ directory { withNewFile(path: "some-file", contents: "some-content") { withNewFile(path: "some-dir/sub-file", contents: "some-content") { directory(path: "some-dir") { withNewFile(path: "another-file", contents: "more-content") { entries } } } } } }`, &res, nil) require.NoError(t, err) require.ElementsMatch(t, []string{"sub-file", "another-file"}, res.Directory.WithNewFile.WithNewFile.Directory.WithNewFile.Entries) } func TestDirectoryWithDirectory(t *testing.T) { t.Parallel() c, ctx := connect(t) defer c.Close() dirID, err := c.Directory(). WithNewFile("some-file", dagger.DirectoryWithNewFileOpts{ Contents: "some-content", }). WithNewFile("some-dir/sub-file", dagger.DirectoryWithNewFileOpts{ Contents: "sub-content", }). Directory("some-dir").ID(ctx) require.NoError(t, err) entries, err := c.Directory().WithDirectory(dirID, "with-dir").Entries(ctx, dagger.DirectoryEntriesOpts{ Path: "with-dir", }) require.NoError(t, err) require.Equal(t, []string{"sub-file"}, entries) entries, err = c.Directory().WithDirectory(dirID, "sub-dir/sub-sub-dir/with-dir").Entries(ctx, dagger.DirectoryEntriesOpts{ Path: "sub-dir/sub-sub-dir/with-dir", }) require.NoError(t, err) require.Equal(t, []string{"sub-file"}, entries) t.Run("copies directory contents to .", func(t *testing.T) { entries, err := c.Directory().WithDirectory(dirID, ".").Entries(ctx) require.NoError(t, err) require.Equal(t, []string{"sub-file"}, entries) }) } func TestDirectoryWithDirectoryIncludeExclude(t *testing.T) { t.Parallel() c, ctx := connect(t) defer c.Close() dir := c.Directory(). WithNewFile("a.txt"). WithNewFile("b.txt"). WithNewFile("c.txt.rar"). WithNewFile("subdir/d.txt"). WithNewFile("subdir/e.txt"). WithNewFile("subdir/f.txt.rar") dirID, err := dir.ID(ctx) require.NoError(t, err) t.Run("exclude", func(t *testing.T) { entries, err := c.Directory().WithDirectory(dirID, ".", dagger.DirectoryWithDirectoryOpts{ Exclude: []string{"*.rar"}, }).Entries(ctx) require.NoError(t, err) require.Equal(t, []string{"a.txt", "b.txt", "subdir"}, entries) }) t.Run("include", func(t *testing.T) { entries, err := c.Directory().WithDirectory(dirID, ".", dagger.DirectoryWithDirectoryOpts{ Include: []string{"*.rar"}, }).Entries(ctx) require.NoError(t, err) require.Equal(t, []string{"c.txt.rar"}, entries) }) t.Run("exclude overrides include", func(t *testing.T) { entries, err := c.Directory().WithDirectory(dirID, ".", dagger.DirectoryWithDirectoryOpts{ Include: []string{"*.txt"}, Exclude: []string{"b.txt"}, }).Entries(ctx) require.NoError(t, err) require.Equal(t, []string{"a.txt"}, entries) }) t.Run("include does not override exclude", func(t *testing.T) { entries, err := c.Directory().WithDirectory(dirID, ".", dagger.DirectoryWithDirectoryOpts{ Include: []string{"a.txt"}, Exclude: []string{"*.txt"}, }).Entries(ctx) require.NoError(t, err) require.Equal(t, []string{}, entries) }) subdirID, err := dir.Directory("subdir").ID(ctx) require.NoError(t, err) t.Run("exclude respects subdir", func(t *testing.T) { entries, err := c.Directory().WithDirectory(subdirID, ".", dagger.DirectoryWithDirectoryOpts{ Exclude: []string{"*.rar"}, }).Entries(ctx) require.NoError(t, err) require.Equal(t, []string{"d.txt", "e.txt"}, entries) }) } func TestDirectoryWithCopiedFile(t *testing.T) { var fileRes struct { Directory struct { WithNewFile struct { File struct { ID core.DirectoryID } } } } err := testutil.Query( `{ directory { withNewFile(path: "some-file", contents: "some-content") { file(path: "some-file") { id } } } }`, &fileRes, nil) require.NoError(t, err) require.NotEmpty(t, fileRes.Directory.WithNewFile.File.ID) var res struct { Directory struct { WithCopiedFile struct { File struct { ID core.DirectoryID Contents string } } } } err = testutil.Query( `query Test($src: FileID!) { directory { withCopiedFile(path: "target-file", source: $src) { file(path: "target-file") { id contents } } } }`, &res, &testutil.QueryOptions{ Variables: map[string]any{ "src": fileRes.Directory.WithNewFile.File.ID, }, }) require.NoError(t, err) require.NotEmpty(t, res.Directory.WithCopiedFile.File.ID) require.Equal(t, "some-content", res.Directory.WithCopiedFile.File.Contents) } func TestDirectoryWithoutDirectory(t *testing.T) { t.Parallel() dirID := newDirWithFiles(t, "some-file", "some-content", "some-dir/sub-file", "sub-content") var res2 struct { Directory struct { WithDirectory struct { WithoutDirectory struct { Entries []string } } } } err := testutil.Query( `query Test($src: DirectoryID!) { directory { withDirectory(path: "with-dir", directory: $src) { withoutDirectory(path: "with-dir/some-dir") { entries(path: "with-dir") } } } }`, &res2, &testutil.QueryOptions{ Variables: map[string]any{ "src": dirID, }, }) require.NoError(t, err) require.Equal(t, []string{"some-file"}, res2.Directory.WithDirectory.WithoutDirectory.Entries) } func TestDirectoryWithoutFile(t *testing.T) { t.Parallel() dirID := newDirWithFiles(t, "some-file", "some-content", "some-dir/sub-file", "sub-content") var res2 struct { Directory struct { WithDirectory struct { WithoutFile struct { Entries []string } } } } err := testutil.Query( `query Test($src: DirectoryID!) { directory { withDirectory(path: "with-dir", directory: $src) { withoutFile(path: "with-dir/some-file") { entries(path: "with-dir") } } } }`, &res2, &testutil.QueryOptions{ Variables: map[string]any{ "src": dirID, }, }) require.NoError(t, err) require.Equal(t, []string{"some-dir"}, res2.Directory.WithDirectory.WithoutFile.Entries) } func TestDirectoryDiff(t *testing.T) { t.Parallel() aID := newDirWithFile(t, "a-file", "a-content") bID := newDirWithFile(t, "b-file", "b-content") var res struct { Directory struct { Diff struct { Entries []string } } } diff := `query Diff($id: DirectoryID!, $other: DirectoryID!) { directory(id: $id) { diff(other: $other) { entries } } }` err := testutil.Query(diff, &res, &testutil.QueryOptions{ Variables: map[string]any{ "id": aID, "other": bID, }, }) require.NoError(t, err) require.Equal(t, []string{"b-file"}, res.Directory.Diff.Entries) err = testutil.Query(diff, &res, &testutil.QueryOptions{ Variables: map[string]any{ "id": bID, "other": aID, }, }) require.NoError(t, err) require.Equal(t, []string{"a-file"}, res.Directory.Diff.Entries) /* This triggers a nil panic in Buildkit! Issue: https://github.com/dagger/dagger/issues/3337 This might be fixed once we update Buildkit. err = testutil.Query(diff, &res, &testutil.QueryOptions{ Variables: map[string]any{ "id": aID, "other": aID, }, }) require.NoError(t, err) require.Empty(t, res.Directory.Diff.Entries) */ }
closed
dagger/dagger
https://github.com/dagger/dagger
3,567
Directory: add `withNewDirectory` for creating an empty dir
New naming scheme for copying files/dirs vs creating files/dirs: https://github.com/dagger/dagger/issues/3567#issuecomment-1294368392 > * `withDirectory`, `withFile`: copy a directory/file (source always required) > > * `withNewDirectory`, `withNewFile`: create a new directory/file This issue is for adding `withNewDirectory` since `withNewFile` already exists.
https://github.com/dagger/dagger/issues/3567
https://github.com/dagger/dagger/pull/3590
530446113eeeeffb2aa0388641ba30d9a1435158
027d0c09d20c3900da341686699b4da3525034d7
"2022-10-26T22:43:16Z"
go
"2022-11-01T20:14:00Z"
core/schema/README.md
# Core API proposal This directory contains a proposal for a complete GraphQL API for Dagger. It is written with the following goals in mind: 1. Feature parity with Dagger 0.2 2. Close to feature parity with Buildkit, with an incremental path to reaching full parity in the future 3. Follow established graphql best practices 4. Sove as many outstanding DX problems as possible ## Reference - [Environment](host.graphqls) - [Container](container.graphqls) - [Directory](directory.graphqls) - [File](file.graphqls) - [Git](git.graphqls) - [HTTP](http.graphqls) - [Secret](secret.graphqls) ## DX problems solved Some problems in the DX that are not yet resolved, and this proposal would help solve, include: - Uncertainty as to how to express uploads in a graphql-friendly way (deployment, image push, git push, etc) - Chaining of FS operations greatly reduces verbosity, but cannot be applied all the time - Transitioning a script to an extension requires non-trivial refactoring, to tease apart the script-specific code from the underlying "API". - The API sandbox is amazing for prototyping small queries, but of limited use when multiple queries must reference each other. This is because the native code doing the stitching cannot be run by the playground, so filesystem IDs must be manually copy-pasted between queries. ## Design highlights ### `withX` and `withoutX` To avoid the use of rpc-style verbs (a graphql best practice) and maximize chaining (a strength of our DX), we use the terminology `withX` and `withoutX`. A field of the form _withX_ returns the same object with content _X_ added or changed. Example: ```graphql "An empty directory with a README copied to it" query readmeDir($readme: FileID!) { directory { withCopiedFile(source: $readme, path: "README.md") { id } } "An empty container with an app directory mounted into it" query appContainer($app: DirectoryID!) { container { withMountedDirectory(source: $app, path: "/app") { id } } } ``` A field of the form _withoutX_ returns the same object with content _X_ removed. ```graphql "Remove node_modules from a JS project" query removeNodeModules($dir: DirectoryID!) { directory(id: $dir) { withoutDirectory(path: "node_modules") { id } } } ``` ### Secrets Secret handling has been simplified and made more consistent with Directory handling. - Secrets have an ID, and can be loaded by ID in the standard graphql manner - Secrets can be created in one of two ways: 1. From an environment variable: `type Environment { secret }` 2. From a file: `type Directory { secret }` ### Embrace the llb / Dockerfile model The `Container` type proposes an expansive definition of the container, similar to the Buildkit/Dockerfile model. A `Container` is: 1. A filesystem state 2. An OCI artifact which can be pulled from, and pushed to a repository at any time 3. A persistent configuration to be applied to all commands executed inside it This is similar to how buildkit models llb state, and how the Dockerfile language models stage state. Note that Dagger extends this model to include even mount configuration (which are scoped to exec in buildkit, but scoped to container in dagger). Examples: ```graphql """ Download a file over HTTP in a very convoluted way: 1. Download a base linux container 2. Install curl 3. Download the file into the container 4. Load and return the file """ query convolutedDownload($url: String!) { container { from(address: "index.docker.io/alpine:latest") { exec(args: ["apk", "add", "curl"]) { exec(args: ["curl", "-o", "/tmp/download", $url) { file(path: "/tmp/download") { id } } } } } """ Specialize two containers from a common base """ query twoContainers { container { from(address: "alpine") { debug: withVariable(name: "DEBUG", value: "1") { id exec(args: ["env"]) { stdout } } noDebug: withVariable(name: "DEBUG", value: "0") { id exec(args: ["env"]) { stdout } } } } } ```
closed
dagger/dagger
https://github.com/dagger/dagger
3,567
Directory: add `withNewDirectory` for creating an empty dir
New naming scheme for copying files/dirs vs creating files/dirs: https://github.com/dagger/dagger/issues/3567#issuecomment-1294368392 > * `withDirectory`, `withFile`: copy a directory/file (source always required) > > * `withNewDirectory`, `withNewFile`: create a new directory/file This issue is for adding `withNewDirectory` since `withNewFile` already exists.
https://github.com/dagger/dagger/issues/3567
https://github.com/dagger/dagger/pull/3590
530446113eeeeffb2aa0388641ba30d9a1435158
027d0c09d20c3900da341686699b4da3525034d7
"2022-10-26T22:43:16Z"
go
"2022-11-01T20:14:00Z"
core/schema/directory.go
package schema import ( "github.com/dagger/dagger/core" "github.com/dagger/dagger/router" ) type directorySchema struct { *baseSchema host *core.Host } var _ router.ExecutableSchema = &directorySchema{} func (s *directorySchema) Name() string { return "directory" } func (s *directorySchema) Schema() string { return Directory } var directoryIDResolver = stringResolver(core.DirectoryID("")) func (s *directorySchema) Resolvers() router.Resolvers { return router.Resolvers{ "DirectoryID": directoryIDResolver, "Query": router.ObjectResolver{ "directory": router.ToResolver(s.directory), }, "Directory": router.ObjectResolver{ "entries": router.ToResolver(s.entries), "file": router.ToResolver(s.file), "withNewFile": router.ToResolver(s.withNewFile), "withCopiedFile": router.ToResolver(s.withCopiedFile), "withoutFile": router.ToResolver(s.withoutFile), "directory": router.ToResolver(s.subdirectory), "withDirectory": router.ToResolver(s.withDirectory), "withoutDirectory": router.ToResolver(s.withoutDirectory), "diff": router.ToResolver(s.diff), "export": router.ToResolver(s.export), }, } } func (s *directorySchema) Dependencies() []router.ExecutableSchema { return nil } type directoryArgs struct { ID core.DirectoryID } func (s *directorySchema) directory(ctx *router.Context, parent any, args directoryArgs) (*core.Directory, error) { return &core.Directory{ ID: args.ID, }, nil } type subdirectoryArgs struct { Path string } func (s *directorySchema) subdirectory(ctx *router.Context, parent *core.Directory, args subdirectoryArgs) (*core.Directory, error) { return parent.Directory(ctx, args.Path) } type withDirectoryArgs struct { Path string Directory core.DirectoryID core.CopyFilter } func (s *directorySchema) withDirectory(ctx *router.Context, parent *core.Directory, args withDirectoryArgs) (*core.Directory, error) { return parent.WithDirectory(ctx, args.Path, &core.Directory{ID: args.Directory}, args.CopyFilter) } type entriesArgs struct { Path string } func (s *directorySchema) entries(ctx *router.Context, parent *core.Directory, args entriesArgs) ([]string, error) { return parent.Entries(ctx, s.gw, args.Path) } type dirFileArgs struct { Path string } func (s *directorySchema) file(ctx *router.Context, parent *core.Directory, args dirFileArgs) (*core.File, error) { return parent.File(ctx, args.Path) } type withNewFileArgs struct { Path string Contents string } func (s *directorySchema) withNewFile(ctx *router.Context, parent *core.Directory, args withNewFileArgs) (*core.Directory, error) { return parent.WithNewFile(ctx, s.gw, args.Path, []byte(args.Contents)) } type withCopiedFileArgs struct { Path string Source core.FileID } func (s *directorySchema) withCopiedFile(ctx *router.Context, parent *core.Directory, args withCopiedFileArgs) (*core.Directory, error) { return parent.WithCopiedFile(ctx, args.Path, &core.File{ID: args.Source}) } type withoutDirectoryArgs struct { Path string } func (s *directorySchema) withoutDirectory(ctx *router.Context, parent *core.Directory, args withoutDirectoryArgs) (*core.Directory, error) { return parent.Without(ctx, args.Path) } type withoutFileArgs struct { Path string } func (s *directorySchema) withoutFile(ctx *router.Context, parent *core.Directory, args withoutFileArgs) (*core.Directory, error) { return parent.Without(ctx, args.Path) } type diffArgs struct { Other core.DirectoryID } func (s *directorySchema) diff(ctx *router.Context, parent *core.Directory, args diffArgs) (*core.Directory, error) { return parent.Diff(ctx, &core.Directory{ID: args.Other}) } type exportArgs struct { Path string } func (s *directorySchema) export(ctx *router.Context, parent *core.Directory, args exportArgs) (bool, error) { err := parent.Export(ctx, s.host, args.Path, s.bkClient, s.solveOpts, s.solveCh) if err != nil { return false, err } return true, nil }
closed
dagger/dagger
https://github.com/dagger/dagger
3,567
Directory: add `withNewDirectory` for creating an empty dir
New naming scheme for copying files/dirs vs creating files/dirs: https://github.com/dagger/dagger/issues/3567#issuecomment-1294368392 > * `withDirectory`, `withFile`: copy a directory/file (source always required) > > * `withNewDirectory`, `withNewFile`: create a new directory/file This issue is for adding `withNewDirectory` since `withNewFile` already exists.
https://github.com/dagger/dagger/issues/3567
https://github.com/dagger/dagger/pull/3590
530446113eeeeffb2aa0388641ba30d9a1435158
027d0c09d20c3900da341686699b4da3525034d7
"2022-10-26T22:43:16Z"
go
"2022-11-01T20:14:00Z"
core/schema/directory.graphqls
extend type Query { "Load a directory by ID. No argument produces an empty directory." directory(id: DirectoryID): Directory! } "A content-addressed directory identifier" scalar DirectoryID "A directory" type Directory { "The content-addressed identifier of the directory" id: DirectoryID! "Return a list of files and directories at the given path" entries(path: String): [String!]! "Retrieve a file at the given path" file(path: String!): File! "This directory plus a new file written at the given path" withNewFile(path: String!, contents: String): Directory! "This directory plus the contents of the given file copied to the given path" withCopiedFile(path: String!, source: FileID!): Directory! "This directory with the file at the given path removed" withoutFile(path: String!): Directory! "Retrieve a directory at the given path" directory(path: String!): Directory! "This directory plus a directory written at the given path" withDirectory( path: String! directory: DirectoryID! exclude: [String!] include: [String!] ): Directory! "This directory with the directory at the given path removed" withoutDirectory(path: String!): Directory! "The difference between this directory and an another directory" diff(other: DirectoryID!): Directory! "Write the contents of the directory to a path on the host" export(path: String!): Boolean! }
closed
dagger/dagger
https://github.com/dagger/dagger
3,567
Directory: add `withNewDirectory` for creating an empty dir
New naming scheme for copying files/dirs vs creating files/dirs: https://github.com/dagger/dagger/issues/3567#issuecomment-1294368392 > * `withDirectory`, `withFile`: copy a directory/file (source always required) > > * `withNewDirectory`, `withNewFile`: create a new directory/file This issue is for adding `withNewDirectory` since `withNewFile` already exists.
https://github.com/dagger/dagger/issues/3567
https://github.com/dagger/dagger/pull/3590
530446113eeeeffb2aa0388641ba30d9a1435158
027d0c09d20c3900da341686699b4da3525034d7
"2022-10-26T22:43:16Z"
go
"2022-11-01T20:14:00Z"
magefile.go
//go:build mage // +build mage package main import ( "context" "errors" "fmt" "os" "runtime" "dagger.io/dagger" "github.com/dagger/dagger/codegen/generator" "github.com/google/go-cmp/cmp" "github.com/magefile/mage/mg" // mg contains helpful utility functions, like Deps ) type Lint mg.Namespace // All runs all lint targets func (t Lint) All(ctx context.Context) error { mg.Deps( t.Codegen, t.Markdown, ) return nil } // Markdown lints the markdown files func (Lint) Markdown(ctx context.Context) error { c, err := dagger.Connect(ctx, dagger.WithLogOutput(os.Stderr)) if err != nil { return err } defer c.Close() workdir := c.Host().Workdir() src, err := workdir.ID(ctx) if err != nil { return err } cfg, err := workdir.File(".markdownlint.yaml").ID(ctx) if err != nil { return err } _, err = c.Container(). From("tmknom/markdownlint:0.31.1"). WithMountedDirectory("/src", src). WithMountedFile("/src/.markdownlint.yaml", cfg). WithWorkdir("/src"). Exec(dagger.ContainerExecOpts{ Args: []string{ "-c", ".markdownlint.yaml", "--", "./docs", "README.md", }, }).ExitCode(ctx) return err } // Codegen ensure the SDK code was re-generated func (Lint) Codegen(ctx context.Context) error { c, err := dagger.Connect(ctx, dagger.WithLogOutput(os.Stderr)) if err != nil { return err } defer c.Close() generated, err := generator.IntrospectAndGenerate(ctx, c, generator.Config{ Package: "dagger", }) if err != nil { return err } // grab the file from the repo src, err := c. Host(). Workdir(). File("sdk/go/api.gen.go"). Contents(ctx) if err != nil { return err } // compare the two diff := cmp.Diff(string(generated), src) if diff != "" { return fmt.Errorf("generated api mismatch. please run `go generate ./...`:\n%s", diff) } return nil } // Build builds the binary func Build(ctx context.Context) error { c, err := dagger.Connect(ctx, dagger.WithLogOutput(os.Stderr)) if err != nil { return err } defer c.Close() workdir := c.Host().Workdir() builder := c.Container(). From("golang:1.19-alpine"). WithEnvVariable("CGO_ENABLED", "0"). WithEnvVariable("GOOS", runtime.GOOS). WithEnvVariable("GOARCH", runtime.GOARCH). WithWorkdir("/app") // install dependencies modules := c.Directory() for _, f := range []string{"go.mod", "go.sum", "sdk/go/go.mod", "sdk/go/go.sum"} { fileID, err := workdir.File(f).ID(ctx) if err != nil { return err } modules = modules.WithCopiedFile(f, fileID) } modID, err := modules.ID(ctx) if err != nil { return err } builder = builder. WithMountedDirectory("/app", modID). Exec(dagger.ContainerExecOpts{ Args: []string{"go", "mod", "download"}, }) src, err := workdir.ID(ctx) if err != nil { return err } builder = builder. WithMountedDirectory("/app", src).WithWorkdir("/app"). Exec(dagger.ContainerExecOpts{ Args: []string{"go", "build", "-o", "./bin/cloak", "-ldflags", "-s -w", "/app/cmd/cloak"}, }) ok, err := builder.Directory("./bin").Export(ctx, "./bin") if err != nil { return err } if !ok { return errors.New("HostDirectoryWrite not ok") } return nil }
closed
dagger/dagger
https://github.com/dagger/dagger
3,567
Directory: add `withNewDirectory` for creating an empty dir
New naming scheme for copying files/dirs vs creating files/dirs: https://github.com/dagger/dagger/issues/3567#issuecomment-1294368392 > * `withDirectory`, `withFile`: copy a directory/file (source always required) > > * `withNewDirectory`, `withNewFile`: create a new directory/file This issue is for adding `withNewDirectory` since `withNewFile` already exists.
https://github.com/dagger/dagger/issues/3567
https://github.com/dagger/dagger/pull/3590
530446113eeeeffb2aa0388641ba30d9a1435158
027d0c09d20c3900da341686699b4da3525034d7
"2022-10-26T22:43:16Z"
go
"2022-11-01T20:14:00Z"
sdk/go/api.gen.go
// Code generated by dagger. DO NOT EDIT. package dagger import ( "context" "dagger.io/dagger/internal/querybuilder" "github.com/Khan/genqlient/graphql" ) // graphqlMarshaller is an interface for marshalling an object into GraphQL. type graphqlMarshaller interface { // GraphQLType returns the native GraphQL type name graphqlType() string // GraphQLMarshal serializes the structure into GraphQL graphqlMarshal(ctx context.Context) (any, error) } // A global cache volume identifier type CacheID string // graphqlType returns the native GraphQL type name func (s CacheID) graphqlType() string { return "CacheID" } // graphqlMarshal serializes the structure into GraphQL func (s CacheID) graphqlMarshal(ctx context.Context) (any, error) { return string(s), nil } // A unique container identifier. Null designates an empty container (scratch). type ContainerID string // graphqlType returns the native GraphQL type name func (s ContainerID) graphqlType() string { return "ContainerID" } // graphqlMarshal serializes the structure into GraphQL func (s ContainerID) graphqlMarshal(ctx context.Context) (any, error) { return string(s), nil } // A content-addressed directory identifier type DirectoryID string // graphqlType returns the native GraphQL type name func (s DirectoryID) graphqlType() string { return "DirectoryID" } // graphqlMarshal serializes the structure into GraphQL func (s DirectoryID) graphqlMarshal(ctx context.Context) (any, error) { return string(s), nil } type FileID string // graphqlType returns the native GraphQL type name func (s FileID) graphqlType() string { return "FileID" } // graphqlMarshal serializes the structure into GraphQL func (s FileID) graphqlMarshal(ctx context.Context) (any, error) { return string(s), nil } type Platform string // graphqlType returns the native GraphQL type name func (s Platform) graphqlType() string { return "Platform" } // graphqlMarshal serializes the structure into GraphQL func (s Platform) graphqlMarshal(ctx context.Context) (any, error) { return string(s), nil } // A unique identifier for a secret type SecretID string // graphqlType returns the native GraphQL type name func (s SecretID) graphqlType() string { return "SecretID" } // graphqlMarshal serializes the structure into GraphQL func (s SecretID) graphqlMarshal(ctx context.Context) (any, error) { return string(s), nil } // A directory whose contents persist across runs type CacheVolume struct { q *querybuilder.Selection c graphql.Client } func (r *CacheVolume) ID(ctx context.Context) (CacheID, error) { q := r.q.Select("id") var response CacheID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // graphqlType returns the native GraphQL type name func (r *CacheVolume) graphqlType() string { return "CacheVolume" } // graphqlMarshal serializes the structure into GraphQL func (r *CacheVolume) graphqlMarshal(ctx context.Context) (any, error) { id, err := r.ID(ctx) if err != nil { return nil, err } return map[string]any{"id": id}, nil } // An OCI-compatible container, also known as a docker container type Container struct { q *querybuilder.Selection c graphql.Client } // ContainerBuildOpts contains options for Container.Build type ContainerBuildOpts struct { Dockerfile string } // Initialize this container from a Dockerfile build func (r *Container) Build(context DirectoryID, opts ...ContainerBuildOpts) *Container { q := r.q.Select("build") q = q.Arg("context", context) // `dockerfile` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Dockerfile) { q = q.Arg("dockerfile", opts[i].Dockerfile) break } } return &Container{ q: q, c: r.c, } } // Default arguments for future commands func (r *Container) DefaultArgs(ctx context.Context) ([]string, error) { q := r.q.Select("defaultArgs") var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Retrieve a directory at the given path. Mounts are included. func (r *Container) Directory(path string) *Directory { q := r.q.Select("directory") q = q.Arg("path", path) return &Directory{ q: q, c: r.c, } } // Entrypoint to be prepended to the arguments of all commands func (r *Container) Entrypoint(ctx context.Context) ([]string, error) { q := r.q.Select("entrypoint") var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The value of the specified environment variable func (r *Container) EnvVariable(ctx context.Context, name string) (string, error) { q := r.q.Select("envVariable") q = q.Arg("name", name) var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // A list of environment variables passed to commands func (r *Container) EnvVariables(ctx context.Context) ([]EnvVariable, error) { q := r.q.Select("envVariables") var response []EnvVariable q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // ContainerExecOpts contains options for Container.Exec type ContainerExecOpts struct { Args []string RedirectStderr string RedirectStdout string Stdin string } // This container after executing the specified command inside it func (r *Container) Exec(opts ...ContainerExecOpts) *Container { q := r.q.Select("exec") // `args` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Args) { q = q.Arg("args", opts[i].Args) break } } // `redirectStderr` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].RedirectStderr) { q = q.Arg("redirectStderr", opts[i].RedirectStderr) break } } // `redirectStdout` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].RedirectStdout) { q = q.Arg("redirectStdout", opts[i].RedirectStdout) break } } // `stdin` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Stdin) { q = q.Arg("stdin", opts[i].Stdin) break } } return &Container{ q: q, c: r.c, } } // Exit code of the last executed command. Zero means success. // Null if no command has been executed. func (r *Container) ExitCode(ctx context.Context) (int, error) { q := r.q.Select("exitCode") var response int q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Retrieve a file at the given path. Mounts are included. func (r *Container) File(path string) *File { q := r.q.Select("file") q = q.Arg("path", path) return &File{ q: q, c: r.c, } } // Initialize this container from the base image published at the given address func (r *Container) From(address string) *Container { q := r.q.Select("from") q = q.Arg("address", address) return &Container{ q: q, c: r.c, } } // This container's root filesystem. Mounts are not included. func (r *Container) FS() *Directory { q := r.q.Select("fs") return &Directory{ q: q, c: r.c, } } // A unique identifier for this container func (r *Container) ID(ctx context.Context) (ContainerID, error) { q := r.q.Select("id") var response ContainerID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // graphqlType returns the native GraphQL type name func (r *Container) graphqlType() string { return "Container" } // graphqlMarshal serializes the structure into GraphQL func (r *Container) graphqlMarshal(ctx context.Context) (any, error) { id, err := r.ID(ctx) if err != nil { return nil, err } return map[string]any{"id": id}, nil } // List of paths where a directory is mounted func (r *Container) Mounts(ctx context.Context) ([]string, error) { q := r.q.Select("mounts") var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The platform this container executes and publishes as func (r *Container) Platform(ctx context.Context) (Platform, error) { q := r.q.Select("platform") var response Platform q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // ContainerPublishOpts contains options for Container.Publish type ContainerPublishOpts struct { PlatformVariants []ContainerID } // Publish this container as a new image, returning a fully qualified ref func (r *Container) Publish(ctx context.Context, address string, opts ...ContainerPublishOpts) (string, error) { q := r.q.Select("publish") q = q.Arg("address", address) // `platformVariants` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].PlatformVariants) { q = q.Arg("platformVariants", opts[i].PlatformVariants) break } } var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The error stream of the last executed command. // Null if no command has been executed. func (r *Container) Stderr() *File { q := r.q.Select("stderr") return &File{ q: q, c: r.c, } } // The output stream of the last executed command. // Null if no command has been executed. func (r *Container) Stdout() *File { q := r.q.Select("stdout") return &File{ q: q, c: r.c, } } // The user to be set for all commands func (r *Container) User(ctx context.Context) (string, error) { q := r.q.Select("user") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // ContainerWithDefaultArgsOpts contains options for Container.WithDefaultArgs type ContainerWithDefaultArgsOpts struct { Args []string } // Configures default arguments for future commands func (r *Container) WithDefaultArgs(opts ...ContainerWithDefaultArgsOpts) *Container { q := r.q.Select("withDefaultArgs") // `args` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Args) { q = q.Arg("args", opts[i].Args) break } } return &Container{ q: q, c: r.c, } } // This container but with a different command entrypoint func (r *Container) WithEntrypoint(args []string) *Container { q := r.q.Select("withEntrypoint") q = q.Arg("args", args) return &Container{ q: q, c: r.c, } } // This container plus the given environment variable func (r *Container) WithEnvVariable(name string, value string) *Container { q := r.q.Select("withEnvVariable") q = q.Arg("name", name) q = q.Arg("value", value) return &Container{ q: q, c: r.c, } } // Initialize this container from this DirectoryID func (r *Container) WithFS(id DirectoryID) *Container { q := r.q.Select("withFS") q = q.Arg("id", id) return &Container{ q: q, c: r.c, } } // ContainerWithMountedCacheOpts contains options for Container.WithMountedCache type ContainerWithMountedCacheOpts struct { Source DirectoryID } // This container plus a cache volume mounted at the given path func (r *Container) WithMountedCache(cache CacheID, path string, opts ...ContainerWithMountedCacheOpts) *Container { q := r.q.Select("withMountedCache") q = q.Arg("cache", cache) q = q.Arg("path", path) // `source` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Source) { q = q.Arg("source", opts[i].Source) break } } return &Container{ q: q, c: r.c, } } // This container plus a directory mounted at the given path func (r *Container) WithMountedDirectory(path string, source DirectoryID) *Container { q := r.q.Select("withMountedDirectory") q = q.Arg("path", path) q = q.Arg("source", source) return &Container{ q: q, c: r.c, } } // This container plus a file mounted at the given path func (r *Container) WithMountedFile(path string, source FileID) *Container { q := r.q.Select("withMountedFile") q = q.Arg("path", path) q = q.Arg("source", source) return &Container{ q: q, c: r.c, } } // This container plus a secret mounted into a file at the given path func (r *Container) WithMountedSecret(path string, source SecretID) *Container { q := r.q.Select("withMountedSecret") q = q.Arg("path", path) q = q.Arg("source", source) return &Container{ q: q, c: r.c, } } // This container plus a temporary directory mounted at the given path func (r *Container) WithMountedTemp(path string) *Container { q := r.q.Select("withMountedTemp") q = q.Arg("path", path) return &Container{ q: q, c: r.c, } } // This container plus an env variable containing the given secret func (r *Container) WithSecretVariable(name string, secret SecretID) *Container { q := r.q.Select("withSecretVariable") q = q.Arg("name", name) q = q.Arg("secret", secret) return &Container{ q: q, c: r.c, } } // This container but with a different command user func (r *Container) WithUser(name string) *Container { q := r.q.Select("withUser") q = q.Arg("name", name) return &Container{ q: q, c: r.c, } } // This container but with a different working directory func (r *Container) WithWorkdir(path string) *Container { q := r.q.Select("withWorkdir") q = q.Arg("path", path) return &Container{ q: q, c: r.c, } } // This container minus the given environment variable func (r *Container) WithoutEnvVariable(name string) *Container { q := r.q.Select("withoutEnvVariable") q = q.Arg("name", name) return &Container{ q: q, c: r.c, } } // This container after unmounting everything at the given path. func (r *Container) WithoutMount(path string) *Container { q := r.q.Select("withoutMount") q = q.Arg("path", path) return &Container{ q: q, c: r.c, } } // The working directory for all commands func (r *Container) Workdir(ctx context.Context) (string, error) { q := r.q.Select("workdir") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // A directory type Directory struct { q *querybuilder.Selection c graphql.Client } // The difference between this directory and an another directory func (r *Directory) Diff(other DirectoryID) *Directory { q := r.q.Select("diff") q = q.Arg("other", other) return &Directory{ q: q, c: r.c, } } // Retrieve a directory at the given path func (r *Directory) Directory(path string) *Directory { q := r.q.Select("directory") q = q.Arg("path", path) return &Directory{ q: q, c: r.c, } } // DirectoryEntriesOpts contains options for Directory.Entries type DirectoryEntriesOpts struct { Path string } // Return a list of files and directories at the given path func (r *Directory) Entries(ctx context.Context, opts ...DirectoryEntriesOpts) ([]string, error) { q := r.q.Select("entries") // `path` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Path) { q = q.Arg("path", opts[i].Path) break } } var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Write the contents of the directory to a path on the host func (r *Directory) Export(ctx context.Context, path string) (bool, error) { q := r.q.Select("export") q = q.Arg("path", path) var response bool q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Retrieve a file at the given path func (r *Directory) File(path string) *File { q := r.q.Select("file") q = q.Arg("path", path) return &File{ q: q, c: r.c, } } // The content-addressed identifier of the directory func (r *Directory) ID(ctx context.Context) (DirectoryID, error) { q := r.q.Select("id") var response DirectoryID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // graphqlType returns the native GraphQL type name func (r *Directory) graphqlType() string { return "Directory" } // graphqlMarshal serializes the structure into GraphQL func (r *Directory) graphqlMarshal(ctx context.Context) (any, error) { id, err := r.ID(ctx) if err != nil { return nil, err } return map[string]any{"id": id}, nil } // load a project's metadata func (r *Directory) LoadProject(configPath string) *Project { q := r.q.Select("loadProject") q = q.Arg("configPath", configPath) return &Project{ q: q, c: r.c, } } // This directory plus the contents of the given file copied to the given path func (r *Directory) WithCopiedFile(path string, source FileID) *Directory { q := r.q.Select("withCopiedFile") q = q.Arg("path", path) q = q.Arg("source", source) return &Directory{ q: q, c: r.c, } } // DirectoryWithDirectoryOpts contains options for Directory.WithDirectory type DirectoryWithDirectoryOpts struct { Exclude []string Include []string } // This directory plus a directory written at the given path func (r *Directory) WithDirectory(directory DirectoryID, path string, opts ...DirectoryWithDirectoryOpts) *Directory { q := r.q.Select("withDirectory") q = q.Arg("directory", directory) // `exclude` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Exclude) { q = q.Arg("exclude", opts[i].Exclude) break } } // `include` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Include) { q = q.Arg("include", opts[i].Include) break } } q = q.Arg("path", path) return &Directory{ q: q, c: r.c, } } // DirectoryWithNewFileOpts contains options for Directory.WithNewFile type DirectoryWithNewFileOpts struct { Contents string } // This directory plus a new file written at the given path func (r *Directory) WithNewFile(path string, opts ...DirectoryWithNewFileOpts) *Directory { q := r.q.Select("withNewFile") // `contents` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Contents) { q = q.Arg("contents", opts[i].Contents) break } } q = q.Arg("path", path) return &Directory{ q: q, c: r.c, } } // This directory with the directory at the given path removed func (r *Directory) WithoutDirectory(path string) *Directory { q := r.q.Select("withoutDirectory") q = q.Arg("path", path) return &Directory{ q: q, c: r.c, } } // This directory with the file at the given path removed func (r *Directory) WithoutFile(path string) *Directory { q := r.q.Select("withoutFile") q = q.Arg("path", path) return &Directory{ q: q, c: r.c, } } // EnvVariable is a simple key value object that represents an environment variable. type EnvVariable struct { q *querybuilder.Selection c graphql.Client } // name is the environment variable name. func (r *EnvVariable) Name(ctx context.Context) (string, error) { q := r.q.Select("name") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // value is the environment variable value func (r *EnvVariable) Value(ctx context.Context) (string, error) { q := r.q.Select("value") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // A file type File struct { q *querybuilder.Selection c graphql.Client } // The contents of the file func (r *File) Contents(ctx context.Context) (string, error) { q := r.q.Select("contents") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The content-addressed identifier of the file func (r *File) ID(ctx context.Context) (FileID, error) { q := r.q.Select("id") var response FileID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // graphqlType returns the native GraphQL type name func (r *File) graphqlType() string { return "File" } // graphqlMarshal serializes the structure into GraphQL func (r *File) graphqlMarshal(ctx context.Context) (any, error) { id, err := r.ID(ctx) if err != nil { return nil, err } return map[string]any{"id": id}, nil } func (r *File) Secret() *Secret { q := r.q.Select("secret") return &Secret{ q: q, c: r.c, } } // The size of the file, in bytes func (r *File) Size(ctx context.Context) (int, error) { q := r.q.Select("size") var response int q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // A git ref (tag or branch) type GitRef struct { q *querybuilder.Selection c graphql.Client } // The digest of the current value of this ref func (r *GitRef) Digest(ctx context.Context) (string, error) { q := r.q.Select("digest") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The filesystem tree at this ref func (r *GitRef) Tree() *Directory { q := r.q.Select("tree") return &Directory{ q: q, c: r.c, } } // A git repository type GitRepository struct { q *querybuilder.Selection c graphql.Client } // Details on one branch func (r *GitRepository) Branch(name string) *GitRef { q := r.q.Select("branch") q = q.Arg("name", name) return &GitRef{ q: q, c: r.c, } } // List of branches on the repository func (r *GitRepository) Branches(ctx context.Context) ([]string, error) { q := r.q.Select("branches") var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Details on one tag func (r *GitRepository) Tag(name string) *GitRef { q := r.q.Select("tag") q = q.Arg("name", name) return &GitRef{ q: q, c: r.c, } } // List of tags on the repository func (r *GitRepository) Tags(ctx context.Context) ([]string, error) { q := r.q.Select("tags") var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Information about the host execution environment type Host struct { q *querybuilder.Selection c graphql.Client } // HostDirectoryOpts contains options for Host.Directory type HostDirectoryOpts struct { Exclude []string Include []string } // Access a directory on the host func (r *Host) Directory(path string, opts ...HostDirectoryOpts) *Directory { q := r.q.Select("directory") // `exclude` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Exclude) { q = q.Arg("exclude", opts[i].Exclude) break } } // `include` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Include) { q = q.Arg("include", opts[i].Include) break } } q = q.Arg("path", path) return &Directory{ q: q, c: r.c, } } // Lookup the value of an environment variable. Null if the variable is not available. func (r *Host) EnvVariable(name string) *HostVariable { q := r.q.Select("envVariable") q = q.Arg("name", name) return &HostVariable{ q: q, c: r.c, } } // HostWorkdirOpts contains options for Host.Workdir type HostWorkdirOpts struct { Exclude []string Include []string } // The current working directory on the host func (r *Host) Workdir(opts ...HostWorkdirOpts) *Directory { q := r.q.Select("workdir") // `exclude` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Exclude) { q = q.Arg("exclude", opts[i].Exclude) break } } // `include` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Include) { q = q.Arg("include", opts[i].Include) break } } return &Directory{ q: q, c: r.c, } } // An environment variable on the host environment type HostVariable struct { q *querybuilder.Selection c graphql.Client } // A secret referencing the value of this variable func (r *HostVariable) Secret() *Secret { q := r.q.Select("secret") return &Secret{ q: q, c: r.c, } } // The value of this variable func (r *HostVariable) Value(ctx context.Context) (string, error) { q := r.q.Select("value") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // A set of scripts and/or extensions type Project struct { q *querybuilder.Selection c graphql.Client } // extensions in this project func (r *Project) Extensions(ctx context.Context) ([]Project, error) { q := r.q.Select("extensions") var response []Project q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Code files generated by the SDKs in the project func (r *Project) GeneratedCode() *Directory { q := r.q.Select("generatedCode") return &Directory{ q: q, c: r.c, } } // install the project's schema func (r *Project) Install(ctx context.Context) (bool, error) { q := r.q.Select("install") var response bool q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // name of the project func (r *Project) Name(ctx context.Context) (string, error) { q := r.q.Select("name") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // schema provided by the project func (r *Project) Schema(ctx context.Context) (string, error) { q := r.q.Select("schema") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // sdk used to generate code for and/or execute this project func (r *Project) SDK(ctx context.Context) (string, error) { q := r.q.Select("sdk") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } type Query struct { q *querybuilder.Selection c graphql.Client } // Construct a cache volume for a given cache key func (r *Query) CacheVolume(key string) *CacheVolume { q := r.q.Select("cacheVolume") q = q.Arg("key", key) return &CacheVolume{ q: q, c: r.c, } } // ContainerOpts contains options for Query.Container type ContainerOpts struct { ID ContainerID Platform Platform } // Load a container from ID. // Null ID returns an empty container (scratch). // Optional platform argument initializes new containers to execute and publish as that platform. Platform defaults to that of the builder's host. func (r *Query) Container(opts ...ContainerOpts) *Container { q := r.q.Select("container") // `id` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].ID) { q = q.Arg("id", opts[i].ID) break } } // `platform` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Platform) { q = q.Arg("platform", opts[i].Platform) break } } return &Container{ q: q, c: r.c, } } // The default platform of the builder. func (r *Query) DefaultPlatform(ctx context.Context) (Platform, error) { q := r.q.Select("defaultPlatform") var response Platform q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // DirectoryOpts contains options for Query.Directory type DirectoryOpts struct { ID DirectoryID } // Load a directory by ID. No argument produces an empty directory. func (r *Query) Directory(opts ...DirectoryOpts) *Directory { q := r.q.Select("directory") // `id` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].ID) { q = q.Arg("id", opts[i].ID) break } } return &Directory{ q: q, c: r.c, } } // Load a file by ID func (r *Query) File(id FileID) *File { q := r.q.Select("file") q = q.Arg("id", id) return &File{ q: q, c: r.c, } } // Query a git repository func (r *Query) Git(url string) *GitRepository { q := r.q.Select("git") q = q.Arg("url", url) return &GitRepository{ q: q, c: r.c, } } // Query the host environment func (r *Query) Host() *Host { q := r.q.Select("host") return &Host{ q: q, c: r.c, } } // An http remote func (r *Query) HTTP(url string) *File { q := r.q.Select("http") q = q.Arg("url", url) return &File{ q: q, c: r.c, } } // Look up a project by name func (r *Query) Project(name string) *Project { q := r.q.Select("project") q = q.Arg("name", name) return &Project{ q: q, c: r.c, } } // Load a secret from its ID func (r *Query) Secret(id SecretID) *Secret { q := r.q.Select("secret") q = q.Arg("id", id) return &Secret{ q: q, c: r.c, } } // A reference to a secret value, which can be handled more safely than the value itself type Secret struct { q *querybuilder.Selection c graphql.Client } // The identifier for this secret func (r *Secret) ID(ctx context.Context) (SecretID, error) { q := r.q.Select("id") var response SecretID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // graphqlType returns the native GraphQL type name func (r *Secret) graphqlType() string { return "Secret" } // graphqlMarshal serializes the structure into GraphQL func (r *Secret) graphqlMarshal(ctx context.Context) (any, error) { id, err := r.ID(ctx) if err != nil { return nil, err } return map[string]any{"id": id}, nil } // The value of this secret func (r *Secret) Plaintext(ctx context.Context) (string, error) { q := r.q.Select("plaintext") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) }
closed
dagger/dagger
https://github.com/dagger/dagger
3,593
Docs: guide: interacting with the local filesystem
A common request with the new Go SDK is: "how do I read to, and write from, the local filesystem?". Thanks to #3560 we now have a much more robust answer. We should document it in an easy-to-find guide.
https://github.com/dagger/dagger/issues/3593
https://github.com/dagger/dagger/pull/3627
c80ac2c13df7d573a069938e01ca13f7a81f0345
56fb442d233c54e3439a7bf88c4bbf5906daf9b3
"2022-10-28T21:53:56Z"
go
"2022-11-03T19:06:41Z"
docs/current/sdk/go/275922-guides.md
closed
dagger/dagger
https://github.com/dagger/dagger
3,593
Docs: guide: interacting with the local filesystem
A common request with the new Go SDK is: "how do I read to, and write from, the local filesystem?". Thanks to #3560 we now have a much more robust answer. We should document it in an easy-to-find guide.
https://github.com/dagger/dagger/issues/3593
https://github.com/dagger/dagger/pull/3627
c80ac2c13df7d573a069938e01ca13f7a81f0345
56fb442d233c54e3439a7bf88c4bbf5906daf9b3
"2022-10-28T21:53:56Z"
go
"2022-11-03T19:06:41Z"
docs/current/sdk/go/guides/421437-work-with-host-filesystem.md
closed
dagger/dagger
https://github.com/dagger/dagger
3,593
Docs: guide: interacting with the local filesystem
A common request with the new Go SDK is: "how do I read to, and write from, the local filesystem?". Thanks to #3560 we now have a much more robust answer. We should document it in an easy-to-find guide.
https://github.com/dagger/dagger/issues/3593
https://github.com/dagger/dagger/pull/3627
c80ac2c13df7d573a069938e01ca13f7a81f0345
56fb442d233c54e3439a7bf88c4bbf5906daf9b3
"2022-10-28T21:53:56Z"
go
"2022-11-03T19:06:41Z"
docs/current/sdk/go/snippets/work-with-host-filesystem/export-dir/main.go
closed
dagger/dagger
https://github.com/dagger/dagger
3,593
Docs: guide: interacting with the local filesystem
A common request with the new Go SDK is: "how do I read to, and write from, the local filesystem?". Thanks to #3560 we now have a much more robust answer. We should document it in an easy-to-find guide.
https://github.com/dagger/dagger/issues/3593
https://github.com/dagger/dagger/pull/3627
c80ac2c13df7d573a069938e01ca13f7a81f0345
56fb442d233c54e3439a7bf88c4bbf5906daf9b3
"2022-10-28T21:53:56Z"
go
"2022-11-03T19:06:41Z"
docs/current/sdk/go/snippets/work-with-host-filesystem/list-dir-exclude/main.go
closed
dagger/dagger
https://github.com/dagger/dagger
3,593
Docs: guide: interacting with the local filesystem
A common request with the new Go SDK is: "how do I read to, and write from, the local filesystem?". Thanks to #3560 we now have a much more robust answer. We should document it in an easy-to-find guide.
https://github.com/dagger/dagger/issues/3593
https://github.com/dagger/dagger/pull/3627
c80ac2c13df7d573a069938e01ca13f7a81f0345
56fb442d233c54e3439a7bf88c4bbf5906daf9b3
"2022-10-28T21:53:56Z"
go
"2022-11-03T19:06:41Z"
docs/current/sdk/go/snippets/work-with-host-filesystem/list-dir-include/main.go
closed
dagger/dagger
https://github.com/dagger/dagger
3,593
Docs: guide: interacting with the local filesystem
A common request with the new Go SDK is: "how do I read to, and write from, the local filesystem?". Thanks to #3560 we now have a much more robust answer. We should document it in an easy-to-find guide.
https://github.com/dagger/dagger/issues/3593
https://github.com/dagger/dagger/pull/3627
c80ac2c13df7d573a069938e01ca13f7a81f0345
56fb442d233c54e3439a7bf88c4bbf5906daf9b3
"2022-10-28T21:53:56Z"
go
"2022-11-03T19:06:41Z"
docs/current/sdk/go/snippets/work-with-host-filesystem/list-dir/main.go
closed
dagger/dagger
https://github.com/dagger/dagger
3,593
Docs: guide: interacting with the local filesystem
A common request with the new Go SDK is: "how do I read to, and write from, the local filesystem?". Thanks to #3560 we now have a much more robust answer. We should document it in an easy-to-find guide.
https://github.com/dagger/dagger/issues/3593
https://github.com/dagger/dagger/pull/3627
c80ac2c13df7d573a069938e01ca13f7a81f0345
56fb442d233c54e3439a7bf88c4bbf5906daf9b3
"2022-10-28T21:53:56Z"
go
"2022-11-03T19:06:41Z"
docs/current/sdk/go/snippets/work-with-host-filesystem/mount-dir/main.go
closed
dagger/dagger
https://github.com/dagger/dagger
3,593
Docs: guide: interacting with the local filesystem
A common request with the new Go SDK is: "how do I read to, and write from, the local filesystem?". Thanks to #3560 we now have a much more robust answer. We should document it in an easy-to-find guide.
https://github.com/dagger/dagger/issues/3593
https://github.com/dagger/dagger/pull/3627
c80ac2c13df7d573a069938e01ca13f7a81f0345
56fb442d233c54e3439a7bf88c4bbf5906daf9b3
"2022-10-28T21:53:56Z"
go
"2022-11-03T19:06:41Z"
docs/current/sdk/go/snippets/work-with-host-filesystem/set-workdir/main.go
closed
dagger/dagger
https://github.com/dagger/dagger
3,593
Docs: guide: interacting with the local filesystem
A common request with the new Go SDK is: "how do I read to, and write from, the local filesystem?". Thanks to #3560 we now have a much more robust answer. We should document it in an easy-to-find guide.
https://github.com/dagger/dagger/issues/3593
https://github.com/dagger/dagger/pull/3627
c80ac2c13df7d573a069938e01ca13f7a81f0345
56fb442d233c54e3439a7bf88c4bbf5906daf9b3
"2022-10-28T21:53:56Z"
go
"2022-11-03T19:06:41Z"
website/sidebars.js
/** * Creating a sidebar enables you to: - create an ordered group of docs - render a sidebar for each doc of that group - provide next/previous navigation The sidebars can be generated from the filesystem, or explicitly defined here. Create as many sidebars as you want. */ module.exports = { 'current': [ { type: "doc", id: "current/index", label: "Introduction" }, { type: "category", label: "Go SDK", collapsible: false, collapsed: false, items: [ { type: "doc", label: "Overview", id: "current/sdk/go/index", }, "current/sdk/go/install", { type: "doc", label: "Get Started", id: "current/sdk/go/get-started", }, { type: "link", label: "Reference 🔗", href: "https://pkg.go.dev/dagger.io/dagger" } ], }, { type: "category", label: "CUE SDK", collapsible: false, collapsed: false, items: [ { type: "doc", label: "Overview", id: "current/sdk/cue/index", }, "current/sdk/cue/getting-started/install", { type: "doc", label: "Get Started", id: "current/sdk/cue/getting-started/get-started", }, { type: "doc", label: "Guides", id: "current/sdk/cue/guides" }, { type: "doc", label: "Reference", id: "current/sdk/cue/reference" }, ], }, { type: "doc", id: "current/faq", }, ], 0.2: [ { type: "category", label: "Introduction", collapsible: false, collapsed: false, items: ["v0.2/overview"], }, { type: "category", label: "Getting Started", collapsible: false, collapsed: false, items: [ "v0.2/getting-started/install", "v0.2/getting-started/how-it-works", { type: "category", label: "Tutorial", items: [ "v0.2/getting-started/tutorial/local-dev", "v0.2/getting-started/tutorial/ci-environment", ], }, { type: "link", label: "Quickstart Templates", href: "/install#explore-our-templates", }, ], }, { type: "category", label: "Core Concepts", collapsible: false, collapsed: false, items: [ "v0.2/core-concepts/vs", "v0.2/core-concepts/action", "v0.2/core-concepts/plan", "v0.2/core-concepts/client", "v0.2/core-concepts/secrets", "v0.2/core-concepts/what-is-cue", "v0.2/core-concepts/dagger-fs", ], }, { type: "category", label: "Guides", collapsible: false, collapsed: false, items: [ { type: "category", label: "Writing Actions", collapsible: true, collapsed: true, items: [{ type: "autogenerated", dirName: "v0.2/guides/actions" }], }, { type: "category", label: "Caching/BuildKit", collapsible: true, collapsed: true, items: [{ type: "autogenerated", dirName: "v0.2/guides/buildkit" }], }, { type: "category", label: "Logging/debugging", collapsible: true, collapsed: true, items: [{ type: "autogenerated", dirName: "v0.2/guides/logdebug" }], }, { type: "category", label: "Concepts", collapsible: true, collapsed: true, items: [{ type: "autogenerated", dirName: "v0.2/guides/concepts" }], }, { type: "category", label: "Docker engine", collapsible: true, collapsed: true, items: [{ type: "autogenerated", dirName: "v0.2/guides/docker" }], }, { type: "category", label: "System", collapsible: true, collapsed: true, items: [{ type: "autogenerated", dirName: "v0.2/guides/system" }], }, ], }, { type: "category", label: "Guidelines", collapsible: false, collapsed: false, items: [ "v0.2/guidelines/contributing", "v0.2/guidelines/coding-style"], }, { type: "category", label: "References", collapsible: false, collapsed: false, items: [ "v0.2/references/core-actions-reference", "v0.2/references/dagger-types-reference", "v0.2/references/13ec8-dagger-env-reference", ], }, { type: "category", label: "Use Cases", collapsible: false, collapsed: false, link: { type: "generated-index", title: "Use Cases", description: "See how others are using Dagger for their CI/CD pipelines. This includes integrating with CI environments.", }, items: [ "v0.2/use-cases/go-docker-swarm", "v0.2/use-cases/go-docker-hub", "v0.2/use-cases/node-ci", "v0.2/use-cases/aws-sam", ], }, { type: "link", label: "⬅️ Dagger 0.1", href: "/0.1", }, ], 0.1: [ { type: "category", label: "Introduction", collapsible: true, items: ["v0.1/introduction/what_is", "v0.1/introduction/vs_old"], }, { type: "doc", id: "v0.1/install", }, { type: "category", label: "Learn Dagger", collapsible: true, collapsed: false, items: [ "v0.1/learn/what_is_cue", "v0.1/learn/get-started", "v0.1/learn/google-cloud-run", "v0.1/learn/kubernetes", "v0.1/learn/aws-cloudformation", "v0.1/learn/github-actions", "v0.1/learn/dev-cue-package", "v0.1/learn/package-manager", ], }, { type: "category", label: "Use Cases", collapsible: true, collapsed: true, items: ["v0.1/use-cases/ci"], }, { type: "category", label: "Universe - API Reference", collapsible: true, collapsed: true, // generate the sidebar for reference doc automatically items: [ { type: "autogenerated", dirName: "v0.1/reference", }, ], }, { type: "category", label: "Administrator Manual", collapsible: true, collapsed: true, items: ["v0.1/administrator/operator-manual"], }, { type: "link", label: "Dagger 0.2 ➡️", href: "/", }, ], };
closed
dagger/dagger
https://github.com/dagger/dagger
3,664
API: lookup git commit
## Problem The Dagger API supports pulling a remote git repository 1) by branch (`git { branch }`) and 2) by tag (`git { tag }`), but not by commit. Initially reported [on discord](https://discord.com/channels/707636530424053791/1037789606134939758) ## Solution Add a new field to the API `git { commit }` Under the hood it's all refs, but it's better to have a dedicated field for each, to be closer to the actual intent of the developer, and adapt the wording.
https://github.com/dagger/dagger/issues/3664
https://github.com/dagger/dagger/pull/3666
3fb2e1d944d8c291f3718624771d5955c9bbb4d8
dfbf6896f56e129a09ad06ef8ee86c66de0c7057
"2022-11-03T18:57:14Z"
go
"2022-11-03T21:46:40Z"
core/integration/git_test.go
package core import ( "testing" "github.com/dagger/dagger/internal/testutil" "github.com/stretchr/testify/require" ) func TestGit(t *testing.T) { t.Parallel() res := struct { Git struct { Branch struct { Tree struct { File struct { Contents string } } } } }{} err := testutil.Query( `{ git(url: "github.com/dagger/dagger") { branch(name: "main") { tree { file(path: "README.md") { contents } } } } }`, &res, nil) require.NoError(t, err) require.Contains(t, res.Git.Branch.Tree.File.Contents, "Dagger") }
closed
dagger/dagger
https://github.com/dagger/dagger
3,664
API: lookup git commit
## Problem The Dagger API supports pulling a remote git repository 1) by branch (`git { branch }`) and 2) by tag (`git { tag }`), but not by commit. Initially reported [on discord](https://discord.com/channels/707636530424053791/1037789606134939758) ## Solution Add a new field to the API `git { commit }` Under the hood it's all refs, but it's better to have a dedicated field for each, to be closer to the actual intent of the developer, and adapt the wording.
https://github.com/dagger/dagger/issues/3664
https://github.com/dagger/dagger/pull/3666
3fb2e1d944d8c291f3718624771d5955c9bbb4d8
dfbf6896f56e129a09ad06ef8ee86c66de0c7057
"2022-11-03T18:57:14Z"
go
"2022-11-03T21:46:40Z"
core/schema/git.go
package schema import ( "github.com/dagger/dagger/core" "github.com/dagger/dagger/router" "github.com/moby/buildkit/client/llb" ) var _ router.ExecutableSchema = &gitSchema{} type gitSchema struct { *baseSchema } func (s *gitSchema) Name() string { return "git" } func (s *gitSchema) Schema() string { return Git } func (s *gitSchema) Resolvers() router.Resolvers { return router.Resolvers{ "Query": router.ObjectResolver{ "git": router.ToResolver(s.git), }, "GitRepository": router.ObjectResolver{ "branches": router.ToResolver(s.branches), "branch": router.ToResolver(s.branch), "tags": router.ToResolver(s.tags), "tag": router.ToResolver(s.tag), }, "GitRef": router.ObjectResolver{ "digest": router.ToResolver(s.digest), "tree": router.ToResolver(s.tree), }, } } func (s *gitSchema) Dependencies() []router.ExecutableSchema { return nil } type gitRepository struct { URL string `json:"url"` } type gitRef struct { Repository gitRepository Name string } type gitArgs struct { URL string `json:"url"` } func (s *gitSchema) git(ctx *router.Context, parent any, args gitArgs) (gitRepository, error) { return gitRepository(args), nil } type branchArgs struct { Name string } func (s *gitSchema) branch(ctx *router.Context, parent gitRepository, args branchArgs) (gitRef, error) { return gitRef{ Repository: parent, Name: args.Name, }, nil } func (s *gitSchema) branches(ctx *router.Context, parent any, args any) (any, error) { return nil, ErrNotImplementedYet } type tagArgs struct { Name string } func (s *gitSchema) tag(ctx *router.Context, parent gitRepository, args tagArgs) (gitRef, error) { return gitRef{ Repository: parent, Name: args.Name, }, nil } func (s *gitSchema) tags(ctx *router.Context, parent any, args any) (any, error) { return nil, ErrNotImplementedYet } func (s *gitSchema) digest(ctx *router.Context, parent any, args any) (any, error) { return nil, ErrNotImplementedYet } func (s *gitSchema) tree(ctx *router.Context, parent gitRef, args any) (*core.Directory, error) { var opts []llb.GitOption if s.sshAuthSockID != "" { opts = append(opts, llb.MountSSHSock(s.sshAuthSockID)) } st := llb.Git(parent.Repository.URL, parent.Name, opts...) return core.NewDirectory(ctx, st, "", s.platform) }
closed
dagger/dagger
https://github.com/dagger/dagger
3,664
API: lookup git commit
## Problem The Dagger API supports pulling a remote git repository 1) by branch (`git { branch }`) and 2) by tag (`git { tag }`), but not by commit. Initially reported [on discord](https://discord.com/channels/707636530424053791/1037789606134939758) ## Solution Add a new field to the API `git { commit }` Under the hood it's all refs, but it's better to have a dedicated field for each, to be closer to the actual intent of the developer, and adapt the wording.
https://github.com/dagger/dagger/issues/3664
https://github.com/dagger/dagger/pull/3666
3fb2e1d944d8c291f3718624771d5955c9bbb4d8
dfbf6896f56e129a09ad06ef8ee86c66de0c7057
"2022-11-03T18:57:14Z"
go
"2022-11-03T21:46:40Z"
core/schema/git.graphqls
extend type Query { "Query a git repository" git(url: String!): GitRepository! } "A git repository" type GitRepository { "List of branches on the repository" branches: [String!]! "Details on one branch" branch(name: String!): GitRef! "List of tags on the repository" tags: [String!]! "Details on one tag" tag(name: String!): GitRef! } "A git ref (tag or branch)" type GitRef { "The digest of the current value of this ref" digest: String! "The filesystem tree at this ref" tree: Directory! }
closed
dagger/dagger
https://github.com/dagger/dagger
3,664
API: lookup git commit
## Problem The Dagger API supports pulling a remote git repository 1) by branch (`git { branch }`) and 2) by tag (`git { tag }`), but not by commit. Initially reported [on discord](https://discord.com/channels/707636530424053791/1037789606134939758) ## Solution Add a new field to the API `git { commit }` Under the hood it's all refs, but it's better to have a dedicated field for each, to be closer to the actual intent of the developer, and adapt the wording.
https://github.com/dagger/dagger/issues/3664
https://github.com/dagger/dagger/pull/3666
3fb2e1d944d8c291f3718624771d5955c9bbb4d8
dfbf6896f56e129a09ad06ef8ee86c66de0c7057
"2022-11-03T18:57:14Z"
go
"2022-11-03T21:46:40Z"
sdk/go/api.gen.go
// Code generated by dagger. DO NOT EDIT. package dagger import ( "context" "dagger.io/dagger/internal/querybuilder" "github.com/Khan/genqlient/graphql" ) // A global cache volume identifier type CacheID string // A unique container identifier. Null designates an empty container (scratch). type ContainerID string // A content-addressed directory identifier type DirectoryID string type FileID string type Platform string // A unique identifier for a secret type SecretID string // A directory whose contents persist across runs type CacheVolume struct { q *querybuilder.Selection c graphql.Client } func (r *CacheVolume) ID(ctx context.Context) (CacheID, error) { q := r.q.Select("id") var response CacheID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // XXX_GraphQLType is an internal function. It returns the native GraphQL type name func (r *CacheVolume) XXX_GraphQLType() string { return "CacheVolume" } // XXX_GraphQLID is an internal function. It returns the underlying type ID func (r *CacheVolume) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } // An OCI-compatible container, also known as a docker container type Container struct { q *querybuilder.Selection c graphql.Client } // ContainerBuildOpts contains options for Container.Build type ContainerBuildOpts struct { Dockerfile string } // Initialize this container from a Dockerfile build func (r *Container) Build(context *Directory, opts ...ContainerBuildOpts) *Container { q := r.q.Select("build") q = q.Arg("context", context) // `dockerfile` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Dockerfile) { q = q.Arg("dockerfile", opts[i].Dockerfile) break } } return &Container{ q: q, c: r.c, } } // Default arguments for future commands func (r *Container) DefaultArgs(ctx context.Context) ([]string, error) { q := r.q.Select("defaultArgs") var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Retrieve a directory at the given path. Mounts are included. func (r *Container) Directory(path string) *Directory { q := r.q.Select("directory") q = q.Arg("path", path) return &Directory{ q: q, c: r.c, } } // Entrypoint to be prepended to the arguments of all commands func (r *Container) Entrypoint(ctx context.Context) ([]string, error) { q := r.q.Select("entrypoint") var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The value of the specified environment variable func (r *Container) EnvVariable(ctx context.Context, name string) (string, error) { q := r.q.Select("envVariable") q = q.Arg("name", name) var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // A list of environment variables passed to commands func (r *Container) EnvVariables(ctx context.Context) ([]EnvVariable, error) { q := r.q.Select("envVariables") var response []EnvVariable q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // ContainerExecOpts contains options for Container.Exec type ContainerExecOpts struct { Args []string Stdin string RedirectStdout string RedirectStderr string } // This container after executing the specified command inside it func (r *Container) Exec(opts ...ContainerExecOpts) *Container { q := r.q.Select("exec") // `args` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Args) { q = q.Arg("args", opts[i].Args) break } } // `stdin` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Stdin) { q = q.Arg("stdin", opts[i].Stdin) break } } // `redirectStdout` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].RedirectStdout) { q = q.Arg("redirectStdout", opts[i].RedirectStdout) break } } // `redirectStderr` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].RedirectStderr) { q = q.Arg("redirectStderr", opts[i].RedirectStderr) break } } return &Container{ q: q, c: r.c, } } // Exit code of the last executed command. Zero means success. // Null if no command has been executed. func (r *Container) ExitCode(ctx context.Context) (int, error) { q := r.q.Select("exitCode") var response int q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // ContainerExportOpts contains options for Container.Export type ContainerExportOpts struct { PlatformVariants []*Container } // Write the container as an OCI tarball to the destination file path on the host func (r *Container) Export(ctx context.Context, path string, opts ...ContainerExportOpts) (bool, error) { q := r.q.Select("export") q = q.Arg("path", path) // `platformVariants` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].PlatformVariants) { q = q.Arg("platformVariants", opts[i].PlatformVariants) break } } var response bool q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Retrieve a file at the given path. Mounts are included. func (r *Container) File(path string) *File { q := r.q.Select("file") q = q.Arg("path", path) return &File{ q: q, c: r.c, } } // Initialize this container from the base image published at the given address func (r *Container) From(address string) *Container { q := r.q.Select("from") q = q.Arg("address", address) return &Container{ q: q, c: r.c, } } // This container's root filesystem. Mounts are not included. func (r *Container) FS() *Directory { q := r.q.Select("fs") return &Directory{ q: q, c: r.c, } } // A unique identifier for this container func (r *Container) ID(ctx context.Context) (ContainerID, error) { q := r.q.Select("id") var response ContainerID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // XXX_GraphQLType is an internal function. It returns the native GraphQL type name func (r *Container) XXX_GraphQLType() string { return "Container" } // XXX_GraphQLID is an internal function. It returns the underlying type ID func (r *Container) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } // List of paths where a directory is mounted func (r *Container) Mounts(ctx context.Context) ([]string, error) { q := r.q.Select("mounts") var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The platform this container executes and publishes as func (r *Container) Platform(ctx context.Context) (Platform, error) { q := r.q.Select("platform") var response Platform q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // ContainerPublishOpts contains options for Container.Publish type ContainerPublishOpts struct { PlatformVariants []*Container } // Publish this container as a new image, returning a fully qualified ref func (r *Container) Publish(ctx context.Context, address string, opts ...ContainerPublishOpts) (string, error) { q := r.q.Select("publish") q = q.Arg("address", address) // `platformVariants` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].PlatformVariants) { q = q.Arg("platformVariants", opts[i].PlatformVariants) break } } var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The error stream of the last executed command. // Null if no command has been executed. func (r *Container) Stderr() *File { q := r.q.Select("stderr") return &File{ q: q, c: r.c, } } // The output stream of the last executed command. // Null if no command has been executed. func (r *Container) Stdout() *File { q := r.q.Select("stdout") return &File{ q: q, c: r.c, } } // The user to be set for all commands func (r *Container) User(ctx context.Context) (string, error) { q := r.q.Select("user") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // ContainerWithDefaultArgsOpts contains options for Container.WithDefaultArgs type ContainerWithDefaultArgsOpts struct { Args []string } // Configures default arguments for future commands func (r *Container) WithDefaultArgs(opts ...ContainerWithDefaultArgsOpts) *Container { q := r.q.Select("withDefaultArgs") // `args` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Args) { q = q.Arg("args", opts[i].Args) break } } return &Container{ q: q, c: r.c, } } // This container but with a different command entrypoint func (r *Container) WithEntrypoint(args []string) *Container { q := r.q.Select("withEntrypoint") q = q.Arg("args", args) return &Container{ q: q, c: r.c, } } // This container plus the given environment variable func (r *Container) WithEnvVariable(name string, value string) *Container { q := r.q.Select("withEnvVariable") q = q.Arg("name", name) q = q.Arg("value", value) return &Container{ q: q, c: r.c, } } // Initialize this container from this DirectoryID func (r *Container) WithFS(id *Directory) *Container { q := r.q.Select("withFS") q = q.Arg("id", id) return &Container{ q: q, c: r.c, } } // ContainerWithMountedCacheOpts contains options for Container.WithMountedCache type ContainerWithMountedCacheOpts struct { Source *Directory } // This container plus a cache volume mounted at the given path func (r *Container) WithMountedCache(path string, cache *CacheVolume, opts ...ContainerWithMountedCacheOpts) *Container { q := r.q.Select("withMountedCache") q = q.Arg("path", path) q = q.Arg("cache", cache) // `source` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Source) { q = q.Arg("source", opts[i].Source) break } } return &Container{ q: q, c: r.c, } } // This container plus a directory mounted at the given path func (r *Container) WithMountedDirectory(path string, source *Directory) *Container { q := r.q.Select("withMountedDirectory") q = q.Arg("path", path) q = q.Arg("source", source) return &Container{ q: q, c: r.c, } } // This container plus a file mounted at the given path func (r *Container) WithMountedFile(path string, source *File) *Container { q := r.q.Select("withMountedFile") q = q.Arg("path", path) q = q.Arg("source", source) return &Container{ q: q, c: r.c, } } // This container plus a secret mounted into a file at the given path func (r *Container) WithMountedSecret(path string, source *Secret) *Container { q := r.q.Select("withMountedSecret") q = q.Arg("path", path) q = q.Arg("source", source) return &Container{ q: q, c: r.c, } } // This container plus a temporary directory mounted at the given path func (r *Container) WithMountedTemp(path string) *Container { q := r.q.Select("withMountedTemp") q = q.Arg("path", path) return &Container{ q: q, c: r.c, } } // This container plus an env variable containing the given secret func (r *Container) WithSecretVariable(name string, secret *Secret) *Container { q := r.q.Select("withSecretVariable") q = q.Arg("name", name) q = q.Arg("secret", secret) return &Container{ q: q, c: r.c, } } // This container but with a different command user func (r *Container) WithUser(name string) *Container { q := r.q.Select("withUser") q = q.Arg("name", name) return &Container{ q: q, c: r.c, } } // This container but with a different working directory func (r *Container) WithWorkdir(path string) *Container { q := r.q.Select("withWorkdir") q = q.Arg("path", path) return &Container{ q: q, c: r.c, } } // This container minus the given environment variable func (r *Container) WithoutEnvVariable(name string) *Container { q := r.q.Select("withoutEnvVariable") q = q.Arg("name", name) return &Container{ q: q, c: r.c, } } // This container after unmounting everything at the given path. func (r *Container) WithoutMount(path string) *Container { q := r.q.Select("withoutMount") q = q.Arg("path", path) return &Container{ q: q, c: r.c, } } // The working directory for all commands func (r *Container) Workdir(ctx context.Context) (string, error) { q := r.q.Select("workdir") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // A directory type Directory struct { q *querybuilder.Selection c graphql.Client } // The difference between this directory and an another directory func (r *Directory) Diff(other *Directory) *Directory { q := r.q.Select("diff") q = q.Arg("other", other) return &Directory{ q: q, c: r.c, } } // Retrieve a directory at the given path func (r *Directory) Directory(path string) *Directory { q := r.q.Select("directory") q = q.Arg("path", path) return &Directory{ q: q, c: r.c, } } // DirectoryEntriesOpts contains options for Directory.Entries type DirectoryEntriesOpts struct { Path string } // Return a list of files and directories at the given path func (r *Directory) Entries(ctx context.Context, opts ...DirectoryEntriesOpts) ([]string, error) { q := r.q.Select("entries") // `path` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Path) { q = q.Arg("path", opts[i].Path) break } } var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Write the contents of the directory to a path on the host func (r *Directory) Export(ctx context.Context, path string) (bool, error) { q := r.q.Select("export") q = q.Arg("path", path) var response bool q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Retrieve a file at the given path func (r *Directory) File(path string) *File { q := r.q.Select("file") q = q.Arg("path", path) return &File{ q: q, c: r.c, } } // The content-addressed identifier of the directory func (r *Directory) ID(ctx context.Context) (DirectoryID, error) { q := r.q.Select("id") var response DirectoryID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // XXX_GraphQLType is an internal function. It returns the native GraphQL type name func (r *Directory) XXX_GraphQLType() string { return "Directory" } // XXX_GraphQLID is an internal function. It returns the underlying type ID func (r *Directory) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } // load a project's metadata func (r *Directory) LoadProject(configPath string) *Project { q := r.q.Select("loadProject") q = q.Arg("configPath", configPath) return &Project{ q: q, c: r.c, } } // DirectoryWithDirectoryOpts contains options for Directory.WithDirectory type DirectoryWithDirectoryOpts struct { Exclude []string Include []string } // This directory plus a directory written at the given path func (r *Directory) WithDirectory(path string, directory *Directory, opts ...DirectoryWithDirectoryOpts) *Directory { q := r.q.Select("withDirectory") q = q.Arg("path", path) q = q.Arg("directory", directory) // `exclude` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Exclude) { q = q.Arg("exclude", opts[i].Exclude) break } } // `include` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Include) { q = q.Arg("include", opts[i].Include) break } } return &Directory{ q: q, c: r.c, } } // This directory plus the contents of the given file copied to the given path func (r *Directory) WithFile(path string, source *File) *Directory { q := r.q.Select("withFile") q = q.Arg("path", path) q = q.Arg("source", source) return &Directory{ q: q, c: r.c, } } // This directory plus a new directory created at the given path func (r *Directory) WithNewDirectory(path string) *Directory { q := r.q.Select("withNewDirectory") q = q.Arg("path", path) return &Directory{ q: q, c: r.c, } } // DirectoryWithNewFileOpts contains options for Directory.WithNewFile type DirectoryWithNewFileOpts struct { Contents string } // This directory plus a new file written at the given path func (r *Directory) WithNewFile(path string, opts ...DirectoryWithNewFileOpts) *Directory { q := r.q.Select("withNewFile") q = q.Arg("path", path) // `contents` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Contents) { q = q.Arg("contents", opts[i].Contents) break } } return &Directory{ q: q, c: r.c, } } // This directory with the directory at the given path removed func (r *Directory) WithoutDirectory(path string) *Directory { q := r.q.Select("withoutDirectory") q = q.Arg("path", path) return &Directory{ q: q, c: r.c, } } // This directory with the file at the given path removed func (r *Directory) WithoutFile(path string) *Directory { q := r.q.Select("withoutFile") q = q.Arg("path", path) return &Directory{ q: q, c: r.c, } } // EnvVariable is a simple key value object that represents an environment variable. type EnvVariable struct { q *querybuilder.Selection c graphql.Client } // name is the environment variable name. func (r *EnvVariable) Name(ctx context.Context) (string, error) { q := r.q.Select("name") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // value is the environment variable value func (r *EnvVariable) Value(ctx context.Context) (string, error) { q := r.q.Select("value") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // A file type File struct { q *querybuilder.Selection c graphql.Client } // The contents of the file func (r *File) Contents(ctx context.Context) (string, error) { q := r.q.Select("contents") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Write the file to a file path on the host func (r *File) Export(ctx context.Context, path string) (bool, error) { q := r.q.Select("export") q = q.Arg("path", path) var response bool q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The content-addressed identifier of the file func (r *File) ID(ctx context.Context) (FileID, error) { q := r.q.Select("id") var response FileID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // XXX_GraphQLType is an internal function. It returns the native GraphQL type name func (r *File) XXX_GraphQLType() string { return "File" } // XXX_GraphQLID is an internal function. It returns the underlying type ID func (r *File) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } func (r *File) Secret() *Secret { q := r.q.Select("secret") return &Secret{ q: q, c: r.c, } } // The size of the file, in bytes func (r *File) Size(ctx context.Context) (int, error) { q := r.q.Select("size") var response int q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // A git ref (tag or branch) type GitRef struct { q *querybuilder.Selection c graphql.Client } // The digest of the current value of this ref func (r *GitRef) Digest(ctx context.Context) (string, error) { q := r.q.Select("digest") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The filesystem tree at this ref func (r *GitRef) Tree() *Directory { q := r.q.Select("tree") return &Directory{ q: q, c: r.c, } } // A git repository type GitRepository struct { q *querybuilder.Selection c graphql.Client } // Details on one branch func (r *GitRepository) Branch(name string) *GitRef { q := r.q.Select("branch") q = q.Arg("name", name) return &GitRef{ q: q, c: r.c, } } // List of branches on the repository func (r *GitRepository) Branches(ctx context.Context) ([]string, error) { q := r.q.Select("branches") var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Details on one tag func (r *GitRepository) Tag(name string) *GitRef { q := r.q.Select("tag") q = q.Arg("name", name) return &GitRef{ q: q, c: r.c, } } // List of tags on the repository func (r *GitRepository) Tags(ctx context.Context) ([]string, error) { q := r.q.Select("tags") var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Information about the host execution environment type Host struct { q *querybuilder.Selection c graphql.Client } // HostDirectoryOpts contains options for Host.Directory type HostDirectoryOpts struct { Exclude []string Include []string } // Access a directory on the host func (r *Host) Directory(path string, opts ...HostDirectoryOpts) *Directory { q := r.q.Select("directory") q = q.Arg("path", path) // `exclude` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Exclude) { q = q.Arg("exclude", opts[i].Exclude) break } } // `include` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Include) { q = q.Arg("include", opts[i].Include) break } } return &Directory{ q: q, c: r.c, } } // Lookup the value of an environment variable. Null if the variable is not available. func (r *Host) EnvVariable(name string) *HostVariable { q := r.q.Select("envVariable") q = q.Arg("name", name) return &HostVariable{ q: q, c: r.c, } } // HostWorkdirOpts contains options for Host.Workdir type HostWorkdirOpts struct { Exclude []string Include []string } // The current working directory on the host func (r *Host) Workdir(opts ...HostWorkdirOpts) *Directory { q := r.q.Select("workdir") // `exclude` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Exclude) { q = q.Arg("exclude", opts[i].Exclude) break } } // `include` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Include) { q = q.Arg("include", opts[i].Include) break } } return &Directory{ q: q, c: r.c, } } // An environment variable on the host environment type HostVariable struct { q *querybuilder.Selection c graphql.Client } // A secret referencing the value of this variable func (r *HostVariable) Secret() *Secret { q := r.q.Select("secret") return &Secret{ q: q, c: r.c, } } // The value of this variable func (r *HostVariable) Value(ctx context.Context) (string, error) { q := r.q.Select("value") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // A set of scripts and/or extensions type Project struct { q *querybuilder.Selection c graphql.Client } // extensions in this project func (r *Project) Extensions(ctx context.Context) ([]Project, error) { q := r.q.Select("extensions") var response []Project q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Code files generated by the SDKs in the project func (r *Project) GeneratedCode() *Directory { q := r.q.Select("generatedCode") return &Directory{ q: q, c: r.c, } } // install the project's schema func (r *Project) Install(ctx context.Context) (bool, error) { q := r.q.Select("install") var response bool q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // name of the project func (r *Project) Name(ctx context.Context) (string, error) { q := r.q.Select("name") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // schema provided by the project func (r *Project) Schema(ctx context.Context) (string, error) { q := r.q.Select("schema") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // sdk used to generate code for and/or execute this project func (r *Project) SDK(ctx context.Context) (string, error) { q := r.q.Select("sdk") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } type Query struct { q *querybuilder.Selection c graphql.Client } // Construct a cache volume for a given cache key func (r *Query) CacheVolume(key string) *CacheVolume { q := r.q.Select("cacheVolume") q = q.Arg("key", key) return &CacheVolume{ q: q, c: r.c, } } // ContainerOpts contains options for Query.Container type ContainerOpts struct { ID ContainerID Platform Platform } // Load a container from ID. // Null ID returns an empty container (scratch). // Optional platform argument initializes new containers to execute and publish as that platform. Platform defaults to that of the builder's host. func (r *Query) Container(opts ...ContainerOpts) *Container { q := r.q.Select("container") // `id` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].ID) { q = q.Arg("id", opts[i].ID) break } } // `platform` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Platform) { q = q.Arg("platform", opts[i].Platform) break } } return &Container{ q: q, c: r.c, } } // The default platform of the builder. func (r *Query) DefaultPlatform(ctx context.Context) (Platform, error) { q := r.q.Select("defaultPlatform") var response Platform q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // DirectoryOpts contains options for Query.Directory type DirectoryOpts struct { ID DirectoryID } // Load a directory by ID. No argument produces an empty directory. func (r *Query) Directory(opts ...DirectoryOpts) *Directory { q := r.q.Select("directory") // `id` optional argument for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].ID) { q = q.Arg("id", opts[i].ID) break } } return &Directory{ q: q, c: r.c, } } // Load a file by ID func (r *Query) File(id FileID) *File { q := r.q.Select("file") q = q.Arg("id", id) return &File{ q: q, c: r.c, } } // Query a git repository func (r *Query) Git(url string) *GitRepository { q := r.q.Select("git") q = q.Arg("url", url) return &GitRepository{ q: q, c: r.c, } } // Query the host environment func (r *Query) Host() *Host { q := r.q.Select("host") return &Host{ q: q, c: r.c, } } // An http remote func (r *Query) HTTP(url string) *File { q := r.q.Select("http") q = q.Arg("url", url) return &File{ q: q, c: r.c, } } // Look up a project by name func (r *Query) Project(name string) *Project { q := r.q.Select("project") q = q.Arg("name", name) return &Project{ q: q, c: r.c, } } // Load a secret from its ID func (r *Query) Secret(id SecretID) *Secret { q := r.q.Select("secret") q = q.Arg("id", id) return &Secret{ q: q, c: r.c, } } // A reference to a secret value, which can be handled more safely than the value itself type Secret struct { q *querybuilder.Selection c graphql.Client } // The identifier for this secret func (r *Secret) ID(ctx context.Context) (SecretID, error) { q := r.q.Select("id") var response SecretID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // XXX_GraphQLType is an internal function. It returns the native GraphQL type name func (r *Secret) XXX_GraphQLType() string { return "Secret" } // XXX_GraphQLID is an internal function. It returns the underlying type ID func (r *Secret) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } // The value of this secret func (r *Secret) Plaintext(ctx context.Context) (string, error) { q := r.q.Select("plaintext") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) }
closed
dagger/dagger
https://github.com/dagger/dagger
3,675
Add a few essential tests
There's a lot of tests to be added, for sure, but I should add at least a few more basic ones for next launch. - Reuse some test examples from Go (integration) - Add a few deserialization test cases (unit)[^1] [^1]: This is where I am most unsure, helps to build confidence.
https://github.com/dagger/dagger/issues/3675
https://github.com/dagger/dagger/pull/3656
4edc2a615a8f2c41c5d4eef0980ca334acb47c17
b7a567ed2afd66c629f816895ac041d4a7b55fda
"2022-11-04T14:10:33Z"
go
"2022-11-05T10:11:51Z"
sdk/python/README.md
# Python SDK for Dagger 1. Install the [hatch](https://hatch.pypa.io/latest/install/) tool (recommended via `pipx`) 2. Run tests with `hatch run test` 3. Re-regenerate client with `hatch run generate` 4. Format (and lint) code with `hatch run lint:fmt` 5. Check types with `hatch run lint:typing`
closed
dagger/dagger
https://github.com/dagger/dagger
3,675
Add a few essential tests
There's a lot of tests to be added, for sure, but I should add at least a few more basic ones for next launch. - Reuse some test examples from Go (integration) - Add a few deserialization test cases (unit)[^1] [^1]: This is where I am most unsure, helps to build confidence.
https://github.com/dagger/dagger/issues/3675
https://github.com/dagger/dagger/pull/3656
4edc2a615a8f2c41c5d4eef0980ca334acb47c17
b7a567ed2afd66c629f816895ac041d4a7b55fda
"2022-11-04T14:10:33Z"
go
"2022-11-05T10:11:51Z"
sdk/python/pyproject.toml
[build-system] requires = ["hatchling"] build-backend = "hatchling.build" [project] name = "dagger" version = "0.1.0" authors = [ { name="Sam Alba", email="sam@dagger.io" }, ] description = "Dagger library" keywords = ["dagger"] readme = "README.md" license = "Apache-2.0" requires-python = ">=3.10" classifiers = [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Framework :: Hatch", "Framework :: AnyIO", "Framework :: Pytest", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "License :: OSI Approved :: Apache Software License", # "Operating System :: OS Independent", "Typing :: Typed", ] dependencies = [ "anyio >= 3.6.2", "attrs >= 22.1.0", "cattrs >= 22.2.0", "gql[aiohttp,requests] >= 3.4.0", "strawberry-graphql >= 0.133.5", "typer[all] >= 0.6.1", ] [project.urls] "Homepage" = "https://dagger.io/" "Bug Tracker" = "https://github.com/dagger/dagger/issues" [project.scripts] dagger-server-py = "dagger.server.cli:app" dagger-py = "dagger.cli:app" [tool.hatch.envs.default] dependencies = [ "pytest >= 7.2.0", "pytest-mock >= 3.10.0", ] [tool.hatch.envs.default.scripts] test = "pytest -W default" generate = "dagger-py generate --output src/dagger/api/gen.py" [tool.hatch.envs.lint] skip_install = true dependencies = [ "autoflake>=1.3.1", "black>=22.3.0", "flake8-black>=^0.3", "flake8-bugbear>=22.9.23", "flake8-eradicate>=1.3.0", "flake8-isort>=^5.0.0", "flake8>=4.0.1", "isort>=5.10.1", "mypy>=0.942", "typing_extensions>=4.4.0", ] [tool.hatch.envs.lint.scripts] typing = "mypy src/dagger tests" style = [ "flake8 .", "black --check --diff .", "isort --check-only --diff .", ] fmt = [ "autoflake --in-place .", "isort .", "black .", "style", ] all = [ "style", "typing", ] [tool.pytest.ini_options] testpaths = ["tests/"] addopts = [ "--import-mode=importlib", ] [tool.mypy] disallow_untyped_defs = false follow_imports = "normal" # ignore_missing_imports = true install_types = true non_interactive = true warn_redundant_casts = true pretty = true show_column_numbers = true warn_no_return = false warn_unused_ignores = true plugins = [ "strawberry.ext.mypy_plugin", ] [tool.black] include = '\.pyi?$' line-length = 119 target-version = ["py310", "py311"] [tool.isort] profile = "black" line_length = 119 known_first_party = ["dagger"] [tool.autoflake] quiet = true recursive = true expand-star-imports = true imports = ["graphql", "gql"] remove-all-unused-imports = true remove-duplicate-keys = true remove-unused-variables = true
closed
dagger/dagger
https://github.com/dagger/dagger
3,675
Add a few essential tests
There's a lot of tests to be added, for sure, but I should add at least a few more basic ones for next launch. - Reuse some test examples from Go (integration) - Add a few deserialization test cases (unit)[^1] [^1]: This is where I am most unsure, helps to build confidence.
https://github.com/dagger/dagger/issues/3675
https://github.com/dagger/dagger/pull/3656
4edc2a615a8f2c41c5d4eef0980ca334acb47c17
b7a567ed2afd66c629f816895ac041d4a7b55fda
"2022-11-04T14:10:33Z"
go
"2022-11-05T10:11:51Z"
sdk/python/src/dagger/api/base.py
from collections import deque from typing import Any, Generic, NamedTuple, Sequence, TypeVar import attrs import cattrs import gql import graphql from attrs import define, field from cattrs.preconf.json import make_converter from gql.client import AsyncClientSession from gql.dsl import DSLField, DSLQuery, DSLSchema, DSLSelectable, DSLType, dsl_gql _T = TypeVar("_T") @define class Context: session: AsyncClientSession schema: DSLSchema selections: deque[DSLField] = field(factory=deque) converter: cattrs.Converter = field(factory=make_converter) def select(self, type_name: str, field_name: str, args: dict[str, Any]) -> "Context": type_: DSLType = getattr(self.schema, type_name) field: DSLField = getattr(type_, field_name)(**args) selections = self.selections.copy() selections.append(field) return attrs.evolve(self, selections=selections) def build(self) -> DSLSelectable: if not self.selections: raise InvalidQueryError("No field has been selected") selections = self.selections.copy() selectable = selections.pop() for dsl_field in reversed(selections): selectable = dsl_field.select(selectable) return selectable def query(self) -> graphql.DocumentNode: return dsl_gql(DSLQuery(self.build())) async def execute(self, return_type: type[_T]) -> "Result[_T]": query = self.query() result = await self.session.execute(query, get_execution_result=True) value = result.data if value is not None: value = self.structure_response(value, return_type) return Result[_T](value, return_type, self, query, result) def structure_response(self, response: dict[str, Any], return_type: type[_T]) -> _T: for f in self.selections: # FIXME: handle lists response = response[f.name] return self.converter.structure(response, return_type) @define class Result(Generic[_T]): value: _T type_: type[_T] context: Context document: graphql.DocumentNode result: graphql.ExecutionResult @property def query(self) -> str: return graphql.print_ast(self.document) class Arg(NamedTuple): name: str value: Any default: Any = attrs.NOTHING @define class Type: _ctx: Context @property def graphql_name(self) -> str: return self.__class__.__name__ def _select(self, field_name: str, args: Sequence[Arg]) -> Context: # The use of Arg class here is just to make it easy to pass a # dict of arguments without having to be limited to a single # `args: dict` parameter in the GraphQL object fields. _args = {k: v for k, v, d in args if v is not d} return self._ctx.select(self.graphql_name, field_name, _args) class Root(Type): @classmethod def from_session(cls, session: AsyncClientSession): assert session.client.schema is not None, "GraphQL session has not been initialized" ds = DSLSchema(session.client.schema) ctx = Context(session, ds) return cls(ctx) @property def _session(self) -> AsyncClientSession: return self._ctx.session @property def _gql_client(self) -> gql.Client: return self._session.client @property def _schema(self) -> graphql.GraphQLSchema: return self._ctx.schema._schema class ClientError(Exception): """Base class for client errors.""" class InvalidQueryError(ClientError): """Misuse of the query builder."""
closed
dagger/dagger
https://github.com/dagger/dagger
3,675
Add a few essential tests
There's a lot of tests to be added, for sure, but I should add at least a few more basic ones for next launch. - Reuse some test examples from Go (integration) - Add a few deserialization test cases (unit)[^1] [^1]: This is where I am most unsure, helps to build confidence.
https://github.com/dagger/dagger/issues/3675
https://github.com/dagger/dagger/pull/3656
4edc2a615a8f2c41c5d4eef0980ca334acb47c17
b7a567ed2afd66c629f816895ac041d4a7b55fda
"2022-11-04T14:10:33Z"
go
"2022-11-05T10:11:51Z"
sdk/python/src/dagger/api/gen.py
# Code generated by dagger. DO NOT EDIT. # flake8: noqa from typing import NewType from dagger.api.base import Arg, Result, Type CacheID = NewType("CacheID", str) """A global cache volume identifier""" ContainerID = NewType("ContainerID", str) """A unique container identifier. Null designates an empty container (scratch).""" DirectoryID = NewType("DirectoryID", str) """A content-addressed directory identifier""" FileID = NewType("FileID", str) Platform = NewType("Platform", str) SecretID = NewType("SecretID", str) """A unique identifier for a secret""" class CacheVolume(Type): """A directory whose contents persist across runs""" async def id(self) -> Result[CacheID]: """Note ---- This is lazyly evaluated, no operation is actually run. Returns ------- Awaitable with resulting leaf value (scalar). Note: A query is executed in the API server when awaited. """ _args: list[Arg] = [] _ctx = self._select("id", _args) return await _ctx.execute(CacheID) class Container(Type): """An OCI-compatible container, also known as a docker container""" def build(self, context: DirectoryID, dockerfile: str | None = None) -> "Container": """Initialize this container from a Dockerfile build""" _args = [ Arg("context", context), Arg("dockerfile", dockerfile, None), ] _ctx = self._select("build", _args) return Container(_ctx) async def default_args(self) -> Result[list[str] | None]: """Default arguments for future commands Returns ------- Awaitable with resulting leaf value (scalar). Note: A query is executed in the API server when awaited. """ _args: list[Arg] = [] _ctx = self._select("defaultArgs", _args) return await _ctx.execute(list[str] | None) def directory(self, path: str) -> "Directory": """Retrieve a directory at the given path. Mounts are included.""" _args = [ Arg("path", path), ] _ctx = self._select("directory", _args) return Directory(_ctx) async def entrypoint(self) -> Result[list[str] | None]: """Entrypoint to be prepended to the arguments of all commands Returns ------- Awaitable with resulting leaf value (scalar). Note: A query is executed in the API server when awaited. """ _args: list[Arg] = [] _ctx = self._select("entrypoint", _args) return await _ctx.execute(list[str] | None) async def env_variable(self, name: str) -> Result[str | None]: """The value of the specified environment variable Returns ------- Awaitable with resulting leaf value (scalar). Note: A query is executed in the API server when awaited. """ _args = [ Arg("name", name), ] _ctx = self._select("envVariable", _args) return await _ctx.execute(str | None) def env_variables(self) -> "EnvVariable": """A list of environment variables passed to commands""" _args: list[Arg] = [] _ctx = self._select("envVariables", _args) return EnvVariable(_ctx) def exec( self, args: list[str] | None = None, stdin: str | None = None, redirect_stdout: str | None = None, redirect_stderr: str | None = None, ) -> "Container": """This container after executing the specified command inside it Parameters ---------- args: Command to run instead of the container's default command stdin: Content to write to the command's standard input before closing redirect_stdout: Redirect the command's standard output to a file in the container redirect_stderr: Redirect the command's standard error to a file in the container """ _args = [ Arg("args", args, None), Arg("stdin", stdin, None), Arg("redirectStdout", redirect_stdout, None), Arg("redirectStderr", redirect_stderr, None), ] _ctx = self._select("exec", _args) return Container(_ctx) async def exit_code(self) -> Result[int | None]: """Exit code of the last executed command. Zero means success. Null if no command has been executed. Returns ------- Awaitable with resulting leaf value (scalar). Note: A query is executed in the API server when awaited. """ _args: list[Arg] = [] _ctx = self._select("exitCode", _args) return await _ctx.execute(int | None) def file(self, path: str) -> "File": """Retrieve a file at the given path. Mounts are included.""" _args = [ Arg("path", path), ] _ctx = self._select("file", _args) return File(_ctx) def from_(self, address: str) -> "Container": """Initialize this container from the base image published at the given address""" _args = [ Arg("address", address), ] _ctx = self._select("from", _args) return Container(_ctx) def fs(self) -> "Directory": """This container's root filesystem. Mounts are not included.""" _args: list[Arg] = [] _ctx = self._select("fs", _args) return Directory(_ctx) async def id(self) -> Result[ContainerID]: """A unique identifier for this container Note ---- This is lazyly evaluated, no operation is actually run. Returns ------- Awaitable with resulting leaf value (scalar). Note: A query is executed in the API server when awaited. """ _args: list[Arg] = [] _ctx = self._select("id", _args) return await _ctx.execute(ContainerID) async def mounts(self) -> Result[list[str]]: """List of paths where a directory is mounted Returns ------- Awaitable with resulting leaf value (scalar). Note: A query is executed in the API server when awaited. """ _args: list[Arg] = [] _ctx = self._select("mounts", _args) return await _ctx.execute(list[str]) async def platform(self) -> Result[Platform]: """The platform this container executes and publishes as Returns ------- Awaitable with resulting leaf value (scalar). Note: A query is executed in the API server when awaited. """ _args: list[Arg] = [] _ctx = self._select("platform", _args) return await _ctx.execute(Platform) async def publish(self, address: str, platform_variants: list[ContainerID] | None = None) -> Result[str]: """Publish this container as a new image, returning a fully qualified ref Returns ------- Awaitable with resulting leaf value (scalar). Note: A query is executed in the API server when awaited. """ _args = [ Arg("address", address), Arg("platformVariants", platform_variants, None), ] _ctx = self._select("publish", _args) return await _ctx.execute(str) def stderr(self) -> "File": """The error stream of the last executed command. Null if no command has been executed. """ _args: list[Arg] = [] _ctx = self._select("stderr", _args) return File(_ctx) def stdout(self) -> "File": """The output stream of the last executed command. Null if no command has been executed. """ _args: list[Arg] = [] _ctx = self._select("stdout", _args) return File(_ctx) async def user(self) -> Result[str | None]: """The user to be set for all commands Returns ------- Awaitable with resulting leaf value (scalar). Note: A query is executed in the API server when awaited. """ _args: list[Arg] = [] _ctx = self._select("user", _args) return await _ctx.execute(str | None) def with_default_args(self, args: list[str] | None = None) -> "Container": """Configures default arguments for future commands""" _args = [ Arg("args", args, None), ] _ctx = self._select("withDefaultArgs", _args) return Container(_ctx) def with_entrypoint(self, args: list[str]) -> "Container": """This container but with a different command entrypoint""" _args = [ Arg("args", args), ] _ctx = self._select("withEntrypoint", _args) return Container(_ctx) def with_env_variable(self, name: str, value: str) -> "Container": """This container plus the given environment variable""" _args = [ Arg("name", name), Arg("value", value), ] _ctx = self._select("withEnvVariable", _args) return Container(_ctx) def with_fs(self, id: DirectoryID) -> "Container": """Initialize this container from this DirectoryID""" _args = [ Arg("id", id), ] _ctx = self._select("withFS", _args) return Container(_ctx) def with_mounted_cache(self, path: str, cache: CacheID, source: DirectoryID | None = None) -> "Container": """This container plus a cache volume mounted at the given path""" _args = [ Arg("path", path), Arg("cache", cache), Arg("source", source, None), ] _ctx = self._select("withMountedCache", _args) return Container(_ctx) def with_mounted_directory(self, path: str, source: DirectoryID) -> "Container": """This container plus a directory mounted at the given path""" _args = [ Arg("path", path), Arg("source", source), ] _ctx = self._select("withMountedDirectory", _args) return Container(_ctx) def with_mounted_file(self, path: str, source: FileID) -> "Container": """This container plus a file mounted at the given path""" _args = [ Arg("path", path), Arg("source", source), ] _ctx = self._select("withMountedFile", _args) return Container(_ctx) def with_mounted_secret(self, path: str, source: SecretID) -> "Container": """This container plus a secret mounted into a file at the given path""" _args = [ Arg("path", path), Arg("source", source), ] _ctx = self._select("withMountedSecret", _args) return Container(_ctx) def with_mounted_temp(self, path: str) -> "Container": """This container plus a temporary directory mounted at the given path""" _args = [ Arg("path", path), ] _ctx = self._select("withMountedTemp", _args) return Container(_ctx) def with_secret_variable(self, name: str, secret: SecretID) -> "Container": """This container plus an env variable containing the given secret""" _args = [ Arg("name", name), Arg("secret", secret), ] _ctx = self._select("withSecretVariable", _args) return Container(_ctx) def with_user(self, name: str) -> "Container": """This container but with a different command user""" _args = [ Arg("name", name), ] _ctx = self._select("withUser", _args) return Container(_ctx) def with_workdir(self, path: str) -> "Container": """This container but with a different working directory""" _args = [ Arg("path", path), ] _ctx = self._select("withWorkdir", _args) return Container(_ctx) def without_env_variable(self, name: str) -> "Container": """This container minus the given environment variable""" _args = [ Arg("name", name), ] _ctx = self._select("withoutEnvVariable", _args) return Container(_ctx) def without_mount(self, path: str) -> "Container": """This container after unmounting everything at the given path.""" _args = [ Arg("path", path), ] _ctx = self._select("withoutMount", _args) return Container(_ctx) async def workdir(self) -> Result[str | None]: """The working directory for all commands Returns ------- Awaitable with resulting leaf value (scalar). Note: A query is executed in the API server when awaited. """ _args: list[Arg] = [] _ctx = self._select("workdir", _args) return await _ctx.execute(str | None) class Directory(Type): """A directory""" def diff(self, other: DirectoryID) -> "Directory": """The difference between this directory and an another directory""" _args = [ Arg("other", other), ] _ctx = self._select("diff", _args) return Directory(_ctx) def directory(self, path: str) -> "Directory": """Retrieve a directory at the given path""" _args = [ Arg("path", path), ] _ctx = self._select("directory", _args) return Directory(_ctx) async def entries(self, path: str | None = None) -> Result[list[str]]: """Return a list of files and directories at the given path Returns ------- Awaitable with resulting leaf value (scalar). Note: A query is executed in the API server when awaited. """ _args = [ Arg("path", path, None), ] _ctx = self._select("entries", _args) return await _ctx.execute(list[str]) async def export(self, path: str) -> Result[bool]: """Write the contents of the directory to a path on the host Returns ------- Awaitable with resulting leaf value (scalar). Note: A query is executed in the API server when awaited. """ _args = [ Arg("path", path), ] _ctx = self._select("export", _args) return await _ctx.execute(bool) def file(self, path: str) -> "File": """Retrieve a file at the given path""" _args = [ Arg("path", path), ] _ctx = self._select("file", _args) return File(_ctx) async def id(self) -> Result[DirectoryID]: """The content-addressed identifier of the directory Note ---- This is lazyly evaluated, no operation is actually run. Returns ------- Awaitable with resulting leaf value (scalar). Note: A query is executed in the API server when awaited. """ _args: list[Arg] = [] _ctx = self._select("id", _args) return await _ctx.execute(DirectoryID) def load_project(self, config_path: str) -> "Project": """load a project's metadata""" _args = [ Arg("configPath", config_path), ] _ctx = self._select("loadProject", _args) return Project(_ctx) def with_directory( self, path: str, directory: DirectoryID, exclude: list[str] | None = None, include: list[str] | None = None ) -> "Directory": """This directory plus a directory written at the given path""" _args = [ Arg("path", path), Arg("directory", directory), Arg("exclude", exclude, None), Arg("include", include, None), ] _ctx = self._select("withDirectory", _args) return Directory(_ctx) def with_file(self, path: str, source: FileID) -> "Directory": """This directory plus the contents of the given file copied to the given path""" _args = [ Arg("path", path), Arg("source", source), ] _ctx = self._select("withFile", _args) return Directory(_ctx) def with_new_directory(self, path: str) -> "Directory": """This directory plus a new directory created at the given path""" _args = [ Arg("path", path), ] _ctx = self._select("withNewDirectory", _args) return Directory(_ctx) def with_new_file(self, path: str, contents: str | None = None) -> "Directory": """This directory plus a new file written at the given path""" _args = [ Arg("path", path), Arg("contents", contents, None), ] _ctx = self._select("withNewFile", _args) return Directory(_ctx) def without_directory(self, path: str) -> "Directory": """This directory with the directory at the given path removed""" _args = [ Arg("path", path), ] _ctx = self._select("withoutDirectory", _args) return Directory(_ctx) def without_file(self, path: str) -> "Directory": """This directory with the file at the given path removed""" _args = [ Arg("path", path), ] _ctx = self._select("withoutFile", _args) return Directory(_ctx) class EnvVariable(Type): """EnvVariable is a simple key value object that represents an environment variable.""" async def name(self) -> Result[str]: """name is the environment variable name. Returns ------- Awaitable with resulting leaf value (scalar). Note: A query is executed in the API server when awaited. """ _args: list[Arg] = [] _ctx = self._select("name", _args) return await _ctx.execute(str) async def value(self) -> Result[str]: """value is the environment variable value Returns ------- Awaitable with resulting leaf value (scalar). Note: A query is executed in the API server when awaited. """ _args: list[Arg] = [] _ctx = self._select("value", _args) return await _ctx.execute(str) class File(Type): """A file""" async def contents(self) -> Result[str]: """The contents of the file Returns ------- Awaitable with resulting leaf value (scalar). Note: A query is executed in the API server when awaited. """ _args: list[Arg] = [] _ctx = self._select("contents", _args) return await _ctx.execute(str) async def id(self) -> Result[FileID]: """The content-addressed identifier of the file Note ---- This is lazyly evaluated, no operation is actually run. Returns ------- Awaitable with resulting leaf value (scalar). Note: A query is executed in the API server when awaited. """ _args: list[Arg] = [] _ctx = self._select("id", _args) return await _ctx.execute(FileID) def secret(self) -> "Secret": _args: list[Arg] = [] _ctx = self._select("secret", _args) return Secret(_ctx) async def size(self) -> Result[int]: """The size of the file, in bytes Returns ------- Awaitable with resulting leaf value (scalar). Note: A query is executed in the API server when awaited. """ _args: list[Arg] = [] _ctx = self._select("size", _args) return await _ctx.execute(int) class GitRef(Type): """A git ref (tag or branch)""" async def digest(self) -> Result[str]: """The digest of the current value of this ref Returns ------- Awaitable with resulting leaf value (scalar). Note: A query is executed in the API server when awaited. """ _args: list[Arg] = [] _ctx = self._select("digest", _args) return await _ctx.execute(str) def tree(self) -> "Directory": """The filesystem tree at this ref""" _args: list[Arg] = [] _ctx = self._select("tree", _args) return Directory(_ctx) class GitRepository(Type): """A git repository""" def branch(self, name: str) -> "GitRef": """Details on one branch""" _args = [ Arg("name", name), ] _ctx = self._select("branch", _args) return GitRef(_ctx) async def branches(self) -> Result[list[str]]: """List of branches on the repository Returns ------- Awaitable with resulting leaf value (scalar). Note: A query is executed in the API server when awaited. """ _args: list[Arg] = [] _ctx = self._select("branches", _args) return await _ctx.execute(list[str]) def tag(self, name: str) -> "GitRef": """Details on one tag""" _args = [ Arg("name", name), ] _ctx = self._select("tag", _args) return GitRef(_ctx) async def tags(self) -> Result[list[str]]: """List of tags on the repository Returns ------- Awaitable with resulting leaf value (scalar). Note: A query is executed in the API server when awaited. """ _args: list[Arg] = [] _ctx = self._select("tags", _args) return await _ctx.execute(list[str]) class Host(Type): """Information about the host execution environment""" def directory(self, path: str, exclude: list[str] | None = None, include: list[str] | None = None) -> "Directory": """Access a directory on the host""" _args = [ Arg("path", path), Arg("exclude", exclude, None), Arg("include", include, None), ] _ctx = self._select("directory", _args) return Directory(_ctx) def env_variable(self, name: str) -> "HostVariable": """Lookup the value of an environment variable. Null if the variable is not available.""" _args = [ Arg("name", name), ] _ctx = self._select("envVariable", _args) return HostVariable(_ctx) def workdir(self, exclude: list[str] | None = None, include: list[str] | None = None) -> "Directory": """The current working directory on the host""" _args = [ Arg("exclude", exclude, None), Arg("include", include, None), ] _ctx = self._select("workdir", _args) return Directory(_ctx) class HostVariable(Type): """An environment variable on the host environment""" def secret(self) -> "Secret": """A secret referencing the value of this variable""" _args: list[Arg] = [] _ctx = self._select("secret", _args) return Secret(_ctx) async def value(self) -> Result[str]: """The value of this variable Returns ------- Awaitable with resulting leaf value (scalar). Note: A query is executed in the API server when awaited. """ _args: list[Arg] = [] _ctx = self._select("value", _args) return await _ctx.execute(str) class Project(Type): """A set of scripts and/or extensions""" def extensions(self) -> "Project": """extensions in this project""" _args: list[Arg] = [] _ctx = self._select("extensions", _args) return Project(_ctx) def generated_code(self) -> "Directory": """Code files generated by the SDKs in the project""" _args: list[Arg] = [] _ctx = self._select("generatedCode", _args) return Directory(_ctx) async def install(self) -> Result[bool]: """install the project's schema Returns ------- Awaitable with resulting leaf value (scalar). Note: A query is executed in the API server when awaited. """ _args: list[Arg] = [] _ctx = self._select("install", _args) return await _ctx.execute(bool) async def name(self) -> Result[str]: """name of the project Returns ------- Awaitable with resulting leaf value (scalar). Note: A query is executed in the API server when awaited. """ _args: list[Arg] = [] _ctx = self._select("name", _args) return await _ctx.execute(str) async def schema(self) -> Result[str | None]: """schema provided by the project Returns ------- Awaitable with resulting leaf value (scalar). Note: A query is executed in the API server when awaited. """ _args: list[Arg] = [] _ctx = self._select("schema", _args) return await _ctx.execute(str | None) async def sdk(self) -> Result[str | None]: """sdk used to generate code for and/or execute this project Returns ------- Awaitable with resulting leaf value (scalar). Note: A query is executed in the API server when awaited. """ _args: list[Arg] = [] _ctx = self._select("sdk", _args) return await _ctx.execute(str | None) class Query(Type): def cache_volume(self, key: str) -> "CacheVolume": """Construct a cache volume for a given cache key""" _args = [ Arg("key", key), ] _ctx = self._select("cacheVolume", _args) return CacheVolume(_ctx) def container(self, id: ContainerID | None = None, platform: Platform | None = None) -> "Container": """Load a container from ID. Null ID returns an empty container (scratch). Optional platform argument initializes new containers to execute and publish as that platform. Platform defaults to that of the builder's host. """ _args = [ Arg("id", id, None), Arg("platform", platform, None), ] _ctx = self._select("container", _args) return Container(_ctx) async def default_platform(self) -> Result[Platform]: """The default platform of the builder. Returns ------- Awaitable with resulting leaf value (scalar). Note: A query is executed in the API server when awaited. """ _args: list[Arg] = [] _ctx = self._select("defaultPlatform", _args) return await _ctx.execute(Platform) def directory(self, id: DirectoryID | None = None) -> "Directory": """Load a directory by ID. No argument produces an empty directory.""" _args = [ Arg("id", id, None), ] _ctx = self._select("directory", _args) return Directory(_ctx) def file(self, id: FileID) -> "File": """Load a file by ID""" _args = [ Arg("id", id), ] _ctx = self._select("file", _args) return File(_ctx) def git(self, url: str) -> "GitRepository": """Query a git repository""" _args = [ Arg("url", url), ] _ctx = self._select("git", _args) return GitRepository(_ctx) def host(self) -> "Host": """Query the host environment""" _args: list[Arg] = [] _ctx = self._select("host", _args) return Host(_ctx) def http(self, url: str) -> "File": """An http remote""" _args = [ Arg("url", url), ] _ctx = self._select("http", _args) return File(_ctx) def project(self, name: str) -> "Project": """Look up a project by name""" _args = [ Arg("name", name), ] _ctx = self._select("project", _args) return Project(_ctx) def secret(self, id: SecretID) -> "Secret": """Load a secret from its ID""" _args = [ Arg("id", id), ] _ctx = self._select("secret", _args) return Secret(_ctx) class Secret(Type): """A reference to a secret value, which can be handled more safely than the value itself""" async def id(self) -> Result[SecretID]: """The identifier for this secret Note ---- This is lazyly evaluated, no operation is actually run. Returns ------- Awaitable with resulting leaf value (scalar). Note: A query is executed in the API server when awaited. """ _args: list[Arg] = [] _ctx = self._select("id", _args) return await _ctx.execute(SecretID) async def plaintext(self) -> Result[str]: """The value of this secret Returns ------- Awaitable with resulting leaf value (scalar). Note: A query is executed in the API server when awaited. """ _args: list[Arg] = [] _ctx = self._select("plaintext", _args) return await _ctx.execute(str)
closed
dagger/dagger
https://github.com/dagger/dagger
3,675
Add a few essential tests
There's a lot of tests to be added, for sure, but I should add at least a few more basic ones for next launch. - Reuse some test examples from Go (integration) - Add a few deserialization test cases (unit)[^1] [^1]: This is where I am most unsure, helps to build confidence.
https://github.com/dagger/dagger/issues/3675
https://github.com/dagger/dagger/pull/3656
4edc2a615a8f2c41c5d4eef0980ca334acb47c17
b7a567ed2afd66c629f816895ac041d4a7b55fda
"2022-11-04T14:10:33Z"
go
"2022-11-05T10:11:51Z"
sdk/python/src/dagger/connectors/base.py
import logging import os from abc import ABC, abstractmethod from collections import UserDict from pathlib import Path from typing import TypeVar from urllib.parse import ParseResult as ParsedURL from urllib.parse import urlparse from attrs import Factory, define, field from gql.client import Client as GraphQLClient from gql.transport import AsyncTransport, Transport from ..api import Client logger = logging.getLogger(__name__) DEFAULT_HOST = "http://localhost:8080" DEFAULT_CONFIG = "dagger.json" @define class Config: """Options for connecting to the Dagger engine. Parameters ---------- host: Address to connect to the engine. workdir: The host workdir loaded into dagger. config_path: Project config file. timeout: Timeout in seconds for establishing a connection to the server. """ host: ParsedURL = field(factory=lambda: os.environ.get("DAGGER_HOST", DEFAULT_HOST), converter=urlparse) timeout: int = 10 # FIXME: aren't these environment variables usable by the engine directly? # If so just skip setting the CLI option if not set by the user explicitly. workdir: Path = field(factory=lambda: os.environ.get("DAGGER_WORKDIR", "."), converter=Path) config_path: Path = field(factory=lambda: os.environ.get("DAGGER_CONFIG", DEFAULT_CONFIG), converter=Path) @define class Connector(ABC): """Facilitates instantiating a client and possibly provisioning the engine for it.""" cfg: Config = Factory(Config) client: Client | None = None async def connect(self) -> Client: transport = self.make_transport() gql_client = self.make_graphql_client(transport) # FIXME: handle errors from establishing session session = await gql_client.connect_async(reconnecting=True) self.client = Client.from_session(session) return self.client async def close(self) -> None: assert self.client is not None await self.client._gql_client.close_async() def connect_sync(self) -> Client: transport = self.make_sync_transport() gql_client = self.make_graphql_client(transport) # FIXME: handle errors from establishing session session = gql_client.connect_sync() self.client = Client.from_session(session) return self.client def close_sync(self) -> None: assert self.client is not None self.client._gql_client.close_sync() @abstractmethod def make_transport(self) -> AsyncTransport: ... @abstractmethod def make_sync_transport(self) -> Transport: ... def make_graphql_client(self, transport: AsyncTransport | Transport) -> GraphQLClient: return GraphQLClient(transport=transport, fetch_schema_from_transport=True) _RT = TypeVar("_RT", bound=type) class _Registry(UserDict[str, type[Connector]]): def add(self, scheme: str): def register(cls: _RT) -> _RT: if scheme not in self.data: if not issubclass(cls, Connector): raise TypeError(f"{cls.__name__} isn't a Connector subclass") self.data[scheme] = cls elif cls is not self.data[scheme]: raise TypeError(f"Can't re-register {scheme} connector: {cls.__name__}") else: # FIXME: make sure imports don't create side effect of registering multiple times logger.debug(f"Attempted to re-register {scheme} connector") return cls return register def get_(self, cfg: Config) -> Connector: try: cls = self.data[cfg.host.scheme] except KeyError: raise ValueError(f'Invalid dagger host "{cfg.host.geturl()}"') return cls(cfg) _registry = _Registry() def register_connector(schema: str): return _registry.add(schema) def get_connector(cfg: Config) -> Connector: return _registry.get_(cfg)
closed
dagger/dagger
https://github.com/dagger/dagger
3,675
Add a few essential tests
There's a lot of tests to be added, for sure, but I should add at least a few more basic ones for next launch. - Reuse some test examples from Go (integration) - Add a few deserialization test cases (unit)[^1] [^1]: This is where I am most unsure, helps to build confidence.
https://github.com/dagger/dagger/issues/3675
https://github.com/dagger/dagger/pull/3656
4edc2a615a8f2c41c5d4eef0980ca334acb47c17
b7a567ed2afd66c629f816895ac041d4a7b55fda
"2022-11-04T14:10:33Z"
go
"2022-11-05T10:11:51Z"
sdk/python/src/dagger/connectors/http.py
import logging import sys from asyncio.subprocess import Process from subprocess import DEVNULL, CalledProcessError import anyio from attrs import Factory, define, field from gql.transport import AsyncTransport, Transport from gql.transport.aiohttp import AIOHTTPTransport from gql.transport.requests import RequestsHTTPTransport from dagger import Client from .base import Config, Connector, register_connector logger = logging.getLogger(__name__) @define class Engine: cfg: Config _proc: Process | None = field(default=None, init=False) async def assert_version(self) -> None: try: await anyio.run_process(["cloak", "dev", "--help"], stdout=DEVNULL, stderr=DEVNULL, check=True) except CalledProcessError: logger.error("⚠️ Please ensure that cloak binary in $PATH is v0.3.0 or newer.") # FIXME: make sure resources are being cleaned up correctly sys.exit(127) async def start(self) -> None: await self.assert_version() args = ["cloak", "dev"] if self.cfg.workdir: args.extend(["--workdir", str(self.cfg.workdir.absolute())]) if self.cfg.host.port: args.extend(["--port", str(self.cfg.host.port)]) if self.cfg.config_path: args.extend(["-p", str(self.cfg.config_path.absolute())]) self._proc = await anyio.open_process(args) async def stop(self) -> None: assert self._proc is not None # FIXME: make sure signals from OS are being handled self._proc.terminate() # Gives 5 seconds for the process to terminate properly # FIXME: timeout await self._proc.wait() # FIXME: kill? @register_connector("http") @define class HTTPConnector(Connector): """Connect to dagger engine via HTTP""" engine: Engine = Factory(lambda self: Engine(self.cfg), takes_self=True) @property def query_url(self) -> str: return f"{self.cfg.host.geturl()}/query" async def connect(self) -> Client: if self.cfg.host.hostname == "localhost": await self.provision() return await super().connect() async def provision(self) -> None: # FIXME: only provision if port is not in use # FIXME: handle cancellation, retries and timeout # FIXME: handle errors during provisioning # await self.engine.start() ... async def close(self) -> None: # FIXME: need exit stack? await super().close() # await self.engine.stop() def connect_sync(self) -> Client: # FIXME: provision engine in sync return super().connect_sync() def make_transport(self) -> AsyncTransport: return AIOHTTPTransport(self.query_url, timeout=self.cfg.timeout) def make_sync_transport(self) -> Transport: return RequestsHTTPTransport(self.query_url, timeout=self.cfg.timeout, retries=10)
closed
dagger/dagger
https://github.com/dagger/dagger
3,675
Add a few essential tests
There's a lot of tests to be added, for sure, but I should add at least a few more basic ones for next launch. - Reuse some test examples from Go (integration) - Add a few deserialization test cases (unit)[^1] [^1]: This is where I am most unsure, helps to build confidence.
https://github.com/dagger/dagger/issues/3675
https://github.com/dagger/dagger/pull/3656
4edc2a615a8f2c41c5d4eef0980ca334acb47c17
b7a567ed2afd66c629f816895ac041d4a7b55fda
"2022-11-04T14:10:33Z"
go
"2022-11-05T10:11:51Z"
sdk/python/tests/api/test_api.py
from textwrap import dedent import pytest import dagger pytestmark = pytest.mark.anyio @pytest.fixture async def client(): async with dagger.Connection() as client: yield client async def test_query(client: dagger.Client): alpine = client.container().from_("python:3.10.8-alpine") version = await alpine.exec(["python", "-V"]).stdout().contents() assert version.value == "Python 3.10.8\n" assert version.query == dedent( """\ { container { from(address: "python:3.10.8-alpine") { exec(args: ["python", "-V"]) { stdout { contents } } } } } """.rstrip() )
closed
dagger/dagger
https://github.com/dagger/dagger
3,675
Add a few essential tests
There's a lot of tests to be added, for sure, but I should add at least a few more basic ones for next launch. - Reuse some test examples from Go (integration) - Add a few deserialization test cases (unit)[^1] [^1]: This is where I am most unsure, helps to build confidence.
https://github.com/dagger/dagger/issues/3675
https://github.com/dagger/dagger/pull/3656
4edc2a615a8f2c41c5d4eef0980ca334acb47c17
b7a567ed2afd66c629f816895ac041d4a7b55fda
"2022-11-04T14:10:33Z"
go
"2022-11-05T10:11:51Z"
sdk/python/tests/api/test_integration.py
closed
dagger/dagger
https://github.com/dagger/dagger
3,675
Add a few essential tests
There's a lot of tests to be added, for sure, but I should add at least a few more basic ones for next launch. - Reuse some test examples from Go (integration) - Add a few deserialization test cases (unit)[^1] [^1]: This is where I am most unsure, helps to build confidence.
https://github.com/dagger/dagger/issues/3675
https://github.com/dagger/dagger/pull/3656
4edc2a615a8f2c41c5d4eef0980ca334acb47c17
b7a567ed2afd66c629f816895ac041d4a7b55fda
"2022-11-04T14:10:33Z"
go
"2022-11-05T10:11:51Z"
sdk/python/tests/api/test_response.py
closed
dagger/dagger
https://github.com/dagger/dagger
3,675
Add a few essential tests
There's a lot of tests to be added, for sure, but I should add at least a few more basic ones for next launch. - Reuse some test examples from Go (integration) - Add a few deserialization test cases (unit)[^1] [^1]: This is where I am most unsure, helps to build confidence.
https://github.com/dagger/dagger/issues/3675
https://github.com/dagger/dagger/pull/3656
4edc2a615a8f2c41c5d4eef0980ca334acb47c17
b7a567ed2afd66c629f816895ac041d4a7b55fda
"2022-11-04T14:10:33Z"
go
"2022-11-05T10:11:51Z"
sdk/python/tests/connectors/test_base.py
closed
dagger/dagger
https://github.com/dagger/dagger
3,686
Fix engine provisioning
Depends on: - https://github.com/dagger/dagger/issues/3653 ## Todo - [x] Use a worker thread with sync code[^1] - [x] Follow instructions in https://github.com/dagger/dagger/issues/3653#issuecomment-1303984783 - [x] Use `docker.io/eriksipsma/test-dagger@sha256:eb6a15a52fed7ac51b26e181dc1c6b2731ba0451f1951c575d85690159cb0722` - [ ] Test connection [^1]: Quicker to reuse previous sync implementation and to have it ready for sync support.
https://github.com/dagger/dagger/issues/3686
https://github.com/dagger/dagger/pull/3716
e6d2e1657e70a28a479123ee12ae333dc7a99e3d
aa21304d28d8c6599936acf2e0f82f5f68075a66
"2022-11-04T18:57:28Z"
go
"2022-11-08T09:52:13Z"
examples/python/client-simple/say.py
import sys import anyio import dagger async def main(args: list[str]): async with dagger.Connection() as client: # build container with cowsay entrypoint # note: this is reusable, no request is made to the server ctr = ( client.container() .from_("python:alpine") .exec(["pip", "install", "cowsay"]) .with_entrypoint(["cowsay"]) ) # run cowsay with requested message # note: methods that return a coroutine with a Result need to await query execution result = await ctr.exec(args).stdout().contents() print(result) if __name__ == "__main__": anyio.run(main, sys.argv[1:])
closed
dagger/dagger
https://github.com/dagger/dagger
3,686
Fix engine provisioning
Depends on: - https://github.com/dagger/dagger/issues/3653 ## Todo - [x] Use a worker thread with sync code[^1] - [x] Follow instructions in https://github.com/dagger/dagger/issues/3653#issuecomment-1303984783 - [x] Use `docker.io/eriksipsma/test-dagger@sha256:eb6a15a52fed7ac51b26e181dc1c6b2731ba0451f1951c575d85690159cb0722` - [ ] Test connection [^1]: Quicker to reuse previous sync implementation and to have it ready for sync support.
https://github.com/dagger/dagger/issues/3686
https://github.com/dagger/dagger/pull/3716
e6d2e1657e70a28a479123ee12ae333dc7a99e3d
aa21304d28d8c6599936acf2e0f82f5f68075a66
"2022-11-04T18:57:28Z"
go
"2022-11-08T09:52:13Z"
sdk/python/README.md
# Dagger Python SDK A client package for running [Dagger](https://dagger.io/) pipelines. ## What is the Dagger Python SDK? The Dagger Python SDK contains everything you need to develop CI/CD pipelines in Python, and run them on any OCI-compatible container runtime. ## Example ```python # say.py import sys import anyio import dagger async def main(args: list[str]): async with dagger.Connection() as client: # build container with cowsay entrypoint # note: this is reusable, no request is made to the server ctr = ( client.container() .from_("python:alpine") .exec(["pip", "install", "cowsay"]) .with_entrypoint(["cowsay"]) ) # run cowsay with requested message # note: methods that return a coroutine with a Result need to # await query execution result = await ctr.exec(args).stdout().contents() print(result) if __name__ == "__main__": anyio.run(main, sys.argv[1:]) ``` Run with: ```console $ python say.py "Simple is better than complex" _____________________________ | Simple is better than complex | ============================= \ \ ^__^ (oo)\_______ (__)\ )\/\ ||----w | || || ``` ## Learn more - [Documentation](https://docs.dagger.io) - [Source code](https://github.com/dagger/dagger/tree/main/sdk/python) ## Development Requirements: - Python 3.10+ - [Hatch](https://hatch.pypa.io/latest/install/) Run tests with `hatch run test`. Run the linter, reformatting code with `hatch run lint:fmt` or just check with `hatch run lint:style`. Re-regenerate client with `hatch run generate`. Remember to run `hatch run lint:fmt` afterwards for consistent output!
closed
dagger/dagger
https://github.com/dagger/dagger
3,686
Fix engine provisioning
Depends on: - https://github.com/dagger/dagger/issues/3653 ## Todo - [x] Use a worker thread with sync code[^1] - [x] Follow instructions in https://github.com/dagger/dagger/issues/3653#issuecomment-1303984783 - [x] Use `docker.io/eriksipsma/test-dagger@sha256:eb6a15a52fed7ac51b26e181dc1c6b2731ba0451f1951c575d85690159cb0722` - [ ] Test connection [^1]: Quicker to reuse previous sync implementation and to have it ready for sync support.
https://github.com/dagger/dagger/issues/3686
https://github.com/dagger/dagger/pull/3716
e6d2e1657e70a28a479123ee12ae333dc7a99e3d
aa21304d28d8c6599936acf2e0f82f5f68075a66
"2022-11-04T18:57:28Z"
go
"2022-11-08T09:52:13Z"
sdk/python/src/dagger/cli.py
from pathlib import Path from typing import Optional import rich import typer from dagger import codegen from dagger.connectors import Config, get_connector app = typer.Typer() @app.callback() def main(): """ Dagger client """ @app.command() def generate( output: Optional[Path] = typer.Option(None, help="File to write generated code") ): """ Generate a client for the Dagger API """ # not using `dagger.Connection` because codegen is # generating the client that it returns connector = get_connector(Config()) transport = connector.make_sync_transport() with connector.make_graphql_client(transport) as session: if session.client.schema is None: raise typer.BadParameter( "Schema not initialized. Make sure the dagger engine is running." ) code = codegen.generate(session.client.schema) if output is not None: output.write_text(code) git_attrs = output.with_name(".gitattributes") if not git_attrs.exists(): git_attrs.write_text(f"/{output.name} linguist-generated=true\n") rich.print(f"[green]Client generated successfully to[/green] {output} :rocket:") else: rich.print(code)
closed
dagger/dagger
https://github.com/dagger/dagger
3,686
Fix engine provisioning
Depends on: - https://github.com/dagger/dagger/issues/3653 ## Todo - [x] Use a worker thread with sync code[^1] - [x] Follow instructions in https://github.com/dagger/dagger/issues/3653#issuecomment-1303984783 - [x] Use `docker.io/eriksipsma/test-dagger@sha256:eb6a15a52fed7ac51b26e181dc1c6b2731ba0451f1951c575d85690159cb0722` - [ ] Test connection [^1]: Quicker to reuse previous sync implementation and to have it ready for sync support.
https://github.com/dagger/dagger/issues/3686
https://github.com/dagger/dagger/pull/3716
e6d2e1657e70a28a479123ee12ae333dc7a99e3d
aa21304d28d8c6599936acf2e0f82f5f68075a66
"2022-11-04T18:57:28Z"
go
"2022-11-08T09:52:13Z"
sdk/python/src/dagger/connection.py
import logging from typing import NoReturn from .connectors import Config, get_connector logger = logging.getLogger(__name__) class Connection: """Connect to a Dagger Engine.""" def __init__(self, config: Config = None) -> None: if config is None: config = Config() self.connector = get_connector(config) async def __aenter__(self): return await self.connector.connect() async def __aexit__(self, *args, **kwargs) -> None: await self.connector.close() def __enter__(self) -> NoReturn: raise NotImplementedError( "Sync is not supported yet. Use `async with` instead." ) def __exit__(self, *args, **kwargs) -> None: ...
closed
dagger/dagger
https://github.com/dagger/dagger
3,686
Fix engine provisioning
Depends on: - https://github.com/dagger/dagger/issues/3653 ## Todo - [x] Use a worker thread with sync code[^1] - [x] Follow instructions in https://github.com/dagger/dagger/issues/3653#issuecomment-1303984783 - [x] Use `docker.io/eriksipsma/test-dagger@sha256:eb6a15a52fed7ac51b26e181dc1c6b2731ba0451f1951c575d85690159cb0722` - [ ] Test connection [^1]: Quicker to reuse previous sync implementation and to have it ready for sync support.
https://github.com/dagger/dagger/issues/3686
https://github.com/dagger/dagger/pull/3716
e6d2e1657e70a28a479123ee12ae333dc7a99e3d
aa21304d28d8c6599936acf2e0f82f5f68075a66
"2022-11-04T18:57:28Z"
go
"2022-11-08T09:52:13Z"
sdk/python/src/dagger/connectors/__init__.py
from . import http # noqa from .base import Config, Connector, get_connector, register_connector __all__ = [ "Config", "Connector", "get_connector", "register_connector", ]
closed
dagger/dagger
https://github.com/dagger/dagger
3,686
Fix engine provisioning
Depends on: - https://github.com/dagger/dagger/issues/3653 ## Todo - [x] Use a worker thread with sync code[^1] - [x] Follow instructions in https://github.com/dagger/dagger/issues/3653#issuecomment-1303984783 - [x] Use `docker.io/eriksipsma/test-dagger@sha256:eb6a15a52fed7ac51b26e181dc1c6b2731ba0451f1951c575d85690159cb0722` - [ ] Test connection [^1]: Quicker to reuse previous sync implementation and to have it ready for sync support.
https://github.com/dagger/dagger/issues/3686
https://github.com/dagger/dagger/pull/3716
e6d2e1657e70a28a479123ee12ae333dc7a99e3d
aa21304d28d8c6599936acf2e0f82f5f68075a66
"2022-11-04T18:57:28Z"
go
"2022-11-08T09:52:13Z"
sdk/python/src/dagger/connectors/base.py
import logging import os from abc import ABC, abstractmethod from collections import UserDict from pathlib import Path from typing import TypeVar from urllib.parse import ParseResult as ParsedURL from urllib.parse import urlparse from attrs import Factory, define, field from gql.client import Client as GraphQLClient from gql.transport import AsyncTransport, Transport from dagger import Client logger = logging.getLogger(__name__) DEFAULT_HOST = "http://localhost:8080" DEFAULT_CONFIG = "dagger.json" @define class Config: """Options for connecting to the Dagger engine. Parameters ---------- host: Address to connect to the engine. workdir: The host workdir loaded into dagger. config_path: Project config file. timeout: The maximum time in seconds for establishing a connection to the server. execute_timeout: The maximum time in seconds for the execution of a request before a TimeoutError is raised. Only used for async transport. Passing None results in waiting forever for a response. reconnecting: If True, create a permanent reconnecting session. Only used for async transport. """ host: ParsedURL = field( factory=lambda: os.environ.get("DAGGER_HOST", DEFAULT_HOST), converter=urlparse, ) timeout: int = 10 execute_timeout: int | float | None = 60 * 5 reconnecting: bool = True # FIXME: aren't these environment variables usable by the engine directly? # If so just skip setting the CLI option if not set by the user explicitly. workdir: Path = field( factory=lambda: os.environ.get("DAGGER_WORKDIR", "."), converter=Path, ) config_path: Path = field( factory=lambda: os.environ.get("DAGGER_CONFIG", DEFAULT_CONFIG), converter=Path, ) @define class Connector(ABC): """Facilitates instantiating a client and possibly provisioning the engine for it. """ cfg: Config = Factory(Config) client: Client | None = None async def connect(self) -> Client: transport = self.make_transport() gql_client = self.make_graphql_client(transport) # FIXME: handle errors from establishing session session = await gql_client.connect_async(reconnecting=self.cfg.reconnecting) self.client = Client.from_session(session) return self.client async def close(self) -> None: assert self.client is not None await self.client._gql_client.close_async() def connect_sync(self) -> Client: transport = self.make_sync_transport() gql_client = self.make_graphql_client(transport) # FIXME: handle errors from establishing session session = gql_client.connect_sync() self.client = Client.from_session(session) return self.client def close_sync(self) -> None: assert self.client is not None self.client._gql_client.close_sync() @abstractmethod def make_transport(self) -> AsyncTransport: ... @abstractmethod def make_sync_transport(self) -> Transport: ... def make_graphql_client( self, transport: AsyncTransport | Transport ) -> GraphQLClient: return GraphQLClient( transport=transport, fetch_schema_from_transport=True, execute_timeout=self.cfg.execute_timeout, ) _RT = TypeVar("_RT", bound=type) class _Registry(UserDict[str, type[Connector]]): def add(self, scheme: str): def register(cls: _RT) -> _RT: if scheme not in self.data: if not issubclass(cls, Connector): raise TypeError(f"{cls.__name__} isn't a Connector subclass") self.data[scheme] = cls elif cls is not self.data[scheme]: raise TypeError(f"Can't re-register {scheme} connector: {cls.__name__}") else: # FIXME: make sure imports don't create side effect of registering # multiple times logger.debug(f"Attempted to re-register {scheme} connector") return cls return register def get_(self, cfg: Config) -> Connector: try: cls = self.data[cfg.host.scheme] except KeyError: raise ValueError(f'Invalid dagger host "{cfg.host.geturl()}"') return cls(cfg) _registry = _Registry() def register_connector(schema: str): return _registry.add(schema) def get_connector(cfg: Config) -> Connector: return _registry.get_(cfg)
closed
dagger/dagger
https://github.com/dagger/dagger
3,686
Fix engine provisioning
Depends on: - https://github.com/dagger/dagger/issues/3653 ## Todo - [x] Use a worker thread with sync code[^1] - [x] Follow instructions in https://github.com/dagger/dagger/issues/3653#issuecomment-1303984783 - [x] Use `docker.io/eriksipsma/test-dagger@sha256:eb6a15a52fed7ac51b26e181dc1c6b2731ba0451f1951c575d85690159cb0722` - [ ] Test connection [^1]: Quicker to reuse previous sync implementation and to have it ready for sync support.
https://github.com/dagger/dagger/issues/3686
https://github.com/dagger/dagger/pull/3716
e6d2e1657e70a28a479123ee12ae333dc7a99e3d
aa21304d28d8c6599936acf2e0f82f5f68075a66
"2022-11-04T18:57:28Z"
go
"2022-11-08T09:52:13Z"
sdk/python/src/dagger/connectors/docker.py
closed
dagger/dagger
https://github.com/dagger/dagger
3,686
Fix engine provisioning
Depends on: - https://github.com/dagger/dagger/issues/3653 ## Todo - [x] Use a worker thread with sync code[^1] - [x] Follow instructions in https://github.com/dagger/dagger/issues/3653#issuecomment-1303984783 - [x] Use `docker.io/eriksipsma/test-dagger@sha256:eb6a15a52fed7ac51b26e181dc1c6b2731ba0451f1951c575d85690159cb0722` - [ ] Test connection [^1]: Quicker to reuse previous sync implementation and to have it ready for sync support.
https://github.com/dagger/dagger/issues/3686
https://github.com/dagger/dagger/pull/3716
e6d2e1657e70a28a479123ee12ae333dc7a99e3d
aa21304d28d8c6599936acf2e0f82f5f68075a66
"2022-11-04T18:57:28Z"
go
"2022-11-08T09:52:13Z"
sdk/python/src/dagger/connectors/http.py
import logging import sys from asyncio.subprocess import Process from subprocess import DEVNULL, CalledProcessError import anyio from aiohttp import ClientTimeout from attrs import Factory, define, field from gql.transport import AsyncTransport, Transport from gql.transport.aiohttp import AIOHTTPTransport from gql.transport.requests import RequestsHTTPTransport from dagger import Client from .base import Config, Connector, register_connector logger = logging.getLogger(__name__) @define class Engine: cfg: Config _proc: Process | None = field(default=None, init=False) async def assert_version(self) -> None: try: await anyio.run_process( ["cloak", "dev", "--help"], stdout=DEVNULL, stderr=DEVNULL, check=True ) except CalledProcessError: logger.error( "⚠️ Please ensure that cloak binary in $PATH is v0.3.0 or newer." ) # FIXME: make sure resources are being cleaned up correctly sys.exit(127) async def start(self) -> None: await self.assert_version() args = ["cloak", "dev"] if self.cfg.workdir: args.extend(["--workdir", str(self.cfg.workdir.absolute())]) if self.cfg.host.port: args.extend(["--port", str(self.cfg.host.port)]) if self.cfg.config_path: args.extend(["-p", str(self.cfg.config_path.absolute())]) self._proc = await anyio.open_process(args) async def stop(self) -> None: assert self._proc is not None # FIXME: make sure signals from OS are being handled self._proc.terminate() # Gives 5 seconds for the process to terminate properly # FIXME: timeout await self._proc.wait() # FIXME: kill? @register_connector("http") @define class HTTPConnector(Connector): """Connect to dagger engine via HTTP""" engine: Engine = Factory(lambda self: Engine(self.cfg), takes_self=True) @property def query_url(self) -> str: return f"{self.cfg.host.geturl()}/query" async def connect(self) -> Client: if self.cfg.host.hostname == "localhost": await self.provision() return await super().connect() async def provision(self) -> None: # FIXME: only provision if port is not in use # FIXME: handle cancellation, retries and timeout # FIXME: handle errors during provisioning # await self.engine.start() ... async def close(self) -> None: # FIXME: need exit stack? await super().close() # await self.engine.stop() def connect_sync(self) -> Client: # FIXME: provision engine in sync return super().connect_sync() def make_transport(self) -> AsyncTransport: session_timeout = self.cfg.execute_timeout if isinstance(session_timeout, int): session_timeout = float(session_timeout) return AIOHTTPTransport( self.query_url, timeout=self.cfg.timeout, client_session_args={"timeout": ClientTimeout(total=session_timeout)}, ) def make_sync_transport(self) -> Transport: return RequestsHTTPTransport( self.query_url, timeout=self.cfg.timeout, retries=10 )
closed
dagger/dagger
https://github.com/dagger/dagger
3,686
Fix engine provisioning
Depends on: - https://github.com/dagger/dagger/issues/3653 ## Todo - [x] Use a worker thread with sync code[^1] - [x] Follow instructions in https://github.com/dagger/dagger/issues/3653#issuecomment-1303984783 - [x] Use `docker.io/eriksipsma/test-dagger@sha256:eb6a15a52fed7ac51b26e181dc1c6b2731ba0451f1951c575d85690159cb0722` - [ ] Test connection [^1]: Quicker to reuse previous sync implementation and to have it ready for sync support.
https://github.com/dagger/dagger/issues/3686
https://github.com/dagger/dagger/pull/3716
e6d2e1657e70a28a479123ee12ae333dc7a99e3d
aa21304d28d8c6599936acf2e0f82f5f68075a66
"2022-11-04T18:57:28Z"
go
"2022-11-08T09:52:13Z"
sdk/python/tests/api/test_integration.py
from datetime import datetime from textwrap import dedent import pytest import dagger pytestmark = [ pytest.mark.anyio, pytest.mark.slow, ] async def test_container(): async with dagger.Connection() as client: alpine = client.container().from_("alpine:3.16.2") version = await alpine.exec(["cat", "/etc/alpine-release"]).stdout().contents() assert version == "3.16.2\n" async def test_git_repository(): async with dagger.Connection() as client: repo = client.git("https://github.com/dagger/dagger").tag("v0.3.0").tree() readme = await repo.file("README.md").contents() assert readme.split("\n")[0] == "## What is Dagger?" async def test_container_build(): async with dagger.Connection() as client: repo_id = ( await client.git("https://github.com/dagger/dagger") .tag("v0.3.0") .tree() .id() ) dagger_img = client.container().build(repo_id) out = await dagger_img.exec(["version"]).stdout().contents() words = out.strip().split(" ") assert words[0] == "dagger" async def test_container_with_env_variable(): async with dagger.Connection() as client: container = ( client.container().from_("alpine:3.16.2").with_env_variable("FOO", "bar") ) out = await container.exec(["sh", "-c", "echo -n $FOO"]).stdout().contents() assert out == "bar" async def test_container_with_mounted_directory(): async with dagger.Connection() as client: dir_id = await ( client.directory() .with_new_file("hello.txt", "Hello, world!") .with_new_file("goodbye.txt", "Goodbye, world!") .id() ) container = ( client.container() .from_("alpine:3.16.2") .with_mounted_directory("/mnt", dir_id) ) out = await container.exec(["ls", "/mnt"]).stdout().contents() assert out == dedent( """\ goodbye.txt hello.txt """ ) async def test_container_with_mounted_cache(): async with dagger.Connection() as client: cache_key = f"example-{datetime.now().isoformat()}" cache_id = await client.cache_volume(cache_key).id() container = ( client.container() .from_("alpine:3.16.2") .with_mounted_cache("/cache", cache_id) ) for i in range(5): out = ( await container.exec( [ "sh", "-c", "echo $0 >> /cache/x.txt; cat /cache/x.txt", str(i), ] ) .stdout() .contents() ) assert out == "0\n1\n2\n3\n4\n" async def test_directory(): async with dagger.Connection() as client: dir = ( client.directory() .with_new_file("hello.txt", "Hello, world!") .with_new_file("goodbye.txt", "Goodbye, world!") ) entries = await dir.entries() assert entries == ["goodbye.txt", "hello.txt"] async def test_host_workdir(): async with dagger.Connection(dagger.Config(workdir=".")) as client: readme = await client.host().workdir().file("README.md").contents() assert "Dagger" in readme
closed
dagger/dagger
https://github.com/dagger/dagger
3,723
Fix spurious `WARN[0000] commandConn.CloseWrite: commandconn: failed to wait: signal: terminated`
Caused by our use of the buildkit connhelper more often now (we always wait to check if it's running first)
https://github.com/dagger/dagger/issues/3723
https://github.com/dagger/dagger/pull/3731
9bd33ed56ab5e64de7ec5759b9416cd05baec5ee
d0e08e48a909fc14647b8be5047597f8243d48a4
"2022-11-08T01:47:22Z"
go
"2022-11-08T18:33:42Z"
internal/buildkitd/buildkitd.go
package buildkitd import ( "context" "errors" "fmt" "os" "os/exec" "path/filepath" "runtime/debug" "strconv" "strings" "time" "github.com/gofrs/flock" "github.com/mitchellh/go-homedir" bkclient "github.com/moby/buildkit/client" "github.com/moby/buildkit/util/tracing/detect" "github.com/rs/zerolog/log" "go.opentelemetry.io/otel" _ "github.com/moby/buildkit/client/connhelper/dockercontainer" // import the docker connection driver _ "github.com/moby/buildkit/client/connhelper/kubepod" // import the kubernetes connection driver _ "github.com/moby/buildkit/client/connhelper/podmancontainer" // import the podman connection driver ) const ( mobyBuildkitImage = "moby/buildkit" containerName = "dagger-buildkitd" volumeName = "dagger-buildkitd" buildkitdLockPath = "~/.config/dagger/.buildkitd.lock" // Long timeout to allow for slow image pulls of // buildkitd while not blocking for infinity lockTimeout = 10 * time.Minute ) // NB: normally we take the version of Buildkit from our go.mod, e.g. v0.10.5, // and use the same version for the moby/buildkit Docker tag. // // this isn't possible when we're using an unreleased version of Buildkit. in // this scenario a new buildkit image will eventually be built + pushed to // moby/buildkit:master by their own CI, but if we were to use just "master" we // wouldn't know when the image needs to be bumped. // // so instead we'll manually map the go.mod version to the the image that // corresponds to it. note that this go.mod version doesn't care what repo it's // from; the sha should be enough. // // you can find this digest by pulling moby/buildkit:master like so: // // $ docker pull moby/buildkit:master // // # check that it matches // $ docker run moby/buildkit:master --version // // # get the exact digest // $ docker images --digests | grep moby/buildkit:master // // (unfortunately this relies on timing/chance/spying on their CI) // // alternatively you can build your own image and push it somewhere var modVersionToImage = map[string]string{ "v0.10.1-0.20221027014600-b78713cdd127": "moby/buildkit@sha256:4984ac6da1898a9a06c4c3f7da5eaabe8a09ec56f5054b0a911ab0f9df6a092c", } func Client(ctx context.Context, host string) (*bkclient.Client, error) { if host == "" { host = os.Getenv("BUILDKIT_HOST") } if host == "" { h, err := startBuildkitd(ctx) if err != nil { return nil, err } host = h } if err := waitBuildkit(ctx, host); err != nil { return nil, err } opts := []bkclient.ClientOpt{ bkclient.WithFailFast(), bkclient.WithTracerProvider(otel.GetTracerProvider()), } exp, err := detect.Exporter() if err != nil { return nil, err } if td, ok := exp.(bkclient.TracerDelegate); ok { opts = append(opts, bkclient.WithTracerDelegate(td)) } c, err := bkclient.New(ctx, host, opts...) if err != nil { return nil, fmt.Errorf("buildkit client: %w", err) } return c, nil } func startBuildkitd(ctx context.Context) (string, error) { version, err := getBuildInfoVersion() if err != nil { return version, err } if version == "" { version, err = getGoModVersion() if err != nil { return version, err } } var ref string customImage, found := modVersionToImage[version] if found { ref = customImage } else { ref = mobyBuildkitImage + ":" + version } return startBuildkitdVersion(ctx, ref) } func getBuildInfoVersion() (string, error) { bi, ok := debug.ReadBuildInfo() if !ok { return "", errors.New("unable to read build info") } for _, d := range bi.Deps { if d.Path != "github.com/moby/buildkit" { continue } if d.Replace != nil { return d.Replace.Version, nil } return d.Version, nil } return "", nil } // Workaround the fact that debug.ReadBuildInfo doesn't work in tests: // https://github.com/golang/go/issues/33976 func getGoModVersion() (string, error) { out, err := exec.Command("go", "list", "-m", "github.com/moby/buildkit").CombinedOutput() if err != nil { return "", err } trimmed := strings.TrimSpace(string(out)) // NB: normally this will be: // // github.com/moby/buildkit v0.10.5 // // if it's replaced it'll be: // // github.com/moby/buildkit v0.10.5 => github.com/vito/buildkit v0.10.5 _, replace, replaced := strings.Cut(trimmed, " => ") if replaced { trimmed = strings.TrimSpace(replace) } fields := strings.Fields(trimmed) if len(fields) < 2 { return "", fmt.Errorf("unexpected go list output: %s", trimmed) } version := fields[1] return version, nil } func startBuildkitdVersion(ctx context.Context, imageRef string) (string, error) { if imageRef == "" { return "", errors.New("buildkitd image ref is empty") } if err := checkBuildkit(ctx, imageRef); err != nil { return "", err } return fmt.Sprintf("docker-container://%s", containerName), nil } // ensure the buildkit is active and properly set up (e.g. connected to host and last version with moby/buildkit) func checkBuildkit(ctx context.Context, imageRef string) error { // acquire a file-based lock to ensure parallel dagger clients // don't interfere with checking+creating the buildkitd container lockFilePath, err := homedir.Expand(buildkitdLockPath) if err != nil { return fmt.Errorf("unable to expand buildkitd lock path: %w", err) } if err := os.MkdirAll(filepath.Dir(lockFilePath), 0755); err != nil { return fmt.Errorf("unable to create buildkitd lock path parent dir: %w", err) } lock := flock.New(lockFilePath) lockCtx, cancel := context.WithTimeout(ctx, lockTimeout) defer cancel() locked, err := lock.TryLockContext(lockCtx, 100*time.Millisecond) if err != nil { return fmt.Errorf("failed to lock buildkitd lock file: %w", err) } if !locked { return fmt.Errorf("failed to acquire buildkitd lock file") } defer lock.Unlock() // check status of buildkitd container config, err := getBuildkitInformation(ctx) if err != nil { // If that failed, it might be because the docker CLI is out of service. if err := checkDocker(ctx); err != nil { return err } fmt.Fprintln(os.Stderr, "No buildkitd container found, creating one...") removeBuildkit(ctx) if err := installBuildkit(ctx, imageRef); err != nil { return err } return nil } if config.Image != imageRef { fmt.Fprintln(os.Stderr, "Buildkitd container is out of date, updating it...") if err := removeBuildkit(ctx); err != nil { return err } if err := installBuildkit(ctx, imageRef); err != nil { return err } } if !config.IsActive { fmt.Fprintln(os.Stderr, "Buildkitd container is not running, starting it...") if err := startBuildkit(ctx); err != nil { return err } } return nil } // ensure the docker CLI is available and properly set up (e.g. permissions to // communicate with the daemon, etc) func checkDocker(ctx context.Context) error { cmd := exec.CommandContext(ctx, "docker", "info") output, err := cmd.CombinedOutput() if err != nil { log. Ctx(ctx). Error(). Err(err). Bytes("output", output). Msg("failed to run docker") return fmt.Errorf("%s%s", err, output) } return nil } // Start the buildkit daemon func startBuildkit(ctx context.Context) error { cmd := exec.CommandContext(ctx, "docker", "start", containerName, ) _, err := cmd.CombinedOutput() if err != nil { return err } return nil } // Pull and run the buildkit daemon with a proper configuration // If the buildkit daemon is already configured, use startBuildkit func installBuildkit(ctx context.Context, ref string) error { // #nosec cmd := exec.CommandContext(ctx, "docker", "pull", ref) _, err := cmd.CombinedOutput() if err != nil { return err } // #nosec G204 cmd = exec.CommandContext(ctx, "docker", "run", "-d", "--restart", "always", "-v", volumeName+":/var/lib/buildkit", "--name", containerName, "--privileged", ref, "--debug", ) output, err := cmd.CombinedOutput() if err != nil { // If the daemon failed to start because it's already running, // chances are another dagger instance started it. We can just ignore // the error. if !strings.Contains(string(output), "Error response from daemon: Conflict.") { return err } } return nil } // waitBuildkit waits for the buildkit daemon to be responsive. func waitBuildkit(ctx context.Context, host string) error { c, err := bkclient.New(ctx, host) if err != nil { return err } // FIXME Does output "failed to wait: signal: broken pipe" defer c.Close() // Try to connect every 100ms up to 100 times (10 seconds total) const ( retryPeriod = 100 * time.Millisecond retryAttempts = 100 ) for retry := 0; retry < retryAttempts; retry++ { _, err = c.ListWorkers(ctx) if err == nil { return nil } time.Sleep(retryPeriod) } return errors.New("buildkit failed to respond") } func removeBuildkit(ctx context.Context) error { cmd := exec.CommandContext(ctx, "docker", "rm", "-fv", containerName, ) _, err := cmd.CombinedOutput() if err != nil { return err } return nil } func getBuildkitInformation(ctx context.Context) (*buildkitInformation, error) { formatString := "{{.Config.Image}};{{.State.Running}};{{if index .NetworkSettings.Networks \"host\"}}{{\"true\"}}{{else}}{{\"false\"}}{{end}}" cmd := exec.CommandContext(ctx, "docker", "inspect", "--format", formatString, containerName, ) output, err := cmd.CombinedOutput() if err != nil { return nil, err } s := strings.Split(string(output), ";") // Retrieve the image name imageRef := strings.TrimSpace(s[0]) // Retrieve the state isActive, err := strconv.ParseBool(strings.TrimSpace(s[1])) if err != nil { return nil, err } return &buildkitInformation{ Image: imageRef, IsActive: isActive, }, nil } type buildkitInformation struct { Image string IsActive bool }
closed
dagger/dagger
https://github.com/dagger/dagger
3,702
Switch to Poetry
## Context We're using [hatch](https://hatch.pypa.io/latest/). ## Pros - Better support (e.g., ~dependabot~[^1], vs code, ...) - Better known by users - Reproducible dev environment (via lock file) ## Cons - Need tox[^2] to replace our use of scripts in dedicated environments - Hatch is more standards compliant [^1]: It [supports hatch](https://github.blog/changelog/2022-10-24-dependabot-updates-support-for-the-python-pep-621-standard/) now. [^2]: Or something else, e.g., [poethepoet](https://pypi.org/project/poethepoet/).
https://github.com/dagger/dagger/issues/3702
https://github.com/dagger/dagger/pull/3730
cd5fbd323926d1eef68a00f5f00e5e89dc0084b7
94f086f6f0e7ffedc4883d0be8e3f32b7b10a4fd
"2022-11-05T00:40:24Z"
go
"2022-11-09T12:10:25Z"
.github/workflows/publish-sdk-python.yml
closed
dagger/dagger
https://github.com/dagger/dagger
3,702
Switch to Poetry
## Context We're using [hatch](https://hatch.pypa.io/latest/). ## Pros - Better support (e.g., ~dependabot~[^1], vs code, ...) - Better known by users - Reproducible dev environment (via lock file) ## Cons - Need tox[^2] to replace our use of scripts in dedicated environments - Hatch is more standards compliant [^1]: It [supports hatch](https://github.blog/changelog/2022-10-24-dependabot-updates-support-for-the-python-pep-621-standard/) now. [^2]: Or something else, e.g., [poethepoet](https://pypi.org/project/poethepoet/).
https://github.com/dagger/dagger/issues/3702
https://github.com/dagger/dagger/pull/3730
cd5fbd323926d1eef68a00f5f00e5e89dc0084b7
94f086f6f0e7ffedc4883d0be8e3f32b7b10a4fd
"2022-11-05T00:40:24Z"
go
"2022-11-09T12:10:25Z"
.gitignore
# General .DS_Store # Binaries for programs and plugins *.exe *.exe~ *.dll *.so *.dylib stub/stub # Test binary, build with `go test -c` *.test **/*/report.xml # Output of the go coverage tool, specifically when used with LiteIDE *.out # vscode .vscode # intellij .idea # vim-obsession Session.vim # js node_modules # python .venv __pycache__ .mypy_cache # Built Binary /bin
closed
dagger/dagger
https://github.com/dagger/dagger
3,702
Switch to Poetry
## Context We're using [hatch](https://hatch.pypa.io/latest/). ## Pros - Better support (e.g., ~dependabot~[^1], vs code, ...) - Better known by users - Reproducible dev environment (via lock file) ## Cons - Need tox[^2] to replace our use of scripts in dedicated environments - Hatch is more standards compliant [^1]: It [supports hatch](https://github.blog/changelog/2022-10-24-dependabot-updates-support-for-the-python-pep-621-standard/) now. [^2]: Or something else, e.g., [poethepoet](https://pypi.org/project/poethepoet/).
https://github.com/dagger/dagger/issues/3702
https://github.com/dagger/dagger/pull/3730
cd5fbd323926d1eef68a00f5f00e5e89dc0084b7
94f086f6f0e7ffedc4883d0be8e3f32b7b10a4fd
"2022-11-05T00:40:24Z"
go
"2022-11-09T12:10:25Z"
internal/mage/sdk/python.go
package sdk import ( "context" "errors" "os" "strings" "dagger.io/dagger" "github.com/dagger/dagger/internal/mage/util" "github.com/magefile/mage/mg" ) var ( pythonGeneratedAPIPaths = []string{ "sdk/python/src/dagger/api/gen.py", "sdk/python/src/dagger/api/gen_sync.py", } ) var _ SDK = Python{} type Python mg.Namespace // Lint lints the Python SDK func (t Python) Lint(ctx context.Context) error { c, err := dagger.Connect(ctx, dagger.WithLogOutput(os.Stderr)) if err != nil { return err } defer c.Close() _, err = pythonBase(c). Exec(dagger.ContainerExecOpts{ Args: []string{"hatch", "run", "lint:style"}, }). ExitCode(ctx) if err != nil { return err } return lintGeneratedCode(func() error { return t.Generate(ctx) }, pythonGeneratedAPIPaths...) } // Test tests the Python SDK func (t Python) Test(ctx context.Context) error { c, err := dagger.Connect(ctx, dagger.WithLogOutput(os.Stderr)) if err != nil { return err } defer c.Close() return util.WithDevEngine(ctx, c, func(ctx context.Context, c *dagger.Client) error { _, err = pythonBase(c). WithEnvVariable("DAGGER_HOST", "unix:///dagger.sock"). // gets automatically rewritten by shim to be http Exec(dagger.ContainerExecOpts{ Args: []string{"hatch", "run", "test"}, ExperimentalPrivilegedNesting: true, }). ExitCode(ctx) return err }) } // Generate re-generates the SDK API func (t Python) Generate(ctx context.Context) error { c, err := dagger.Connect(ctx, dagger.WithLogOutput(os.Stderr)) if err != nil { return err } defer c.Close() return util.WithDevEngine(ctx, c, func(ctx context.Context, c *dagger.Client) error { generated := pythonBase(c). Exec(dagger.ContainerExecOpts{ Args: []string{"hatch", "run", "generate"}, ExperimentalPrivilegedNesting: true, }). Exec(dagger.ContainerExecOpts{ Args: []string{"hatch", "run", "lint:fmt"}, }) for _, f := range pythonGeneratedAPIPaths { contents, err := generated.File(strings.TrimPrefix(f, "sdk/python/")).Contents(ctx) if err != nil { return err } if err := os.WriteFile(f, []byte(contents), 0600); err != nil { return err } } return nil }) } // Publish publishes the Python SDK func (t Python) Publish(ctx context.Context, tag string) error { return errors.New("not implemented") } func pythonBase(c *dagger.Client) *dagger.Container { src := c.Directory().WithDirectory("/", util.Repository(c).Directory("sdk/python")) base := c.Container().From("python:3.10-alpine"). Exec(dagger.ContainerExecOpts{ Args: []string{"apk", "add", "-U", "--no-cache", "gcc", "musl-dev", "libffi-dev"}, }) base = base. WithEnvVariable("PIP_NO_CACHE_DIR", "off"). WithEnvVariable("PIP_DISABLE_PIP_VERSION_CHECK", "on"). WithEnvVariable("PIP_DEFAULT_TIMEOUT", "100"). Exec(dagger.ContainerExecOpts{ Args: []string{"pip", "install", "hatch"}, }) return base. WithWorkdir("/app"). WithMountedDirectory("/app", src). Exec(dagger.ContainerExecOpts{ Args: []string{"hatch", "env", "create"}, }). Exec(dagger.ContainerExecOpts{ Args: []string{"hatch", "env", "create", "lint"}, }) }
closed
dagger/dagger
https://github.com/dagger/dagger
3,702
Switch to Poetry
## Context We're using [hatch](https://hatch.pypa.io/latest/). ## Pros - Better support (e.g., ~dependabot~[^1], vs code, ...) - Better known by users - Reproducible dev environment (via lock file) ## Cons - Need tox[^2] to replace our use of scripts in dedicated environments - Hatch is more standards compliant [^1]: It [supports hatch](https://github.blog/changelog/2022-10-24-dependabot-updates-support-for-the-python-pep-621-standard/) now. [^2]: Or something else, e.g., [poethepoet](https://pypi.org/project/poethepoet/).
https://github.com/dagger/dagger/issues/3702
https://github.com/dagger/dagger/pull/3730
cd5fbd323926d1eef68a00f5f00e5e89dc0084b7
94f086f6f0e7ffedc4883d0be8e3f32b7b10a4fd
"2022-11-05T00:40:24Z"
go
"2022-11-09T12:10:25Z"
sdk/python/.gitignore
closed
dagger/dagger
https://github.com/dagger/dagger
3,702
Switch to Poetry
## Context We're using [hatch](https://hatch.pypa.io/latest/). ## Pros - Better support (e.g., ~dependabot~[^1], vs code, ...) - Better known by users - Reproducible dev environment (via lock file) ## Cons - Need tox[^2] to replace our use of scripts in dedicated environments - Hatch is more standards compliant [^1]: It [supports hatch](https://github.blog/changelog/2022-10-24-dependabot-updates-support-for-the-python-pep-621-standard/) now. [^2]: Or something else, e.g., [poethepoet](https://pypi.org/project/poethepoet/).
https://github.com/dagger/dagger/issues/3702
https://github.com/dagger/dagger/pull/3730
cd5fbd323926d1eef68a00f5f00e5e89dc0084b7
94f086f6f0e7ffedc4883d0be8e3f32b7b10a4fd
"2022-11-05T00:40:24Z"
go
"2022-11-09T12:10:25Z"
sdk/python/LICENSE
closed
dagger/dagger
https://github.com/dagger/dagger
3,702
Switch to Poetry
## Context We're using [hatch](https://hatch.pypa.io/latest/). ## Pros - Better support (e.g., ~dependabot~[^1], vs code, ...) - Better known by users - Reproducible dev environment (via lock file) ## Cons - Need tox[^2] to replace our use of scripts in dedicated environments - Hatch is more standards compliant [^1]: It [supports hatch](https://github.blog/changelog/2022-10-24-dependabot-updates-support-for-the-python-pep-621-standard/) now. [^2]: Or something else, e.g., [poethepoet](https://pypi.org/project/poethepoet/).
https://github.com/dagger/dagger/issues/3702
https://github.com/dagger/dagger/pull/3730
cd5fbd323926d1eef68a00f5f00e5e89dc0084b7
94f086f6f0e7ffedc4883d0be8e3f32b7b10a4fd
"2022-11-05T00:40:24Z"
go
"2022-11-09T12:10:25Z"
sdk/python/README.md
# Dagger Python SDK A client package for running [Dagger](https://dagger.io/) pipelines. ## What is the Dagger Python SDK? The Dagger Python SDK contains everything you need to develop CI/CD pipelines in Python, and run them on any OCI-compatible container runtime. ## Example ```python # say.py import sys import anyio import dagger async def main(args: list[str]): async with dagger.Connection() as client: # build container with cowsay entrypoint # note: this is reusable, no request is made to the server ctr = ( client.container() .from_("python:alpine") .exec(["pip", "install", "cowsay"]) .with_entrypoint(["cowsay"]) ) # run cowsay with requested message # note: methods that return a coroutine with a Result need to # await query execution result = await ctr.exec(args).stdout().contents() print(result) if __name__ == "__main__": anyio.run(main, sys.argv[1:]) ``` Run with: ```console $ python say.py "Simple is better than complex" _____________________________ | Simple is better than complex | ============================= \ \ ^__^ (oo)\_______ (__)\ )\/\ ||----w | || || ``` ## Learn more - [Documentation](https://docs.dagger.io) - [Source code](https://github.com/dagger/dagger/tree/main/sdk/python) ## Development Requirements: - Python 3.10+ - [Hatch](https://hatch.pypa.io/latest/install/) - [Docker](https://docs.docker.com/engine/install/) Run tests with `hatch run test`. Run the linter, reformatting code with `hatch run lint:fmt` or just check with `hatch run lint:style`. Re-regenerate client with `hatch run generate`. Remember to run `hatch run lint:fmt` afterwards for consistent output!
closed
dagger/dagger
https://github.com/dagger/dagger
3,702
Switch to Poetry
## Context We're using [hatch](https://hatch.pypa.io/latest/). ## Pros - Better support (e.g., ~dependabot~[^1], vs code, ...) - Better known by users - Reproducible dev environment (via lock file) ## Cons - Need tox[^2] to replace our use of scripts in dedicated environments - Hatch is more standards compliant [^1]: It [supports hatch](https://github.blog/changelog/2022-10-24-dependabot-updates-support-for-the-python-pep-621-standard/) now. [^2]: Or something else, e.g., [poethepoet](https://pypi.org/project/poethepoet/).
https://github.com/dagger/dagger/issues/3702
https://github.com/dagger/dagger/pull/3730
cd5fbd323926d1eef68a00f5f00e5e89dc0084b7
94f086f6f0e7ffedc4883d0be8e3f32b7b10a4fd
"2022-11-05T00:40:24Z"
go
"2022-11-09T12:10:25Z"
sdk/python/poetry.lock
closed
dagger/dagger
https://github.com/dagger/dagger
3,702
Switch to Poetry
## Context We're using [hatch](https://hatch.pypa.io/latest/). ## Pros - Better support (e.g., ~dependabot~[^1], vs code, ...) - Better known by users - Reproducible dev environment (via lock file) ## Cons - Need tox[^2] to replace our use of scripts in dedicated environments - Hatch is more standards compliant [^1]: It [supports hatch](https://github.blog/changelog/2022-10-24-dependabot-updates-support-for-the-python-pep-621-standard/) now. [^2]: Or something else, e.g., [poethepoet](https://pypi.org/project/poethepoet/).
https://github.com/dagger/dagger/issues/3702
https://github.com/dagger/dagger/pull/3730
cd5fbd323926d1eef68a00f5f00e5e89dc0084b7
94f086f6f0e7ffedc4883d0be8e3f32b7b10a4fd
"2022-11-05T00:40:24Z"
go
"2022-11-09T12:10:25Z"
sdk/python/pyproject.toml
[build-system] requires = ["hatchling"] build-backend = "hatchling.build" [project] name = "dagger" version = "0.1.0" authors = [ { name="Dagger Inc.", email="hello@dagger.io" }, ] description = "Dagger library" keywords = ["dagger"] readme = "README.md" license = "Apache-2.0" requires-python = ">=3.10" classifiers = [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Framework :: Hatch", "Framework :: AnyIO", "Framework :: Pytest", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "License :: OSI Approved :: Apache Software License", # "Operating System :: OS Independent", "Typing :: Typed", ] dependencies = [ "anyio >= 3.6.2", "attrs >= 22.1.0", "cattrs >= 22.2.0", "gql[aiohttp,requests] >= 3.4.0", "strawberry-graphql >= 0.133.5", "typer[all] >= 0.6.1", ] [project.urls] "Homepage" = "https://dagger.io/" "Bug Tracker" = "https://github.com/dagger/dagger/issues" [project.scripts] dagger-server-py = "dagger.server.cli:app" dagger-py = "dagger.cli:app" [tool.hatch.envs.default] dependencies = [ "pytest >= 7.2.0", "pytest-mock >= 3.10.0", ] [tool.hatch.envs.default.scripts] test = "pytest -W default" generate = [ "dagger-py generate --output src/dagger/api/gen.py", "dagger-py generate --output src/dagger/api/gen_sync.py --sync", ] [tool.hatch.envs.lint] skip_install = true dependencies = [ "autoflake>=1.3.1", "black>=22.3.0", "flake8-black>=^0.3", "flake8-bugbear>=22.9.23", "flake8-eradicate>=1.3.0", "flake8-isort>=^5.0.0", "flake8>=4.0.1", "isort>=5.10.1", "mypy>=0.942", "typing_extensions>=4.4.0", ] [tool.hatch.envs.lint.scripts] typing = "mypy src/dagger tests" style = [ "flake8 .", "black --check --diff .", "isort --check-only --diff .", ] fmt = [ "autoflake --in-place .", "isort .", "black .", "style", ] all = [ "style", "typing", ] [tool.pytest.ini_options] testpaths = ["tests/"] addopts = [ "--import-mode=importlib", ] markers = [ "slow: mark test as slow (integration)", ] [tool.mypy] disallow_untyped_defs = false follow_imports = "normal" # ignore_missing_imports = true install_types = true non_interactive = true warn_redundant_casts = true pretty = true show_column_numbers = true warn_no_return = false warn_unused_ignores = true plugins = [ "strawberry.ext.mypy_plugin", ] [tool.black] include = '\.pyi?$' target-version = ["py310", "py311"] [tool.isort] profile = "black" known_first_party = ["dagger"] [tool.autoflake] quiet = true recursive = true expand-star-imports = true imports = ["graphql", "gql"] remove-all-unused-imports = true remove-duplicate-keys = true remove-unused-variables = true
closed
dagger/dagger
https://github.com/dagger/dagger
3,682
Add Python's CI pipeline to GitHub Actions
## Tasks - [x] Add steps from #3678 - [x] Deploy (trigger on release) - [x] Add test step (trigger on PRs) \cc @gerhard
https://github.com/dagger/dagger/issues/3682
https://github.com/dagger/dagger/pull/3730
cd5fbd323926d1eef68a00f5f00e5e89dc0084b7
94f086f6f0e7ffedc4883d0be8e3f32b7b10a4fd
"2022-11-04T16:00:10Z"
go
"2022-11-09T12:10:25Z"
.github/workflows/publish-sdk-python.yml
closed
dagger/dagger
https://github.com/dagger/dagger
3,682
Add Python's CI pipeline to GitHub Actions
## Tasks - [x] Add steps from #3678 - [x] Deploy (trigger on release) - [x] Add test step (trigger on PRs) \cc @gerhard
https://github.com/dagger/dagger/issues/3682
https://github.com/dagger/dagger/pull/3730
cd5fbd323926d1eef68a00f5f00e5e89dc0084b7
94f086f6f0e7ffedc4883d0be8e3f32b7b10a4fd
"2022-11-04T16:00:10Z"
go
"2022-11-09T12:10:25Z"
.gitignore
# General .DS_Store # Binaries for programs and plugins *.exe *.exe~ *.dll *.so *.dylib stub/stub # Test binary, build with `go test -c` *.test **/*/report.xml # Output of the go coverage tool, specifically when used with LiteIDE *.out # vscode .vscode # intellij .idea # vim-obsession Session.vim # js node_modules # python .venv __pycache__ .mypy_cache # Built Binary /bin
closed
dagger/dagger
https://github.com/dagger/dagger
3,682
Add Python's CI pipeline to GitHub Actions
## Tasks - [x] Add steps from #3678 - [x] Deploy (trigger on release) - [x] Add test step (trigger on PRs) \cc @gerhard
https://github.com/dagger/dagger/issues/3682
https://github.com/dagger/dagger/pull/3730
cd5fbd323926d1eef68a00f5f00e5e89dc0084b7
94f086f6f0e7ffedc4883d0be8e3f32b7b10a4fd
"2022-11-04T16:00:10Z"
go
"2022-11-09T12:10:25Z"
internal/mage/sdk/python.go
package sdk import ( "context" "errors" "os" "strings" "dagger.io/dagger" "github.com/dagger/dagger/internal/mage/util" "github.com/magefile/mage/mg" ) var ( pythonGeneratedAPIPaths = []string{ "sdk/python/src/dagger/api/gen.py", "sdk/python/src/dagger/api/gen_sync.py", } ) var _ SDK = Python{} type Python mg.Namespace // Lint lints the Python SDK func (t Python) Lint(ctx context.Context) error { c, err := dagger.Connect(ctx, dagger.WithLogOutput(os.Stderr)) if err != nil { return err } defer c.Close() _, err = pythonBase(c). Exec(dagger.ContainerExecOpts{ Args: []string{"hatch", "run", "lint:style"}, }). ExitCode(ctx) if err != nil { return err } return lintGeneratedCode(func() error { return t.Generate(ctx) }, pythonGeneratedAPIPaths...) } // Test tests the Python SDK func (t Python) Test(ctx context.Context) error { c, err := dagger.Connect(ctx, dagger.WithLogOutput(os.Stderr)) if err != nil { return err } defer c.Close() return util.WithDevEngine(ctx, c, func(ctx context.Context, c *dagger.Client) error { _, err = pythonBase(c). WithEnvVariable("DAGGER_HOST", "unix:///dagger.sock"). // gets automatically rewritten by shim to be http Exec(dagger.ContainerExecOpts{ Args: []string{"hatch", "run", "test"}, ExperimentalPrivilegedNesting: true, }). ExitCode(ctx) return err }) } // Generate re-generates the SDK API func (t Python) Generate(ctx context.Context) error { c, err := dagger.Connect(ctx, dagger.WithLogOutput(os.Stderr)) if err != nil { return err } defer c.Close() return util.WithDevEngine(ctx, c, func(ctx context.Context, c *dagger.Client) error { generated := pythonBase(c). Exec(dagger.ContainerExecOpts{ Args: []string{"hatch", "run", "generate"}, ExperimentalPrivilegedNesting: true, }). Exec(dagger.ContainerExecOpts{ Args: []string{"hatch", "run", "lint:fmt"}, }) for _, f := range pythonGeneratedAPIPaths { contents, err := generated.File(strings.TrimPrefix(f, "sdk/python/")).Contents(ctx) if err != nil { return err } if err := os.WriteFile(f, []byte(contents), 0600); err != nil { return err } } return nil }) } // Publish publishes the Python SDK func (t Python) Publish(ctx context.Context, tag string) error { return errors.New("not implemented") } func pythonBase(c *dagger.Client) *dagger.Container { src := c.Directory().WithDirectory("/", util.Repository(c).Directory("sdk/python")) base := c.Container().From("python:3.10-alpine"). Exec(dagger.ContainerExecOpts{ Args: []string{"apk", "add", "-U", "--no-cache", "gcc", "musl-dev", "libffi-dev"}, }) base = base. WithEnvVariable("PIP_NO_CACHE_DIR", "off"). WithEnvVariable("PIP_DISABLE_PIP_VERSION_CHECK", "on"). WithEnvVariable("PIP_DEFAULT_TIMEOUT", "100"). Exec(dagger.ContainerExecOpts{ Args: []string{"pip", "install", "hatch"}, }) return base. WithWorkdir("/app"). WithMountedDirectory("/app", src). Exec(dagger.ContainerExecOpts{ Args: []string{"hatch", "env", "create"}, }). Exec(dagger.ContainerExecOpts{ Args: []string{"hatch", "env", "create", "lint"}, }) }
closed
dagger/dagger
https://github.com/dagger/dagger
3,682
Add Python's CI pipeline to GitHub Actions
## Tasks - [x] Add steps from #3678 - [x] Deploy (trigger on release) - [x] Add test step (trigger on PRs) \cc @gerhard
https://github.com/dagger/dagger/issues/3682
https://github.com/dagger/dagger/pull/3730
cd5fbd323926d1eef68a00f5f00e5e89dc0084b7
94f086f6f0e7ffedc4883d0be8e3f32b7b10a4fd
"2022-11-04T16:00:10Z"
go
"2022-11-09T12:10:25Z"
sdk/python/.gitignore
closed
dagger/dagger
https://github.com/dagger/dagger
3,682
Add Python's CI pipeline to GitHub Actions
## Tasks - [x] Add steps from #3678 - [x] Deploy (trigger on release) - [x] Add test step (trigger on PRs) \cc @gerhard
https://github.com/dagger/dagger/issues/3682
https://github.com/dagger/dagger/pull/3730
cd5fbd323926d1eef68a00f5f00e5e89dc0084b7
94f086f6f0e7ffedc4883d0be8e3f32b7b10a4fd
"2022-11-04T16:00:10Z"
go
"2022-11-09T12:10:25Z"
sdk/python/LICENSE
closed
dagger/dagger
https://github.com/dagger/dagger
3,682
Add Python's CI pipeline to GitHub Actions
## Tasks - [x] Add steps from #3678 - [x] Deploy (trigger on release) - [x] Add test step (trigger on PRs) \cc @gerhard
https://github.com/dagger/dagger/issues/3682
https://github.com/dagger/dagger/pull/3730
cd5fbd323926d1eef68a00f5f00e5e89dc0084b7
94f086f6f0e7ffedc4883d0be8e3f32b7b10a4fd
"2022-11-04T16:00:10Z"
go
"2022-11-09T12:10:25Z"
sdk/python/README.md
# Dagger Python SDK A client package for running [Dagger](https://dagger.io/) pipelines. ## What is the Dagger Python SDK? The Dagger Python SDK contains everything you need to develop CI/CD pipelines in Python, and run them on any OCI-compatible container runtime. ## Example ```python # say.py import sys import anyio import dagger async def main(args: list[str]): async with dagger.Connection() as client: # build container with cowsay entrypoint # note: this is reusable, no request is made to the server ctr = ( client.container() .from_("python:alpine") .exec(["pip", "install", "cowsay"]) .with_entrypoint(["cowsay"]) ) # run cowsay with requested message # note: methods that return a coroutine with a Result need to # await query execution result = await ctr.exec(args).stdout().contents() print(result) if __name__ == "__main__": anyio.run(main, sys.argv[1:]) ``` Run with: ```console $ python say.py "Simple is better than complex" _____________________________ | Simple is better than complex | ============================= \ \ ^__^ (oo)\_______ (__)\ )\/\ ||----w | || || ``` ## Learn more - [Documentation](https://docs.dagger.io) - [Source code](https://github.com/dagger/dagger/tree/main/sdk/python) ## Development Requirements: - Python 3.10+ - [Hatch](https://hatch.pypa.io/latest/install/) - [Docker](https://docs.docker.com/engine/install/) Run tests with `hatch run test`. Run the linter, reformatting code with `hatch run lint:fmt` or just check with `hatch run lint:style`. Re-regenerate client with `hatch run generate`. Remember to run `hatch run lint:fmt` afterwards for consistent output!
closed
dagger/dagger
https://github.com/dagger/dagger
3,682
Add Python's CI pipeline to GitHub Actions
## Tasks - [x] Add steps from #3678 - [x] Deploy (trigger on release) - [x] Add test step (trigger on PRs) \cc @gerhard
https://github.com/dagger/dagger/issues/3682
https://github.com/dagger/dagger/pull/3730
cd5fbd323926d1eef68a00f5f00e5e89dc0084b7
94f086f6f0e7ffedc4883d0be8e3f32b7b10a4fd
"2022-11-04T16:00:10Z"
go
"2022-11-09T12:10:25Z"
sdk/python/poetry.lock
closed
dagger/dagger
https://github.com/dagger/dagger
3,682
Add Python's CI pipeline to GitHub Actions
## Tasks - [x] Add steps from #3678 - [x] Deploy (trigger on release) - [x] Add test step (trigger on PRs) \cc @gerhard
https://github.com/dagger/dagger/issues/3682
https://github.com/dagger/dagger/pull/3730
cd5fbd323926d1eef68a00f5f00e5e89dc0084b7
94f086f6f0e7ffedc4883d0be8e3f32b7b10a4fd
"2022-11-04T16:00:10Z"
go
"2022-11-09T12:10:25Z"
sdk/python/pyproject.toml
[build-system] requires = ["hatchling"] build-backend = "hatchling.build" [project] name = "dagger" version = "0.1.0" authors = [ { name="Dagger Inc.", email="hello@dagger.io" }, ] description = "Dagger library" keywords = ["dagger"] readme = "README.md" license = "Apache-2.0" requires-python = ">=3.10" classifiers = [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Framework :: Hatch", "Framework :: AnyIO", "Framework :: Pytest", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "License :: OSI Approved :: Apache Software License", # "Operating System :: OS Independent", "Typing :: Typed", ] dependencies = [ "anyio >= 3.6.2", "attrs >= 22.1.0", "cattrs >= 22.2.0", "gql[aiohttp,requests] >= 3.4.0", "strawberry-graphql >= 0.133.5", "typer[all] >= 0.6.1", ] [project.urls] "Homepage" = "https://dagger.io/" "Bug Tracker" = "https://github.com/dagger/dagger/issues" [project.scripts] dagger-server-py = "dagger.server.cli:app" dagger-py = "dagger.cli:app" [tool.hatch.envs.default] dependencies = [ "pytest >= 7.2.0", "pytest-mock >= 3.10.0", ] [tool.hatch.envs.default.scripts] test = "pytest -W default" generate = [ "dagger-py generate --output src/dagger/api/gen.py", "dagger-py generate --output src/dagger/api/gen_sync.py --sync", ] [tool.hatch.envs.lint] skip_install = true dependencies = [ "autoflake>=1.3.1", "black>=22.3.0", "flake8-black>=^0.3", "flake8-bugbear>=22.9.23", "flake8-eradicate>=1.3.0", "flake8-isort>=^5.0.0", "flake8>=4.0.1", "isort>=5.10.1", "mypy>=0.942", "typing_extensions>=4.4.0", ] [tool.hatch.envs.lint.scripts] typing = "mypy src/dagger tests" style = [ "flake8 .", "black --check --diff .", "isort --check-only --diff .", ] fmt = [ "autoflake --in-place .", "isort .", "black .", "style", ] all = [ "style", "typing", ] [tool.pytest.ini_options] testpaths = ["tests/"] addopts = [ "--import-mode=importlib", ] markers = [ "slow: mark test as slow (integration)", ] [tool.mypy] disallow_untyped_defs = false follow_imports = "normal" # ignore_missing_imports = true install_types = true non_interactive = true warn_redundant_casts = true pretty = true show_column_numbers = true warn_no_return = false warn_unused_ignores = true plugins = [ "strawberry.ext.mypy_plugin", ] [tool.black] include = '\.pyi?$' target-version = ["py310", "py311"] [tool.isort] profile = "black" known_first_party = ["dagger"] [tool.autoflake] quiet = true recursive = true expand-star-imports = true imports = ["graphql", "gql"] remove-all-unused-imports = true remove-duplicate-keys = true remove-unused-variables = true
closed
dagger/dagger
https://github.com/dagger/dagger
3,678
Add Python's CI pipeline to mage
Depends on: - #3672 - #3720 - #3730 ## Tasks - [x] Add **generate** step - [x] Need to `lint:fmt` afterwards - [x] Add **lint** (`lint:style`) step - [x] Add **publish** with *build* \cc @aluzzardi
https://github.com/dagger/dagger/issues/3678
https://github.com/dagger/dagger/pull/3730
cd5fbd323926d1eef68a00f5f00e5e89dc0084b7
94f086f6f0e7ffedc4883d0be8e3f32b7b10a4fd
"2022-11-04T15:52:19Z"
go
"2022-11-09T12:10:25Z"
.github/workflows/publish-sdk-python.yml
closed
dagger/dagger
https://github.com/dagger/dagger
3,678
Add Python's CI pipeline to mage
Depends on: - #3672 - #3720 - #3730 ## Tasks - [x] Add **generate** step - [x] Need to `lint:fmt` afterwards - [x] Add **lint** (`lint:style`) step - [x] Add **publish** with *build* \cc @aluzzardi
https://github.com/dagger/dagger/issues/3678
https://github.com/dagger/dagger/pull/3730
cd5fbd323926d1eef68a00f5f00e5e89dc0084b7
94f086f6f0e7ffedc4883d0be8e3f32b7b10a4fd
"2022-11-04T15:52:19Z"
go
"2022-11-09T12:10:25Z"
.gitignore
# General .DS_Store # Binaries for programs and plugins *.exe *.exe~ *.dll *.so *.dylib stub/stub # Test binary, build with `go test -c` *.test **/*/report.xml # Output of the go coverage tool, specifically when used with LiteIDE *.out # vscode .vscode # intellij .idea # vim-obsession Session.vim # js node_modules # python .venv __pycache__ .mypy_cache # Built Binary /bin
closed
dagger/dagger
https://github.com/dagger/dagger
3,678
Add Python's CI pipeline to mage
Depends on: - #3672 - #3720 - #3730 ## Tasks - [x] Add **generate** step - [x] Need to `lint:fmt` afterwards - [x] Add **lint** (`lint:style`) step - [x] Add **publish** with *build* \cc @aluzzardi
https://github.com/dagger/dagger/issues/3678
https://github.com/dagger/dagger/pull/3730
cd5fbd323926d1eef68a00f5f00e5e89dc0084b7
94f086f6f0e7ffedc4883d0be8e3f32b7b10a4fd
"2022-11-04T15:52:19Z"
go
"2022-11-09T12:10:25Z"
internal/mage/sdk/python.go
package sdk import ( "context" "errors" "os" "strings" "dagger.io/dagger" "github.com/dagger/dagger/internal/mage/util" "github.com/magefile/mage/mg" ) var ( pythonGeneratedAPIPaths = []string{ "sdk/python/src/dagger/api/gen.py", "sdk/python/src/dagger/api/gen_sync.py", } ) var _ SDK = Python{} type Python mg.Namespace // Lint lints the Python SDK func (t Python) Lint(ctx context.Context) error { c, err := dagger.Connect(ctx, dagger.WithLogOutput(os.Stderr)) if err != nil { return err } defer c.Close() _, err = pythonBase(c). Exec(dagger.ContainerExecOpts{ Args: []string{"hatch", "run", "lint:style"}, }). ExitCode(ctx) if err != nil { return err } return lintGeneratedCode(func() error { return t.Generate(ctx) }, pythonGeneratedAPIPaths...) } // Test tests the Python SDK func (t Python) Test(ctx context.Context) error { c, err := dagger.Connect(ctx, dagger.WithLogOutput(os.Stderr)) if err != nil { return err } defer c.Close() return util.WithDevEngine(ctx, c, func(ctx context.Context, c *dagger.Client) error { _, err = pythonBase(c). WithEnvVariable("DAGGER_HOST", "unix:///dagger.sock"). // gets automatically rewritten by shim to be http Exec(dagger.ContainerExecOpts{ Args: []string{"hatch", "run", "test"}, ExperimentalPrivilegedNesting: true, }). ExitCode(ctx) return err }) } // Generate re-generates the SDK API func (t Python) Generate(ctx context.Context) error { c, err := dagger.Connect(ctx, dagger.WithLogOutput(os.Stderr)) if err != nil { return err } defer c.Close() return util.WithDevEngine(ctx, c, func(ctx context.Context, c *dagger.Client) error { generated := pythonBase(c). Exec(dagger.ContainerExecOpts{ Args: []string{"hatch", "run", "generate"}, ExperimentalPrivilegedNesting: true, }). Exec(dagger.ContainerExecOpts{ Args: []string{"hatch", "run", "lint:fmt"}, }) for _, f := range pythonGeneratedAPIPaths { contents, err := generated.File(strings.TrimPrefix(f, "sdk/python/")).Contents(ctx) if err != nil { return err } if err := os.WriteFile(f, []byte(contents), 0600); err != nil { return err } } return nil }) } // Publish publishes the Python SDK func (t Python) Publish(ctx context.Context, tag string) error { return errors.New("not implemented") } func pythonBase(c *dagger.Client) *dagger.Container { src := c.Directory().WithDirectory("/", util.Repository(c).Directory("sdk/python")) base := c.Container().From("python:3.10-alpine"). Exec(dagger.ContainerExecOpts{ Args: []string{"apk", "add", "-U", "--no-cache", "gcc", "musl-dev", "libffi-dev"}, }) base = base. WithEnvVariable("PIP_NO_CACHE_DIR", "off"). WithEnvVariable("PIP_DISABLE_PIP_VERSION_CHECK", "on"). WithEnvVariable("PIP_DEFAULT_TIMEOUT", "100"). Exec(dagger.ContainerExecOpts{ Args: []string{"pip", "install", "hatch"}, }) return base. WithWorkdir("/app"). WithMountedDirectory("/app", src). Exec(dagger.ContainerExecOpts{ Args: []string{"hatch", "env", "create"}, }). Exec(dagger.ContainerExecOpts{ Args: []string{"hatch", "env", "create", "lint"}, }) }
closed
dagger/dagger
https://github.com/dagger/dagger
3,678
Add Python's CI pipeline to mage
Depends on: - #3672 - #3720 - #3730 ## Tasks - [x] Add **generate** step - [x] Need to `lint:fmt` afterwards - [x] Add **lint** (`lint:style`) step - [x] Add **publish** with *build* \cc @aluzzardi
https://github.com/dagger/dagger/issues/3678
https://github.com/dagger/dagger/pull/3730
cd5fbd323926d1eef68a00f5f00e5e89dc0084b7
94f086f6f0e7ffedc4883d0be8e3f32b7b10a4fd
"2022-11-04T15:52:19Z"
go
"2022-11-09T12:10:25Z"
sdk/python/.gitignore
closed
dagger/dagger
https://github.com/dagger/dagger
3,678
Add Python's CI pipeline to mage
Depends on: - #3672 - #3720 - #3730 ## Tasks - [x] Add **generate** step - [x] Need to `lint:fmt` afterwards - [x] Add **lint** (`lint:style`) step - [x] Add **publish** with *build* \cc @aluzzardi
https://github.com/dagger/dagger/issues/3678
https://github.com/dagger/dagger/pull/3730
cd5fbd323926d1eef68a00f5f00e5e89dc0084b7
94f086f6f0e7ffedc4883d0be8e3f32b7b10a4fd
"2022-11-04T15:52:19Z"
go
"2022-11-09T12:10:25Z"
sdk/python/LICENSE
closed
dagger/dagger
https://github.com/dagger/dagger
3,678
Add Python's CI pipeline to mage
Depends on: - #3672 - #3720 - #3730 ## Tasks - [x] Add **generate** step - [x] Need to `lint:fmt` afterwards - [x] Add **lint** (`lint:style`) step - [x] Add **publish** with *build* \cc @aluzzardi
https://github.com/dagger/dagger/issues/3678
https://github.com/dagger/dagger/pull/3730
cd5fbd323926d1eef68a00f5f00e5e89dc0084b7
94f086f6f0e7ffedc4883d0be8e3f32b7b10a4fd
"2022-11-04T15:52:19Z"
go
"2022-11-09T12:10:25Z"
sdk/python/README.md
# Dagger Python SDK A client package for running [Dagger](https://dagger.io/) pipelines. ## What is the Dagger Python SDK? The Dagger Python SDK contains everything you need to develop CI/CD pipelines in Python, and run them on any OCI-compatible container runtime. ## Example ```python # say.py import sys import anyio import dagger async def main(args: list[str]): async with dagger.Connection() as client: # build container with cowsay entrypoint # note: this is reusable, no request is made to the server ctr = ( client.container() .from_("python:alpine") .exec(["pip", "install", "cowsay"]) .with_entrypoint(["cowsay"]) ) # run cowsay with requested message # note: methods that return a coroutine with a Result need to # await query execution result = await ctr.exec(args).stdout().contents() print(result) if __name__ == "__main__": anyio.run(main, sys.argv[1:]) ``` Run with: ```console $ python say.py "Simple is better than complex" _____________________________ | Simple is better than complex | ============================= \ \ ^__^ (oo)\_______ (__)\ )\/\ ||----w | || || ``` ## Learn more - [Documentation](https://docs.dagger.io) - [Source code](https://github.com/dagger/dagger/tree/main/sdk/python) ## Development Requirements: - Python 3.10+ - [Hatch](https://hatch.pypa.io/latest/install/) - [Docker](https://docs.docker.com/engine/install/) Run tests with `hatch run test`. Run the linter, reformatting code with `hatch run lint:fmt` or just check with `hatch run lint:style`. Re-regenerate client with `hatch run generate`. Remember to run `hatch run lint:fmt` afterwards for consistent output!
closed
dagger/dagger
https://github.com/dagger/dagger
3,678
Add Python's CI pipeline to mage
Depends on: - #3672 - #3720 - #3730 ## Tasks - [x] Add **generate** step - [x] Need to `lint:fmt` afterwards - [x] Add **lint** (`lint:style`) step - [x] Add **publish** with *build* \cc @aluzzardi
https://github.com/dagger/dagger/issues/3678
https://github.com/dagger/dagger/pull/3730
cd5fbd323926d1eef68a00f5f00e5e89dc0084b7
94f086f6f0e7ffedc4883d0be8e3f32b7b10a4fd
"2022-11-04T15:52:19Z"
go
"2022-11-09T12:10:25Z"
sdk/python/poetry.lock
closed
dagger/dagger
https://github.com/dagger/dagger
3,678
Add Python's CI pipeline to mage
Depends on: - #3672 - #3720 - #3730 ## Tasks - [x] Add **generate** step - [x] Need to `lint:fmt` afterwards - [x] Add **lint** (`lint:style`) step - [x] Add **publish** with *build* \cc @aluzzardi
https://github.com/dagger/dagger/issues/3678
https://github.com/dagger/dagger/pull/3730
cd5fbd323926d1eef68a00f5f00e5e89dc0084b7
94f086f6f0e7ffedc4883d0be8e3f32b7b10a4fd
"2022-11-04T15:52:19Z"
go
"2022-11-09T12:10:25Z"
sdk/python/pyproject.toml
[build-system] requires = ["hatchling"] build-backend = "hatchling.build" [project] name = "dagger" version = "0.1.0" authors = [ { name="Dagger Inc.", email="hello@dagger.io" }, ] description = "Dagger library" keywords = ["dagger"] readme = "README.md" license = "Apache-2.0" requires-python = ">=3.10" classifiers = [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Framework :: Hatch", "Framework :: AnyIO", "Framework :: Pytest", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "License :: OSI Approved :: Apache Software License", # "Operating System :: OS Independent", "Typing :: Typed", ] dependencies = [ "anyio >= 3.6.2", "attrs >= 22.1.0", "cattrs >= 22.2.0", "gql[aiohttp,requests] >= 3.4.0", "strawberry-graphql >= 0.133.5", "typer[all] >= 0.6.1", ] [project.urls] "Homepage" = "https://dagger.io/" "Bug Tracker" = "https://github.com/dagger/dagger/issues" [project.scripts] dagger-server-py = "dagger.server.cli:app" dagger-py = "dagger.cli:app" [tool.hatch.envs.default] dependencies = [ "pytest >= 7.2.0", "pytest-mock >= 3.10.0", ] [tool.hatch.envs.default.scripts] test = "pytest -W default" generate = [ "dagger-py generate --output src/dagger/api/gen.py", "dagger-py generate --output src/dagger/api/gen_sync.py --sync", ] [tool.hatch.envs.lint] skip_install = true dependencies = [ "autoflake>=1.3.1", "black>=22.3.0", "flake8-black>=^0.3", "flake8-bugbear>=22.9.23", "flake8-eradicate>=1.3.0", "flake8-isort>=^5.0.0", "flake8>=4.0.1", "isort>=5.10.1", "mypy>=0.942", "typing_extensions>=4.4.0", ] [tool.hatch.envs.lint.scripts] typing = "mypy src/dagger tests" style = [ "flake8 .", "black --check --diff .", "isort --check-only --diff .", ] fmt = [ "autoflake --in-place .", "isort .", "black .", "style", ] all = [ "style", "typing", ] [tool.pytest.ini_options] testpaths = ["tests/"] addopts = [ "--import-mode=importlib", ] markers = [ "slow: mark test as slow (integration)", ] [tool.mypy] disallow_untyped_defs = false follow_imports = "normal" # ignore_missing_imports = true install_types = true non_interactive = true warn_redundant_casts = true pretty = true show_column_numbers = true warn_no_return = false warn_unused_ignores = true plugins = [ "strawberry.ext.mypy_plugin", ] [tool.black] include = '\.pyi?$' target-version = ["py310", "py311"] [tool.isort] profile = "black" known_first_party = ["dagger"] [tool.autoflake] quiet = true recursive = true expand-star-imports = true imports = ["graphql", "gql"] remove-all-unused-imports = true remove-duplicate-keys = true remove-unused-variables = true
closed
dagger/dagger
https://github.com/dagger/dagger
3,737
Errors getting credentials on macos when using dagger-in-dagger
A few of us running `mage sdk:python:test` are getting very cryptic errors on the first step that runs dagger-in-dagger: ``` #1 resolve image config for docker.io/library/golang:1.19-alpine Error: input:1: container.from error getting credentials - err: signal: killed, out: `` Please visit https://dagger.io/help#go for troubleshooting guidance. #1 ERROR: error getting credentials - err: signal: killed, out: `` ``` But only on macos. I did some digging and eventually found the line where it comes from, forked and added a little extra debug information: https://github.com/sipsma/docker-credential-helpers/blob/9706447df656d46a595e2e2788637eddcf962a4c/client/client.go#L68 With that change it shows the error: ``` error getting credentials - err: signal: killed, prog: docker-credential-desktop get, out: ` ``` When I try to manually invoke docker-credential-desktop get from my terminal, it hangs indefinitely, ignoring even SIGTERM and I have to SIGKILL it. I have no idea why this *seems* to only happen once we get to the dagger-in-dagger step. It is worth confirming that understanding and worth confirming that the credential provider is indeed trying to run `docker-credential-desktop` on macos directly as opposed to inside the Linux container. It's actually not even obvious that it should be trying the macos client auth provider since the buildkit client is technically inside dagger and thus linux. However, buildkit has a lot of logic where it fallsback to trying any connected session, so *maybe* it is trying the macos client that is also connected to buildkit? Overall, kind of mysterious for a number of reasons, needs more investigation.
https://github.com/dagger/dagger/issues/3737
https://github.com/dagger/dagger/pull/3758
15a897278460408ccc4f832fd7e91dd2ddfaa90a
4a797801ef3bb6148d7186dac5d9d544cc913960
"2022-11-08T21:58:43Z"
go
"2022-11-10T00:30:26Z"
go.mod
module github.com/dagger/dagger replace dagger.io/dagger => ./sdk/go go 1.18 require ( dagger.io/dagger v0.3.0-alpha.4 github.com/containerd/containerd v1.6.9 github.com/dagger/graphql v0.0.0-20221102000338-24d5e47d3b72 github.com/dagger/graphql-go-tools v0.0.0-20221102001222-e68b44170936 github.com/docker/distribution v2.8.1+incompatible github.com/go-openapi/runtime v0.24.2 github.com/gofrs/flock v0.8.1 github.com/gogo/protobuf v1.3.2 github.com/hexops/gotextdiff v1.0.3 github.com/magefile/mage v1.14.0 github.com/mitchellh/go-homedir v1.1.0 github.com/moby/buildkit v0.10.5 github.com/netlify/open-api/v2 v2.12.1 github.com/opencontainers/go-digest v1.0.0 github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 github.com/pkg/errors v0.9.1 github.com/rs/zerolog v1.28.0 github.com/sirupsen/logrus v1.9.0 github.com/spf13/cobra v1.6.1 github.com/stretchr/testify v1.8.1 github.com/tonistiigi/fsutil v0.0.0-20220115021204-b19f7f9cb274 go.opentelemetry.io/otel v1.10.0 go.opentelemetry.io/otel/exporters/jaeger v1.4.1 go.opentelemetry.io/otel/sdk v1.9.0 golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 golang.org/x/term v0.0.0-20220722155259-a9ba230a4035 google.golang.org/grpc v1.49.0 ) require ( github.com/Azure/go-autorest v14.2.0+incompatible // indirect github.com/Azure/go-autorest/autorest v0.11.1 // indirect github.com/Azure/go-autorest/autorest/adal v0.9.5 // indirect github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect github.com/Azure/go-autorest/logger v0.2.0 // indirect github.com/Azure/go-autorest/tracing v0.6.0 // indirect github.com/Khan/genqlient v0.5.0 // indirect github.com/Microsoft/go-winio v0.5.2 // indirect github.com/adrg/xdg v0.4.0 // indirect github.com/agext/levenshtein v1.2.3 // indirect github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/containerd/console v1.0.3 // indirect github.com/containerd/continuity v0.3.0 // indirect github.com/containerd/ttrpc v1.1.0 // indirect github.com/containerd/typeurl v1.0.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/docker/cli v20.10.17+incompatible // indirect github.com/docker/docker v20.10.17+incompatible // indirect github.com/docker/docker-credential-helpers v0.6.4 // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect github.com/form3tech-oss/jwt-go v3.2.2+incompatible // indirect github.com/go-logr/logr v1.2.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-openapi/analysis v0.21.2 // indirect github.com/go-openapi/errors v0.20.2 // indirect github.com/go-openapi/jsonpointer v0.19.5 // indirect github.com/go-openapi/jsonreference v0.20.0 // indirect github.com/go-openapi/loads v0.21.1 // indirect github.com/go-openapi/spec v0.20.6 // indirect github.com/go-openapi/strfmt v0.21.3 // indirect github.com/go-openapi/swag v0.22.0 // indirect github.com/go-openapi/validate v0.22.0 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.2 // indirect github.com/iancoleman/strcase v0.2.0 // indirect github.com/inconshreveable/mousetrap v1.0.1 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/klauspost/compress v1.15.9 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.12 // indirect github.com/mattn/go-isatty v0.0.14 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/moby/locker v1.0.1 // indirect github.com/moby/sys/signal v0.7.0 // indirect github.com/morikuni/aec v1.0.0 // indirect github.com/oklog/ulid v1.3.1 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rsc/goversion v1.2.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea // indirect github.com/tonistiigi/vt100 v0.0.0-20210615222946-8066bb97264f // indirect github.com/vektah/gqlparser/v2 v2.5.1 // indirect go.mongodb.org/mongo-driver v1.10.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.34.0 // indirect go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.9.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.9.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.9.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.9.0 // indirect go.opentelemetry.io/otel/trace v1.10.0 // indirect go.opentelemetry.io/proto/otlp v0.18.0 // indirect golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa // indirect golang.org/x/net v0.0.0-20220811182439-13a9a731de15 // indirect golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect golang.org/x/text v0.3.7 // indirect golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 // indirect google.golang.org/genproto v0.0.0-20220810155839-1856144b1d9c // indirect google.golang.org/protobuf v1.28.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) replace github.com/docker/docker => github.com/docker/docker v20.10.3-0.20220414164044-61404de7df1a+incompatible
closed
dagger/dagger
https://github.com/dagger/dagger
3,737
Errors getting credentials on macos when using dagger-in-dagger
A few of us running `mage sdk:python:test` are getting very cryptic errors on the first step that runs dagger-in-dagger: ``` #1 resolve image config for docker.io/library/golang:1.19-alpine Error: input:1: container.from error getting credentials - err: signal: killed, out: `` Please visit https://dagger.io/help#go for troubleshooting guidance. #1 ERROR: error getting credentials - err: signal: killed, out: `` ``` But only on macos. I did some digging and eventually found the line where it comes from, forked and added a little extra debug information: https://github.com/sipsma/docker-credential-helpers/blob/9706447df656d46a595e2e2788637eddcf962a4c/client/client.go#L68 With that change it shows the error: ``` error getting credentials - err: signal: killed, prog: docker-credential-desktop get, out: ` ``` When I try to manually invoke docker-credential-desktop get from my terminal, it hangs indefinitely, ignoring even SIGTERM and I have to SIGKILL it. I have no idea why this *seems* to only happen once we get to the dagger-in-dagger step. It is worth confirming that understanding and worth confirming that the credential provider is indeed trying to run `docker-credential-desktop` on macos directly as opposed to inside the Linux container. It's actually not even obvious that it should be trying the macos client auth provider since the buildkit client is technically inside dagger and thus linux. However, buildkit has a lot of logic where it fallsback to trying any connected session, so *maybe* it is trying the macos client that is also connected to buildkit? Overall, kind of mysterious for a number of reasons, needs more investigation.
https://github.com/dagger/dagger/issues/3737
https://github.com/dagger/dagger/pull/3758
15a897278460408ccc4f832fd7e91dd2ddfaa90a
4a797801ef3bb6148d7186dac5d9d544cc913960
"2022-11-08T21:58:43Z"
go
"2022-11-10T00:30:26Z"
go.sum
bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0 h1:Dg9iHVQfrhq82rUNu9ZxUDrJLaxFUe/HlCVaLyRruq8= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/99designs/gqlgen v0.17.2/go.mod h1:K5fzLKwtph+FFgh9j7nFbRUdBKvTcGnsta51fsMTn3o= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= github.com/Azure/go-autorest/autorest v0.10.1/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= github.com/Azure/go-autorest/autorest v0.11.1 h1:eVvIXUKiTgv++6YnWb42DUA1YL7qDugnKP0HljexdnQ= github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg= github.com/Azure/go-autorest/autorest/adal v0.9.5 h1:Y3bBUV4rTuxenJJs41HU3qmqsb+auo+a3Lz+PlJPpL0= github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/logger v0.2.0 h1:e4RVHVZKC5p6UANLJHkM4OfR1UKZPj8Wt8Pcx+3oqrE= github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Khan/genqlient v0.5.0 h1:TMZJ+tl/BpbmGyIBiXzKzUftDhw4ZWxQZ+1ydn0gyII= github.com/Khan/genqlient v0.5.0/go.mod h1:EpIvDVXYm01GP6AXzjA7dKriPTH6GmtpmvTAwUUqIX8= github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= github.com/Microsoft/hcsshim v0.9.4 h1:mnUj0ivWy6UzbB1uLFqKR6F+ZyiDc7j4iGgHTpO+5+I= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/adrg/xdg v0.4.0 h1:RzRqFcjH4nE5C6oTAxhBtoE2IRyjBSa62SCbyPidvls= github.com/adrg/xdg v0.4.0/go.mod h1:N6ag73EX4wyxeaoeHctc1mas01KZgsj5tYiAIwqJE/E= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= github.com/agnivade/levenshtein v1.1.0/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8= github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alexflint/go-arg v1.4.2/go.mod h1:9iRbDxne7LcR/GSvEr7ma++GLpdIU1zrghf2y2768kM= github.com/alexflint/go-scalar v1.0.0/go.mod h1:GpHzbCOZXEKMEcygYQ5n/aa4Aq84zbxjy3MxYW0gjYw= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d h1:Byv0BzEl3/e6D5CLfI0j/7hiIEtvGVFPCZ7Ei2oq8iQ= github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/bradleyjkemp/cupaloy/v2 v2.6.0/go.mod h1:bm7JXdkRd4BHJk9HpwqAI8BoAY1lps46Enkdqw6aRX0= github.com/cenkalti/backoff/v4 v4.0.2/go.mod h1:eEew/i+1Q6OrCDZh3WiXYv3+nJwBASZ8Bog/87DQnVg= github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/containerd/cgroups v1.0.3 h1:ADZftAkglvCiD44c77s5YmMqaP2pzVCFZvBmAlBdAP4= github.com/containerd/console v1.0.3 h1:lIr7SlA5PxZyMV30bDW0MGbiOPXwc63yRuCP0ARubLw= github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= github.com/containerd/containerd v1.6.9 h1:IN/r8DUes/B5lEGTNfIiUkfZBtIQJGx2ai703dV6lRA= github.com/containerd/containerd v1.6.9/go.mod h1:XVicUvkxOrftE2Q1YWUXgZwkkAxwQYNOFzYWvfVfEfQ= github.com/containerd/continuity v0.1.0/go.mod h1:ICJu0PwR54nI0yPEnJ6jcS+J7CZAUXrLh8lPo2knzsM= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/containerd/fifo v1.0.0 h1:6PirWBr9/L7GDamKr+XM0IeUFXu5mf3M/BPpH9gaLBU= github.com/containerd/ttrpc v1.1.0 h1:GbtyLRxb0gOLR0TYQWt3O6B0NvT8tMdorEHqIQo/lWI= github.com/containerd/ttrpc v1.1.0/go.mod h1:XX4ZTnoOId4HklF4edwc4DcqskFZuvXB1Evzy5KFQpQ= github.com/containerd/typeurl v1.0.2 h1:Chlt8zIieDbzQFzXzAeBEF92KhExuE4p9p92/QmY7aY= github.com/containerd/typeurl v1.0.2/go.mod h1:9trJWW2sRlGub4wZJRTW83VtbOLS6hwcDZXTn6oPz9s= github.com/corbym/gocrest v1.0.3/go.mod h1:maVFL5lbdS2PgfOQgGRWDYTeunSWQeiEgoNdTABShCs= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-oidc v2.2.1+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/dagger/graphql v0.0.0-20221102000338-24d5e47d3b72 h1:0I9Y9nsFVcP42k9eOpjYmcm+NMEIFxNuJFOHfQ8MKpo= github.com/dagger/graphql v0.0.0-20221102000338-24d5e47d3b72/go.mod h1:z9nYmunTkok2pE+Kdjpl1ICaqcCzlDxcVjwaFE0MJTc= github.com/dagger/graphql-go-tools v0.0.0-20221102001222-e68b44170936 h1:yRwbZ5iT34iXf2Kg3my9Yclbg5Mq20b+w+uqePfbUoo= github.com/dagger/graphql-go-tools v0.0.0-20221102001222-e68b44170936/go.mod h1:n/St2rWoBXCywBsC4Bw4Gj/Bs92X8fVd0Q8Y0aaNbH0= github.com/danieljoos/wincred v1.1.0/go.mod h1:XYlo+eRTsVA9aHGp7NGjFkPla4m+DCL7hqDjlFjiygg= github.com/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/deadcheat/goblet v1.3.1/go.mod h1:IrMNyAwyrVgB30HsND2WgleTUM4wHTS9m40yNY6NJQg= github.com/deadcheat/gonch v0.0.0-20180528124129-c2ff7a019863/go.mod h1:/5mH3gAuXUxGN3maOBAxBfB8RXvP9tBIX5fx2x1k0V0= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= github.com/docker/cli v20.10.17+incompatible h1:eO2KS7ZFeov5UJeaDmIs1NFEDRf32PaqRpvoEkKBy5M= github.com/docker/cli v20.10.17+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v20.10.3-0.20220414164044-61404de7df1a+incompatible h1:jnhU41Zm9biz6e4GPOvAtuognZ+pi8S77ZlRir/SHRA= github.com/docker/docker v20.10.3-0.20220414164044-61404de7df1a+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.6.4 h1:axCks+yV+2MR3/kZhAmy07yC56WZ2Pwu/fKWtKuZB0o= github.com/docker/docker-credential-helpers v0.6.4/go.mod h1:ofX3UI0Gz1TteYBjtgs07O36Pyasyp66D2uKT7H8W1c= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c h1:+pKlWGMw7gf6bQ+oDZB4KHQFypsfjYlq/C4rfL7D3g8= github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= github.com/go-openapi/analysis v0.19.4/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= github.com/go-openapi/analysis v0.19.10/go.mod h1:qmhS3VNFxBlquFJ0RGoDtylO9y4pgTAUNE9AEEMdlJQ= github.com/go-openapi/analysis v0.19.16/go.mod h1:GLInF007N83Ad3m8a/CbQ5TPzdnGT7workfHwuVjNVk= github.com/go-openapi/analysis v0.21.2 h1:hXFrOYFHUAMQdu6zwAiKKJHJQ8kqZs1ux/ru1P1wLJU= github.com/go-openapi/analysis v0.21.2/go.mod h1:HZwRk4RRisyG8vx2Oe6aqeSQcoxRp47Xkp3+K6q+LdY= github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= github.com/go-openapi/errors v0.19.3/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= github.com/go-openapi/errors v0.19.4/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= github.com/go-openapi/errors v0.19.6/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/errors v0.19.7/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/errors v0.19.8/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/errors v0.19.9/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/errors v0.20.2 h1:dxy7PGTqEh94zj2E3h1cUmQQWiM1+aeCROfAr02EmK8= github.com/go-openapi/errors v0.20.2/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/inflect v0.19.0/go.mod h1:lHpZVlpIQqLyKwJ4N+YSc9hchQy/i12fJykb83CRBH4= github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA= github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= github.com/go-openapi/loads v0.19.3/go.mod h1:YVfqhUCdahYwR3f3iiwQLhicVRvLlU/WO5WPaZvcvSI= github.com/go-openapi/loads v0.19.4/go.mod h1:zZVHonKd8DXyxyw4yfnVjPzBjIQcLt0CCsn0N0ZrQsk= github.com/go-openapi/loads v0.19.5/go.mod h1:dswLCAdonkRufe/gSUC3gN8nTSaB9uaS2es0x5/IbjY= github.com/go-openapi/loads v0.19.6/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc= github.com/go-openapi/loads v0.19.7/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc= github.com/go-openapi/loads v0.20.0/go.mod h1:2LhKquiE513rN5xC6Aan6lYOSddlL8Mp20AW9kpviM4= github.com/go-openapi/loads v0.21.1 h1:Wb3nVZpdEzDTcly8S4HMkey6fjARRzb7iEaySimlDW0= github.com/go-openapi/loads v0.21.1/go.mod h1:/DtAMXXneXFjbQMGEtbamCZb+4x7eGwkvZCvBmwUG+g= github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= github.com/go-openapi/runtime v0.19.12/go.mod h1:dhGWCTKRXlAfGnQG0ONViOZpjfg0m2gUt9nTQPQZuoo= github.com/go-openapi/runtime v0.19.15/go.mod h1:dhGWCTKRXlAfGnQG0ONViOZpjfg0m2gUt9nTQPQZuoo= github.com/go-openapi/runtime v0.19.16/go.mod h1:5P9104EJgYcizotuXhEuUrzVc+j1RiSjahULvYmlv98= github.com/go-openapi/runtime v0.19.24/go.mod h1:Lm9YGCeecBnUUkFTxPC4s1+lwrkJ0pthx8YvyjCfkgk= github.com/go-openapi/runtime v0.24.2 h1:yX9HMGQbz32M87ECaAhGpJjBmErO3QLcgdZj9BzGx7c= github.com/go-openapi/runtime v0.24.2/go.mod h1:AKurw9fNre+h3ELZfk6ILsfvPN+bvvlaU/M9q/r9hpk= github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= github.com/go-openapi/spec v0.19.6/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= github.com/go-openapi/spec v0.19.7/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= github.com/go-openapi/spec v0.19.8/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= github.com/go-openapi/spec v0.19.15/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU= github.com/go-openapi/spec v0.20.0/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU= github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I= github.com/go-openapi/spec v0.20.6 h1:ich1RQ3WDbfoeTqTAb+5EIxNmpKVJZWBNah9RAT0jIQ= github.com/go-openapi/spec v0.20.6/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= github.com/go-openapi/strfmt v0.19.2/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= github.com/go-openapi/strfmt v0.19.4/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= github.com/go-openapi/strfmt v0.19.11/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLsF2VwmoFtbtc= github.com/go-openapi/strfmt v0.21.0/go.mod h1:ZRQ409bWMj+SOgXofQAGTIo2Ebu72Gs+WaRADcS5iNg= github.com/go-openapi/strfmt v0.21.1/go.mod h1:I/XVKeLc5+MM5oPNN7P6urMOpuLXEcNrCX/rPGuWb0k= github.com/go-openapi/strfmt v0.21.2/go.mod h1:I/XVKeLc5+MM5oPNN7P6urMOpuLXEcNrCX/rPGuWb0k= github.com/go-openapi/strfmt v0.21.3 h1:xwhj5X6CjXEZZHMWy1zKJxvW9AfHC9pkyUjLvHtKG7o= github.com/go-openapi/strfmt v0.21.3/go.mod h1:k+RzNO0Da+k3FrrynSNN8F7n/peCmQQqbbXjtDfvmGg= github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.7/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= github.com/go-openapi/swag v0.19.8/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= github.com/go-openapi/swag v0.19.9/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= github.com/go-openapi/swag v0.19.12/go.mod h1:eFdyEBkTdoAf/9RXBvj4cr1nH7GD8Kzo5HTt47gr72M= github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.22.0 h1:1VXunYCNgapcSzFtcY+eBmrwESlYCnFJZahQRgTRoo8= github.com/go-openapi/swag v0.22.0/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= github.com/go-openapi/validate v0.19.3/go.mod h1:90Vh6jjkTn+OT1Eefm0ZixWNFjhtOH7vS9k0lo6zwJo= github.com/go-openapi/validate v0.19.7/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= github.com/go-openapi/validate v0.19.10/go.mod h1:RKEZTUWDkxKQxN2jDT7ZnZi2bhZlbNMAuKvKB+IaGx8= github.com/go-openapi/validate v0.19.12/go.mod h1:Rzou8hA/CBw8donlS6WNEUQupNvUZ0waH08tGe6kAQ4= github.com/go-openapi/validate v0.19.15/go.mod h1:tbn/fdOwYHgrhPBzidZfJC2MIVvs9GA7monOmWBbeCI= github.com/go-openapi/validate v0.20.0/go.mod h1:b60iJT+xNNLfaQJUqLI7946tYiFEOuE9E4k54HpKcJ0= github.com/go-openapi/validate v0.21.0/go.mod h1:rjnrwK57VJ7A8xqfpAOEKRH8yQSGUriMu5/zuPSQ1hg= github.com/go-openapi/validate v0.22.0 h1:b0QecH6VslW/TxtpKgzpO1SNG7GU2FsaqKdP1E2T50Y= github.com/go-openapi/validate v0.22.0/go.mod h1:rjnrwK57VJ7A8xqfpAOEKRH8yQSGUriMu5/zuPSQ1hg= 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-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= github.com/go-swagger/go-swagger v0.23.0/go.mod h1:5AaV4Dx69cUjpFRTZnSHPr1Y7dKBVk6SvfIvkTEqwJs= github.com/go-swagger/scan-repo-boundary v0.0.0-20180623220736-973b3573c013/go.mod h1:b65mBPzqzZWxOZGxSWrqs4GInLIn+u99Q9q7p+GKni0= github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= github.com/gobuffalo/flect v0.1.3/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk= github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28= github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo= github.com/gobuffalo/genny v0.1.1/go.mod h1:5TExbEyY48pfunL4QSXxlDOmdsD44RRq4mVZ0Ex28Xk= github.com/gobuffalo/gitgen v0.0.0-20190315122116-cc086187d211/go.mod h1:vEHJk/E9DmhejeLeNt7UVvlSGv3ziL+djtTr3yyzcOw= github.com/gobuffalo/gogen v0.0.0-20190315121717-8f38393713f5/go.mod h1:V9QVDIxsgKNZs6L2IYiGR8datgMhB577vzTDqypH360= github.com/gobuffalo/gogen v0.1.0/go.mod h1:8NTelM5qd8RZ15VjQTFkAW6qOMx5wBbW4dSCS3BY8gg= github.com/gobuffalo/gogen v0.1.1/go.mod h1:y8iBtmHmGc4qa3urIyo1shvOD8JftTtfcKi+71xfDNE= github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8= github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= github.com/gobuffalo/mapi v1.0.2/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= 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= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= 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/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.2 h1:BqHID5W5qnMkug0Z8UmL8tN0gAy4jQ+B4WFt8cCgluU= github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.2/go.mod h1:ZbS3MZTZq/apAfAEHGoB5HbsQQstoqP92SjAqtQ9zeg= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/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/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= github.com/kevinmbeaulieu/eq-go v1.0.0/go.mod h1:G3S8ajA56gKBZm4UB9AOyoOS37JO3roToPzKNM8dtdM= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.15.9 h1:wKRjX6JRtDdrE9qwa4b/Cip7ACOshUI4smpCQanqjSY= github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kyoh86/richgo v0.3.3/go.mod h1:S65jllVRxBm59fqIXfCa3cPxQYRT9u9v45EPQVeuoH0= github.com/kyoh86/xdg v0.0.0-20171007020617-d28e4c5d7b81/go.mod h1:Z5mDqe0fxyxn3W2yTxsBAOQqIrXADQIh02wrTnaRM38= github.com/logrusorgru/aurora/v3 v3.0.0/go.mod h1:vsR12bk5grlLvLXAYrBsb5Oc/N+LxAlxggSjiwMnCUc= github.com/magefile/mage v1.14.0 h1:6QDX3g6z1YvJ4olPhT1wksUcSa/V0a1B+pJb73fBjyo= github.com/magefile/mage v1.14.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= github.com/matryer/moq v0.2.3/go.mod h1:9RtPYjTnH1bSBIkpvtHkFN7nbWAnO7oRpdJkEIn6UtE= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-isatty v0.0.0-20170925054904-a5cdd64afdee/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.2.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/buildkit v0.10.5 h1:d9krS/lG3dn6N7y+R8o9PTgIixlYAaDk35f3/B4jZOw= github.com/moby/buildkit v0.10.5/go.mod h1:Yajz9vt1Zw5q9Pp4pdb3TCSUXJBIroIQGQ3TTs/sLug= github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg= github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= github.com/moby/sys/mountinfo v0.6.0 h1:gUDhXQx58YNrpHlK4nSL+7y2pxFZkUcXqzFDKWdC0Oo= github.com/moby/sys/signal v0.7.0 h1:25RW3d5TnQEoKvRbEKUGay6DCQ46IxAVTT9CUMgmsSI= github.com/moby/sys/signal v0.7.0/go.mod h1:GQ6ObYZfqacOwTtlXvcmh9A26dVRul/hbOZn88Kg8Tg= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/myitcv/gobin v0.0.14/go.mod h1:GvHEiYCWroKI2KrMT+xQkHC3FC551wigVWeR4Sgg5P4= github.com/netlify/open-api/v2 v2.12.1 h1:sGSz0gf3sAxPG0L586xFHcrNujW97X1qxmUHO1R8lTE= github.com/netlify/open-api/v2 v2.12.1/go.mod h1:NbccOGa/b1S22KG8yBKhkuUfhrlQC31nCWzUApIbjiQ= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 h1:rc3tiVYb5z54aKaDfakKn0dDjIyPpTtszkjuMzyt7ec= github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/runc v1.1.2 h1:2VSZwLx5k/BfsBxMMipG/LYUnmqOD/BPkIVgQUcTlLw= github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417 h1:3snG66yBm59tKhhSPQrQ/0bCrv1LQbKt40LnUPiUxdc= github.com/opencontainers/selinux v1.10.1 h1:09LIPVRP3uuZGQvgR+SgMSNBd1Eb3vlRbGqQpoHsF8w= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= github.com/pelletier/go-toml v1.6.0/go.mod h1:5N711Q9dKgbdkxHL+MEfF31hpT7l0S0s/t2kKREewys= github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= 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/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.28.0 h1:MirSo27VyNi7RJYP3078AA1+Cyzd2GB66qy3aUHvsWY= github.com/rs/zerolog v1.28.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6usyD0= github.com/rsc/goversion v1.2.0 h1:zVF4y5ciA/rw779S62bEAq4Yif1cBc/UwRkXJ2xZyT4= github.com/rsc/goversion v1.2.0/go.mod h1:Tf/O0TQyfRvp7NelXAyfXYRKUO+LX3KNgXc8ALRUv4k= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.6.2/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.1.4/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tonistiigi/fsutil v0.0.0-20220115021204-b19f7f9cb274 h1:wbyZxD6IPFp0sl5uscMOJRsz5UKGFiNiD16e+MVfKZY= github.com/tonistiigi/fsutil v0.0.0-20220115021204-b19f7f9cb274/go.mod h1:oPAfvw32vlUJSjyDcQ3Bu0nb2ON2B+G0dtVN/SZNJiA= github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea h1:SXhTLE6pb6eld/v/cCndK0AMpt1wiVFb/YYmqB3/QG0= github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea/go.mod h1:WPnis/6cRcDZSUvVmezrxJPkiO87ThFYsoUiMwWNDJk= github.com/tonistiigi/vt100 v0.0.0-20210615222946-8066bb97264f h1:DLpt6B5oaaS8jyXHa9VA4rrZloBVPVXeCtrOsrFauxc= github.com/tonistiigi/vt100 v0.0.0-20210615222946-8066bb97264f/go.mod h1:ulncasL3N9uLrVann0m+CDlJKWsIAP34MPcOJF6VRvc= github.com/toqueteos/webbrowser v1.2.0/go.mod h1:XWoZq4cyp9WeUeak7w7LXRUQf1F1ATJMir8RTqb4ayM= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= github.com/vektah/gqlparser/v2 v2.4.0/go.mod h1:flJWIR04IMQPGz+BXLrORkrARBxv/rtyIAFvd/MceW0= github.com/vektah/gqlparser/v2 v2.4.5/go.mod h1:flJWIR04IMQPGz+BXLrORkrARBxv/rtyIAFvd/MceW0= github.com/vektah/gqlparser/v2 v2.5.1 h1:ZGu+bquAY23jsxDRcYpWjttRZrUz07LbiY77gUOHcr4= github.com/vektah/gqlparser/v2 v2.5.1/go.mod h1:mPgqFBu/woKTVYWyNk8cO3kh4S/f4aRFZrvOnp3hmCs= github.com/wacul/ptr v0.0.0-20170209030335-91632201dfc8/go.mod h1:BD0gjsZrCwtoR+yWDB9v2hQ8STlq9tT84qKfa+3txOc= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.3.0/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= go.mongodb.org/mongo-driver v1.3.1/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= go.mongodb.org/mongo-driver v1.3.4/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= go.mongodb.org/mongo-driver v1.4.3/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= go.mongodb.org/mongo-driver v1.4.4/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg= go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng= go.mongodb.org/mongo-driver v1.8.3/go.mod h1:0sQWfOeY63QTntERDJJ/0SuKK0T1uVSgKCuAROlKEPY= go.mongodb.org/mongo-driver v1.10.0 h1:UtV6N5k14upNp4LTduX0QCufG124fSu25Wz9tu94GLg= go.mongodb.org/mongo-driver v1.10.0/go.mod h1:wsihk0Kdgv8Kqu1Anit4sfK+22vSFbUrAVEYRhCXrA8= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.34.0 h1:PNEMW4EvpNQ7SuoPFNkvbZqi1STkTPKq+8vfoMl/6AE= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.34.0/go.mod h1:fk1+icoN47ytLSgkoWHLJrtVTSQ+HgmkNgPTKrk/Nsc= go.opentelemetry.io/otel v1.4.1/go.mod h1:StM6F/0fSwpd8dKWDCdRr7uRvEPYdW0hBSlbdTiUde4= go.opentelemetry.io/otel v1.10.0 h1:Y7DTJMR6zs1xkS/upamJYk0SxxN4C9AqRd77jmZnyY4= go.opentelemetry.io/otel v1.10.0/go.mod h1:NbvWjCthWHKBEUMpf0/v8ZRZlni86PpGFEMA9pnQSnQ= go.opentelemetry.io/otel/exporters/jaeger v1.4.1 h1:VHCK+2yTZDqDaVXj7JH2Z/khptuydo6C0ttBh2bxAbc= go.opentelemetry.io/otel/exporters/jaeger v1.4.1/go.mod h1:ZW7vkOu9nC1CxsD8bHNHCia5JUbwP39vxgd1q4Z5rCI= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.9.0 h1:ggqApEjDKczicksfvZUCxuvoyDmR6Sbm56LwiK8DVR0= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.9.0/go.mod h1:78XhIg8Ht9vR4tbLNUhXsiOnE2HOuSeKAiAcoVQEpOY= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.9.0 h1:NN90Cuna0CnBg8YNu1Q0V35i2E8LDByFOwHRCq/ZP9I= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.9.0/go.mod h1:0EsCXjZAiiZGnLdEUXM9YjCKuuLZMYyglh2QDXcYKVA= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.9.0 h1:M0/hqGuJBLeIEu20f89H74RGtqV2dn+SFWEz9ATAAwY= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.9.0/go.mod h1:K5G92gbtCrYJ0mn6zj9Pst7YFsDFuvSYEhYKRMcufnM= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.9.0 h1:FAF9l8Wjxi9Ad2k/vLTfHZyzXYX72C62wBGpV3G6AIo= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.9.0/go.mod h1:smUdtylgc0YQiUr2PuifS4hBXhAS5xtR6WQhxP1wiNA= go.opentelemetry.io/otel/sdk v1.4.1/go.mod h1:NBwHDgDIBYjwK2WNu1OPgsIc2IJzmBXNnvIJxJc8BpE= go.opentelemetry.io/otel/sdk v1.9.0 h1:LNXp1vrr83fNXTHgU8eO89mhzxb/bbWAsHG6fNf3qWo= go.opentelemetry.io/otel/sdk v1.9.0/go.mod h1:AEZc8nt5bd2F7BC24J5R0mrjYnpEgYHyTcM/vrSple4= go.opentelemetry.io/otel/trace v1.4.1/go.mod h1:iYEVbroFCNut9QkwEczV9vMRPHNKSSwYZjulEtsmhFc= go.opentelemetry.io/otel/trace v1.10.0 h1:npQMbR8o7mum8uF95yFbOEJffhs1sbCOfDh8zAJiH5E= go.opentelemetry.io/otel/trace v1.10.0/go.mod h1:Sij3YYczqAdz+EhmGhE6TpTxUO5/F/AzrK+kxfGqySM= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.18.0 h1:W5hyXNComRa23tGpKwG+FRAc4rfF6ZUg1JReK+QHS80= go.opentelemetry.io/proto/otlp v0.18.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/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-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200311171314-f7b00557c8c4/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201216223049-8b5274cf687f/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa h1:zuSxTR4o9y82ebqCUJYNGJbGPo6sKVl54f/TVDObg1c= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/net v0.0.0-20180404174746-b3c676e531a6/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-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220811182439-13a9a731de15 h1:cik0bxZUSJVDyaHf1hZPSDsU8SZHGQZQMeueXCE7yBQ= golang.org/x/net v0.0.0-20220811182439-13a9a731de15/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20220722155238-128564f6959c h1:q3gFqPqH7NVofKo3c3yETAP//pPI+G5mvB7qqj1Y5kY= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20170927054621-314a259e304f/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/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-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210313202042-bd2e13477e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab h1:2QkjZIsXupsJbJIdSjjUOgWK3aEtzyuh2mPt3l/CkeU= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20220722155259-a9ba230a4035 h1:Q5284mrmYTpACcm+eAKjKJH48BBwSyfJqmmGDTtT8Vc= golang.org/x/term v0.0.0-20220722155259-a9ba230a4035/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 h1:ftMN5LMiBFjbzleLqtoBZk7KdJwhuybIU+FckUHgoyQ= golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200313205530-4303120df7d8/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200815165600-90abf76919f3/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220810155839-1856144b1d9c h1:IooGDWedfLC6KLczH/uduUsKQP42ZZYhKx+zd50L1Sk= google.golang.org/genproto v0.0.0-20220810155839-1856144b1d9c/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.49.0 h1:WTLtQzmQori5FUH25Pq4WT22oCsv8USpQ+F6rqtsmxw= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.54.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.4.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
closed
dagger/dagger
https://github.com/dagger/dagger
3,737
Errors getting credentials on macos when using dagger-in-dagger
A few of us running `mage sdk:python:test` are getting very cryptic errors on the first step that runs dagger-in-dagger: ``` #1 resolve image config for docker.io/library/golang:1.19-alpine Error: input:1: container.from error getting credentials - err: signal: killed, out: `` Please visit https://dagger.io/help#go for troubleshooting guidance. #1 ERROR: error getting credentials - err: signal: killed, out: `` ``` But only on macos. I did some digging and eventually found the line where it comes from, forked and added a little extra debug information: https://github.com/sipsma/docker-credential-helpers/blob/9706447df656d46a595e2e2788637eddcf962a4c/client/client.go#L68 With that change it shows the error: ``` error getting credentials - err: signal: killed, prog: docker-credential-desktop get, out: ` ``` When I try to manually invoke docker-credential-desktop get from my terminal, it hangs indefinitely, ignoring even SIGTERM and I have to SIGKILL it. I have no idea why this *seems* to only happen once we get to the dagger-in-dagger step. It is worth confirming that understanding and worth confirming that the credential provider is indeed trying to run `docker-credential-desktop` on macos directly as opposed to inside the Linux container. It's actually not even obvious that it should be trying the macos client auth provider since the buildkit client is technically inside dagger and thus linux. However, buildkit has a lot of logic where it fallsback to trying any connected session, so *maybe* it is trying the macos client that is also connected to buildkit? Overall, kind of mysterious for a number of reasons, needs more investigation.
https://github.com/dagger/dagger/issues/3737
https://github.com/dagger/dagger/pull/3758
15a897278460408ccc4f832fd7e91dd2ddfaa90a
4a797801ef3bb6148d7186dac5d9d544cc913960
"2022-11-08T21:58:43Z"
go
"2022-11-10T00:30:26Z"
sdk/go/go.mod
module dagger.io/dagger go 1.19 replace github.com/dagger/dagger => ../.. // retract engine releases from SDK releases retract [v0.0.0, v0.2.36] require ( github.com/Khan/genqlient v0.5.0 github.com/adrg/xdg v0.4.0 github.com/iancoleman/strcase v0.2.0 github.com/opencontainers/go-digest v1.0.0 github.com/pkg/errors v0.9.1 github.com/stretchr/testify v1.8.1 github.com/vektah/gqlparser/v2 v2.5.1 golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab ) require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/kr/pretty v0.2.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect )
closed
dagger/dagger
https://github.com/dagger/dagger
3,737
Errors getting credentials on macos when using dagger-in-dagger
A few of us running `mage sdk:python:test` are getting very cryptic errors on the first step that runs dagger-in-dagger: ``` #1 resolve image config for docker.io/library/golang:1.19-alpine Error: input:1: container.from error getting credentials - err: signal: killed, out: `` Please visit https://dagger.io/help#go for troubleshooting guidance. #1 ERROR: error getting credentials - err: signal: killed, out: `` ``` But only on macos. I did some digging and eventually found the line where it comes from, forked and added a little extra debug information: https://github.com/sipsma/docker-credential-helpers/blob/9706447df656d46a595e2e2788637eddcf962a4c/client/client.go#L68 With that change it shows the error: ``` error getting credentials - err: signal: killed, prog: docker-credential-desktop get, out: ` ``` When I try to manually invoke docker-credential-desktop get from my terminal, it hangs indefinitely, ignoring even SIGTERM and I have to SIGKILL it. I have no idea why this *seems* to only happen once we get to the dagger-in-dagger step. It is worth confirming that understanding and worth confirming that the credential provider is indeed trying to run `docker-credential-desktop` on macos directly as opposed to inside the Linux container. It's actually not even obvious that it should be trying the macos client auth provider since the buildkit client is technically inside dagger and thus linux. However, buildkit has a lot of logic where it fallsback to trying any connected session, so *maybe* it is trying the macos client that is also connected to buildkit? Overall, kind of mysterious for a number of reasons, needs more investigation.
https://github.com/dagger/dagger/issues/3737
https://github.com/dagger/dagger/pull/3758
15a897278460408ccc4f832fd7e91dd2ddfaa90a
4a797801ef3bb6148d7186dac5d9d544cc913960
"2022-11-08T21:58:43Z"
go
"2022-11-10T00:30:26Z"
sdk/go/go.sum
github.com/99designs/gqlgen v0.17.2/go.mod h1:K5fzLKwtph+FFgh9j7nFbRUdBKvTcGnsta51fsMTn3o= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/Khan/genqlient v0.5.0 h1:TMZJ+tl/BpbmGyIBiXzKzUftDhw4ZWxQZ+1ydn0gyII= github.com/Khan/genqlient v0.5.0/go.mod h1:EpIvDVXYm01GP6AXzjA7dKriPTH6GmtpmvTAwUUqIX8= github.com/adrg/xdg v0.4.0 h1:RzRqFcjH4nE5C6oTAxhBtoE2IRyjBSa62SCbyPidvls= github.com/adrg/xdg v0.4.0/go.mod h1:N6ag73EX4wyxeaoeHctc1mas01KZgsj5tYiAIwqJE/E= github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= github.com/agnivade/levenshtein v1.1.0/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8= github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= github.com/alexflint/go-arg v1.4.2/go.mod h1:9iRbDxne7LcR/GSvEr7ma++GLpdIU1zrghf2y2768kM= github.com/alexflint/go-scalar v1.0.0/go.mod h1:GpHzbCOZXEKMEcygYQ5n/aa4Aq84zbxjy3MxYW0gjYw= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE= github.com/bradleyjkemp/cupaloy/v2 v2.6.0/go.mod h1:bm7JXdkRd4BHJk9HpwqAI8BoAY1lps46Enkdqw6aRX0= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= 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/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/kevinmbeaulieu/eq-go v1.0.0/go.mod h1:G3S8ajA56gKBZm4UB9AOyoOS37JO3roToPzKNM8dtdM= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/logrusorgru/aurora/v3 v3.0.0/go.mod h1:vsR12bk5grlLvLXAYrBsb5Oc/N+LxAlxggSjiwMnCUc= github.com/matryer/moq v0.2.3/go.mod h1:9RtPYjTnH1bSBIkpvtHkFN7nbWAnO7oRpdJkEIn6UtE= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mitchellh/mapstructure v1.2.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= github.com/vektah/gqlparser/v2 v2.4.0/go.mod h1:flJWIR04IMQPGz+BXLrORkrARBxv/rtyIAFvd/MceW0= github.com/vektah/gqlparser/v2 v2.4.5/go.mod h1:flJWIR04IMQPGz+BXLrORkrARBxv/rtyIAFvd/MceW0= github.com/vektah/gqlparser/v2 v2.5.1 h1:ZGu+bquAY23jsxDRcYpWjttRZrUz07LbiY77gUOHcr4= github.com/vektah/gqlparser/v2 v2.5.1/go.mod h1:mPgqFBu/woKTVYWyNk8cO3kh4S/f4aRFZrvOnp3hmCs= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab h1:2QkjZIsXupsJbJIdSjjUOgWK3aEtzyuh2mPt3l/CkeU= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200815165600-90abf76919f3/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
closed
dagger/dagger
https://github.com/dagger/dagger
3,737
Errors getting credentials on macos when using dagger-in-dagger
A few of us running `mage sdk:python:test` are getting very cryptic errors on the first step that runs dagger-in-dagger: ``` #1 resolve image config for docker.io/library/golang:1.19-alpine Error: input:1: container.from error getting credentials - err: signal: killed, out: `` Please visit https://dagger.io/help#go for troubleshooting guidance. #1 ERROR: error getting credentials - err: signal: killed, out: `` ``` But only on macos. I did some digging and eventually found the line where it comes from, forked and added a little extra debug information: https://github.com/sipsma/docker-credential-helpers/blob/9706447df656d46a595e2e2788637eddcf962a4c/client/client.go#L68 With that change it shows the error: ``` error getting credentials - err: signal: killed, prog: docker-credential-desktop get, out: ` ``` When I try to manually invoke docker-credential-desktop get from my terminal, it hangs indefinitely, ignoring even SIGTERM and I have to SIGKILL it. I have no idea why this *seems* to only happen once we get to the dagger-in-dagger step. It is worth confirming that understanding and worth confirming that the credential provider is indeed trying to run `docker-credential-desktop` on macos directly as opposed to inside the Linux container. It's actually not even obvious that it should be trying the macos client auth provider since the buildkit client is technically inside dagger and thus linux. However, buildkit has a lot of logic where it fallsback to trying any connected session, so *maybe* it is trying the macos client that is also connected to buildkit? Overall, kind of mysterious for a number of reasons, needs more investigation.
https://github.com/dagger/dagger/issues/3737
https://github.com/dagger/dagger/pull/3758
15a897278460408ccc4f832fd7e91dd2ddfaa90a
4a797801ef3bb6148d7186dac5d9d544cc913960
"2022-11-08T21:58:43Z"
go
"2022-11-10T00:30:26Z"
sdk/go/internal/engineconn/dockerprovision/container.go
package dockerprovision import ( "context" "io" "net" "net/http" "net/url" "os" "runtime" "dagger.io/dagger/internal/engineconn" "github.com/pkg/errors" exec "golang.org/x/sys/execabs" ) func NewDockerContainer(u *url.URL) (engineconn.EngineConn, error) { containerName := u.Host + u.Path if containerName == "" { return nil, errors.New("container name must be specified") } return &DockerContainer{ containerName: containerName, }, nil } type DockerContainer struct { containerName string childStdin io.Closer } func (c *DockerContainer) Connect(ctx context.Context, cfg *engineconn.Config) (*http.Client, error) { tmpbin, err := os.CreateTemp("", "temp-dagger-engine-session"+c.containerName) if err != nil { return nil, err } defer tmpbin.Close() defer os.Remove(tmpbin.Name()) // #nosec if output, err := exec.CommandContext(ctx, "docker", "cp", c.containerName+":"+containerEngineSessionBinPrefix+runtime.GOOS+"-"+runtime.GOARCH, tmpbin.Name(), ).CombinedOutput(); err != nil { return nil, errors.Wrapf(err, "failed to copy dagger-engine-session bin: %s", output) } if err := tmpbin.Chmod(0700); err != nil { return nil, err } if err := tmpbin.Close(); err != nil { return nil, err } // TODO: verify checksum? remote := "docker-container://" + c.containerName args := []string{ "--remote", remote, } if cfg.Workdir != "" { args = append(args, "--workdir", cfg.Workdir) } if cfg.ConfigPath != "" { args = append(args, "--project", cfg.ConfigPath) } addr, childStdin, err := startEngineSession(ctx, cfg.LogOutput, tmpbin.Name(), args...) if err != nil { return nil, err } c.childStdin = childStdin return &http.Client{ Transport: &http.Transport{ DialContext: func(_ context.Context, _, _ string) (net.Conn, error) { return net.Dial("tcp", addr) }, }, }, nil } func (c *DockerContainer) Addr() string { return "http://dagger" } func (c *DockerContainer) Close() error { if c.childStdin != nil { return c.childStdin.Close() } return nil }
closed
dagger/dagger
https://github.com/dagger/dagger
3,393
Fix build of shim when execing on non-platform specific llb state
from @marcosnils ``` query Build($file: FileID!, $ref: ContainerAddress!) { container { withMountedFile(path: "/mnt/dagger", source: $file) { exec(args: ["cp", "/mnt/dagger", "/dagger"]) { withEntrypoint(args: ["dagger"]) { publish(address: $ref) } } } } } ``` results in ``` { "data": null, "errors": [ { "message": "build shim: failed to parse target platform unknown: \"unknown\": unknown operating system or architecture: invalid argument", "locations": [ { "line": 4, "column": 7 } ], "path": [ "container", "withMountedFile", "exec" ] } ] } ``` The above query should fail since there's no fs on which to execute `cp` but it shouldn't fail by not being able to build the shim. It's also should be possible in general to, e.g. start at scratch, unpack a static binary and exec it, in which case this shouldn't even be an error case at all.
https://github.com/dagger/dagger/issues/3393
https://github.com/dagger/dagger/pull/3399
51c7941c3c8e7c2ac4242f5c41cec5a56d17e9d3
f8b3c63637cfcca2ec677fea2e020885664bd301
"2022-10-14T22:29:08Z"
go
"2022-11-10T06:01:37Z"
core/container.go
package core import ( "context" "encoding/json" "fmt" "io" "os" "path" "path/filepath" "strconv" "strings" "github.com/containerd/containerd/platforms" "github.com/dagger/dagger/core/shim" "github.com/docker/distribution/reference" bkclient "github.com/moby/buildkit/client" "github.com/moby/buildkit/client/llb" "github.com/moby/buildkit/exporter/containerimage/exptypes" dockerfilebuilder "github.com/moby/buildkit/frontend/dockerfile/builder" bkgw "github.com/moby/buildkit/frontend/gateway/client" "github.com/moby/buildkit/solver/pb" "github.com/opencontainers/go-digest" specs "github.com/opencontainers/image-spec/specs-go/v1" "github.com/pkg/errors" ) const ( DaggerSockName = "dagger-sock" DaggerSockPath = "/dagger.sock" ) // Container is a content-addressed container. type Container struct { ID ContainerID `json:"id"` } func NewContainer(id ContainerID, platform specs.Platform) (*Container, error) { if id == "" { id, err := (&containerIDPayload{Platform: platform}).Encode() if err != nil { return nil, err } return &Container{ID: id}, nil } return &Container{ID: id}, nil } // ContainerID is an opaque value representing a content-addressed container. type ContainerID string func (id ContainerID) decode() (*containerIDPayload, error) { if id == "" { // scratch return &containerIDPayload{}, nil } var payload containerIDPayload if err := decodeID(&payload, id); err != nil { return nil, err } return &payload, nil } // containerIDPayload is the inner content of a ContainerID. type containerIDPayload struct { // The container's root filesystem. FS *pb.Definition `json:"fs"` // Image configuration (env, workdir, etc) Config specs.ImageConfig `json:"cfg"` // Mount points configured for the container. Mounts ContainerMounts `json:"mounts,omitempty"` // Meta is the /dagger filesystem. It will be null if nothing has run yet. Meta *pb.Definition `json:"meta,omitempty"` // The platform of the container's rootfs. Platform specs.Platform `json:"platform,omitempty"` // Secrets to expose to the container. Secrets []ContainerSecret `json:"secret_env,omitempty"` } // ContainerSecret configures a secret to expose, either as an environment // variable or mounted to a file path. type ContainerSecret struct { Secret SecretID `json:"secret"` EnvName string `json:"env,omitempty"` MountPath string `json:"path,omitempty"` } // Encode returns the opaque string ID representation of the container. func (payload *containerIDPayload) Encode() (ContainerID, error) { id, err := encodeID(payload) if err != nil { return "", err } return ContainerID(id), nil } // FSState returns the container's root filesystem mount state. If there is // none (as with an empty container ID), it returns scratch. func (payload *containerIDPayload) FSState() (llb.State, error) { if payload.FS == nil { return llb.Scratch(), nil } return defToState(payload.FS) } // metaMount is the special path that the shim writes metadata to. const metaMount = "/.dagger_meta_mount" // metaSourcePath is a world-writable directory created and mounted to /dagger. const metaSourcePath = "meta" // MetaState returns the container's metadata mount state. If the container has // yet to run, it returns nil. func (payload *containerIDPayload) MetaState() (*llb.State, error) { if payload.Meta == nil { return nil, nil } metaSt, err := defToState(payload.Meta) if err != nil { return nil, err } return &metaSt, nil } // ContainerMount is a mount point configured in a container. type ContainerMount struct { // The source of the mount. Source *pb.Definition `json:"source,omitempty"` // A path beneath the source to scope the mount to. SourcePath string `json:"source_path,omitempty"` // The path of the mount within the container. Target string `json:"target"` // Persist changes to the mount under this cache ID. CacheID string `json:"cache_id,omitempty"` // How to share the cache across concurrent runs. CacheSharingMode string `json:"cache_sharing,omitempty"` // Configure the mount as a tmpfs. Tmpfs bool `json:"tmpfs,omitempty"` } // SourceState returns the state of the source of the mount. func (mnt ContainerMount) SourceState() (llb.State, error) { if mnt.Source == nil { return llb.Scratch(), nil } return defToState(mnt.Source) } type ContainerMounts []ContainerMount func (mnts ContainerMounts) With(newMnt ContainerMount) ContainerMounts { mntsCp := make(ContainerMounts, 0, len(mnts)) // NB: this / might need to change on Windows, but I'm not even sure how // mounts work on Windows, so... parent := newMnt.Target + "/" for _, mnt := range mnts { if mnt.Target == newMnt.Target || strings.HasPrefix(mnt.Target, parent) { continue } mntsCp = append(mntsCp, mnt) } mntsCp = append(mntsCp, newMnt) return mntsCp } func (container *Container) From(ctx context.Context, gw bkgw.Client, addr string) (*Container, error) { payload, err := container.ID.decode() if err != nil { return nil, err } platform := payload.Platform refName, err := reference.ParseNormalizedNamed(addr) if err != nil { return nil, err } ref := reference.TagNameOnly(refName).String() _, cfgBytes, err := gw.ResolveImageConfig(ctx, ref, llb.ResolveImageConfigOpt{ Platform: &platform, ResolveMode: llb.ResolveModeDefault.String(), }) if err != nil { return nil, err } var imgSpec specs.Image if err := json.Unmarshal(cfgBytes, &imgSpec); err != nil { return nil, err } dir, err := NewDirectory(ctx, llb.Image(addr), "/", platform) if err != nil { return nil, err } ctr, err := container.WithFS(ctx, dir) if err != nil { return nil, err } return ctr.UpdateImageConfig(ctx, func(specs.ImageConfig) specs.ImageConfig { return imgSpec.Config }) } const defaultDockerfileName = "Dockerfile" func (container *Container) Build(ctx context.Context, gw bkgw.Client, context *Directory, dockerfile string) (*Container, error) { payload, err := container.ID.decode() if err != nil { return nil, err } ctxPayload, err := context.ID.Decode() if err != nil { return nil, err } platform := payload.Platform opts := map[string]string{ "platform": platforms.Format(platform), "contextsubdir": ctxPayload.Dir, } if dockerfile != "" { opts["filename"] = filepath.Join(ctxPayload.Dir, dockerfile) } else { opts["filename"] = filepath.Join(ctxPayload.Dir, defaultDockerfileName) } inputs := map[string]*pb.Definition{ dockerfilebuilder.DefaultLocalNameContext: ctxPayload.LLB, dockerfilebuilder.DefaultLocalNameDockerfile: ctxPayload.LLB, } res, err := gw.Solve(ctx, bkgw.SolveRequest{ Frontend: "dockerfile.v0", FrontendOpt: opts, FrontendInputs: inputs, }) if err != nil { return nil, err } bkref, err := res.SingleRef() if err != nil { return nil, err } st, err := bkref.ToState() if err != nil { return nil, err } def, err := st.Marshal(ctx, llb.Platform(platform)) if err != nil { return nil, err } payload.FS = def.ToPB() cfgBytes, found := res.Metadata[exptypes.ExporterImageConfigKey] if found { var imgSpec specs.Image if err := json.Unmarshal(cfgBytes, &imgSpec); err != nil { return nil, err } payload.Config = imgSpec.Config } id, err := payload.Encode() if err != nil { return nil, err } return &Container{ID: id}, nil } func (container *Container) FS(ctx context.Context) (*Directory, error) { payload, err := container.ID.decode() if err != nil { return nil, err } return (&directoryIDPayload{ LLB: payload.FS, Platform: payload.Platform, }).ToDirectory() } func (container *Container) WithFS(ctx context.Context, dir *Directory) (*Container, error) { payload, err := container.ID.decode() if err != nil { return nil, err } dirPayload, err := dir.ID.Decode() if err != nil { return nil, err } payload.FS = dirPayload.LLB id, err := payload.Encode() if err != nil { return nil, err } return &Container{ID: id}, nil } func (container *Container) WithMountedDirectory(ctx context.Context, target string, source *Directory) (*Container, error) { payload, err := source.ID.Decode() if err != nil { return nil, err } return container.withMounted(target, payload.LLB, payload.Dir) } func (container *Container) WithMountedFile(ctx context.Context, target string, source *File) (*Container, error) { payload, err := source.ID.decode() if err != nil { return nil, err } return container.withMounted(target, payload.LLB, payload.File) } func (container *Container) WithMountedCache(ctx context.Context, target string, cache CacheID, source *Directory) (*Container, error) { payload, err := container.ID.decode() if err != nil { return nil, err } cachePayload, err := cache.decode() if err != nil { return nil, err } target = absPath(payload.Config.WorkingDir, target) mount := ContainerMount{ Target: target, CacheID: cachePayload.Sum(), CacheSharingMode: "shared", // TODO(vito): add param } if source != nil { srcPayload, err := source.ID.Decode() if err != nil { return nil, err } mount.Source = srcPayload.LLB mount.SourcePath = srcPayload.Dir } payload.Mounts = payload.Mounts.With(mount) id, err := payload.Encode() if err != nil { return nil, err } return &Container{ID: id}, nil } func (container *Container) WithMountedTemp(ctx context.Context, target string) (*Container, error) { payload, err := container.ID.decode() if err != nil { return nil, err } target = absPath(payload.Config.WorkingDir, target) payload.Mounts = payload.Mounts.With(ContainerMount{ Target: target, Tmpfs: true, }) id, err := payload.Encode() if err != nil { return nil, err } return &Container{ID: id}, nil } func (container *Container) WithMountedSecret(ctx context.Context, target string, source *Secret) (*Container, error) { payload, err := container.ID.decode() if err != nil { return nil, err } target = absPath(payload.Config.WorkingDir, target) payload.Secrets = append(payload.Secrets, ContainerSecret{ Secret: source.ID, MountPath: target, }) id, err := payload.Encode() if err != nil { return nil, err } return &Container{ID: id}, nil } func (container *Container) WithoutMount(ctx context.Context, target string) (*Container, error) { payload, err := container.ID.decode() if err != nil { return nil, err } target = absPath(payload.Config.WorkingDir, target) var found bool var foundIdx int for i := len(payload.Mounts) - 1; i >= 0; i-- { if payload.Mounts[i].Target == target { found = true foundIdx = i break } } if found { payload.Mounts = append(payload.Mounts[:foundIdx], payload.Mounts[foundIdx+1:]...) } id, err := payload.Encode() if err != nil { return nil, err } return &Container{ID: id}, nil } func (container *Container) Mounts(ctx context.Context) ([]string, error) { payload, err := container.ID.decode() if err != nil { return nil, err } mounts := []string{} for _, mnt := range payload.Mounts { mounts = append(mounts, mnt.Target) } return mounts, nil } func (container *Container) WithSecretVariable(ctx context.Context, name string, secret *Secret) (*Container, error) { payload, err := container.ID.decode() if err != nil { return nil, err } payload.Secrets = append(payload.Secrets, ContainerSecret{ Secret: secret.ID, EnvName: name, }) id, err := payload.Encode() if err != nil { return nil, err } return &Container{ID: id}, nil } func (container *Container) Directory(ctx context.Context, gw bkgw.Client, dirPath string) (*Directory, error) { dir, err := locatePath(ctx, container, dirPath, gw, NewDirectory) if err != nil { return nil, err } // check that the directory actually exists so the user gets an error earlier // rather than when the dir is used info, err := dir.Stat(ctx, gw, ".") if err != nil { return nil, err } if !info.IsDir() { return nil, fmt.Errorf("path %s is a file, not a directory", dirPath) } return dir, nil } func (container *Container) File(ctx context.Context, gw bkgw.Client, filePath string) (*File, error) { file, err := locatePath(ctx, container, filePath, gw, NewFile) if err != nil { return nil, err } // check that the file actually exists so the user gets an error earlier // rather than when the file is used info, err := file.Stat(ctx, gw) if err != nil { return nil, err } if info.IsDir() { return nil, fmt.Errorf("path %s is a directory, not a file", filePath) } return file, nil } func locatePath[T *File | *Directory]( ctx context.Context, container *Container, containerPath string, gw bkgw.Client, init func(context.Context, llb.State, string, specs.Platform) (T, error), ) (T, error) { payload, err := container.ID.decode() if err != nil { return nil, err } containerPath = absPath(payload.Config.WorkingDir, containerPath) var found T // NB(vito): iterate in reverse order so we'll find deeper mounts first for i := len(payload.Mounts) - 1; i >= 0; i-- { mnt := payload.Mounts[i] if containerPath == mnt.Target || strings.HasPrefix(containerPath, mnt.Target+"/") { if mnt.Tmpfs { return nil, fmt.Errorf("%s: cannot retrieve path from tmpfs", containerPath) } if mnt.CacheID != "" { return nil, fmt.Errorf("%s: cannot retrieve path from cache", containerPath) } st, err := mnt.SourceState() if err != nil { return nil, err } sub := mnt.SourcePath if containerPath != mnt.Target { // make relative portion relative to the source path dirSub := strings.TrimPrefix(containerPath, mnt.Target+"/") if dirSub != "" { sub = path.Join(sub, dirSub) } } found, err = init(ctx, st, sub, payload.Platform) if err != nil { return nil, err } break } } if found == nil { st, err := payload.FSState() if err != nil { return nil, err } found, err = init(ctx, st, containerPath, payload.Platform) if err != nil { return nil, err } } return found, nil } func (container *Container) withMounted(target string, srcDef *pb.Definition, srcPath string) (*Container, error) { payload, err := container.ID.decode() if err != nil { return nil, err } target = absPath(payload.Config.WorkingDir, target) payload.Mounts = payload.Mounts.With(ContainerMount{ Source: srcDef, SourcePath: srcPath, Target: target, }) id, err := payload.Encode() if err != nil { return nil, err } return &Container{ID: id}, nil } func (container *Container) ImageConfig(ctx context.Context) (specs.ImageConfig, error) { payload, err := container.ID.decode() if err != nil { return specs.ImageConfig{}, err } return payload.Config, nil } func (container *Container) UpdateImageConfig(ctx context.Context, updateFn func(specs.ImageConfig) specs.ImageConfig) (*Container, error) { payload, err := container.ID.decode() if err != nil { return nil, err } payload.Config = updateFn(payload.Config) id, err := payload.Encode() if err != nil { return nil, err } return &Container{ID: id}, nil } func (container *Container) Exec(ctx context.Context, gw bkgw.Client, opts ContainerExecOpts) (*Container, error) { //nolint:gocyclo payload, err := container.ID.decode() if err != nil { return nil, fmt.Errorf("decode id: %w", err) } cfg := payload.Config mounts := payload.Mounts platform := payload.Platform shimSt, err := shim.Build(ctx, gw, platform) if err != nil { return nil, fmt.Errorf("build shim: %w", err) } args := opts.Args if len(args) == 0 { // we use the default args if no new default args are passed args = cfg.Cmd } if len(cfg.Entrypoint) > 0 { args = append(cfg.Entrypoint, args...) } runOpts := []llb.RunOption{ // run the command via the shim, hide shim behind custom name llb.AddMount(shim.Path, shimSt, llb.SourcePath(shim.Path)), llb.Args(append([]string{shim.Path}, args...)), llb.WithCustomName(strings.Join(args, " ")), } // this allows executed containers to communicate back to this API if opts.ExperimentalPrivilegedNesting { runOpts = append(runOpts, llb.AddEnv("DAGGER_HOST", "unix:///dagger.sock"), llb.AddSSHSocket( llb.SSHID(DaggerSockName), llb.SSHSocketTarget(DaggerSockPath), ), ) } // because the shim might run as non-root, we need to make a world-writable // directory first and then make it the base of the /dagger mount point. // // TODO(vito): have the shim exec as the other user instead? meta := llb.Mkdir(metaSourcePath, 0777) if opts.Stdin != "" { meta = meta.Mkfile(path.Join(metaSourcePath, "stdin"), 0600, []byte(opts.Stdin)) } // create /dagger mount point for the shim to write to runOpts = append(runOpts, llb.AddMount(metaMount, llb.Scratch().File(meta), llb.SourcePath(metaSourcePath))) if opts.RedirectStdout != "" { runOpts = append(runOpts, llb.AddEnv("_DAGGER_REDIRECT_STDOUT", opts.RedirectStdout)) } if opts.RedirectStderr != "" { runOpts = append(runOpts, llb.AddEnv("_DAGGER_REDIRECT_STDERR", opts.RedirectStderr)) } if cfg.User != "" { runOpts = append(runOpts, llb.User(cfg.User)) } if cfg.WorkingDir != "" { runOpts = append(runOpts, llb.Dir(cfg.WorkingDir)) } for _, env := range cfg.Env { name, val, ok := strings.Cut(env, "=") if !ok { // it's OK to not be OK // we'll just set an empty env _ = ok } runOpts = append(runOpts, llb.AddEnv(name, val)) } for i, secret := range payload.Secrets { secretOpts := []llb.SecretOption{llb.SecretID(string(secret.Secret))} var secretDest string switch { case secret.EnvName != "": secretDest = secret.EnvName secretOpts = append(secretOpts, llb.SecretAsEnv(true)) case secret.MountPath != "": secretDest = secret.MountPath default: return nil, fmt.Errorf("malformed secret config at index %d", i) } runOpts = append(runOpts, llb.AddSecret(secretDest, secretOpts...)) } fsSt, err := payload.FSState() if err != nil { return nil, fmt.Errorf("fs state: %w", err) } for _, mnt := range mounts { srcSt, err := mnt.SourceState() if err != nil { return nil, fmt.Errorf("mount %s: %w", mnt.Target, err) } mountOpts := []llb.MountOption{} if mnt.SourcePath != "" { mountOpts = append(mountOpts, llb.SourcePath(mnt.SourcePath)) } if mnt.CacheSharingMode != "" { var sharingMode llb.CacheMountSharingMode switch mnt.CacheSharingMode { case "shared": sharingMode = llb.CacheMountShared case "private": sharingMode = llb.CacheMountPrivate case "locked": sharingMode = llb.CacheMountLocked default: return nil, errors.Errorf("invalid cache mount sharing mode %q", mnt.CacheSharingMode) } mountOpts = append(mountOpts, llb.AsPersistentCacheDir(mnt.CacheID, sharingMode)) } if mnt.Tmpfs { mountOpts = append(mountOpts, llb.Tmpfs()) } runOpts = append(runOpts, llb.AddMount(mnt.Target, srcSt, mountOpts...)) } execSt := fsSt.Run(runOpts...) execDef, err := execSt.Root().Marshal(ctx, llb.Platform(platform)) if err != nil { return nil, fmt.Errorf("marshal root: %w", err) } payload.FS = execDef.ToPB() metaDef, err := execSt.GetMount(metaMount).Marshal(ctx, llb.Platform(platform)) if err != nil { return nil, fmt.Errorf("get meta mount: %w", err) } payload.Meta = metaDef.ToPB() for i, mnt := range mounts { if mnt.Tmpfs || mnt.CacheID != "" { continue } mountSt := execSt.GetMount(mnt.Target) // propagate any changes to regular mounts to subsequent containers execMountDef, err := mountSt.Marshal(ctx, llb.Platform(platform)) if err != nil { return nil, fmt.Errorf("propagate %s: %w", mnt.Target, err) } mounts[i].Source = execMountDef.ToPB() } payload.Mounts = mounts id, err := payload.Encode() if err != nil { return nil, fmt.Errorf("encode: %w", err) } return &Container{ID: id}, nil } func (container *Container) ExitCode(ctx context.Context, gw bkgw.Client) (*int, error) { file, err := container.MetaFile(ctx, gw, "exitCode") if err != nil { return nil, err } if file == nil { return nil, nil } content, err := file.Contents(ctx, gw) if err != nil { return nil, err } exitCode, err := strconv.Atoi(string(content)) if err != nil { return nil, err } return &exitCode, nil } func (container *Container) MetaFile(ctx context.Context, gw bkgw.Client, filePath string) (*File, error) { payload, err := container.ID.decode() if err != nil { return nil, err } meta, err := payload.MetaState() if err != nil { return nil, err } if meta == nil { return nil, nil } return NewFile(ctx, *meta, path.Join(metaSourcePath, filePath), payload.Platform) } func (container *Container) Publish( ctx context.Context, ref string, platformVariants []ContainerID, bkClient *bkclient.Client, solveOpts bkclient.SolveOpt, solveCh chan<- *bkclient.SolveStatus, ) (string, error) { // NOTE: be careful to not overwrite any values from original solveOpts (i.e. with append). solveOpts.Exports = []bkclient.ExportEntry{ { Type: bkclient.ExporterImage, Attrs: map[string]string{ "name": ref, "push": "true", }, }, } ch, wg := mirrorCh(solveCh) defer wg.Wait() res, err := bkClient.Build(ctx, solveOpts, "", func(ctx context.Context, gw bkgw.Client) (*bkgw.Result, error) { return container.export(ctx, gw, platformVariants) }, ch) if err != nil { return "", err } refName, err := reference.ParseNormalizedNamed(ref) if err != nil { return "", err } imageDigest, found := res.ExporterResponse[exptypes.ExporterImageDigestKey] if found { dig, err := digest.Parse(imageDigest) if err != nil { return "", fmt.Errorf("parse digest: %w", err) } withDig, err := reference.WithDigest(refName, dig) if err != nil { return "", fmt.Errorf("with digest: %w", err) } return withDig.String(), nil } return ref, nil } func (container *Container) Platform() (specs.Platform, error) { payload, err := container.ID.decode() if err != nil { return specs.Platform{}, err } return payload.Platform, nil } func (container *Container) Export( ctx context.Context, host *Host, dest string, platformVariants []ContainerID, bkClient *bkclient.Client, solveOpts bkclient.SolveOpt, solveCh chan<- *bkclient.SolveStatus, ) error { dest, err := host.NormalizeDest(dest) if err != nil { return err } out, err := os.Create(dest) if err != nil { return err } defer out.Close() return host.Export(ctx, bkclient.ExportEntry{ Type: bkclient.ExporterOCI, Output: func(map[string]string) (io.WriteCloser, error) { return out, nil }, }, dest, bkClient, solveOpts, solveCh, func(ctx context.Context, gw bkgw.Client) (*bkgw.Result, error) { return container.export(ctx, gw, platformVariants) }) } func (container *Container) export( ctx context.Context, gw bkgw.Client, platformVariants []ContainerID, ) (*bkgw.Result, error) { var payloads []*containerIDPayload if container.ID != "" { payload, err := container.ID.decode() if err != nil { return nil, err } if payload.FS != nil { payloads = append(payloads, payload) } } for _, id := range platformVariants { payload, err := id.decode() if err != nil { return nil, err } if payload.FS != nil { payloads = append(payloads, payload) } } if len(payloads) == 0 { // Could also just ignore and do nothing, airing on side of error until proven otherwise. return nil, errors.New("no containers to export") } if len(payloads) == 1 { payload := payloads[0] st, err := payload.FSState() if err != nil { return nil, err } stDef, err := st.Marshal(ctx, llb.Platform(payload.Platform)) if err != nil { return nil, err } res, err := gw.Solve(ctx, bkgw.SolveRequest{ Evaluate: true, Definition: stDef.ToPB(), }) if err != nil { return nil, err } cfgBytes, err := json.Marshal(specs.Image{ Architecture: payload.Platform.Architecture, OS: payload.Platform.OS, OSVersion: payload.Platform.OSVersion, OSFeatures: payload.Platform.OSFeatures, Config: payload.Config, }) if err != nil { return nil, err } res.AddMeta(exptypes.ExporterImageConfigKey, cfgBytes) return res, nil } res := bkgw.NewResult() expPlatforms := &exptypes.Platforms{ Platforms: make([]exptypes.Platform, len(payloads)), } for i, payload := range payloads { st, err := payload.FSState() if err != nil { return nil, err } stDef, err := st.Marshal(ctx, llb.Platform(payload.Platform)) if err != nil { return nil, err } r, err := gw.Solve(ctx, bkgw.SolveRequest{ Evaluate: true, Definition: stDef.ToPB(), }) if err != nil { return nil, err } ref, err := r.SingleRef() if err != nil { return nil, err } platformKey := platforms.Format(payload.Platform) res.AddRef(platformKey, ref) expPlatforms.Platforms[i] = exptypes.Platform{ ID: platformKey, Platform: payload.Platform, } cfgBytes, err := json.Marshal(specs.Image{ Architecture: payload.Platform.Architecture, OS: payload.Platform.OS, OSVersion: payload.Platform.OSVersion, OSFeatures: payload.Platform.OSFeatures, Config: payload.Config, }) if err != nil { return nil, err } res.AddMeta(fmt.Sprintf("%s/%s", exptypes.ExporterImageConfigKey, platformKey), cfgBytes) } platformBytes, err := json.Marshal(expPlatforms) if err != nil { return nil, err } res.AddMeta(exptypes.ExporterPlatformsKey, platformBytes) return res, nil } type ContainerExecOpts struct { // Command to run instead of the container's default command Args []string // Content to write to the command's standard input before closing Stdin string // Redirect the command's standard output to a file in the container RedirectStdout string // Redirect the command's standard error to a file in the container RedirectStderr string // Provide dagger access to the executed command // Do not use this option unless you trust the command being executed. // The command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM ExperimentalPrivilegedNesting bool }
closed
dagger/dagger
https://github.com/dagger/dagger
3,393
Fix build of shim when execing on non-platform specific llb state
from @marcosnils ``` query Build($file: FileID!, $ref: ContainerAddress!) { container { withMountedFile(path: "/mnt/dagger", source: $file) { exec(args: ["cp", "/mnt/dagger", "/dagger"]) { withEntrypoint(args: ["dagger"]) { publish(address: $ref) } } } } } ``` results in ``` { "data": null, "errors": [ { "message": "build shim: failed to parse target platform unknown: \"unknown\": unknown operating system or architecture: invalid argument", "locations": [ { "line": 4, "column": 7 } ], "path": [ "container", "withMountedFile", "exec" ] } ] } ``` The above query should fail since there's no fs on which to execute `cp` but it shouldn't fail by not being able to build the shim. It's also should be possible in general to, e.g. start at scratch, unpack a static binary and exec it, in which case this shouldn't even be an error case at all.
https://github.com/dagger/dagger/issues/3393
https://github.com/dagger/dagger/pull/3399
51c7941c3c8e7c2ac4242f5c41cec5a56d17e9d3
f8b3c63637cfcca2ec677fea2e020885664bd301
"2022-10-14T22:29:08Z"
go
"2022-11-10T06:01:37Z"
core/integration/container_test.go
package core import ( "context" "os" "path/filepath" "strings" "testing" "dagger.io/dagger" "github.com/dagger/dagger/core" "github.com/dagger/dagger/core/schema" "github.com/dagger/dagger/internal/testutil" "github.com/moby/buildkit/identity" "github.com/stretchr/testify/require" ) func TestContainerScratch(t *testing.T) { t.Parallel() res := struct { Container struct { ID string Fs struct { Entries []string } } }{} err := testutil.Query( `{ container { id fs { entries } } }`, &res, nil) require.NoError(t, err) require.Empty(t, res.Container.Fs.Entries) } func TestContainerFrom(t *testing.T) { t.Parallel() res := struct { Container struct { From struct { Fs struct { File struct { Contents string } } } } }{} err := testutil.Query( `{ container { from(address: "alpine:3.16.2") { fs { file(path: "/etc/alpine-release") { contents } } } } }`, &res, nil) require.NoError(t, err) require.Equal(t, res.Container.From.Fs.File.Contents, "3.16.2\n") } func TestContainerBuild(t *testing.T) { ctx := context.Background() c, err := dagger.Connect(ctx) require.NoError(t, err) defer c.Close() contextDir := c.Directory(). WithNewFile("main.go", dagger.DirectoryWithNewFileOpts{ Contents: `package main import "fmt" import "os" func main() { for _, env := range os.Environ() { fmt.Println(env) } }`, }) t.Run("default Dockerfile location", func(t *testing.T) { src := contextDir. WithNewFile("Dockerfile", dagger.DirectoryWithNewFileOpts{ Contents: `FROM golang:1.18.2-alpine WORKDIR /src COPY main.go . RUN go mod init hello RUN go build -o /usr/bin/goenv main.go ENV FOO=bar CMD goenv `, }) env, err := c.Container().Build(src).Exec().Stdout().Contents(ctx) require.NoError(t, err) require.Contains(t, env, "FOO=bar\n") }) t.Run("custom Dockerfile location", func(t *testing.T) { src := contextDir. WithNewFile("subdir/Dockerfile.whee", dagger.DirectoryWithNewFileOpts{ Contents: `FROM golang:1.18.2-alpine WORKDIR /src COPY main.go . RUN go mod init hello RUN go build -o /usr/bin/goenv main.go ENV FOO=bar CMD goenv `, }) env, err := c.Container().Build(src, dagger.ContainerBuildOpts{ Dockerfile: "subdir/Dockerfile.whee", }).Exec().Stdout().Contents(ctx) require.NoError(t, err) require.Contains(t, env, "FOO=bar\n") }) t.Run("subdirectory with default Dockerfile location", func(t *testing.T) { src := contextDir. WithNewFile("Dockerfile", dagger.DirectoryWithNewFileOpts{ Contents: `FROM golang:1.18.2-alpine WORKDIR /src COPY main.go . RUN go mod init hello RUN go build -o /usr/bin/goenv main.go ENV FOO=bar CMD goenv `, }) sub := c.Directory().WithDirectory("subcontext", src).Directory("subcontext") env, err := c.Container().Build(sub).Exec().Stdout().Contents(ctx) require.NoError(t, err) require.Contains(t, env, "FOO=bar\n") }) t.Run("subdirectory with custom Dockerfile location", func(t *testing.T) { src := contextDir. WithNewFile("subdir/Dockerfile.whee", dagger.DirectoryWithNewFileOpts{ Contents: `FROM golang:1.18.2-alpine WORKDIR /src COPY main.go . RUN go mod init hello RUN go build -o /usr/bin/goenv main.go ENV FOO=bar CMD goenv `, }) sub := c.Directory().WithDirectory("subcontext", src).Directory("subcontext") env, err := c.Container().Build(sub, dagger.ContainerBuildOpts{ Dockerfile: "subdir/Dockerfile.whee", }).Exec().Stdout().Contents(ctx) require.NoError(t, err) require.Contains(t, env, "FOO=bar\n") }) } func TestContainerWithFS(t *testing.T) { t.Parallel() ctx := context.Background() c, err := dagger.Connect(ctx) require.NoError(t, err) defer c.Close() alpine316 := c.Container().From("alpine:3.16.2") alpine316ReleaseStr, err := alpine316.File("/etc/alpine-release").Contents(ctx) require.NoError(t, err) alpine316ReleaseStr = strings.TrimSpace(alpine316ReleaseStr) dir := alpine316.FS() exitCode, err := c.Container().WithEnvVariable("ALPINE_RELEASE", alpine316ReleaseStr).WithFS(dir).Exec(dagger.ContainerExecOpts{ Args: []string{ "/bin/sh", "-c", "test -f /etc/alpine-release && test \"$(head -n 1 /etc/alpine-release)\" = \"$ALPINE_RELEASE\"", }, }).ExitCode(ctx) require.NoError(t, err) require.Equal(t, exitCode, 0) alpine315 := c.Container().From("alpine:3.15.6") varVal := "testing123" alpine315WithVar := alpine315.WithEnvVariable("DAGGER_TEST", varVal) varValResp, err := alpine315WithVar.EnvVariable(ctx, "DAGGER_TEST") require.NoError(t, err) require.Equal(t, varVal, varValResp) alpine315ReplacedFS := alpine315WithVar.WithFS(dir) varValResp, err = alpine315ReplacedFS.EnvVariable(ctx, "DAGGER_TEST") require.NoError(t, err) require.Equal(t, varVal, varValResp) releaseStr, err := alpine315ReplacedFS.File("/etc/alpine-release").Contents(ctx) require.NoError(t, err) require.Equal(t, "3.16.2\n", releaseStr) } func TestContainerExecExitCode(t *testing.T) { t.Parallel() res := struct { Container struct { From struct { Exec struct { ExitCode *int } } } }{} err := testutil.Query( `{ container { from(address: "alpine:3.16.2") { exec(args: ["true"]) { exitCode } } } }`, &res, nil) require.NoError(t, err) require.NotNil(t, res.Container.From.Exec.ExitCode) require.Equal(t, 0, *res.Container.From.Exec.ExitCode) /* It's not currently possible to get a nonzero exit code back because Buildkit raises an error. We could perhaps have the shim mask the exit status and always exit 0, but we would have to be careful not to let that happen in a big chained LLB since it would prevent short-circuiting. We could only do it when the user requests the exitCode, but then we would actually need to run the command _again_ since we'd need some way to tell the shim what to do. Hmm... err = testutil.Query( `{ container { from(address: "alpine:3.16.2") { exec(args: ["false"]) { exitCode } } } }`, &res, nil) require.NoError(t, err) require.Equal(t, res.Container.From.Exec.ExitCode, 1) */ } func TestContainerExecStdoutStderr(t *testing.T) { t.Parallel() res := struct { Container struct { From struct { Exec struct { Stdout, Stderr struct { Contents string } } } } }{} err := testutil.Query( `{ container { from(address: "alpine:3.16.2") { exec(args: ["sh", "-c", "echo hello; echo goodbye >/dev/stderr"]) { stdout { contents } stderr { contents } } } } }`, &res, nil) require.NoError(t, err) require.Equal(t, res.Container.From.Exec.Stdout.Contents, "hello\n") require.Equal(t, res.Container.From.Exec.Stderr.Contents, "goodbye\n") } func TestContainerExecStdin(t *testing.T) { t.Parallel() res := struct { Container struct { From struct { Exec struct { Stdout struct { Contents string } } } } }{} err := testutil.Query( `{ container { from(address: "alpine:3.16.2") { exec(args: ["cat"], stdin: "hello") { stdout { contents } } } } }`, &res, nil) require.NoError(t, err) require.Equal(t, res.Container.From.Exec.Stdout.Contents, "hello") } func TestContainerExecRedirectStdoutStderr(t *testing.T) { t.Parallel() res := struct { Container struct { From struct { Exec struct { Out, Err struct { Contents string } } } } }{} err := testutil.Query( `{ container { from(address: "alpine:3.16.2") { exec( args: ["sh", "-c", "echo hello; echo goodbye >/dev/stderr"], redirectStdout: "out", redirectStderr: "err" ) { out: file(path: "out") { contents } err: file(path: "err") { contents } } } } }`, &res, nil) require.NoError(t, err) require.Equal(t, res.Container.From.Exec.Out.Contents, "hello\n") require.Equal(t, res.Container.From.Exec.Err.Contents, "goodbye\n") err = testutil.Query( `{ container { from(address: "alpine:3.16.2") { exec( args: ["sh", "-c", "echo hello; echo goodbye >/dev/stderr"], redirectStdout: "out", redirectStderr: "err" ) { stdout { contents } stderr { contents } } } } }`, &res, nil) require.Error(t, err) require.Contains(t, err.Error(), "stdout: no such file or directory") require.Contains(t, err.Error(), "stderr: no such file or directory") } func TestContainerNullStdoutStderr(t *testing.T) { t.Parallel() res := struct { Container struct { From struct { Stdout, Stderr *struct { Contents string } } } }{} err := testutil.Query( `{ container { from(address: "alpine:3.16.2") { stdout { contents } stderr { contents } } } }`, &res, nil) require.NoError(t, err) require.Nil(t, res.Container.From.Stdout) require.Nil(t, res.Container.From.Stderr) } func TestContainerExecWithWorkdir(t *testing.T) { t.Parallel() res := struct { Container struct { From struct { WithWorkdir struct { Exec struct { Stdout struct { Contents string } } } } } }{} err := testutil.Query( `{ container { from(address: "alpine:3.16.2") { withWorkdir(path: "/usr") { exec(args: ["pwd"]) { stdout { contents } } } } } }`, &res, nil) require.NoError(t, err) require.Equal(t, res.Container.From.WithWorkdir.Exec.Stdout.Contents, "/usr\n") } func TestContainerExecWithUser(t *testing.T) { t.Parallel() res := struct { Container struct { From struct { User string WithUser struct { User string Exec struct { Stdout struct { Contents string } } } } } }{} t.Run("user name", func(t *testing.T) { err := testutil.Query( `{ container { from(address: "alpine:3.16.2") { user withUser(name: "daemon") { user exec(args: ["whoami"]) { stdout { contents } } } } } }`, &res, nil) require.NoError(t, err) require.Equal(t, "", res.Container.From.User) require.Equal(t, "daemon", res.Container.From.WithUser.User) require.Equal(t, "daemon\n", res.Container.From.WithUser.Exec.Stdout.Contents) }) t.Run("user and group name", func(t *testing.T) { err := testutil.Query( `{ container { from(address: "alpine:3.16.2") { user withUser(name: "daemon:floppy") { user exec(args: ["sh", "-c", "whoami; groups"]) { stdout { contents } } } } } }`, &res, nil) require.NoError(t, err) require.Equal(t, "", res.Container.From.User) require.Equal(t, "daemon:floppy", res.Container.From.WithUser.User) require.Equal(t, "daemon\nfloppy\n", res.Container.From.WithUser.Exec.Stdout.Contents) }) t.Run("user ID", func(t *testing.T) { err := testutil.Query( `{ container { from(address: "alpine:3.16.2") { user withUser(name: "2") { user exec(args: ["whoami"]) { stdout { contents } } } } } }`, &res, nil) require.NoError(t, err) require.Equal(t, "", res.Container.From.User) require.Equal(t, "2", res.Container.From.WithUser.User) require.Equal(t, "daemon\n", res.Container.From.WithUser.Exec.Stdout.Contents) }) t.Run("user and group ID", func(t *testing.T) { err := testutil.Query( `{ container { from(address: "alpine:3.16.2") { user withUser(name: "2:11") { user exec(args: ["sh", "-c", "whoami; groups"]) { stdout { contents } } } } } }`, &res, nil) require.NoError(t, err) require.Equal(t, "", res.Container.From.User) require.Equal(t, "2:11", res.Container.From.WithUser.User) require.Equal(t, "daemon\nfloppy\n", res.Container.From.WithUser.Exec.Stdout.Contents) }) } func TestContainerExecWithEntrypoint(t *testing.T) { t.Parallel() res := struct { Container struct { From struct { Entrypoint []string WithEntrypoint struct { Entrypoint []string Exec struct { Stdout struct { Contents string } } WithEntrypoint struct { Entrypoint []string } } } } }{} err := testutil.Query( `{ container { from(address: "alpine:3.16.2") { entrypoint withEntrypoint(args: ["sh", "-c"]) { entrypoint exec(args: ["echo $HOME"]) { stdout { contents } } withEntrypoint(args: []) { entrypoint } } } } }`, &res, nil) require.NoError(t, err) require.Empty(t, res.Container.From.Entrypoint) require.Equal(t, []string{"sh", "-c"}, res.Container.From.WithEntrypoint.Entrypoint) require.Equal(t, "/root\n", res.Container.From.WithEntrypoint.Exec.Stdout.Contents) require.Empty(t, res.Container.From.WithEntrypoint.WithEntrypoint.Entrypoint) } func TestContainerWithDefaultArgs(t *testing.T) { t.Parallel() res := struct { Container struct { From struct { Entrypoint []string DefaultArgs []string Exec struct { Stdout struct { Contents string } } WithDefaultArgs struct { Entrypoint []string DefaultArgs []string } WithEntrypoint struct { Entrypoint []string DefaultArgs []string Exec struct { Stdout struct { Contents string } } WithDefaultArgs struct { Entrypoint []string DefaultArgs []string Exec struct { Stdout struct { Contents string } } } } } } }{} err := testutil.Query( `{ container { from(address: "alpine:3.16.2") { entrypoint defaultArgs withDefaultArgs { entrypoint defaultArgs } withEntrypoint(args: ["sh", "-c"]) { entrypoint defaultArgs exec(args: ["echo $HOME"]) { stdout { contents } } withDefaultArgs(args: ["id"]) { entrypoint defaultArgs exec(args: []) { stdout { contents } } } } } } }`, &res, nil) t.Run("default alpine (no entrypoint)", func(t *testing.T) { require.NoError(t, err) require.Empty(t, res.Container.From.Entrypoint) require.Equal(t, []string{"/bin/sh"}, res.Container.From.DefaultArgs) }) t.Run("with nil default args", func(t *testing.T) { require.Empty(t, res.Container.From.WithDefaultArgs.Entrypoint) require.Empty(t, res.Container.From.WithDefaultArgs.DefaultArgs) }) t.Run("with entrypoint set", func(t *testing.T) { require.Equal(t, []string{"sh", "-c"}, res.Container.From.WithEntrypoint.Entrypoint) require.Equal(t, []string{"/bin/sh"}, res.Container.From.WithEntrypoint.DefaultArgs) }) t.Run("with exec args", func(t *testing.T) { require.Equal(t, "/root\n", res.Container.From.WithEntrypoint.Exec.Stdout.Contents) }) t.Run("with default args set", func(t *testing.T) { require.Equal(t, []string{"sh", "-c"}, res.Container.From.WithEntrypoint.WithDefaultArgs.Entrypoint) require.Equal(t, []string{"id"}, res.Container.From.WithEntrypoint.WithDefaultArgs.DefaultArgs) require.Equal(t, "uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video)\n", res.Container.From.WithEntrypoint.WithDefaultArgs.Exec.Stdout.Contents) }) } func TestContainerExecWithEnvVariable(t *testing.T) { t.Parallel() res := struct { Container struct { From struct { WithEnvVariable struct { Exec struct { Stdout struct { Contents string } } } } } }{} err := testutil.Query( `{ container { from(address: "alpine:3.16.2") { withEnvVariable(name: "FOO", value: "bar") { exec(args: ["env"]) { stdout { contents } } } } } }`, &res, nil) require.NoError(t, err) require.Contains(t, res.Container.From.WithEnvVariable.Exec.Stdout.Contents, "FOO=bar\n") } func TestContainerVariables(t *testing.T) { t.Parallel() res := struct { Container struct { From struct { EnvVariables []schema.EnvVariable Exec struct { Stdout struct { Contents string } } } } }{} err := testutil.Query( `{ container { from(address: "golang:1.18.2-alpine") { envVariables { name value } exec(args: ["env"]) { stdout { contents } } } } }`, &res, nil) require.NoError(t, err) require.Equal(t, []schema.EnvVariable{ {Name: "PATH", Value: "/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"}, {Name: "GOLANG_VERSION", Value: "1.18.2"}, {Name: "GOPATH", Value: "/go"}, }, res.Container.From.EnvVariables) require.Contains(t, res.Container.From.Exec.Stdout.Contents, "GOPATH=/go\n") } func TestContainerVariable(t *testing.T) { t.Parallel() res := struct { Container struct { From struct { EnvVariable *string } } }{} err := testutil.Query( `{ container { from(address: "golang:1.18.2-alpine") { envVariable(name: "GOLANG_VERSION") } } }`, &res, nil) require.NoError(t, err) require.NotNil(t, res.Container.From.EnvVariable) require.Equal(t, "1.18.2", *res.Container.From.EnvVariable) err = testutil.Query( `{ container { from(address: "golang:1.18.2-alpine") { envVariable(name: "UNKNOWN") } } }`, &res, nil) require.NoError(t, err) require.Nil(t, res.Container.From.EnvVariable) } func TestContainerWithoutVariable(t *testing.T) { t.Parallel() res := struct { Container struct { From struct { WithoutEnvVariable struct { EnvVariables []schema.EnvVariable Exec struct { Stdout struct { Contents string } } } } } }{} err := testutil.Query( `{ container { from(address: "golang:1.18.2-alpine") { withoutEnvVariable(name: "GOLANG_VERSION") { envVariables { name value } exec(args: ["env"]) { stdout { contents } } } } } }`, &res, nil) require.NoError(t, err) require.Equal(t, res.Container.From.WithoutEnvVariable.EnvVariables, []schema.EnvVariable{ {Name: "PATH", Value: "/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"}, {Name: "GOPATH", Value: "/go"}, }) require.NotContains(t, res.Container.From.WithoutEnvVariable.Exec.Stdout.Contents, "GOLANG_VERSION") } func TestContainerEnvVariablesReplace(t *testing.T) { t.Parallel() res := struct { Container struct { From struct { WithEnvVariable struct { EnvVariables []schema.EnvVariable Exec struct { Stdout struct { Contents string } } } } } }{} err := testutil.Query( `{ container { from(address: "golang:1.18.2-alpine") { withEnvVariable(name: "GOPATH", value: "/gone") { envVariables { name value } exec(args: ["env"]) { stdout { contents } } } } } }`, &res, nil) require.NoError(t, err) require.Equal(t, res.Container.From.WithEnvVariable.EnvVariables, []schema.EnvVariable{ {Name: "PATH", Value: "/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"}, {Name: "GOLANG_VERSION", Value: "1.18.2"}, {Name: "GOPATH", Value: "/gone"}, }) require.Contains(t, res.Container.From.WithEnvVariable.Exec.Stdout.Contents, "GOPATH=/gone\n") } func TestContainerWorkdir(t *testing.T) { t.Parallel() res := struct { Container struct { From struct { Workdir string Exec struct { Stdout struct { Contents string } } } } }{} err := testutil.Query( `{ container { from(address: "golang:1.18.2-alpine") { workdir exec(args: ["pwd"]) { stdout { contents } } } } }`, &res, nil) require.NoError(t, err) require.Equal(t, res.Container.From.Workdir, "/go") require.Equal(t, res.Container.From.Exec.Stdout.Contents, "/go\n") } func TestContainerWithWorkdir(t *testing.T) { t.Parallel() res := struct { Container struct { From struct { WithWorkdir struct { Workdir string Exec struct { Stdout struct { Contents string } } } } } }{} err := testutil.Query( `{ container { from(address: "golang:1.18.2-alpine") { withWorkdir(path: "/usr") { workdir exec(args: ["pwd"]) { stdout { contents } } } } } }`, &res, nil) require.NoError(t, err) require.Equal(t, res.Container.From.WithWorkdir.Workdir, "/usr") require.Equal(t, res.Container.From.WithWorkdir.Exec.Stdout.Contents, "/usr\n") } func TestContainerWithMountedDirectory(t *testing.T) { t.Parallel() dirRes := struct { Directory struct { WithNewFile struct { WithNewFile struct { ID string } } } }{} err := testutil.Query( `{ directory { withNewFile(path: "some-file", contents: "some-content") { withNewFile(path: "some-dir/sub-file", contents: "sub-content") { id } } } }`, &dirRes, nil) require.NoError(t, err) id := dirRes.Directory.WithNewFile.WithNewFile.ID execRes := struct { Container struct { From struct { WithMountedDirectory struct { Exec struct { Stdout struct { Contents string } Exec struct { Stdout struct { Contents string } } } } } } }{} err = testutil.Query( `query Test($id: DirectoryID!) { container { from(address: "alpine:3.16.2") { withMountedDirectory(path: "/mnt", source: $id) { exec(args: ["cat", "/mnt/some-file"]) { stdout { contents } exec(args: ["cat", "/mnt/some-dir/sub-file"]) { stdout { contents } } } } } } }`, &execRes, &testutil.QueryOptions{Variables: map[string]any{ "id": id, }}) require.NoError(t, err) require.Equal(t, "some-content", execRes.Container.From.WithMountedDirectory.Exec.Stdout.Contents) require.Equal(t, "sub-content", execRes.Container.From.WithMountedDirectory.Exec.Exec.Stdout.Contents) } func TestContainerWithMountedDirectorySourcePath(t *testing.T) { t.Parallel() dirRes := struct { Directory struct { WithNewFile struct { WithNewFile struct { Directory struct { ID string } } } } }{} err := testutil.Query( `{ directory { withNewFile(path: "some-file", contents: "some-content") { withNewFile(path: "some-dir/sub-file", contents: "sub-content") { directory(path: "some-dir") { id } } } } }`, &dirRes, nil) require.NoError(t, err) id := dirRes.Directory.WithNewFile.WithNewFile.Directory.ID execRes := struct { Container struct { From struct { WithMountedDirectory struct { Exec struct { Exec struct { Stdout struct { Contents string } } } } } } }{} err = testutil.Query( `query Test($id: DirectoryID!) { container { from(address: "alpine:3.16.2") { withMountedDirectory(path: "/mnt", source: $id) { exec(args: ["sh", "-c", "echo >> /mnt/sub-file; echo -n more-content >> /mnt/sub-file"]) { exec(args: ["cat", "/mnt/sub-file"]) { stdout { contents } } } } } } }`, &execRes, &testutil.QueryOptions{Variables: map[string]any{ "id": id, }}) require.NoError(t, err) require.Equal(t, "sub-content\nmore-content", execRes.Container.From.WithMountedDirectory.Exec.Exec.Stdout.Contents) } func TestContainerWithMountedDirectoryPropagation(t *testing.T) { t.Parallel() dirRes := struct { Directory struct { WithNewFile struct { ID core.DirectoryID } } }{} err := testutil.Query( `{ directory { withNewFile(path: "some-file", contents: "some-content") { id } } }`, &dirRes, nil) require.NoError(t, err) id := dirRes.Directory.WithNewFile.ID execRes := struct { Container struct { From struct { WithMountedDirectory struct { Exec struct { Stdout struct { Contents string } Exec struct { Exec struct { Stdout struct { Contents string } WithMountedDirectory struct { Exec struct { Stdout struct { Contents string } Exec struct { Stdout struct { Contents string } } } } } } } } } } }{} err = testutil.Query( `query Test($id: DirectoryID!) { container { from(address: "alpine:3.16.2") { withMountedDirectory(path: "/mnt", source: $id) { exec(args: ["cat", "/mnt/some-file"]) { # original content stdout { contents } exec(args: ["sh", "-c", "echo >> /mnt/some-file; echo -n more-content >> /mnt/some-file"]) { exec(args: ["cat", "/mnt/some-file"]) { # modified content should propagate stdout { contents } withMountedDirectory(path: "/mnt", source: $id) { exec(args: ["cat", "/mnt/some-file"]) { # should be back to the original content stdout { contents } exec(args: ["cat", "/mnt/some-file"]) { # original content override should propagate stdout { contents } } } } } } } } } } }`, &execRes, &testutil.QueryOptions{Variables: map[string]any{ "id": id, }}) require.NoError(t, err) require.Equal(t, "some-content", execRes.Container.From.WithMountedDirectory.Exec.Stdout.Contents) require.Equal(t, "some-content\nmore-content", execRes.Container.From.WithMountedDirectory.Exec.Exec.Exec.Stdout.Contents) require.Equal(t, "some-content", execRes.Container.From.WithMountedDirectory.Exec.Exec.Exec.WithMountedDirectory.Exec.Stdout.Contents) require.Equal(t, "some-content", execRes.Container.From.WithMountedDirectory.Exec.Exec.Exec.WithMountedDirectory.Exec.Exec.Stdout.Contents) } func TestContainerWithMountedFile(t *testing.T) { t.Parallel() dirRes := struct { Directory struct { WithNewFile struct { File struct { ID core.FileID } } } }{} err := testutil.Query( `{ directory { withNewFile(path: "some-dir/sub-file", contents: "sub-content") { file(path: "some-dir/sub-file") { id } } } }`, &dirRes, nil) require.NoError(t, err) id := dirRes.Directory.WithNewFile.File.ID execRes := struct { Container struct { From struct { WithMountedFile struct { Exec struct { Stdout struct { Contents string } } } } } }{} err = testutil.Query( `query Test($id: FileID!) { container { from(address: "alpine:3.16.2") { withMountedFile(path: "/mnt/file", source: $id) { exec(args: ["cat", "/mnt/file"]) { stdout { contents } } } } } }`, &execRes, &testutil.QueryOptions{Variables: map[string]any{ "id": id, }}) require.NoError(t, err) require.Equal(t, "sub-content", execRes.Container.From.WithMountedFile.Exec.Stdout.Contents) } func TestContainerWithMountedCache(t *testing.T) { t.Parallel() cacheID := newCache(t) execRes := struct { Container struct { From struct { WithEnvVariable struct { WithMountedCache struct { Exec struct { Stdout struct { Contents string } } } } } } }{} query := `query Test($cache: CacheID!, $rand: String!) { container { from(address: "alpine:3.16.2") { withEnvVariable(name: "RAND", value: $rand) { withMountedCache(path: "/mnt/cache", cache: $cache) { exec(args: ["sh", "-c", "echo $RAND >> /mnt/cache/file; cat /mnt/cache/file"]) { stdout { contents } } } } } } }` rand1 := identity.NewID() err := testutil.Query(query, &execRes, &testutil.QueryOptions{Variables: map[string]any{ "cache": cacheID, "rand": rand1, }}) require.NoError(t, err) require.Equal(t, rand1+"\n", execRes.Container.From.WithEnvVariable.WithMountedCache.Exec.Stdout.Contents) rand2 := identity.NewID() err = testutil.Query(query, &execRes, &testutil.QueryOptions{Variables: map[string]any{ "cache": cacheID, "rand": rand2, }}) require.NoError(t, err) require.Equal(t, rand1+"\n"+rand2+"\n", execRes.Container.From.WithEnvVariable.WithMountedCache.Exec.Stdout.Contents) } func TestContainerWithMountedCacheFromDirectory(t *testing.T) { t.Parallel() dirRes := struct { Directory struct { WithNewFile struct { Directory struct { ID core.FileID } } } }{} err := testutil.Query( `{ directory { withNewFile(path: "some-dir/sub-file", contents: "initial-content\n") { directory(path: "some-dir") { id } } } }`, &dirRes, nil) require.NoError(t, err) initialID := dirRes.Directory.WithNewFile.Directory.ID cacheID := newCache(t) execRes := struct { Container struct { From struct { WithEnvVariable struct { WithMountedCache struct { Exec struct { Stdout struct { Contents string } } } } } } }{} query := `query Test($cache: CacheID!, $rand: String!, $init: DirectoryID!) { container { from(address: "alpine:3.16.2") { withEnvVariable(name: "RAND", value: $rand) { withMountedCache(path: "/mnt/cache", cache: $cache, source: $init) { exec(args: ["sh", "-c", "echo $RAND >> /mnt/cache/sub-file; cat /mnt/cache/sub-file"]) { stdout { contents } } } } } } }` rand1 := identity.NewID() err = testutil.Query(query, &execRes, &testutil.QueryOptions{Variables: map[string]any{ "init": initialID, "rand": rand1, "cache": cacheID, }}) require.NoError(t, err) require.Equal(t, "initial-content\n"+rand1+"\n", execRes.Container.From.WithEnvVariable.WithMountedCache.Exec.Stdout.Contents) rand2 := identity.NewID() err = testutil.Query(query, &execRes, &testutil.QueryOptions{Variables: map[string]any{ "init": initialID, "rand": rand2, "cache": cacheID, }}) require.NoError(t, err) require.Equal(t, "initial-content\n"+rand1+"\n"+rand2+"\n", execRes.Container.From.WithEnvVariable.WithMountedCache.Exec.Stdout.Contents) } func TestContainerWithMountedTemp(t *testing.T) { t.Parallel() execRes := struct { Container struct { From struct { WithMountedTemp struct { Exec struct { Stdout struct { Contents string } } } } } }{} err := testutil.Query(`{ container { from(address: "alpine:3.16.2") { withMountedTemp(path: "/mnt/tmp") { exec(args: ["grep", "/mnt/tmp", "/proc/mounts"]) { stdout { contents } } } } } }`, &execRes, nil) require.NoError(t, err) require.Contains(t, execRes.Container.From.WithMountedTemp.Exec.Stdout.Contents, "tmpfs /mnt/tmp tmpfs") } func TestContainerMountsWithoutMount(t *testing.T) { t.Parallel() dirRes := struct { Directory struct { WithNewFile struct { WithNewFile struct { ID string } } } }{} err := testutil.Query( `{ directory { withNewFile(path: "some-file", contents: "some-content") { withNewFile(path: "some-dir/sub-file", contents: "sub-content") { id } } } }`, &dirRes, nil) require.NoError(t, err) id := dirRes.Directory.WithNewFile.WithNewFile.ID execRes := struct { Container struct { From struct { WithMountedTemp struct { Mounts []string WithMountedDirectory struct { Mounts []string Exec struct { Stdout struct { Contents string } WithoutMount struct { Mounts []string Exec struct { Stdout struct { Contents string } } } } } } } } }{} err = testutil.Query( `query Test($id: DirectoryID!) { container { from(address: "alpine:3.16.2") { withMountedTemp(path: "/mnt/tmp") { mounts withMountedDirectory(path: "/mnt/dir", source: $id) { mounts exec(args: ["ls", "/mnt/dir"]) { stdout { contents } withoutMount(path: "/mnt/dir") { mounts exec(args: ["ls", "/mnt/dir"]) { stdout { contents } } } } } } } } }`, &execRes, &testutil.QueryOptions{Variables: map[string]any{ "id": id, }}) require.NoError(t, err) require.Equal(t, []string{"/mnt/tmp"}, execRes.Container.From.WithMountedTemp.Mounts) require.Equal(t, []string{"/mnt/tmp", "/mnt/dir"}, execRes.Container.From.WithMountedTemp.WithMountedDirectory.Mounts) require.Equal(t, "some-dir\nsome-file\n", execRes.Container.From.WithMountedTemp.WithMountedDirectory.Exec.Stdout.Contents) require.Equal(t, "", execRes.Container.From.WithMountedTemp.WithMountedDirectory.Exec.WithoutMount.Exec.Stdout.Contents) require.Equal(t, []string{"/mnt/tmp"}, execRes.Container.From.WithMountedTemp.WithMountedDirectory.Exec.WithoutMount.Mounts) } func TestContainerReplacedMounts(t *testing.T) { t.Parallel() c, ctx := connect(t) defer c.Close() lower := c.Directory().WithNewFile("some-file", dagger.DirectoryWithNewFileOpts{ Contents: "lower-content", }) upper := c.Directory().WithNewFile("some-file", dagger.DirectoryWithNewFileOpts{ Contents: "upper-content", }) ctr := c.Container(). From("alpine:3.16.2"). WithMountedDirectory("/mnt/dir", lower) t.Run("initial content is lower", func(t *testing.T) { mnts, err := ctr.Mounts(ctx) require.NoError(t, err) require.Equal(t, []string{"/mnt/dir"}, mnts) out, err := ctr.Exec(dagger.ContainerExecOpts{ Args: []string{"cat", "/mnt/dir/some-file"}, }).Stdout().Contents(ctx) require.NoError(t, err) require.Equal(t, "lower-content", out) }) replaced := ctr.WithMountedDirectory("/mnt/dir", upper) t.Run("mounts of same path are replaced", func(t *testing.T) { mnts, err := replaced.Mounts(ctx) require.NoError(t, err) require.Equal(t, []string{"/mnt/dir"}, mnts) out, err := replaced.Exec(dagger.ContainerExecOpts{ Args: []string{"cat", "/mnt/dir/some-file"}, }).Stdout().Contents(ctx) require.NoError(t, err) require.Equal(t, "upper-content", out) }) t.Run("removing a replaced mount does not reveal previous mount", func(t *testing.T) { removed := replaced.WithoutMount("/mnt/dir") mnts, err := removed.Mounts(ctx) require.NoError(t, err) require.Empty(t, mnts) }) clobberedDir := c.Directory().WithNewFile("some-file", dagger.DirectoryWithNewFileOpts{ Contents: "clobbered-content", }) clobbered := replaced.WithMountedDirectory("/mnt", clobberedDir) t.Run("replacing parent of a mount clobbers child", func(t *testing.T) { mnts, err := clobbered.Mounts(ctx) require.NoError(t, err) require.Equal(t, []string{"/mnt"}, mnts) out, err := clobbered.Exec(dagger.ContainerExecOpts{ Args: []string{"cat", "/mnt/some-file"}, }).Stdout().Contents(ctx) require.NoError(t, err) require.Equal(t, "clobbered-content", out) }) clobberedSubDir := c.Directory().WithNewFile("some-file", dagger.DirectoryWithNewFileOpts{ Contents: "clobbered-sub-content", }) clobberedSub := clobbered.WithMountedDirectory("/mnt/dir", clobberedSubDir) t.Run("restoring mount under clobbered mount", func(t *testing.T) { mnts, err := clobberedSub.Mounts(ctx) require.NoError(t, err) require.Equal(t, []string{"/mnt", "/mnt/dir"}, mnts) out, err := clobberedSub.Exec(dagger.ContainerExecOpts{ Args: []string{"cat", "/mnt/dir/some-file"}, }).Stdout().Contents(ctx) require.NoError(t, err) require.Equal(t, "clobbered-sub-content", out) }) } func TestContainerDirectory(t *testing.T) { t.Parallel() dirRes := struct { Directory struct { WithNewFile struct { WithNewFile struct { ID core.DirectoryID } } } }{} err := testutil.Query( `{ directory { withNewFile(path: "some-file", contents: "some-content") { withNewFile(path: "some-dir/sub-file", contents: "sub-content") { id } } } }`, &dirRes, nil) require.NoError(t, err) id := dirRes.Directory.WithNewFile.WithNewFile.ID writeRes := struct { Container struct { From struct { WithMountedDirectory struct { WithMountedDirectory struct { Exec struct { Directory struct { ID core.DirectoryID } } } } } } }{} err = testutil.Query( `query Test($id: DirectoryID!) { container { from(address: "alpine:3.16.2") { withMountedDirectory(path: "/mnt/dir", source: $id) { withMountedDirectory(path: "/mnt/dir/overlap", source: $id) { exec(args: ["sh", "-c", "echo hello >> /mnt/dir/overlap/another-file"]) { directory(path: "/mnt/dir/overlap") { id } } } } } } }`, &writeRes, &testutil.QueryOptions{Variables: map[string]any{ "id": id, }}) require.NoError(t, err) writtenID := writeRes.Container.From.WithMountedDirectory.WithMountedDirectory.Exec.Directory.ID execRes := struct { Container struct { From struct { WithMountedDirectory struct { Exec struct { Stdout struct { Contents string } } } } } }{} err = testutil.Query( `query Test($id: DirectoryID!) { container { from(address: "alpine:3.16.2") { withMountedDirectory(path: "/mnt/dir", source: $id) { exec(args: ["cat", "/mnt/dir/another-file"]) { stdout { contents } } } } } }`, &execRes, &testutil.QueryOptions{Variables: map[string]any{ "id": writtenID, }}) require.NoError(t, err) require.Equal(t, "hello\n", execRes.Container.From.WithMountedDirectory.Exec.Stdout.Contents) } func TestContainerDirectoryErrors(t *testing.T) { t.Parallel() dirRes := struct { Directory struct { WithNewFile struct { WithNewFile struct { ID core.DirectoryID } } } }{} err := testutil.Query( `{ directory { withNewFile(path: "some-file", contents: "some-content") { withNewFile(path: "some-dir/sub-file", contents: "sub-content") { id } } } }`, &dirRes, nil) require.NoError(t, err) id := dirRes.Directory.WithNewFile.WithNewFile.ID err = testutil.Query( `query Test($id: DirectoryID!) { container { from(address: "alpine:3.16.2") { withMountedDirectory(path: "/mnt/dir", source: $id) { directory(path: "/mnt/dir/some-file") { id } } } } }`, nil, &testutil.QueryOptions{Variables: map[string]any{ "id": id, }}) require.Error(t, err) require.Contains(t, err.Error(), "path /mnt/dir/some-file is a file, not a directory") err = testutil.Query( `query Test($id: DirectoryID!) { container { from(address: "alpine:3.16.2") { withMountedDirectory(path: "/mnt/dir", source: $id) { directory(path: "/mnt/dir/bogus") { id } } } } }`, nil, &testutil.QueryOptions{Variables: map[string]any{ "id": id, }}) require.Error(t, err) require.Contains(t, err.Error(), "bogus: no such file or directory") err = testutil.Query( `{ container { from(address: "alpine:3.16.2") { withMountedTemp(path: "/mnt/tmp") { directory(path: "/mnt/tmp/bogus") { id } } } } }`, nil, nil) require.Error(t, err) require.Contains(t, err.Error(), "bogus: cannot retrieve path from tmpfs") cacheID := newCache(t) err = testutil.Query( `query Test($cache: CacheID!) { container { from(address: "alpine:3.16.2") { withMountedCache(path: "/mnt/cache", cache: $cache) { directory(path: "/mnt/cache/bogus") { id } } } } }`, nil, &testutil.QueryOptions{Variables: map[string]any{ "cache": cacheID, }}) require.Error(t, err) require.Contains(t, err.Error(), "bogus: cannot retrieve path from cache") } func TestContainerDirectorySourcePath(t *testing.T) { t.Parallel() dirRes := struct { Directory struct { WithNewFile struct { Directory struct { ID core.DirectoryID } } } }{} err := testutil.Query( `{ directory { withNewFile(path: "some-dir/sub-dir/sub-file", contents: "sub-content\n") { directory(path: "some-dir") { id } } } }`, &dirRes, nil) require.NoError(t, err) id := dirRes.Directory.WithNewFile.Directory.ID writeRes := struct { Container struct { From struct { WithMountedDirectory struct { Exec struct { Directory struct { ID core.DirectoryID } } } } } }{} err = testutil.Query( `query Test($id: DirectoryID!) { container { from(address: "alpine:3.16.2") { withMountedDirectory(path: "/mnt/dir", source: $id) { exec(args: ["sh", "-c", "echo more-content >> /mnt/dir/sub-dir/sub-file"]) { directory(path: "/mnt/dir/sub-dir") { id } } } } } }`, &writeRes, &testutil.QueryOptions{Variables: map[string]any{ "id": id, }}) require.NoError(t, err) writtenID := writeRes.Container.From.WithMountedDirectory.Exec.Directory.ID execRes := struct { Container struct { From struct { WithMountedDirectory struct { Exec struct { Stdout struct { Contents string } } } } } }{} err = testutil.Query( `query Test($id: DirectoryID!) { container { from(address: "alpine:3.16.2") { withMountedDirectory(path: "/mnt/dir", source: $id) { exec(args: ["cat", "/mnt/dir/sub-file"]) { stdout { contents } } } } } }`, &execRes, &testutil.QueryOptions{Variables: map[string]any{ "id": writtenID, }}) require.NoError(t, err) require.Equal(t, "sub-content\nmore-content\n", execRes.Container.From.WithMountedDirectory.Exec.Stdout.Contents) } func TestContainerFile(t *testing.T) { t.Parallel() id := newDirWithFile(t, "some-file", "some-content-") writeRes := struct { Container struct { From struct { WithMountedDirectory struct { WithMountedDirectory struct { Exec struct { File struct { ID core.FileID } } } } } } }{} err := testutil.Query( `query Test($id: DirectoryID!) { container { from(address: "alpine:3.16.2") { withMountedDirectory(path: "/mnt/dir", source: $id) { withMountedDirectory(path: "/mnt/dir/overlap", source: $id) { exec(args: ["sh", "-c", "echo -n appended >> /mnt/dir/overlap/some-file"]) { file(path: "/mnt/dir/overlap/some-file") { id } } } } } } }`, &writeRes, &testutil.QueryOptions{Variables: map[string]any{ "id": id, }}) require.NoError(t, err) writtenID := writeRes.Container.From.WithMountedDirectory.WithMountedDirectory.Exec.File.ID execRes := struct { Container struct { From struct { WithMountedFile struct { Exec struct { Stdout struct { Contents string } } } } } }{} err = testutil.Query( `query Test($id: FileID!) { container { from(address: "alpine:3.16.2") { withMountedFile(path: "/mnt/file", source: $id) { exec(args: ["cat", "/mnt/file"]) { stdout { contents } } } } } }`, &execRes, &testutil.QueryOptions{Variables: map[string]any{ "id": writtenID, }}) require.NoError(t, err) require.Equal(t, "some-content-appended", execRes.Container.From.WithMountedFile.Exec.Stdout.Contents) } func TestContainerFileErrors(t *testing.T) { t.Parallel() id := newDirWithFile(t, "some-file", "some-content") err := testutil.Query( `query Test($id: DirectoryID!) { container { from(address: "alpine:3.16.2") { withMountedDirectory(path: "/mnt/dir", source: $id) { file(path: "/mnt/dir/bogus") { id } } } } }`, nil, &testutil.QueryOptions{Variables: map[string]any{ "id": id, }}) require.Error(t, err) require.Contains(t, err.Error(), "bogus: no such file or directory") err = testutil.Query( `query Test($id: DirectoryID!) { container { from(address: "alpine:3.16.2") { withMountedDirectory(path: "/mnt/dir", source: $id) { file(path: "/mnt/dir") { id } } } } }`, nil, &testutil.QueryOptions{Variables: map[string]any{ "id": id, }}) require.Error(t, err) require.Contains(t, err.Error(), "path /mnt/dir is a directory, not a file") err = testutil.Query( `{ container { from(address: "alpine:3.16.2") { withMountedTemp(path: "/mnt/tmp") { file(path: "/mnt/tmp/bogus") { id } } } } }`, nil, nil) require.Error(t, err) require.Contains(t, err.Error(), "bogus: cannot retrieve path from tmpfs") cacheID := newCache(t) err = testutil.Query( `query Test($cache: CacheID!) { container { from(address: "alpine:3.16.2") { withMountedCache(path: "/mnt/cache", cache: $cache) { file(path: "/mnt/cache/bogus") { id } } } } }`, nil, &testutil.QueryOptions{Variables: map[string]any{ "cache": cacheID, }}) require.Error(t, err) require.Contains(t, err.Error(), "bogus: cannot retrieve path from cache") secretID := newSecret(t, "some-secret") err = testutil.Query( `query Test($secret: SecretID!) { container { from(address: "alpine:3.16.2") { withMountedSecret(path: "/sekret", source: $secret) { file(path: "/sekret") { contents } } } } }`, nil, &testutil.QueryOptions{Variables: map[string]any{ "secret": secretID, }}) require.Error(t, err) require.Contains(t, err.Error(), "sekret: no such file or directory") } func TestContainerFSDirectory(t *testing.T) { t.Parallel() dirRes := struct { Container struct { From struct { Directory struct { ID core.DirectoryID } } } }{} err := testutil.Query( `{ container { from(address: "alpine:3.16.2") { directory(path: "/etc") { id } } } }`, &dirRes, nil) require.NoError(t, err) etcID := dirRes.Container.From.Directory.ID execRes := struct { Container struct { From struct { WithMountedDirectory struct { Exec struct { Stdout struct { Contents string } } } } } }{} err = testutil.Query( `query Test($id: DirectoryID!) { container { from(address: "alpine:3.16.2") { withMountedDirectory(path: "/mnt/etc", source: $id) { exec(args: ["cat", "/mnt/etc/alpine-release"]) { stdout { contents } } } } } }`, &execRes, &testutil.QueryOptions{Variables: map[string]any{ "id": etcID, }}) require.NoError(t, err) require.Equal(t, "3.16.2\n", execRes.Container.From.WithMountedDirectory.Exec.Stdout.Contents) } func TestContainerRelativePaths(t *testing.T) { t.Parallel() dirRes := struct { Directory struct { WithNewFile struct { ID core.DirectoryID } } }{} err := testutil.Query( `{ directory { withNewFile(path: "some-file", contents: "some-content") { id } } }`, &dirRes, nil) require.NoError(t, err) id := dirRes.Directory.WithNewFile.ID writeRes := struct { Container struct { From struct { Exec struct { WithWorkdir struct { WithWorkdir struct { Workdir string WithMountedDirectory struct { WithMountedTemp struct { WithMountedCache struct { Mounts []string Exec struct { Directory struct { ID core.DirectoryID } } WithoutMount struct { Mounts []string } } } } } } } } } }{} cacheID := newCache(t) err = testutil.Query( `query Test($id: DirectoryID!, $cache: CacheID!) { container { from(address: "alpine:3.16.2") { exec(args: ["mkdir", "-p", "/mnt/sub"]) { withWorkdir(path: "/mnt") { withWorkdir(path: "sub") { workdir withMountedDirectory(path: "dir", source: $id) { withMountedTemp(path: "tmp") { withMountedCache(path: "cache", cache: $cache) { mounts exec(args: ["touch", "dir/another-file"]) { directory(path: "dir") { id } } withoutMount(path: "cache") { mounts } } } } } } } } } }`, &writeRes, &testutil.QueryOptions{Variables: map[string]any{ "id": id, "cache": cacheID, }}) require.NoError(t, err) require.Equal(t, []string{"/mnt/sub/dir", "/mnt/sub/tmp", "/mnt/sub/cache"}, writeRes.Container.From.Exec.WithWorkdir.WithWorkdir.WithMountedDirectory.WithMountedTemp.WithMountedCache.Mounts) require.Equal(t, []string{"/mnt/sub/dir", "/mnt/sub/tmp"}, writeRes.Container.From.Exec.WithWorkdir.WithWorkdir.WithMountedDirectory.WithMountedTemp.WithMountedCache.WithoutMount.Mounts) writtenID := writeRes.Container.From.Exec.WithWorkdir.WithWorkdir.WithMountedDirectory.WithMountedTemp.WithMountedCache.Exec.Directory.ID execRes := struct { Container struct { From struct { WithMountedDirectory struct { Exec struct { Stdout struct { Contents string } } } } } }{} err = testutil.Query( `query Test($id: DirectoryID!) { container { from(address: "alpine:3.16.2") { withMountedDirectory(path: "/mnt/dir", source: $id) { exec(args: ["ls", "/mnt/dir"]) { stdout { contents } } } } } }`, &execRes, &testutil.QueryOptions{Variables: map[string]any{ "id": writtenID, }}) require.NoError(t, err) require.Equal(t, "another-file\nsome-file\n", execRes.Container.From.WithMountedDirectory.Exec.Stdout.Contents) } func TestContainerMultiFrom(t *testing.T) { t.Parallel() dirRes := struct { Directory struct { ID core.DirectoryID } }{} err := testutil.Query( `{ directory { id } }`, &dirRes, nil) require.NoError(t, err) id := dirRes.Directory.ID execRes := struct { Container struct { From struct { WithMountedDirectory struct { Exec struct { From struct { Exec struct { Exec struct { Stdout struct { Contents string } } } } } } } } }{} err = testutil.Query( `query Test($id: DirectoryID!) { container { from(address: "node:18.10.0-alpine") { withMountedDirectory(path: "/mnt", source: $id) { exec(args: ["sh", "-c", "node --version >> /mnt/versions"]) { from(address: "golang:1.18.2-alpine") { exec(args: ["sh", "-c", "go version >> /mnt/versions"]) { exec(args: ["cat", "/mnt/versions"]) { stdout { contents } } } } } } } } }`, &execRes, &testutil.QueryOptions{Variables: map[string]any{ "id": id, }}) require.NoError(t, err) require.Contains(t, execRes.Container.From.WithMountedDirectory.Exec.From.Exec.Exec.Stdout.Contents, "v18.10.0\n") require.Contains(t, execRes.Container.From.WithMountedDirectory.Exec.From.Exec.Exec.Stdout.Contents, "go version go1.18.2") } func TestContainerPublish(t *testing.T) { ctx := context.Background() c, err := dagger.Connect(ctx) require.NoError(t, err) defer c.Close() // FIXME:(sipsma) this test is a bit hacky+brittle, but unless we push to a real registry // or flesh out the idea of local services, it's probably the best we can do for now. // include a random ID so it runs every time (hack until we have no-cache or equivalent support) randomID := identity.NewID() go func() { _, err := c.Container(). From("registry:2"). WithEnvVariable("RANDOM", randomID). Exec(). ExitCode(ctx) if err != nil { t.Logf("error running registry: %v", err) } }() _, err = c.Container(). From("alpine:3.16.2"). WithEnvVariable("RANDOM", randomID). Exec(dagger.ContainerExecOpts{ Args: []string{"sh", "-c", "for i in $(seq 1 60); do nc -zv 127.0.0.1 5000 && exit 0; sleep 1; done; exit 1"}, }). ExitCode(ctx) require.NoError(t, err) testRef := "127.0.0.1:5000/testimagepush:latest" pushedRef, err := c.Container(). From("alpine:3.16.2"). Publish(ctx, testRef) require.NoError(t, err) require.NotEqual(t, testRef, pushedRef) require.Contains(t, pushedRef, "@sha256:") contents, err := c.Container(). From(pushedRef).FS().File("/etc/alpine-release").Contents(ctx) require.NoError(t, err) require.Equal(t, contents, "3.16.2\n") } func TestContainerMultipleMounts(t *testing.T) { c, ctx := connect(t) defer c.Close() dir := t.TempDir() require.NoError(t, os.WriteFile(filepath.Join(dir, "one"), []byte("1"), 0600)) require.NoError(t, os.WriteFile(filepath.Join(dir, "two"), []byte("2"), 0600)) require.NoError(t, os.WriteFile(filepath.Join(dir, "three"), []byte("3"), 0600)) one := c.Host().Directory(dir).File("one") two := c.Host().Directory(dir).File("two") three := c.Host().Directory(dir).File("three") build := c.Container().From("alpine:3.16.2"). WithMountedFile("/example/one", one). WithMountedFile("/example/two", two). WithMountedFile("/example/three", three) build = build.Exec(dagger.ContainerExecOpts{ Args: []string{"ls", "/example/one", "/example/two", "/example/three"}, }) build = build.Exec(dagger.ContainerExecOpts{ Args: []string{"cat", "/example/one", "/example/two", "/example/three"}, }) out, err := build.Stdout().Contents(ctx) require.NoError(t, err) require.Equal(t, "123", out) } func TestContainerExport(t *testing.T) { t.Parallel() ctx := context.Background() wd := t.TempDir() dest := t.TempDir() c, err := dagger.Connect(ctx, dagger.WithWorkdir(wd)) require.NoError(t, err) defer c.Close() ctr := c.Container().From("alpine:3.16.2") t.Run("to absolute dir", func(t *testing.T) { imagePath := filepath.Join(dest, "image.tar") ok, err := ctr.Export(ctx, imagePath) require.NoError(t, err) require.True(t, ok) entries := tarEntries(t, imagePath) require.Contains(t, entries, "oci-layout") require.Contains(t, entries, "index.json") // a single-platform image can include a manifest.json, making it // compatible with docker load require.Contains(t, entries, "manifest.json") }) t.Run("to workdir", func(t *testing.T) { ok, err := ctr.Export(ctx, "./image.tar") require.NoError(t, err) require.True(t, ok) entries := tarEntries(t, filepath.Join(wd, "image.tar")) require.Contains(t, entries, "oci-layout") require.Contains(t, entries, "index.json") require.Contains(t, entries, "manifest.json") }) t.Run("to outer dir", func(t *testing.T) { ok, err := ctr.Export(ctx, "../") require.Error(t, err) require.False(t, ok) }) } func TestContainerMultiPlatformExport(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() c, err := dagger.Connect(ctx, dagger.WithLogOutput(os.Stdout)) require.NoError(t, err) defer c.Close() startRegistry(ctx, c, t) variants := make([]*dagger.Container, 0, len(platformToUname)) for platform := range platformToUname { ctr := c.Container(dagger.ContainerOpts{Platform: platform}). From("alpine:3.16.2"). Exec(dagger.ContainerExecOpts{ Args: []string{"uname", "-m"}, }) variants = append(variants, ctr) } dest := filepath.Join(t.TempDir(), "image.tar") ok, err := c.Container().Export(ctx, dest, dagger.ContainerExportOpts{ PlatformVariants: variants, }) require.NoError(t, err) require.True(t, ok) entries := tarEntries(t, dest) require.Contains(t, entries, "oci-layout") require.Contains(t, entries, "index.json") // multi-platform images don't contain a manifest.json require.NotContains(t, entries, "manifest.json") }
closed
dagger/dagger
https://github.com/dagger/dagger
3,393
Fix build of shim when execing on non-platform specific llb state
from @marcosnils ``` query Build($file: FileID!, $ref: ContainerAddress!) { container { withMountedFile(path: "/mnt/dagger", source: $file) { exec(args: ["cp", "/mnt/dagger", "/dagger"]) { withEntrypoint(args: ["dagger"]) { publish(address: $ref) } } } } } ``` results in ``` { "data": null, "errors": [ { "message": "build shim: failed to parse target platform unknown: \"unknown\": unknown operating system or architecture: invalid argument", "locations": [ { "line": 4, "column": 7 } ], "path": [ "container", "withMountedFile", "exec" ] } ] } ``` The above query should fail since there's no fs on which to execute `cp` but it shouldn't fail by not being able to build the shim. It's also should be possible in general to, e.g. start at scratch, unpack a static binary and exec it, in which case this shouldn't even be an error case at all.
https://github.com/dagger/dagger/issues/3393
https://github.com/dagger/dagger/pull/3399
51c7941c3c8e7c2ac4242f5c41cec5a56d17e9d3
f8b3c63637cfcca2ec677fea2e020885664bd301
"2022-10-14T22:29:08Z"
go
"2022-11-10T06:01:37Z"
core/schema/container.go
package schema import ( "fmt" "path" "strings" "github.com/dagger/dagger/core" "github.com/dagger/dagger/router" specs "github.com/opencontainers/image-spec/specs-go/v1" ) type containerSchema struct { *baseSchema host *core.Host } var _ router.ExecutableSchema = &containerSchema{} func (s *containerSchema) Name() string { return "container" } func (s *containerSchema) Schema() string { return Container } func (s *containerSchema) Resolvers() router.Resolvers { return router.Resolvers{ "ContainerID": stringResolver(core.ContainerID("")), "Query": router.ObjectResolver{ "container": router.ToResolver(s.container), }, "Container": router.ObjectResolver{ "from": router.ToResolver(s.from), "build": router.ToResolver(s.build), "fs": router.ToResolver(s.fs), "withFS": router.ToResolver(s.withFS), "file": router.ToResolver(s.file), "directory": router.ToResolver(s.directory), "user": router.ToResolver(s.user), "withUser": router.ToResolver(s.withUser), "workdir": router.ToResolver(s.workdir), "withWorkdir": router.ToResolver(s.withWorkdir), "envVariables": router.ToResolver(s.envVariables), "envVariable": router.ToResolver(s.envVariable), "withEnvVariable": router.ToResolver(s.withEnvVariable), "withSecretVariable": router.ToResolver(s.withSecretVariable), "withoutEnvVariable": router.ToResolver(s.withoutEnvVariable), "entrypoint": router.ToResolver(s.entrypoint), "withEntrypoint": router.ToResolver(s.withEntrypoint), "defaultArgs": router.ToResolver(s.defaultArgs), "withDefaultArgs": router.ToResolver(s.withDefaultArgs), "mounts": router.ToResolver(s.mounts), "withMountedDirectory": router.ToResolver(s.withMountedDirectory), "withMountedFile": router.ToResolver(s.withMountedFile), "withMountedTemp": router.ToResolver(s.withMountedTemp), "withMountedCache": router.ToResolver(s.withMountedCache), "withMountedSecret": router.ToResolver(s.withMountedSecret), "withoutMount": router.ToResolver(s.withoutMount), "exec": router.ToResolver(s.exec), "exitCode": router.ToResolver(s.exitCode), "stdout": router.ToResolver(s.stdout), "stderr": router.ToResolver(s.stderr), "publish": router.ToResolver(s.publish), "platform": router.ToResolver(s.platform), "export": router.ToResolver(s.export), }, } } func (s *containerSchema) Dependencies() []router.ExecutableSchema { return nil } type containerArgs struct { ID core.ContainerID Platform *specs.Platform } func (s *containerSchema) container(ctx *router.Context, parent any, args containerArgs) (*core.Container, error) { platform := s.baseSchema.platform if args.Platform != nil { if args.ID != "" { return nil, fmt.Errorf("cannot specify both existing container ID and platform") } platform = *args.Platform } return core.NewContainer(args.ID, platform) } type containerFromArgs struct { Address string } func (s *containerSchema) from(ctx *router.Context, parent *core.Container, args containerFromArgs) (*core.Container, error) { return parent.From(ctx, s.gw, args.Address) } type containerBuildArgs struct { Context core.DirectoryID Dockerfile string } func (s *containerSchema) build(ctx *router.Context, parent *core.Container, args containerBuildArgs) (*core.Container, error) { return parent.Build(ctx, s.gw, &core.Directory{ID: args.Context}, args.Dockerfile) } func (s *containerSchema) withFS(ctx *router.Context, parent *core.Container, arg core.Directory) (*core.Container, error) { ctr, err := parent.WithFS(ctx, &arg) if err != nil { return nil, err } return ctr, nil } func (s *containerSchema) fs(ctx *router.Context, parent *core.Container, args any) (*core.Directory, error) { return parent.FS(ctx) } type containerExecArgs struct { core.ContainerExecOpts } func (s *containerSchema) exec(ctx *router.Context, parent *core.Container, args containerExecArgs) (*core.Container, error) { return parent.Exec(ctx, s.gw, args.ContainerExecOpts) } func (s *containerSchema) exitCode(ctx *router.Context, parent *core.Container, args any) (*int, error) { return parent.ExitCode(ctx, s.gw) } func (s *containerSchema) stdout(ctx *router.Context, parent *core.Container, args any) (*core.File, error) { return parent.MetaFile(ctx, s.gw, "stdout") } func (s *containerSchema) stderr(ctx *router.Context, parent *core.Container, args any) (*core.File, error) { return parent.MetaFile(ctx, s.gw, "stderr") } type containerWithEntrypointArgs struct { Args []string } func (s *containerSchema) withEntrypoint(ctx *router.Context, parent *core.Container, args containerWithEntrypointArgs) (*core.Container, error) { return parent.UpdateImageConfig(ctx, func(cfg specs.ImageConfig) specs.ImageConfig { cfg.Entrypoint = args.Args return cfg }) } func (s *containerSchema) entrypoint(ctx *router.Context, parent *core.Container, args containerWithVariableArgs) ([]string, error) { cfg, err := parent.ImageConfig(ctx) if err != nil { return nil, err } return cfg.Entrypoint, nil } type containerWithDefaultArgs struct { Args *[]string } func (s *containerSchema) withDefaultArgs(ctx *router.Context, parent *core.Container, args containerWithDefaultArgs) (*core.Container, error) { return parent.UpdateImageConfig(ctx, func(cfg specs.ImageConfig) specs.ImageConfig { if args.Args == nil { cfg.Cmd = []string{} return cfg } cfg.Cmd = *args.Args return cfg }) } func (s *containerSchema) defaultArgs(ctx *router.Context, parent *core.Container, args any) ([]string, error) { cfg, err := parent.ImageConfig(ctx) if err != nil { return nil, err } return cfg.Cmd, nil } type containerWithUserArgs struct { Name string } func (s *containerSchema) withUser(ctx *router.Context, parent *core.Container, args containerWithUserArgs) (*core.Container, error) { return parent.UpdateImageConfig(ctx, func(cfg specs.ImageConfig) specs.ImageConfig { cfg.User = args.Name return cfg }) } func (s *containerSchema) user(ctx *router.Context, parent *core.Container, args containerWithVariableArgs) (string, error) { cfg, err := parent.ImageConfig(ctx) if err != nil { return "", err } return cfg.User, nil } type containerWithWorkdirArgs struct { Path string } func (s *containerSchema) withWorkdir(ctx *router.Context, parent *core.Container, args containerWithWorkdirArgs) (*core.Container, error) { return parent.UpdateImageConfig(ctx, func(cfg specs.ImageConfig) specs.ImageConfig { cfg.WorkingDir = absPath(cfg.WorkingDir, args.Path) return cfg }) } func (s *containerSchema) workdir(ctx *router.Context, parent *core.Container, args containerWithVariableArgs) (string, error) { cfg, err := parent.ImageConfig(ctx) if err != nil { return "", err } return cfg.WorkingDir, nil } type containerWithVariableArgs struct { Name string Value string } func (s *containerSchema) withEnvVariable(ctx *router.Context, parent *core.Container, args containerWithVariableArgs) (*core.Container, error) { return parent.UpdateImageConfig(ctx, func(cfg specs.ImageConfig) specs.ImageConfig { // NB(vito): buildkit handles replacing properly when we do llb.AddEnv, but // we want to replace it here anyway because someone might publish the image // instead of running it. (there's a test covering this!) newEnv := []string{} prefix := args.Name + "=" for _, env := range cfg.Env { if !strings.HasPrefix(env, prefix) { newEnv = append(newEnv, env) } } newEnv = append(newEnv, fmt.Sprintf("%s=%s", args.Name, args.Value)) cfg.Env = newEnv return cfg }) } type containerWithoutVariableArgs struct { Name string } func (s *containerSchema) withoutEnvVariable(ctx *router.Context, parent *core.Container, args containerWithoutVariableArgs) (*core.Container, error) { return parent.UpdateImageConfig(ctx, func(cfg specs.ImageConfig) specs.ImageConfig { removedEnv := []string{} prefix := args.Name + "=" for _, env := range cfg.Env { if !strings.HasPrefix(env, prefix) { removedEnv = append(removedEnv, env) } } cfg.Env = removedEnv return cfg }) } type EnvVariable struct { Name string `json:"name"` Value string `json:"value"` } func (s *containerSchema) envVariables(ctx *router.Context, parent *core.Container, args any) ([]EnvVariable, error) { cfg, err := parent.ImageConfig(ctx) if err != nil { return nil, err } vars := make([]EnvVariable, 0, len(cfg.Env)) for _, v := range cfg.Env { name, value, _ := strings.Cut(v, "=") e := EnvVariable{ Name: name, Value: value, } vars = append(vars, e) } return vars, nil } type containerVariableArgs struct { Name string } func (s *containerSchema) envVariable(ctx *router.Context, parent *core.Container, args containerVariableArgs) (*string, error) { cfg, err := parent.ImageConfig(ctx) if err != nil { return nil, err } for _, env := range cfg.Env { name, val, ok := strings.Cut(env, "=") if ok && name == args.Name { return &val, nil } } return nil, nil } type containerWithMountedDirectoryArgs struct { Path string Source core.DirectoryID } func (s *containerSchema) withMountedDirectory(ctx *router.Context, parent *core.Container, args containerWithMountedDirectoryArgs) (*core.Container, error) { return parent.WithMountedDirectory(ctx, args.Path, &core.Directory{ID: args.Source}) } type containerPublishArgs struct { Address string PlatformVariants []core.ContainerID } func (s *containerSchema) publish(ctx *router.Context, parent *core.Container, args containerPublishArgs) (string, error) { return parent.Publish(ctx, args.Address, args.PlatformVariants, s.bkClient, s.solveOpts, s.solveCh) } type containerWithMountedFileArgs struct { Path string Source core.FileID } func (s *containerSchema) withMountedFile(ctx *router.Context, parent *core.Container, args containerWithMountedFileArgs) (*core.Container, error) { return parent.WithMountedFile(ctx, args.Path, &core.File{ID: args.Source}) } type containerWithMountedCacheArgs struct { Path string Cache core.CacheID Source core.DirectoryID } func (s *containerSchema) withMountedCache(ctx *router.Context, parent *core.Container, args containerWithMountedCacheArgs) (*core.Container, error) { var dir *core.Directory if args.Source != "" { dir = &core.Directory{ID: args.Source} } return parent.WithMountedCache(ctx, args.Path, args.Cache, dir) } type containerWithMountedTempArgs struct { Path string } func (s *containerSchema) withMountedTemp(ctx *router.Context, parent *core.Container, args containerWithMountedTempArgs) (*core.Container, error) { return parent.WithMountedTemp(ctx, args.Path) } type containerWithoutMountArgs struct { Path string } func (s *containerSchema) withoutMount(ctx *router.Context, parent *core.Container, args containerWithoutMountArgs) (*core.Container, error) { return parent.WithoutMount(ctx, args.Path) } func (s *containerSchema) mounts(ctx *router.Context, parent *core.Container, _ any) ([]string, error) { return parent.Mounts(ctx) } type containerDirectoryArgs struct { Path string } func (s *containerSchema) directory(ctx *router.Context, parent *core.Container, args containerDirectoryArgs) (*core.Directory, error) { return parent.Directory(ctx, s.gw, args.Path) } type containerFileArgs struct { Path string } func (s *containerSchema) file(ctx *router.Context, parent *core.Container, args containerFileArgs) (*core.File, error) { return parent.File(ctx, s.gw, args.Path) } func absPath(workDir string, containerPath string) string { if path.IsAbs(containerPath) { return containerPath } if workDir == "" { workDir = "/" } return path.Join(workDir, containerPath) } type containerWithSecretVariableArgs struct { Name string Secret core.SecretID } func (s *containerSchema) withSecretVariable(ctx *router.Context, parent *core.Container, args containerWithSecretVariableArgs) (*core.Container, error) { return parent.WithSecretVariable(ctx, args.Name, &core.Secret{ID: args.Secret}) } type containerWithMountedSecretArgs struct { Path string Source core.SecretID } func (s *containerSchema) withMountedSecret(ctx *router.Context, parent *core.Container, args containerWithMountedSecretArgs) (*core.Container, error) { return parent.WithMountedSecret(ctx, args.Path, core.NewSecret(args.Source)) } func (s *containerSchema) platform(ctx *router.Context, parent *core.Container, args any) (specs.Platform, error) { return parent.Platform() } type containerExportArgs struct { Path string PlatformVariants []core.ContainerID } func (s *containerSchema) export(ctx *router.Context, parent *core.Container, args containerExportArgs) (bool, error) { if err := parent.Export(ctx, s.host, args.Path, args.PlatformVariants, s.bkClient, s.solveOpts, s.solveCh); err != nil { return false, err } return true, nil }
closed
dagger/dagger
https://github.com/dagger/dagger
3,719
NodeJS SDK : Publish NodeJS SDK to npm
Publishes the NodeJS SDK to the registry so that it can be installed by name. ex: `npm publish @dagger.io/nodejs-sdk` https://www.npmjs.com is the npm Registry that has a public collection of packages of open-source code for Node.js. In order to publish, follow the developer guide: https://docs.npmjs.com/cli/v9/using-npm/developers#the-packagejson-file Need to discuss everything related to the CI with github action (Test, build and publish to NPM). cc @gerhard Tasks: - [x] add a README.md - [x] LICENSE Npm automatically handles node_modules ignore. Do not add node_modules to .npmignore.
https://github.com/dagger/dagger/issues/3719
https://github.com/dagger/dagger/pull/3809
88e795da2c1b78e4b2b79f542a3233c57dd1fbed
dea51153c37566831d1075479f708d7d51bbcf5d
"2022-11-07T20:47:22Z"
go
"2022-11-15T20:39:32Z"
.github/workflows/publish-sdk-nodejs.yml
closed
dagger/dagger
https://github.com/dagger/dagger
3,719
NodeJS SDK : Publish NodeJS SDK to npm
Publishes the NodeJS SDK to the registry so that it can be installed by name. ex: `npm publish @dagger.io/nodejs-sdk` https://www.npmjs.com is the npm Registry that has a public collection of packages of open-source code for Node.js. In order to publish, follow the developer guide: https://docs.npmjs.com/cli/v9/using-npm/developers#the-packagejson-file Need to discuss everything related to the CI with github action (Test, build and publish to NPM). cc @gerhard Tasks: - [x] add a README.md - [x] LICENSE Npm automatically handles node_modules ignore. Do not add node_modules to .npmignore.
https://github.com/dagger/dagger/issues/3719
https://github.com/dagger/dagger/pull/3809
88e795da2c1b78e4b2b79f542a3233c57dd1fbed
dea51153c37566831d1075479f708d7d51bbcf5d
"2022-11-07T20:47:22Z"
go
"2022-11-15T20:39:32Z"
.gitignore
# General .DS_Store # Binaries for programs and plugins *.exe *.exe~ *.dll *.so *.dylib stub/stub # Test binary, build with `go test -c` *.test **/*/report.xml # Output of the go coverage tool, specifically when used with LiteIDE *.out # vscode .vscode # intellij .idea # vim-obsession Session.vim # js node_modules # python .venv __pycache__ # Built Binary /bin
closed
dagger/dagger
https://github.com/dagger/dagger
3,719
NodeJS SDK : Publish NodeJS SDK to npm
Publishes the NodeJS SDK to the registry so that it can be installed by name. ex: `npm publish @dagger.io/nodejs-sdk` https://www.npmjs.com is the npm Registry that has a public collection of packages of open-source code for Node.js. In order to publish, follow the developer guide: https://docs.npmjs.com/cli/v9/using-npm/developers#the-packagejson-file Need to discuss everything related to the CI with github action (Test, build and publish to NPM). cc @gerhard Tasks: - [x] add a README.md - [x] LICENSE Npm automatically handles node_modules ignore. Do not add node_modules to .npmignore.
https://github.com/dagger/dagger/issues/3719
https://github.com/dagger/dagger/pull/3809
88e795da2c1b78e4b2b79f542a3233c57dd1fbed
dea51153c37566831d1075479f708d7d51bbcf5d
"2022-11-07T20:47:22Z"
go
"2022-11-15T20:39:32Z"
internal/mage/sdk/all.go
package sdk import ( "context" "errors" "fmt" "os" "github.com/hexops/gotextdiff" "github.com/hexops/gotextdiff/myers" "github.com/hexops/gotextdiff/span" "github.com/magefile/mage/mg" "golang.org/x/sync/errgroup" ) type SDK interface { Lint(ctx context.Context) error Test(ctx context.Context) error Generate(ctx context.Context) error Publish(ctx context.Context, tag string) error Bump(ctx context.Context, engineVersion string) error } var availableSDKs = []SDK{ &Go{}, &Python{}, &NodeJS{}, } var _ SDK = All{} type All mg.Namespace // Lint runs all SDK linters func (t All) Lint(ctx context.Context) error { return t.runAll(func(s SDK) any { return s.Lint }) } // Test runs all SDK tests func (t All) Test(ctx context.Context) error { return t.runAll(func(s SDK) any { return s.Test }) } // Generate re-generates all SDK APIs func (t All) Generate(ctx context.Context) error { return t.runAll(func(s SDK) any { return s.Generate }) } // Publish publishes all SDK APIs func (t All) Publish(ctx context.Context, version string) error { return errors.New("publish is not supported on `all` target. Please run this command on individual SDKs") } // Bump SDKs to a specific Engine version func (t All) Bump(ctx context.Context, engineVersion string) error { eg, gctx := errgroup.WithContext(ctx) for _, sdk := range availableSDKs { sdk := sdk eg.Go(func() error { return sdk.Bump(gctx, engineVersion) }) } return eg.Wait() } func (t All) runAll(fn func(SDK) any) error { handlers := []any{} for _, sdk := range availableSDKs { handlers = append(handlers, fn(sdk)) } mg.Deps(handlers...) return nil } // lintGeneratedCode ensures the generated code is up to date. // // 1) Read currently generated code // 2) Generate again // 3) Compare // 4) Restore original generated code. func lintGeneratedCode(fn func() error, files ...string) error { originals := map[string][]byte{} for _, f := range files { content, err := os.ReadFile(f) if err != nil { return err } originals[f] = content } defer func() { for _, f := range files { defer os.WriteFile(f, originals[f], 0600) } }() if err := fn(); err != nil { return err } for _, f := range files { original := string(originals[f]) updated, err := os.ReadFile(f) if err != nil { return err } if original != string(updated) { edits := myers.ComputeEdits(span.URIFromPath(f), original, string(updated)) diff := fmt.Sprint(gotextdiff.ToUnified(f, f, original, edits)) return fmt.Errorf("generated api mismatch. please run `mage sdk:all:generate`:\n%s", diff) } } return nil }
closed
dagger/dagger
https://github.com/dagger/dagger
3,719
NodeJS SDK : Publish NodeJS SDK to npm
Publishes the NodeJS SDK to the registry so that it can be installed by name. ex: `npm publish @dagger.io/nodejs-sdk` https://www.npmjs.com is the npm Registry that has a public collection of packages of open-source code for Node.js. In order to publish, follow the developer guide: https://docs.npmjs.com/cli/v9/using-npm/developers#the-packagejson-file Need to discuss everything related to the CI with github action (Test, build and publish to NPM). cc @gerhard Tasks: - [x] add a README.md - [x] LICENSE Npm automatically handles node_modules ignore. Do not add node_modules to .npmignore.
https://github.com/dagger/dagger/issues/3719
https://github.com/dagger/dagger/pull/3809
88e795da2c1b78e4b2b79f542a3233c57dd1fbed
dea51153c37566831d1075479f708d7d51bbcf5d
"2022-11-07T20:47:22Z"
go
"2022-11-15T20:39:32Z"
internal/mage/sdk/nodejs.go
package sdk import ( "context" "fmt" "os" "dagger.io/dagger" "github.com/dagger/dagger/internal/mage/util" "github.com/magefile/mage/mg" ) var ( nodejsGeneratedAPIPath = "sdk/nodejs/api/client.gen.ts" ) var _ SDK = NodeJS{} type NodeJS mg.Namespace // Lint lints the NodeJS SDK func (t NodeJS) Lint(ctx context.Context) error { c, err := dagger.Connect(ctx, dagger.WithLogOutput(os.Stderr)) if err != nil { return err } defer c.Close() return util.WithDevEngine(ctx, c, func(ctx context.Context, c *dagger.Client) error { _, err = nodeJSBase(c). Exec(dagger.ContainerExecOpts{ Args: []string{"yarn", "lint"}, ExperimentalPrivilegedNesting: true, }). WithWorkdir("/app"). ExitCode(ctx) return err }) } // Generateandcheck checks generated code func (t NodeJS) Generateandcheck(ctx context.Context) error { return lintGeneratedCode(func() error { return t.Generate(ctx) }, nodejsGeneratedAPIPath) } // Test tests the NodeJS SDK func (t NodeJS) Test(ctx context.Context) error { c, err := dagger.Connect(ctx, dagger.WithLogOutput(os.Stderr)) if err != nil { return err } defer c.Close() return util.WithDevEngine(ctx, c, func(ctx context.Context, c *dagger.Client) error { _, err = nodeJSBase(c). Exec(dagger.ContainerExecOpts{ Args: []string{"yarn", "run", "test"}, ExperimentalPrivilegedNesting: true, }). ExitCode(ctx) return err }) } // Generate re-generates the SDK API func (t NodeJS) Generate(ctx context.Context) error { c, err := dagger.Connect(ctx, dagger.WithLogOutput(os.Stderr)) if err != nil { return err } defer c.Close() return util.WithDevEngine(ctx, c, func(ctx context.Context, c *dagger.Client) error { generated, err := util.GoBase(c). WithMountedFile("/usr/local/bin/cloak", util.DaggerBinary(c)). Exec(dagger.ContainerExecOpts{ Args: []string{"cloak", "client-gen", "--lang", "nodejs", "-o", nodejsGeneratedAPIPath}, ExperimentalPrivilegedNesting: true, }). File(nodejsGeneratedAPIPath). Contents(ctx) if err != nil { return err } return os.WriteFile(nodejsGeneratedAPIPath, []byte(generated), 0o600) }) } // Publish publishes the NodeJS SDK func (t NodeJS) Publish(ctx context.Context, tag string) error { panic("FIXME") } // Bump the NodeJS SDK's Engine dependency func (t NodeJS) Bump(ctx context.Context, version string) error { engineReference := fmt.Sprintf("// Code generated by dagger. DO NOT EDIT.\n"+ "const DEFAULT_IMAGE_REF = %q;\n\n"+ "export const DEFAULT_HOST = `docker-image://${DEFAULT_IMAGE_REF}`\n", version) return os.WriteFile("sdk/nodejs/provisioning/default.ts", []byte(engineReference), 0600) } func nodeJSBase(c *dagger.Client) *dagger.Container { src := c.Directory().WithDirectory("/", util.Repository(c).Directory("sdk/nodejs")) base := c.Container(). // ⚠️ Keep this in sync with the engine version defined in package.json From("node:16-alpine") return base. WithMountedDirectory("/app", src). WithWorkdir("/app"). Exec(dagger.ContainerExecOpts{ Args: []string{"yarn", "install"}, }) }
closed
dagger/dagger
https://github.com/dagger/dagger
3,719
NodeJS SDK : Publish NodeJS SDK to npm
Publishes the NodeJS SDK to the registry so that it can be installed by name. ex: `npm publish @dagger.io/nodejs-sdk` https://www.npmjs.com is the npm Registry that has a public collection of packages of open-source code for Node.js. In order to publish, follow the developer guide: https://docs.npmjs.com/cli/v9/using-npm/developers#the-packagejson-file Need to discuss everything related to the CI with github action (Test, build and publish to NPM). cc @gerhard Tasks: - [x] add a README.md - [x] LICENSE Npm automatically handles node_modules ignore. Do not add node_modules to .npmignore.
https://github.com/dagger/dagger/issues/3719
https://github.com/dagger/dagger/pull/3809
88e795da2c1b78e4b2b79f542a3233c57dd1fbed
dea51153c37566831d1075479f708d7d51bbcf5d
"2022-11-07T20:47:22Z"
go
"2022-11-15T20:39:32Z"
sdk/nodejs/package.json
{ "name": "@dagger.io/dagger", "version": "0.1.0", "author": "jf@dagger.io", "license": "Apache-2.0", "types": "./dist/index.d.ts", "type": "module", "files": [ "dist/" ], "exports": { ".": "./dist/index.js" }, "engines": { "node": ">=16" }, "main": "dist/index.js", "dependencies": { "@lifeomic/axios-fetch": "^3.0.1", "axios": "^1.1.2", "execa": "^6.1.0", "graphql": "^16.5.0", "graphql-request": "^5.0.0", "graphql-tag": "^2.12.6", "node-fetch": "^3.2.10" }, "scripts": { "build": "tsc", "test": "mocha", "gen:typedoc": "yarn typedoc", "lint": "yarn eslint ." }, "devDependencies": { "@types/mocha": "latest", "@types/node": "~16", "@typescript-eslint/eslint-plugin": "^5.42.1", "@typescript-eslint/parser": "^5.42.1", "eslint": "^8.27.0", "mocha": "^10.1.0", "ts-node": "^10.9.1", "typedoc": "^0.23.21", "typedoc-plugin-markdown": "^3.13.6", "typedoc-plugin-missing-exports": "^1.0.0", "typescript": "^4.8.4" } }
closed
dagger/dagger
https://github.com/dagger/dagger
3,640
NodeJS Documentation
### What is the issue? We will need the following for the NodeJS launch. - New section in docs - Get Started Guide - API reference guide - Installation - FAQ @slumbering can help support as needed since he is NodeJS SDK release lead.
https://github.com/dagger/dagger/issues/3640
https://github.com/dagger/dagger/pull/3823
dea51153c37566831d1075479f708d7d51bbcf5d
410559c588e8b0e5bfdf119366608ba9c1d6fdf7
"2022-11-02T15:35:55Z"
go
"2022-11-15T22:03:26Z"
docs/current/sdk/nodejs/722802-index.md
closed
dagger/dagger
https://github.com/dagger/dagger
3,640
NodeJS Documentation
### What is the issue? We will need the following for the NodeJS launch. - New section in docs - Get Started Guide - API reference guide - Installation - FAQ @slumbering can help support as needed since he is NodeJS SDK release lead.
https://github.com/dagger/dagger/issues/3640
https://github.com/dagger/dagger/pull/3823
dea51153c37566831d1075479f708d7d51bbcf5d
410559c588e8b0e5bfdf119366608ba9c1d6fdf7
"2022-11-02T15:35:55Z"
go
"2022-11-15T22:03:26Z"
docs/current/sdk/nodejs/783645-get-started.md
closed
dagger/dagger
https://github.com/dagger/dagger
3,640
NodeJS Documentation
### What is the issue? We will need the following for the NodeJS launch. - New section in docs - Get Started Guide - API reference guide - Installation - FAQ @slumbering can help support as needed since he is NodeJS SDK release lead.
https://github.com/dagger/dagger/issues/3640
https://github.com/dagger/dagger/pull/3823
dea51153c37566831d1075479f708d7d51bbcf5d
410559c588e8b0e5bfdf119366608ba9c1d6fdf7
"2022-11-02T15:35:55Z"
go
"2022-11-15T22:03:26Z"
docs/current/sdk/nodejs/835948-install.md
closed
dagger/dagger
https://github.com/dagger/dagger
3,640
NodeJS Documentation
### What is the issue? We will need the following for the NodeJS launch. - New section in docs - Get Started Guide - API reference guide - Installation - FAQ @slumbering can help support as needed since he is NodeJS SDK release lead.
https://github.com/dagger/dagger/issues/3640
https://github.com/dagger/dagger/pull/3823
dea51153c37566831d1075479f708d7d51bbcf5d
410559c588e8b0e5bfdf119366608ba9c1d6fdf7
"2022-11-02T15:35:55Z"
go
"2022-11-15T22:03:26Z"
docs/current/sdk/nodejs/snippets/get-started/step3/build.ts
closed
dagger/dagger
https://github.com/dagger/dagger
3,640
NodeJS Documentation
### What is the issue? We will need the following for the NodeJS launch. - New section in docs - Get Started Guide - API reference guide - Installation - FAQ @slumbering can help support as needed since he is NodeJS SDK release lead.
https://github.com/dagger/dagger/issues/3640
https://github.com/dagger/dagger/pull/3823
dea51153c37566831d1075479f708d7d51bbcf5d
410559c588e8b0e5bfdf119366608ba9c1d6fdf7
"2022-11-02T15:35:55Z"
go
"2022-11-15T22:03:26Z"
docs/current/sdk/nodejs/snippets/get-started/step4/build.ts
closed
dagger/dagger
https://github.com/dagger/dagger
3,640
NodeJS Documentation
### What is the issue? We will need the following for the NodeJS launch. - New section in docs - Get Started Guide - API reference guide - Installation - FAQ @slumbering can help support as needed since he is NodeJS SDK release lead.
https://github.com/dagger/dagger/issues/3640
https://github.com/dagger/dagger/pull/3823
dea51153c37566831d1075479f708d7d51bbcf5d
410559c588e8b0e5bfdf119366608ba9c1d6fdf7
"2022-11-02T15:35:55Z"
go
"2022-11-15T22:03:26Z"
docs/current/sdk/nodejs/snippets/get-started/step5/build.ts
closed
dagger/dagger
https://github.com/dagger/dagger
3,813
🐞 Python SDK fails on Windows when trying to get the platform
### What is the issue? When trying to run the example for the Dagger Python SDK on Windows I am getting the error: `AttributeError: module 'os' has no attribute 'uname'` Link to the place in the code: https://github.com/dagger/dagger/blob/main/sdk/python/src/dagger/connectors/docker.py#L26 I guess this is only related to Windows as it looks like this function is not present there. ### Log output ``` C:\Users\amuller20\Miniconda3\envs\dagger-sdk\python.exe C:\Users\amuller20\PycharmProjects\dagger-sdk\main.py "Simple is better than complex" Traceback (most recent call last): File "C:\Users\amuller20\PycharmProjects\dagger-sdk\main.py", line 38, in <module> anyio.run(main, sys.argv[1:]) File "C:\Users\amuller20\Miniconda3\envs\dagger-sdk\lib\site-packages\anyio\_core\_eventloop.py", line 70, in run return asynclib.run(func, *args, **backend_options) File "C:\Users\amuller20\Miniconda3\envs\dagger-sdk\lib\site-packages\anyio\_backends\_asyncio.py", line 292, in run return native_run(wrapper(), debug=debug) File "C:\Users\amuller20\Miniconda3\envs\dagger-sdk\lib\asyncio\runners.py", line 44, in run return loop.run_until_complete(main) File "C:\Users\amuller20\Miniconda3\envs\dagger-sdk\lib\asyncio\base_events.py", line 646, in run_until_complete return future.result() File "C:\Users\amuller20\Miniconda3\envs\dagger-sdk\lib\site-packages\anyio\_backends\_asyncio.py", line 287, in wrapper return await func(*args) File "C:\Users\amuller20\PycharmProjects\dagger-sdk\main.py", line 20, in main async with dagger.Connection() as client: File "C:\Users\amuller20\Miniconda3\envs\dagger-sdk\lib\site-packages\dagger\connection.py", line 39, in __aenter__ return await self.connector.connect() File "C:\Users\amuller20\Miniconda3\envs\dagger-sdk\lib\site-packages\dagger\connectors\docker.py", line 168, in connect await anyio.to_thread.run_sync(self.provision_sync) File "C:\Users\amuller20\Miniconda3\envs\dagger-sdk\lib\site-packages\anyio\to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "C:\Users\amuller20\Miniconda3\envs\dagger-sdk\lib\site-packages\anyio\_backends\_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "C:\Users\amuller20\Miniconda3\envs\dagger-sdk\lib\site-packages\anyio\_backends\_asyncio.py", line 867, in run result = context.run(func, *args) File "C:\Users\amuller20\Miniconda3\envs\dagger-sdk\lib\site-packages\dagger\connectors\docker.py", line 184, in provision_sync self.engine.start() File "C:\Users\amuller20\Miniconda3\envs\dagger-sdk\lib\site-packages\dagger\connectors\docker.py", line 61, in start os_, arch = get_platform() File "C:\Users\amuller20\Miniconda3\envs\dagger-sdk\lib\site-packages\dagger\connectors\docker.py", line 26, in get_platform uname = os.uname() AttributeError: module 'os' has no attribute 'uname' Process finished with exit code 1 ``` ### Steps to reproduce Create virtual environment with Python 3.10 and install dagger SDK Run one of the Dagger samples (e.g. https://github.com/helderco/dagger-examples/blob/main/say.py) ### Dagger version dagger SDK 0.1.1 ### OS version Windows 10
https://github.com/dagger/dagger/issues/3813
https://github.com/dagger/dagger/pull/3814
c0a66164ea6e4e464a0e8324f185c4f43b4503ad
76d28eb66f86e7d447c8aa4d98ac6bff055dc1b4
"2022-11-14T16:35:40Z"
go
"2022-11-16T09:33:29Z"
sdk/python/src/dagger/connectors/docker.py
import logging import os import subprocess import tempfile from pathlib import Path import anyio from attrs import Factory, define, field from dagger import Client from .base import Config, register_connector from .http import HTTPConnector logger = logging.getLogger(__name__) ENGINE_SESSION_BINARY_PREFIX = "dagger-engine-session-" def get_platform() -> tuple[str, str]: normalized_arch = { "x86_64": "amd64", "aarch64": "arm64", } uname = os.uname() os_ = uname.sysname.lower() arch = uname.machine.lower() arch = normalized_arch.get(arch, arch) return os_, arch class ImageRef: DIGEST_LEN = 16 def __init__(self, ref: str) -> None: self.ref = ref # Check to see if ref contains @sha256:, if so use the digest as the id. if "@sha256:" not in ref: raise ValueError("Image ref must contain a digest") id_ = ref.split("@sha256:", maxsplit=1)[1] # TODO: add verification that the digest is valid # (not something malicious with / or ..) self.id = id_[: self.DIGEST_LEN] @define class Engine: cfg: Config _proc: subprocess.Popen | None = field(default=None, init=False) def start(self) -> None: cache_dir = ( Path(os.environ.get("XDG_CACHE_HOME", "~/.cache")).expanduser() / "dagger" ) cache_dir.mkdir(mode=0o700, parents=True, exist_ok=True) os_, arch = get_platform() image = ImageRef(self.cfg.host.hostname + self.cfg.host.path) engine_session_bin_path = ( cache_dir / f"{ENGINE_SESSION_BINARY_PREFIX}{image.id}" ) if os_ == "windows": engine_session_bin_path = engine_session_bin_path.with_suffix(".exe") if not engine_session_bin_path.exists(): tempfile_args = { "prefix": f"temp-{ENGINE_SESSION_BINARY_PREFIX}", "dir": cache_dir, "delete": False, } with tempfile.NamedTemporaryFile(**tempfile_args) as tmp_bin: docker_run_args = [ "docker", "run", "--rm", "--entrypoint", "/bin/cat", image.ref, f"/usr/bin/{ENGINE_SESSION_BINARY_PREFIX}{os_}-{arch}", ] try: subprocess.run( docker_run_args, stdout=tmp_bin, stderr=subprocess.PIPE, encoding="utf-8", check=True, ) except subprocess.CalledProcessError as e: tmp_bin.close() os.unlink(tmp_bin.name) raise ProvisionError( f"Failed to copy engine session binary: {e.stdout}" ) tmp_bin_path = Path(tmp_bin.name) tmp_bin_path.chmod(0o700) engine_session_bin_path = tmp_bin_path.rename(engine_session_bin_path) # garbage collection of old engine_session binaries for bin in cache_dir.glob(f"{ENGINE_SESSION_BINARY_PREFIX}*"): if bin != engine_session_bin_path: bin.unlink() remote = f"docker-image://{image.ref}" engine_session_args = [engine_session_bin_path, "--remote", remote] if self.cfg.workdir: engine_session_args.extend( ["--workdir", str(Path(self.cfg.workdir).absolute())] ) if self.cfg.config_path: engine_session_args.extend( ["--project", str(Path(self.cfg.config_path).absolute())] ) self._proc = subprocess.Popen( engine_session_args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=self.cfg.log_output or subprocess.DEVNULL, encoding="utf-8", ) # read port number from first line of stdout port = int(self._proc.stdout.readline()) # TODO: verify port number is valid self.cfg.host = f"http://localhost:{port}" def is_running(self) -> bool: return self._proc is not None def stop(self, exc_type) -> None: if not self.is_running(): return self._proc.__exit__(exc_type, None, None) def __enter__(self): self.start() return self def __exit__(self, exc_type, *args, **kwargs): self.stop(exc_type) @register_connector("docker-image") @define class DockerConnector(HTTPConnector): """Provision dagger engine from an image with docker""" engine: Engine = Factory(lambda self: Engine(self.cfg), takes_self=True) @property def query_url(self) -> str: return f"{self.cfg.host.geturl()}/query" async def connect(self) -> Client: # FIXME: Create proper async provisioning later. # This is just to support sync faster. await anyio.to_thread.run_sync(self.provision_sync) return await super().connect() async def close(self, exc_type) -> None: # FIXME: need exit stack? await super().close(exc_type) if self.engine.is_running(): await anyio.to_thread.run_sync(self.engine.stop, exc_type) def connect_sync(self) -> Client: self.provision_sync() return super().connect_sync() def provision_sync(self) -> None: # FIXME: handle cancellation, retries and timeout # FIXME: handle errors during provisioning self.engine.start() def close_sync(self, exc_type) -> None: # FIXME: need exit stack? super().close_sync() self.engine.stop(exc_type) class ProvisionError(Exception): """Error while provisioning the Dagger engine."""
closed
dagger/dagger
https://github.com/dagger/dagger
3,727
Use dependabot with Python
~May depend on #3702~
https://github.com/dagger/dagger/issues/3727
https://github.com/dagger/dagger/pull/3815
76d28eb66f86e7d447c8aa4d98ac6bff055dc1b4
32e16359c17ff34cd22aa1328b9b8d7489562c9d
"2022-11-08T09:26:24Z"
go
"2022-11-16T09:45:16Z"
.github/dependabot.yml
version: 2 updates: - package-ecosystem: "gomod" directory: "/" schedule: interval: "daily" labels: - "kind/dependencies" - package-ecosystem: "docker" directory: "/" schedule: interval: "daily" labels: - "kind/dependencies" - package-ecosystem: "npm" directory: "/sdk/nodejs" schedule: interval: "daily" labels: - "kind/dependencies" - package-ecosystem: "npm" directory: "/website" schedule: interval: "daily" labels: - "kind/dependencies" - "area/website" - package-ecosystem: "gomod" directory: "/sdk/go" schedule: interval: "daily" labels: - "kind/dependencies"
closed
dagger/dagger
https://github.com/dagger/dagger
2,339
Make more clear that `universe.dagger.io/x` is experimental
### What is the issue? Not everyone will know that `universe.dagger.io/x` (in golang `x` way) means experimental pre-universe packages that are contributed by the community and not yet fully supported by Dagger as a universe package.
https://github.com/dagger/dagger/issues/2339
https://github.com/dagger/dagger/pull/3869
5619f43ffeefff9f406617ad89e77d0c943dd865
783f943793b69c19c67eb7ff88abebeb82d77ddc
"2022-04-27T21:12:40Z"
go
"2022-11-16T14:55:16Z"
sdk/python/poetry.lock
[[package]] name = "aiohttp" version = "3.8.3" description = "Async http client/server framework (asyncio)" category = "main" optional = false python-versions = ">=3.6" [package.dependencies] aiosignal = ">=1.1.2" async-timeout = ">=4.0.0a3,<5.0" attrs = ">=17.3.0" charset-normalizer = ">=2.0,<3.0" frozenlist = ">=1.1.1" multidict = ">=4.5,<7.0" yarl = ">=1.0,<2.0" [package.extras] speedups = ["Brotli", "aiodns", "cchardet"] [[package]] name = "aiosignal" version = "1.3.1" description = "aiosignal: a list of registered asynchronous callbacks" category = "main" optional = false python-versions = ">=3.7" [package.dependencies] frozenlist = ">=1.1.0" [[package]] name = "alabaster" version = "0.7.12" description = "A configurable sidebar-enabled Sphinx theme" category = "dev" optional = false python-versions = "*" [[package]] name = "anyio" version = "3.6.2" description = "High level compatibility layer for multiple asynchronous event loop implementations" category = "main" optional = false python-versions = ">=3.6.2" [package.dependencies] idna = ">=2.8" sniffio = ">=1.1" [package.extras] doc = ["packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"] test = ["contextlib2", "coverage[toml] (>=4.5)", "hypothesis (>=4.0)", "mock (>=4)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (<0.15)", "uvloop (>=0.15)"] trio = ["trio (>=0.16,<0.22)"] [[package]] name = "async-timeout" version = "4.0.2" description = "Timeout context manager for asyncio programs" category = "main" optional = false python-versions = ">=3.6" [[package]] name = "attrs" version = "22.1.0" description = "Classes Without Boilerplate" category = "main" optional = false python-versions = ">=3.5" [package.extras] dev = ["cloudpickle", "coverage[toml] (>=5.0.2)", "furo", "hypothesis", "mypy (>=0.900,!=0.940)", "pre-commit", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "sphinx", "sphinx-notfound-page", "zope.interface"] docs = ["furo", "sphinx", "sphinx-notfound-page", "zope.interface"] tests = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy (>=0.900,!=0.940)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "zope.interface"] tests-no-zope = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy (>=0.900,!=0.940)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins"] [[package]] name = "autoflake" version = "1.7.7" description = "Removes unused imports and unused variables" category = "dev" optional = false python-versions = ">=3.7" [package.dependencies] pyflakes = ">=1.1.0" tomli = {version = ">=2.0.1", markers = "python_version < \"3.11\""} [[package]] name = "babel" version = "2.11.0" description = "Internationalization utilities" category = "dev" optional = false python-versions = ">=3.6" [package.dependencies] pytz = ">=2015.7" [[package]] name = "backoff" version = "2.2.1" description = "Function decoration for backoff and retry" category = "main" optional = false python-versions = ">=3.7,<4.0" [[package]] name = "black" version = "22.10.0" description = "The uncompromising code formatter." category = "dev" optional = false python-versions = ">=3.7" [package.dependencies] click = ">=8.0.0" mypy-extensions = ">=0.4.3" pathspec = ">=0.9.0" platformdirs = ">=2" tomli = {version = ">=1.1.0", markers = "python_full_version < \"3.11.0a7\""} [package.extras] colorama = ["colorama (>=0.4.3)"] d = ["aiohttp (>=3.7.4)"] jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] uvloop = ["uvloop (>=0.15.2)"] [[package]] name = "cattrs" version = "22.2.0" description = "Composable complex class support for attrs and dataclasses." category = "main" optional = false python-versions = ">=3.7" [package.dependencies] attrs = ">=20" exceptiongroup = {version = "*", markers = "python_version < \"3.11\""} [[package]] name = "certifi" version = "2022.9.24" description = "Python package for providing Mozilla's CA Bundle." category = "main" optional = false python-versions = ">=3.6" [[package]] name = "charset-normalizer" version = "2.1.1" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." category = "main" optional = false python-versions = ">=3.6.0" [package.extras] unicode-backport = ["unicodedata2"] [[package]] name = "click" version = "8.1.3" description = "Composable command line interface toolkit" category = "main" optional = false python-versions = ">=3.7" [package.dependencies] colorama = {version = "*", markers = "platform_system == \"Windows\""} [[package]] name = "colorama" version = "0.4.6" description = "Cross-platform colored terminal text." category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" [[package]] name = "commonmark" version = "0.9.1" description = "Python parser for the CommonMark Markdown spec" category = "main" optional = false python-versions = "*" [package.extras] test = ["flake8 (==3.7.8)", "hypothesis (==3.55.3)"] [[package]] name = "docutils" version = "0.17.1" description = "Docutils -- Python Documentation Utilities" category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [[package]] name = "eradicate" version = "2.1.0" description = "Removes commented-out code." category = "dev" optional = false python-versions = "*" [[package]] name = "exceptiongroup" version = "1.0.1" description = "Backport of PEP 654 (exception groups)" category = "main" optional = false python-versions = ">=3.7" [package.extras] test = ["pytest (>=6)"] [[package]] name = "flake8" version = "5.0.4" description = "the modular source code checker: pep8 pyflakes and co" category = "dev" optional = false python-versions = ">=3.6.1" [package.dependencies] mccabe = ">=0.7.0,<0.8.0" pycodestyle = ">=2.9.0,<2.10.0" pyflakes = ">=2.5.0,<2.6.0" [[package]] name = "flake8-black" version = "0.3.3" description = "flake8 plugin to call black as a code style validator" category = "dev" optional = false python-versions = ">=3.7" [package.dependencies] black = ">=22.1.0" flake8 = ">=3.0.0" tomli = "*" [[package]] name = "flake8-bugbear" version = "22.10.27" description = "A plugin for flake8 finding likely bugs and design problems in your program. Contains warnings that don't belong in pyflakes and pycodestyle." category = "dev" optional = false python-versions = ">=3.7" [package.dependencies] attrs = ">=19.2.0" flake8 = ">=3.0.0" [package.extras] dev = ["coverage", "hypothesis", "hypothesmith (>=0.2)", "pre-commit", "tox"] [[package]] name = "flake8-eradicate" version = "1.4.0" description = "Flake8 plugin to find commented out code" category = "dev" optional = false python-versions = ">=3.7,<4.0" [package.dependencies] attrs = "*" eradicate = ">=2.0,<3.0" flake8 = ">=3.5,<6" [[package]] name = "flake8-isort" version = "5.0.0" description = "flake8 plugin that integrates isort ." category = "dev" optional = false python-versions = ">=3.7" [package.dependencies] flake8 = "*" isort = ">=4.3.5,<6" [package.extras] test = ["pytest"] [[package]] name = "frozenlist" version = "1.3.3" description = "A list-like structure which implements collections.abc.MutableSequence" category = "main" optional = false python-versions = ">=3.7" [[package]] name = "gql" version = "3.4.0" description = "GraphQL client for Python" category = "main" optional = false python-versions = "*" [package.dependencies] aiohttp = {version = ">=3.7.1,<3.9.0", optional = true, markers = "extra == \"aiohttp\""} backoff = ">=1.11.1,<3.0" graphql-core = ">=3.2,<3.3" requests = {version = ">=2.26,<3", optional = true, markers = "extra == \"requests\""} requests-toolbelt = {version = ">=0.9.1,<1", optional = true, markers = "extra == \"requests\""} urllib3 = {version = ">=1.26", optional = true, markers = "extra == \"requests\""} yarl = ">=1.6,<2.0" [package.extras] aiohttp = ["aiohttp (>=3.7.1,<3.9.0)"] all = ["aiohttp (>=3.7.1,<3.9.0)", "botocore (>=1.21,<2)", "requests (>=2.26,<3)", "requests-toolbelt (>=0.9.1,<1)", "urllib3 (>=1.26)", "websockets (>=10,<11)", "websockets (>=9,<10)"] botocore = ["botocore (>=1.21,<2)"] dev = ["aiofiles", "aiohttp (>=3.7.1,<3.9.0)", "black (==22.3.0)", "botocore (>=1.21,<2)", "check-manifest (>=0.42,<1)", "flake8 (==3.8.1)", "isort (==4.3.21)", "mock (==4.0.2)", "mypy (==0.910)", "parse (==1.15.0)", "pytest (==6.2.5)", "pytest-asyncio (==0.16.0)", "pytest-console-scripts (==1.3.1)", "pytest-cov (==3.0.0)", "requests (>=2.26,<3)", "requests-toolbelt (>=0.9.1,<1)", "sphinx (>=3.0.0,<4)", "sphinx-argparse (==0.2.5)", "sphinx-rtd-theme (>=0.4,<1)", "types-aiofiles", "types-mock", "types-requests", "urllib3 (>=1.26)", "vcrpy (==4.0.2)", "websockets (>=10,<11)", "websockets (>=9,<10)"] requests = ["requests (>=2.26,<3)", "requests-toolbelt (>=0.9.1,<1)", "urllib3 (>=1.26)"] test = ["aiofiles", "aiohttp (>=3.7.1,<3.9.0)", "botocore (>=1.21,<2)", "mock (==4.0.2)", "parse (==1.15.0)", "pytest (==6.2.5)", "pytest-asyncio (==0.16.0)", "pytest-console-scripts (==1.3.1)", "pytest-cov (==3.0.0)", "requests (>=2.26,<3)", "requests-toolbelt (>=0.9.1,<1)", "urllib3 (>=1.26)", "vcrpy (==4.0.2)", "websockets (>=10,<11)", "websockets (>=9,<10)"] test-no-transport = ["aiofiles", "mock (==4.0.2)", "parse (==1.15.0)", "pytest (==6.2.5)", "pytest-asyncio (==0.16.0)", "pytest-console-scripts (==1.3.1)", "pytest-cov (==3.0.0)", "vcrpy (==4.0.2)"] websockets = ["websockets (>=10,<11)", "websockets (>=9,<10)"] [[package]] name = "graphql-core" version = "3.2.3" description = "GraphQL implementation for Python, a port of GraphQL.js, the JavaScript reference implementation for GraphQL." category = "main" optional = false python-versions = ">=3.6,<4" [[package]] name = "idna" version = "3.4" description = "Internationalized Domain Names in Applications (IDNA)" category = "main" optional = false python-versions = ">=3.5" [[package]] name = "imagesize" version = "1.4.1" description = "Getting image size from png/jpeg/jpeg2000/gif file" category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "iniconfig" version = "1.1.1" description = "iniconfig: brain-dead simple config-ini parsing" category = "dev" optional = false python-versions = "*" [[package]] name = "isort" version = "5.10.1" description = "A Python utility / library to sort Python imports." category = "dev" optional = false python-versions = ">=3.6.1,<4.0" [package.extras] colors = ["colorama (>=0.4.3,<0.5.0)"] pipfile-deprecated-finder = ["pipreqs", "requirementslib"] plugins = ["setuptools"] requirements-deprecated-finder = ["pip-api", "pipreqs"] [[package]] name = "jinja2" version = "3.1.2" description = "A very fast and expressive template engine." category = "dev" optional = false python-versions = ">=3.7" [package.dependencies] MarkupSafe = ">=2.0" [package.extras] i18n = ["Babel (>=2.7)"] [[package]] name = "markupsafe" version = "2.1.1" description = "Safely add untrusted strings to HTML/XML markup." category = "dev" optional = false python-versions = ">=3.7" [[package]] name = "mccabe" version = "0.7.0" description = "McCabe checker, plugin for flake8" category = "dev" optional = false python-versions = ">=3.6" [[package]] name = "multidict" version = "6.0.2" description = "multidict implementation" category = "main" optional = false python-versions = ">=3.7" [[package]] name = "mypy" version = "0.990" description = "Optional static typing for Python" category = "dev" optional = false python-versions = ">=3.7" [package.dependencies] mypy-extensions = ">=0.4.3" tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} typing-extensions = ">=3.10" [package.extras] dmypy = ["psutil (>=4.0)"] install-types = ["pip"] python2 = ["typed-ast (>=1.4.0,<2)"] reports = ["lxml"] [[package]] name = "mypy-extensions" version = "0.4.3" description = "Experimental type system extensions for programs checked with the mypy typechecker." category = "dev" optional = false python-versions = "*" [[package]] name = "packaging" version = "21.3" description = "Core utilities for Python packages" category = "dev" optional = false python-versions = ">=3.6" [package.dependencies] pyparsing = ">=2.0.2,<3.0.5 || >3.0.5" [[package]] name = "pastel" version = "0.2.1" description = "Bring colors to your terminal." category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "pathspec" version = "0.10.1" description = "Utility library for gitignore style pattern matching of file paths." category = "dev" optional = false python-versions = ">=3.7" [[package]] name = "platformdirs" version = "2.5.3" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." category = "dev" optional = false python-versions = ">=3.7" [package.extras] docs = ["furo (>=2022.9.29)", "proselint (>=0.13)", "sphinx (>=5.3)", "sphinx-autodoc-typehints (>=1.19.4)"] test = ["appdirs (==1.4.4)", "pytest (>=7.2)", "pytest-cov (>=4)", "pytest-mock (>=3.10)"] [[package]] name = "pluggy" version = "1.0.0" description = "plugin and hook calling mechanisms for python" category = "dev" optional = false python-versions = ">=3.6" [package.extras] dev = ["pre-commit", "tox"] testing = ["pytest", "pytest-benchmark"] [[package]] name = "poethepoet" version = "0.16.4" description = "A task runner that works well with poetry." category = "dev" optional = false python-versions = ">=3.7" [package.dependencies] pastel = ">=0.2.1,<0.3.0" tomli = ">=1.2.2" [package.extras] poetry-plugin = ["poetry (>=1.0,<2.0)"] [[package]] name = "pycodestyle" version = "2.9.1" description = "Python style guide checker" category = "dev" optional = false python-versions = ">=3.6" [[package]] name = "pyflakes" version = "2.5.0" description = "passive checker of Python programs" category = "dev" optional = false python-versions = ">=3.6" [[package]] name = "pygments" version = "2.13.0" description = "Pygments is a syntax highlighting package written in Python." category = "main" optional = false python-versions = ">=3.6" [package.extras] plugins = ["importlib-metadata"] [[package]] name = "pyparsing" version = "3.0.9" description = "pyparsing module - Classes and methods to define and execute parsing grammars" category = "dev" optional = false python-versions = ">=3.6.8" [package.extras] diagrams = ["jinja2", "railroad-diagrams"] [[package]] name = "pytest" version = "7.2.0" description = "pytest: simple powerful testing with Python" category = "dev" optional = false python-versions = ">=3.7" [package.dependencies] attrs = ">=19.2.0" colorama = {version = "*", markers = "sys_platform == \"win32\""} exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} iniconfig = "*" packaging = "*" pluggy = ">=0.12,<2.0" tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} [package.extras] testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "xmlschema"] [[package]] name = "pytest-mock" version = "3.10.0" description = "Thin-wrapper around the mock package for easier use with pytest" category = "dev" optional = false python-versions = ">=3.7" [package.dependencies] pytest = ">=5.0" [package.extras] dev = ["pre-commit", "pytest-asyncio", "tox"] [[package]] name = "python-dateutil" version = "2.8.2" description = "Extensions to the standard Python datetime module" category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" [package.dependencies] six = ">=1.5" [[package]] name = "pytz" version = "2022.6" description = "World timezone definitions, modern and historical" category = "dev" optional = false python-versions = "*" [[package]] name = "requests" version = "2.28.1" description = "Python HTTP for Humans." category = "main" optional = false python-versions = ">=3.7, <4" [package.dependencies] certifi = ">=2017.4.17" charset-normalizer = ">=2,<3" idna = ">=2.5,<4" urllib3 = ">=1.21.1,<1.27" [package.extras] socks = ["PySocks (>=1.5.6,!=1.5.7)"] use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] [[package]] name = "requests-toolbelt" version = "0.10.1" description = "A utility belt for advanced users of python-requests" category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [package.dependencies] requests = ">=2.0.1,<3.0.0" [[package]] name = "rich" version = "12.6.0" description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" category = "main" optional = false python-versions = ">=3.6.3,<4.0.0" [package.dependencies] commonmark = ">=0.9.0,<0.10.0" pygments = ">=2.6.0,<3.0.0" [package.extras] jupyter = ["ipywidgets (>=7.5.1,<8.0.0)"] [[package]] name = "shellingham" version = "1.5.0" description = "Tool to Detect Surrounding Shell" category = "main" optional = false python-versions = ">=3.4" [[package]] name = "six" version = "1.16.0" description = "Python 2 and 3 compatibility utilities" category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" [[package]] name = "sniffio" version = "1.3.0" description = "Sniff out which async library your code is running under" category = "main" optional = false python-versions = ">=3.7" [[package]] name = "snowballstemmer" version = "2.2.0" description = "This package provides 29 stemmers for 28 languages generated from Snowball algorithms." category = "dev" optional = false python-versions = "*" [[package]] name = "sphinx" version = "5.3.0" description = "Python documentation generator" category = "dev" optional = false python-versions = ">=3.6" [package.dependencies] alabaster = ">=0.7,<0.8" babel = ">=2.9" colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} docutils = ">=0.14,<0.20" imagesize = ">=1.3" Jinja2 = ">=3.0" packaging = ">=21.0" Pygments = ">=2.12" requests = ">=2.5.0" snowballstemmer = ">=2.0" sphinxcontrib-applehelp = "*" sphinxcontrib-devhelp = "*" sphinxcontrib-htmlhelp = ">=2.0.0" sphinxcontrib-jsmath = "*" sphinxcontrib-qthelp = "*" sphinxcontrib-serializinghtml = ">=1.1.5" [package.extras] docs = ["sphinxcontrib-websupport"] lint = ["docutils-stubs", "flake8 (>=3.5.0)", "flake8-bugbear", "flake8-comprehensions", "flake8-simplify", "isort", "mypy (>=0.981)", "sphinx-lint", "types-requests", "types-typed-ast"] test = ["cython", "html5lib", "pytest (>=4.6)", "typed_ast"] [[package]] name = "sphinx-rtd-theme" version = "1.1.1" description = "Read the Docs theme for Sphinx" category = "dev" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7" [package.dependencies] docutils = "<0.18" sphinx = ">=1.6,<6" [package.extras] dev = ["bump2version", "sphinxcontrib-httpdomain", "transifex-client", "wheel"] [[package]] name = "sphinxcontrib-applehelp" version = "1.0.2" description = "sphinxcontrib-applehelp is a sphinx extension which outputs Apple help books" category = "dev" optional = false python-versions = ">=3.5" [package.extras] lint = ["docutils-stubs", "flake8", "mypy"] test = ["pytest"] [[package]] name = "sphinxcontrib-devhelp" version = "1.0.2" description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document." category = "dev" optional = false python-versions = ">=3.5" [package.extras] lint = ["docutils-stubs", "flake8", "mypy"] test = ["pytest"] [[package]] name = "sphinxcontrib-htmlhelp" version = "2.0.0" description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files" category = "dev" optional = false python-versions = ">=3.6" [package.extras] lint = ["docutils-stubs", "flake8", "mypy"] test = ["html5lib", "pytest"] [[package]] name = "sphinxcontrib-jsmath" version = "1.0.1" description = "A sphinx extension which renders display math in HTML via JavaScript" category = "dev" optional = false python-versions = ">=3.5" [package.extras] test = ["flake8", "mypy", "pytest"] [[package]] name = "sphinxcontrib-qthelp" version = "1.0.3" description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document." category = "dev" optional = false python-versions = ">=3.5" [package.extras] lint = ["docutils-stubs", "flake8", "mypy"] test = ["pytest"] [[package]] name = "sphinxcontrib-serializinghtml" version = "1.1.5" description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)." category = "dev" optional = false python-versions = ">=3.5" [package.extras] lint = ["docutils-stubs", "flake8", "mypy"] test = ["pytest"] [[package]] name = "strawberry-graphql" version = "0.140.3" description = "A library for creating GraphQL APIs" category = "main" optional = false python-versions = ">=3.7,<4.0" [package.dependencies] graphql-core = ">=3.2.0,<3.3.0" python-dateutil = ">=2.7.0,<3.0.0" typing_extensions = ">=3.7.4,<5.0.0" [package.extras] aiohttp = ["aiohttp (>=3.7.4.post0,<4.0.0)"] asgi = ["python-multipart (>=0.0.5,<0.0.6)", "starlette (>=0.13.6)"] chalice = ["chalice (>=1.22,<2.0)"] channels = ["asgiref (>=3.2,<4.0)", "channels (>=3.0.5)"] cli = ["click (>=7.0,<9.0)", "pygments (>=2.3,<3.0)"] debug-server = ["click (>=7.0,<9.0)", "pygments (>=2.3,<3.0)", "python-multipart (>=0.0.5,<0.0.6)", "starlette (>=0.13.6)", "uvicorn (>=0.11.6,<0.20.0)"] django = ["Django (>=3.2)", "asgiref (>=3.2,<4.0)"] fastapi = ["fastapi (>=0.65.2)", "python-multipart (>=0.0.5,<0.0.6)"] flask = ["flask (>=1.1)"] opentelemetry = ["opentelemetry-api (<2)", "opentelemetry-sdk (<2)"] pydantic = ["pydantic (<2)"] sanic = ["sanic (>=20.12.2,<22.0.0)"] [[package]] name = "tomli" version = "2.0.1" description = "A lil' TOML parser" category = "dev" optional = false python-versions = ">=3.7" [[package]] name = "typer" version = "0.7.0" description = "Typer, build great CLIs. Easy to code. Based on Python type hints." category = "main" optional = false python-versions = ">=3.6" [package.dependencies] click = ">=7.1.1,<9.0.0" colorama = {version = ">=0.4.3,<0.5.0", optional = true, markers = "extra == \"all\""} rich = {version = ">=10.11.0,<13.0.0", optional = true, markers = "extra == \"all\""} shellingham = {version = ">=1.3.0,<2.0.0", optional = true, markers = "extra == \"all\""} [package.extras] all = ["colorama (>=0.4.3,<0.5.0)", "rich (>=10.11.0,<13.0.0)", "shellingham (>=1.3.0,<2.0.0)"] dev = ["autoflake (>=1.3.1,<2.0.0)", "flake8 (>=3.8.3,<4.0.0)", "pre-commit (>=2.17.0,<3.0.0)"] doc = ["cairosvg (>=2.5.2,<3.0.0)", "mdx-include (>=1.4.1,<2.0.0)", "mkdocs (>=1.1.2,<2.0.0)", "mkdocs-material (>=8.1.4,<9.0.0)", "pillow (>=9.3.0,<10.0.0)"] test = ["black (>=22.3.0,<23.0.0)", "coverage (>=6.2,<7.0)", "isort (>=5.0.6,<6.0.0)", "mypy (==0.910)", "pytest (>=4.4.0,<8.0.0)", "pytest-cov (>=2.10.0,<5.0.0)", "pytest-sugar (>=0.9.4,<0.10.0)", "pytest-xdist (>=1.32.0,<4.0.0)", "rich (>=10.11.0,<13.0.0)", "shellingham (>=1.3.0,<2.0.0)"] [[package]] name = "typing-extensions" version = "4.4.0" description = "Backported and Experimental Type Hints for Python 3.7+" category = "main" optional = false python-versions = ">=3.7" [[package]] name = "urllib3" version = "1.26.12" description = "HTTP library with thread-safe connection pooling, file post, and more." category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4" [package.extras] brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)", "brotlipy (>=0.6.0)"] secure = ["certifi", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "ipaddress", "pyOpenSSL (>=0.14)", "urllib3-secure-extra"] socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] [[package]] name = "yarl" version = "1.8.1" description = "Yet another URL library" category = "main" optional = false python-versions = ">=3.7" [package.dependencies] idna = ">=2.0" multidict = ">=4.0" [metadata] lock-version = "1.1" python-versions = "^3.10" content-hash = "722b31574e5045db73552081d8d5dbb89f1b25904aa901f57f8aca4ee4f504ec" [metadata.files] aiohttp = [ {file = "aiohttp-3.8.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:ba71c9b4dcbb16212f334126cc3d8beb6af377f6703d9dc2d9fb3874fd667ee9"}, {file = "aiohttp-3.8.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d24b8bb40d5c61ef2d9b6a8f4528c2f17f1c5d2d31fed62ec860f6006142e83e"}, {file = "aiohttp-3.8.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f88df3a83cf9df566f171adba39d5bd52814ac0b94778d2448652fc77f9eb491"}, {file = "aiohttp-3.8.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b97decbb3372d4b69e4d4c8117f44632551c692bb1361b356a02b97b69e18a62"}, {file = "aiohttp-3.8.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:309aa21c1d54b8ef0723181d430347d7452daaff93e8e2363db8e75c72c2fb2d"}, {file = "aiohttp-3.8.3-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ad5383a67514e8e76906a06741febd9126fc7c7ff0f599d6fcce3e82b80d026f"}, {file = "aiohttp-3.8.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:20acae4f268317bb975671e375493dbdbc67cddb5f6c71eebdb85b34444ac46b"}, {file = "aiohttp-3.8.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:05a3c31c6d7cd08c149e50dc7aa2568317f5844acd745621983380597f027a18"}, {file = "aiohttp-3.8.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:d6f76310355e9fae637c3162936e9504b4767d5c52ca268331e2756e54fd4ca5"}, {file = "aiohttp-3.8.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:256deb4b29fe5e47893fa32e1de2d73c3afe7407738bd3c63829874661d4822d"}, {file = "aiohttp-3.8.3-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:5c59fcd80b9049b49acd29bd3598cada4afc8d8d69bd4160cd613246912535d7"}, {file = "aiohttp-3.8.3-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:059a91e88f2c00fe40aed9031b3606c3f311414f86a90d696dd982e7aec48142"}, {file = "aiohttp-3.8.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:2feebbb6074cdbd1ac276dbd737b40e890a1361b3cc30b74ac2f5e24aab41f7b"}, {file = "aiohttp-3.8.3-cp310-cp310-win32.whl", hash = "sha256:5bf651afd22d5f0c4be16cf39d0482ea494f5c88f03e75e5fef3a85177fecdeb"}, {file = "aiohttp-3.8.3-cp310-cp310-win_amd64.whl", hash = "sha256:653acc3880459f82a65e27bd6526e47ddf19e643457d36a2250b85b41a564715"}, {file = "aiohttp-3.8.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:86fc24e58ecb32aee09f864cb11bb91bc4c1086615001647dbfc4dc8c32f4008"}, {file = "aiohttp-3.8.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:75e14eac916f024305db517e00a9252714fce0abcb10ad327fb6dcdc0d060f1d"}, {file = "aiohttp-3.8.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d1fde0f44029e02d02d3993ad55ce93ead9bb9b15c6b7ccd580f90bd7e3de476"}, {file = "aiohttp-3.8.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4ab94426ddb1ecc6a0b601d832d5d9d421820989b8caa929114811369673235c"}, {file = "aiohttp-3.8.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:89d2e02167fa95172c017732ed7725bc8523c598757f08d13c5acca308e1a061"}, {file = "aiohttp-3.8.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:02f9a2c72fc95d59b881cf38a4b2be9381b9527f9d328771e90f72ac76f31ad8"}, {file = "aiohttp-3.8.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9c7149272fb5834fc186328e2c1fa01dda3e1fa940ce18fded6d412e8f2cf76d"}, {file = "aiohttp-3.8.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:512bd5ab136b8dc0ffe3fdf2dfb0c4b4f49c8577f6cae55dca862cd37a4564e2"}, {file = "aiohttp-3.8.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:7018ecc5fe97027214556afbc7c502fbd718d0740e87eb1217b17efd05b3d276"}, {file = "aiohttp-3.8.3-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:88c70ed9da9963d5496d38320160e8eb7e5f1886f9290475a881db12f351ab5d"}, {file = "aiohttp-3.8.3-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:da22885266bbfb3f78218dc40205fed2671909fbd0720aedba39b4515c038091"}, {file = "aiohttp-3.8.3-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:e65bc19919c910127c06759a63747ebe14f386cda573d95bcc62b427ca1afc73"}, {file = "aiohttp-3.8.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:08c78317e950e0762c2983f4dd58dc5e6c9ff75c8a0efeae299d363d439c8e34"}, {file = "aiohttp-3.8.3-cp311-cp311-win32.whl", hash = "sha256:45d88b016c849d74ebc6f2b6e8bc17cabf26e7e40c0661ddd8fae4c00f015697"}, {file = "aiohttp-3.8.3-cp311-cp311-win_amd64.whl", hash = "sha256:96372fc29471646b9b106ee918c8eeb4cca423fcbf9a34daa1b93767a88a2290"}, {file = "aiohttp-3.8.3-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:c971bf3786b5fad82ce5ad570dc6ee420f5b12527157929e830f51c55dc8af77"}, {file = "aiohttp-3.8.3-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ff25f48fc8e623d95eca0670b8cc1469a83783c924a602e0fbd47363bb54aaca"}, {file = "aiohttp-3.8.3-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e381581b37db1db7597b62a2e6b8b57c3deec95d93b6d6407c5b61ddc98aca6d"}, {file = "aiohttp-3.8.3-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:db19d60d846283ee275d0416e2a23493f4e6b6028825b51290ac05afc87a6f97"}, {file = "aiohttp-3.8.3-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:25892c92bee6d9449ffac82c2fe257f3a6f297792cdb18ad784737d61e7a9a85"}, {file = "aiohttp-3.8.3-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:398701865e7a9565d49189f6c90868efaca21be65c725fc87fc305906be915da"}, {file = "aiohttp-3.8.3-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:4a4fbc769ea9b6bd97f4ad0b430a6807f92f0e5eb020f1e42ece59f3ecfc4585"}, {file = "aiohttp-3.8.3-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:b29bfd650ed8e148f9c515474a6ef0ba1090b7a8faeee26b74a8ff3b33617502"}, {file = "aiohttp-3.8.3-cp36-cp36m-musllinux_1_1_ppc64le.whl", hash = "sha256:1e56b9cafcd6531bab5d9b2e890bb4937f4165109fe98e2b98ef0dcfcb06ee9d"}, {file = "aiohttp-3.8.3-cp36-cp36m-musllinux_1_1_s390x.whl", hash = "sha256:ec40170327d4a404b0d91855d41bfe1fe4b699222b2b93e3d833a27330a87a6d"}, {file = "aiohttp-3.8.3-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:2df5f139233060578d8c2c975128fb231a89ca0a462b35d4b5fcf7c501ebdbe1"}, {file = "aiohttp-3.8.3-cp36-cp36m-win32.whl", hash = "sha256:f973157ffeab5459eefe7b97a804987876dd0a55570b8fa56b4e1954bf11329b"}, {file = "aiohttp-3.8.3-cp36-cp36m-win_amd64.whl", hash = "sha256:437399385f2abcd634865705bdc180c8314124b98299d54fe1d4c8990f2f9494"}, {file = "aiohttp-3.8.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:09e28f572b21642128ef31f4e8372adb6888846f32fecb288c8b0457597ba61a"}, {file = "aiohttp-3.8.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6f3553510abdbec67c043ca85727396ceed1272eef029b050677046d3387be8d"}, {file = "aiohttp-3.8.3-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e168a7560b7c61342ae0412997b069753f27ac4862ec7867eff74f0fe4ea2ad9"}, {file = "aiohttp-3.8.3-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:db4c979b0b3e0fa7e9e69ecd11b2b3174c6963cebadeecfb7ad24532ffcdd11a"}, {file = "aiohttp-3.8.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e164e0a98e92d06da343d17d4e9c4da4654f4a4588a20d6c73548a29f176abe2"}, {file = "aiohttp-3.8.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e8a78079d9a39ca9ca99a8b0ac2fdc0c4d25fc80c8a8a82e5c8211509c523363"}, {file = "aiohttp-3.8.3-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:21b30885a63c3f4ff5b77a5d6caf008b037cb521a5f33eab445dc566f6d092cc"}, {file = "aiohttp-3.8.3-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:4b0f30372cef3fdc262f33d06e7b411cd59058ce9174ef159ad938c4a34a89da"}, {file = "aiohttp-3.8.3-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:8135fa153a20d82ffb64f70a1b5c2738684afa197839b34cc3e3c72fa88d302c"}, {file = "aiohttp-3.8.3-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:ad61a9639792fd790523ba072c0555cd6be5a0baf03a49a5dd8cfcf20d56df48"}, {file = "aiohttp-3.8.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:978b046ca728073070e9abc074b6299ebf3501e8dee5e26efacb13cec2b2dea0"}, {file = "aiohttp-3.8.3-cp37-cp37m-win32.whl", hash = "sha256:0d2c6d8c6872df4a6ec37d2ede71eff62395b9e337b4e18efd2177de883a5033"}, {file = "aiohttp-3.8.3-cp37-cp37m-win_amd64.whl", hash = "sha256:21d69797eb951f155026651f7e9362877334508d39c2fc37bd04ff55b2007091"}, {file = "aiohttp-3.8.3-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:2ca9af5f8f5812d475c5259393f52d712f6d5f0d7fdad9acdb1107dd9e3cb7eb"}, {file = "aiohttp-3.8.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1d90043c1882067f1bd26196d5d2db9aa6d268def3293ed5fb317e13c9413ea4"}, {file = "aiohttp-3.8.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:d737fc67b9a970f3234754974531dc9afeea11c70791dcb7db53b0cf81b79784"}, {file = "aiohttp-3.8.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ebf909ea0a3fc9596e40d55d8000702a85e27fd578ff41a5500f68f20fd32e6c"}, {file = "aiohttp-3.8.3-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5835f258ca9f7c455493a57ee707b76d2d9634d84d5d7f62e77be984ea80b849"}, {file = "aiohttp-3.8.3-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:da37dcfbf4b7f45d80ee386a5f81122501ec75672f475da34784196690762f4b"}, {file = "aiohttp-3.8.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:87f44875f2804bc0511a69ce44a9595d5944837a62caecc8490bbdb0e18b1342"}, {file = "aiohttp-3.8.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:527b3b87b24844ea7865284aabfab08eb0faf599b385b03c2aa91fc6edd6e4b6"}, {file = "aiohttp-3.8.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:d5ba88df9aa5e2f806650fcbeedbe4f6e8736e92fc0e73b0400538fd25a4dd96"}, {file = "aiohttp-3.8.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:e7b8813be97cab8cb52b1375f41f8e6804f6507fe4660152e8ca5c48f0436017"}, {file = "aiohttp-3.8.3-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:2dea10edfa1a54098703cb7acaa665c07b4e7568472a47f4e64e6319d3821ccf"}, {file = "aiohttp-3.8.3-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:713d22cd9643ba9025d33c4af43943c7a1eb8547729228de18d3e02e278472b6"}, {file = "aiohttp-3.8.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:2d252771fc85e0cf8da0b823157962d70639e63cb9b578b1dec9868dd1f4f937"}, {file = "aiohttp-3.8.3-cp38-cp38-win32.whl", hash = "sha256:66bd5f950344fb2b3dbdd421aaa4e84f4411a1a13fca3aeb2bcbe667f80c9f76"}, {file = "aiohttp-3.8.3-cp38-cp38-win_amd64.whl", hash = "sha256:84b14f36e85295fe69c6b9789b51a0903b774046d5f7df538176516c3e422446"}, {file = "aiohttp-3.8.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:16c121ba0b1ec2b44b73e3a8a171c4f999b33929cd2397124a8c7fcfc8cd9e06"}, {file = "aiohttp-3.8.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:8d6aaa4e7155afaf994d7924eb290abbe81a6905b303d8cb61310a2aba1c68ba"}, {file = "aiohttp-3.8.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:43046a319664a04b146f81b40e1545d4c8ac7b7dd04c47e40bf09f65f2437346"}, {file = "aiohttp-3.8.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:599418aaaf88a6d02a8c515e656f6faf3d10618d3dd95866eb4436520096c84b"}, {file = "aiohttp-3.8.3-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:92a2964319d359f494f16011e23434f6f8ef0434acd3cf154a6b7bec511e2fb7"}, {file = "aiohttp-3.8.3-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:73a4131962e6d91109bca6536416aa067cf6c4efb871975df734f8d2fd821b37"}, {file = "aiohttp-3.8.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:598adde339d2cf7d67beaccda3f2ce7c57b3b412702f29c946708f69cf8222aa"}, {file = "aiohttp-3.8.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:75880ed07be39beff1881d81e4a907cafb802f306efd6d2d15f2b3c69935f6fb"}, {file = "aiohttp-3.8.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:a0239da9fbafd9ff82fd67c16704a7d1bccf0d107a300e790587ad05547681c8"}, {file = "aiohttp-3.8.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:4e3a23ec214e95c9fe85a58470b660efe6534b83e6cbe38b3ed52b053d7cb6ad"}, {file = "aiohttp-3.8.3-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:47841407cc89a4b80b0c52276f3cc8138bbbfba4b179ee3acbd7d77ae33f7ac4"}, {file = "aiohttp-3.8.3-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:54d107c89a3ebcd13228278d68f1436d3f33f2dd2af5415e3feaeb1156e1a62c"}, {file = "aiohttp-3.8.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:c37c5cce780349d4d51739ae682dec63573847a2a8dcb44381b174c3d9c8d403"}, {file = "aiohttp-3.8.3-cp39-cp39-win32.whl", hash = "sha256:f178d2aadf0166be4df834c4953da2d7eef24719e8aec9a65289483eeea9d618"}, {file = "aiohttp-3.8.3-cp39-cp39-win_amd64.whl", hash = "sha256:88e5be56c231981428f4f506c68b6a46fa25c4123a2e86d156c58a8369d31ab7"}, {file = "aiohttp-3.8.3.tar.gz", hash = "sha256:3828fb41b7203176b82fe5d699e0d845435f2374750a44b480ea6b930f6be269"}, ] aiosignal = [ {file = "aiosignal-1.3.1-py3-none-any.whl", hash = "sha256:f8376fb07dd1e86a584e4fcdec80b36b7f81aac666ebc724e2c090300dd83b17"}, {file = "aiosignal-1.3.1.tar.gz", hash = "sha256:54cd96e15e1649b75d6c87526a6ff0b6c1b0dd3459f43d9ca11d48c339b68cfc"}, ] alabaster = [ {file = "alabaster-0.7.12-py2.py3-none-any.whl", hash = "sha256:446438bdcca0e05bd45ea2de1668c1d9b032e1a9154c2c259092d77031ddd359"}, {file = "alabaster-0.7.12.tar.gz", hash = "sha256:a661d72d58e6ea8a57f7a86e37d86716863ee5e92788398526d58b26a4e4dc02"}, ] anyio = [ {file = "anyio-3.6.2-py3-none-any.whl", hash = "sha256:fbbe32bd270d2a2ef3ed1c5d45041250284e31fc0a4df4a5a6071842051a51e3"}, {file = "anyio-3.6.2.tar.gz", hash = "sha256:25ea0d673ae30af41a0c442f81cf3b38c7e79fdc7b60335a4c14e05eb0947421"}, ] async-timeout = [ {file = "async-timeout-4.0.2.tar.gz", hash = "sha256:2163e1640ddb52b7a8c80d0a67a08587e5d245cc9c553a74a847056bc2976b15"}, {file = "async_timeout-4.0.2-py3-none-any.whl", hash = "sha256:8ca1e4fcf50d07413d66d1a5e416e42cfdf5851c981d679a09851a6853383b3c"}, ] attrs = [ {file = "attrs-22.1.0-py2.py3-none-any.whl", hash = "sha256:86efa402f67bf2df34f51a335487cf46b1ec130d02b8d39fd248abfd30da551c"}, {file = "attrs-22.1.0.tar.gz", hash = "sha256:29adc2665447e5191d0e7c568fde78b21f9672d344281d0c6e1ab085429b22b6"}, ] autoflake = [ {file = "autoflake-1.7.7-py3-none-any.whl", hash = "sha256:a9b43d08f8e455824e4f7b3f078399f59ba538ba53872f466c09e55c827773ef"}, {file = "autoflake-1.7.7.tar.gz", hash = "sha256:c8e4fc41aa3eae0f5c94b939e3a3d50923d7a9306786a6cbf4866a077b8f6832"}, ] babel = [ {file = "Babel-2.11.0-py3-none-any.whl", hash = "sha256:1ad3eca1c885218f6dce2ab67291178944f810a10a9b5f3cb8382a5a232b64fe"}, {file = "Babel-2.11.0.tar.gz", hash = "sha256:5ef4b3226b0180dedded4229651c8b0e1a3a6a2837d45a073272f313e4cf97f6"}, ] backoff = [ {file = "backoff-2.2.1-py3-none-any.whl", hash = "sha256:63579f9a0628e06278f7e47b7d7d5b6ce20dc65c5e96a6f3ca99a6adca0396e8"}, {file = "backoff-2.2.1.tar.gz", hash = "sha256:03f829f5bb1923180821643f8753b0502c3b682293992485b0eef2807afa5cba"}, ] black = [ {file = "black-22.10.0-1fixedarch-cp310-cp310-macosx_11_0_x86_64.whl", hash = "sha256:5cc42ca67989e9c3cf859e84c2bf014f6633db63d1cbdf8fdb666dcd9e77e3fa"}, {file = "black-22.10.0-1fixedarch-cp311-cp311-macosx_11_0_x86_64.whl", hash = "sha256:5d8f74030e67087b219b032aa33a919fae8806d49c867846bfacde57f43972ef"}, {file = "black-22.10.0-1fixedarch-cp37-cp37m-macosx_10_16_x86_64.whl", hash = "sha256:197df8509263b0b8614e1df1756b1dd41be6738eed2ba9e9769f3880c2b9d7b6"}, {file = "black-22.10.0-1fixedarch-cp38-cp38-macosx_10_16_x86_64.whl", hash = "sha256:2644b5d63633702bc2c5f3754b1b475378fbbfb481f62319388235d0cd104c2d"}, {file = "black-22.10.0-1fixedarch-cp39-cp39-macosx_11_0_x86_64.whl", hash = "sha256:e41a86c6c650bcecc6633ee3180d80a025db041a8e2398dcc059b3afa8382cd4"}, {file = "black-22.10.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2039230db3c6c639bd84efe3292ec7b06e9214a2992cd9beb293d639c6402edb"}, {file = "black-22.10.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:14ff67aec0a47c424bc99b71005202045dc09270da44a27848d534600ac64fc7"}, {file = "black-22.10.0-cp310-cp310-win_amd64.whl", hash = "sha256:819dc789f4498ecc91438a7de64427c73b45035e2e3680c92e18795a839ebb66"}, {file = "black-22.10.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5b9b29da4f564ba8787c119f37d174f2b69cdfdf9015b7d8c5c16121ddc054ae"}, {file = "black-22.10.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b8b49776299fece66bffaafe357d929ca9451450f5466e997a7285ab0fe28e3b"}, {file = "black-22.10.0-cp311-cp311-win_amd64.whl", hash = "sha256:21199526696b8f09c3997e2b4db8d0b108d801a348414264d2eb8eb2532e540d"}, {file = "black-22.10.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1e464456d24e23d11fced2bc8c47ef66d471f845c7b7a42f3bd77bf3d1789650"}, {file = "black-22.10.0-cp37-cp37m-win_amd64.whl", hash = "sha256:9311e99228ae10023300ecac05be5a296f60d2fd10fff31cf5c1fa4ca4b1988d"}, {file = "black-22.10.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:fba8a281e570adafb79f7755ac8721b6cf1bbf691186a287e990c7929c7692ff"}, {file = "black-22.10.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:915ace4ff03fdfff953962fa672d44be269deb2eaf88499a0f8805221bc68c87"}, {file = "black-22.10.0-cp38-cp38-win_amd64.whl", hash = "sha256:444ebfb4e441254e87bad00c661fe32df9969b2bf224373a448d8aca2132b395"}, {file = "black-22.10.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:974308c58d057a651d182208a484ce80a26dac0caef2895836a92dd6ebd725e0"}, {file = "black-22.10.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:72ef3925f30e12a184889aac03d77d031056860ccae8a1e519f6cbb742736383"}, {file = "black-22.10.0-cp39-cp39-win_amd64.whl", hash = "sha256:432247333090c8c5366e69627ccb363bc58514ae3e63f7fc75c54b1ea80fa7de"}, {file = "black-22.10.0-py3-none-any.whl", hash = "sha256:c957b2b4ea88587b46cf49d1dc17681c1e672864fd7af32fc1e9664d572b3458"}, {file = "black-22.10.0.tar.gz", hash = "sha256:f513588da599943e0cde4e32cc9879e825d58720d6557062d1098c5ad80080e1"}, ] cattrs = [ {file = "cattrs-22.2.0-py3-none-any.whl", hash = "sha256:bc12b1f0d000b9f9bee83335887d532a1d3e99a833d1bf0882151c97d3e68c21"}, {file = "cattrs-22.2.0.tar.gz", hash = "sha256:f0eed5642399423cf656e7b66ce92cdc5b963ecafd041d1b24d136fdde7acf6d"}, ] certifi = [ {file = "certifi-2022.9.24-py3-none-any.whl", hash = "sha256:90c1a32f1d68f940488354e36370f6cca89f0f106db09518524c88d6ed83f382"}, {file = "certifi-2022.9.24.tar.gz", hash = "sha256:0d9c601124e5a6ba9712dbc60d9c53c21e34f5f641fe83002317394311bdce14"}, ] charset-normalizer = [ {file = "charset-normalizer-2.1.1.tar.gz", hash = "sha256:5a3d016c7c547f69d6f81fb0db9449ce888b418b5b9952cc5e6e66843e9dd845"}, {file = "charset_normalizer-2.1.1-py3-none-any.whl", hash = "sha256:83e9a75d1911279afd89352c68b45348559d1fc0506b054b346651b5e7fee29f"}, ] click = [ {file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"}, {file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"}, ] colorama = [ {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, ] commonmark = [ {file = "commonmark-0.9.1-py2.py3-none-any.whl", hash = "sha256:da2f38c92590f83de410ba1a3cbceafbc74fee9def35f9251ba9a971d6d66fd9"}, {file = "commonmark-0.9.1.tar.gz", hash = "sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60"}, ] docutils = [ {file = "docutils-0.17.1-py2.py3-none-any.whl", hash = "sha256:cf316c8370a737a022b72b56874f6602acf974a37a9fba42ec2876387549fc61"}, {file = "docutils-0.17.1.tar.gz", hash = "sha256:686577d2e4c32380bb50cbb22f575ed742d58168cee37e99117a854bcd88f125"}, ] eradicate = [ {file = "eradicate-2.1.0-py3-none-any.whl", hash = "sha256:8bfaca181db9227dc88bdbce4d051a9627604c2243e7d85324f6d6ce0fd08bb2"}, {file = "eradicate-2.1.0.tar.gz", hash = "sha256:aac7384ab25b1bf21c4c012de9b4bf8398945a14c98c911545b2ea50ab558014"}, ] exceptiongroup = [ {file = "exceptiongroup-1.0.1-py3-none-any.whl", hash = "sha256:4d6c0aa6dd825810941c792f53d7b8d71da26f5e5f84f20f9508e8f2d33b140a"}, {file = "exceptiongroup-1.0.1.tar.gz", hash = "sha256:73866f7f842ede6cb1daa42c4af078e2035e5f7607f0e2c762cc51bb31bbe7b2"}, ] flake8 = [ {file = "flake8-5.0.4-py2.py3-none-any.whl", hash = "sha256:7a1cf6b73744f5806ab95e526f6f0d8c01c66d7bbe349562d22dfca20610b248"}, {file = "flake8-5.0.4.tar.gz", hash = "sha256:6fbe320aad8d6b95cec8b8e47bc933004678dc63095be98528b7bdd2a9f510db"}, ] flake8-black = [ {file = "flake8-black-0.3.3.tar.gz", hash = "sha256:8211f5e20e954cb57c709acccf2f3281ce27016d4c4b989c3e51f878bb7ce12a"}, {file = "flake8_black-0.3.3-py3-none-any.whl", hash = "sha256:7d667d0059fd1aa468de1669d77cc934b7f1feeac258d57bdae69a8e73c4cd90"}, ] flake8-bugbear = [ {file = "flake8-bugbear-22.10.27.tar.gz", hash = "sha256:a6708608965c9e0de5fff13904fed82e0ba21ac929fe4896459226a797e11cd5"}, {file = "flake8_bugbear-22.10.27-py3-none-any.whl", hash = "sha256:6ad0ab754507319060695e2f2be80e6d8977cfcea082293089a9226276bd825d"}, ] flake8-eradicate = [ {file = "flake8-eradicate-1.4.0.tar.gz", hash = "sha256:3088cfd6717d1c9c6c3ac45ef2e5f5b6c7267f7504d5a74b781500e95cb9c7e1"}, {file = "flake8_eradicate-1.4.0-py3-none-any.whl", hash = "sha256:e3bbd0871be358e908053c1ab728903c114f062ba596b4d40c852fd18f473d56"}, ] flake8-isort = [ {file = "flake8-isort-5.0.0.tar.gz", hash = "sha256:e336f928c7edc509684930ab124414194b7f4e237c712af8fcbdf49d8747b10c"}, {file = "flake8_isort-5.0.0-py3-none-any.whl", hash = "sha256:c73f9cbd1bf209887f602a27b827164ccfeba1676801b2aa23cb49051a1be79c"}, ] frozenlist = [ {file = "frozenlist-1.3.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:ff8bf625fe85e119553b5383ba0fb6aa3d0ec2ae980295aaefa552374926b3f4"}, {file = "frozenlist-1.3.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:dfbac4c2dfcc082fcf8d942d1e49b6aa0766c19d3358bd86e2000bf0fa4a9cf0"}, {file = "frozenlist-1.3.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:b1c63e8d377d039ac769cd0926558bb7068a1f7abb0f003e3717ee003ad85530"}, {file = "frozenlist-1.3.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7fdfc24dcfce5b48109867c13b4cb15e4660e7bd7661741a391f821f23dfdca7"}, {file = "frozenlist-1.3.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2c926450857408e42f0bbc295e84395722ce74bae69a3b2aa2a65fe22cb14b99"}, {file = "frozenlist-1.3.3-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1841e200fdafc3d51f974d9d377c079a0694a8f06de2e67b48150328d66d5483"}, {file = "frozenlist-1.3.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f470c92737afa7d4c3aacc001e335062d582053d4dbe73cda126f2d7031068dd"}, {file = "frozenlist-1.3.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:783263a4eaad7c49983fe4b2e7b53fa9770c136c270d2d4bbb6d2192bf4d9caf"}, {file = "frozenlist-1.3.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:924620eef691990dfb56dc4709f280f40baee568c794b5c1885800c3ecc69816"}, {file = "frozenlist-1.3.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:ae4dc05c465a08a866b7a1baf360747078b362e6a6dbeb0c57f234db0ef88ae0"}, {file = "frozenlist-1.3.3-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:bed331fe18f58d844d39ceb398b77d6ac0b010d571cba8267c2e7165806b00ce"}, {file = "frozenlist-1.3.3-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:02c9ac843e3390826a265e331105efeab489ffaf4dd86384595ee8ce6d35ae7f"}, {file = "frozenlist-1.3.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:9545a33965d0d377b0bc823dcabf26980e77f1b6a7caa368a365a9497fb09420"}, {file = "frozenlist-1.3.3-cp310-cp310-win32.whl", hash = "sha256:d5cd3ab21acbdb414bb6c31958d7b06b85eeb40f66463c264a9b343a4e238642"}, {file = "frozenlist-1.3.3-cp310-cp310-win_amd64.whl", hash = "sha256:b756072364347cb6aa5b60f9bc18e94b2f79632de3b0190253ad770c5df17db1"}, {file = "frozenlist-1.3.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:b4395e2f8d83fbe0c627b2b696acce67868793d7d9750e90e39592b3626691b7"}, {file = "frozenlist-1.3.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:14143ae966a6229350021384870458e4777d1eae4c28d1a7aa47f24d030e6678"}, {file = "frozenlist-1.3.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5d8860749e813a6f65bad8285a0520607c9500caa23fea6ee407e63debcdbef6"}, {file = "frozenlist-1.3.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:23d16d9f477bb55b6154654e0e74557040575d9d19fe78a161bd33d7d76808e8"}, {file = "frozenlist-1.3.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:eb82dbba47a8318e75f679690190c10a5e1f447fbf9df41cbc4c3afd726d88cb"}, {file = "frozenlist-1.3.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9309869032abb23d196cb4e4db574232abe8b8be1339026f489eeb34a4acfd91"}, {file = "frozenlist-1.3.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a97b4fe50b5890d36300820abd305694cb865ddb7885049587a5678215782a6b"}, {file = "frozenlist-1.3.3-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c188512b43542b1e91cadc3c6c915a82a5eb95929134faf7fd109f14f9892ce4"}, {file = "frozenlist-1.3.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:303e04d422e9b911a09ad499b0368dc551e8c3cd15293c99160c7f1f07b59a48"}, {file = "frozenlist-1.3.3-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:0771aed7f596c7d73444c847a1c16288937ef988dc04fb9f7be4b2aa91db609d"}, {file = "frozenlist-1.3.3-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:66080ec69883597e4d026f2f71a231a1ee9887835902dbe6b6467d5a89216cf6"}, {file = "frozenlist-1.3.3-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:41fe21dc74ad3a779c3d73a2786bdf622ea81234bdd4faf90b8b03cad0c2c0b4"}, {file = "frozenlist-1.3.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:f20380df709d91525e4bee04746ba612a4df0972c1b8f8e1e8af997e678c7b81"}, {file = "frozenlist-1.3.3-cp311-cp311-win32.whl", hash = "sha256:f30f1928162e189091cf4d9da2eac617bfe78ef907a761614ff577ef4edfb3c8"}, {file = "frozenlist-1.3.3-cp311-cp311-win_amd64.whl", hash = "sha256:a6394d7dadd3cfe3f4b3b186e54d5d8504d44f2d58dcc89d693698e8b7132b32"}, {file = "frozenlist-1.3.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:8df3de3a9ab8325f94f646609a66cbeeede263910c5c0de0101079ad541af332"}, {file = "frozenlist-1.3.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0693c609e9742c66ba4870bcee1ad5ff35462d5ffec18710b4ac89337ff16e27"}, {file = "frozenlist-1.3.3-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cd4210baef299717db0a600d7a3cac81d46ef0e007f88c9335db79f8979c0d3d"}, {file = "frozenlist-1.3.3-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:394c9c242113bfb4b9aa36e2b80a05ffa163a30691c7b5a29eba82e937895d5e"}, {file = "frozenlist-1.3.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6327eb8e419f7d9c38f333cde41b9ae348bec26d840927332f17e887a8dcb70d"}, {file = "frozenlist-1.3.3-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2e24900aa13212e75e5b366cb9065e78bbf3893d4baab6052d1aca10d46d944c"}, {file = "frozenlist-1.3.3-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:3843f84a6c465a36559161e6c59dce2f2ac10943040c2fd021cfb70d58c4ad56"}, {file = "frozenlist-1.3.3-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:84610c1502b2461255b4c9b7d5e9c48052601a8957cd0aea6ec7a7a1e1fb9420"}, {file = "frozenlist-1.3.3-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:c21b9aa40e08e4f63a2f92ff3748e6b6c84d717d033c7b3438dd3123ee18f70e"}, {file = "frozenlist-1.3.3-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:efce6ae830831ab6a22b9b4091d411698145cb9b8fc869e1397ccf4b4b6455cb"}, {file = "frozenlist-1.3.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:40de71985e9042ca00b7953c4f41eabc3dc514a2d1ff534027f091bc74416401"}, {file = "frozenlist-1.3.3-cp37-cp37m-win32.whl", hash = "sha256:180c00c66bde6146a860cbb81b54ee0df350d2daf13ca85b275123bbf85de18a"}, {file = "frozenlist-1.3.3-cp37-cp37m-win_amd64.whl", hash = "sha256:9bbbcedd75acdfecf2159663b87f1bb5cfc80e7cd99f7ddd9d66eb98b14a8411"}, {file = "frozenlist-1.3.3-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:034a5c08d36649591be1cbb10e09da9f531034acfe29275fc5454a3b101ce41a"}, {file = "frozenlist-1.3.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:ba64dc2b3b7b158c6660d49cdb1d872d1d0bf4e42043ad8d5006099479a194e5"}, {file = "frozenlist-1.3.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:47df36a9fe24054b950bbc2db630d508cca3aa27ed0566c0baf661225e52c18e"}, {file = "frozenlist-1.3.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:008a054b75d77c995ea26629ab3a0c0d7281341f2fa7e1e85fa6153ae29ae99c"}, {file = "frozenlist-1.3.3-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:841ea19b43d438a80b4de62ac6ab21cfe6827bb8a9dc62b896acc88eaf9cecba"}, {file = "frozenlist-1.3.3-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e235688f42b36be2b6b06fc37ac2126a73b75fb8d6bc66dd632aa35286238703"}, {file = "frozenlist-1.3.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ca713d4af15bae6e5d79b15c10c8522859a9a89d3b361a50b817c98c2fb402a2"}, {file = "frozenlist-1.3.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9ac5995f2b408017b0be26d4a1d7c61bce106ff3d9e3324374d66b5964325448"}, {file = "frozenlist-1.3.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:a4ae8135b11652b08a8baf07631d3ebfe65a4c87909dbef5fa0cdde440444ee4"}, {file = "frozenlist-1.3.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:4ea42116ceb6bb16dbb7d526e242cb6747b08b7710d9782aa3d6732bd8d27649"}, {file = "frozenlist-1.3.3-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:810860bb4bdce7557bc0febb84bbd88198b9dbc2022d8eebe5b3590b2ad6c842"}, {file = "frozenlist-1.3.3-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:ee78feb9d293c323b59a6f2dd441b63339a30edf35abcb51187d2fc26e696d13"}, {file = "frozenlist-1.3.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:0af2e7c87d35b38732e810befb9d797a99279cbb85374d42ea61c1e9d23094b3"}, {file = "frozenlist-1.3.3-cp38-cp38-win32.whl", hash = "sha256:899c5e1928eec13fd6f6d8dc51be23f0d09c5281e40d9cf4273d188d9feeaf9b"}, {file = "frozenlist-1.3.3-cp38-cp38-win_amd64.whl", hash = "sha256:7f44e24fa70f6fbc74aeec3e971f60a14dde85da364aa87f15d1be94ae75aeef"}, {file = "frozenlist-1.3.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:2b07ae0c1edaa0a36339ec6cce700f51b14a3fc6545fdd32930d2c83917332cf"}, {file = "frozenlist-1.3.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:ebb86518203e12e96af765ee89034a1dbb0c3c65052d1b0c19bbbd6af8a145e1"}, {file = "frozenlist-1.3.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:5cf820485f1b4c91e0417ea0afd41ce5cf5965011b3c22c400f6d144296ccbc0"}, {file = "frozenlist-1.3.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5c11e43016b9024240212d2a65043b70ed8dfd3b52678a1271972702d990ac6d"}, {file = "frozenlist-1.3.3-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8fa3c6e3305aa1146b59a09b32b2e04074945ffcfb2f0931836d103a2c38f936"}, {file = "frozenlist-1.3.3-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:352bd4c8c72d508778cf05ab491f6ef36149f4d0cb3c56b1b4302852255d05d5"}, {file = "frozenlist-1.3.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:65a5e4d3aa679610ac6e3569e865425b23b372277f89b5ef06cf2cdaf1ebf22b"}, {file = "frozenlist-1.3.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b1e2c1185858d7e10ff045c496bbf90ae752c28b365fef2c09cf0fa309291669"}, {file = "frozenlist-1.3.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:f163d2fd041c630fed01bc48d28c3ed4a3b003c00acd396900e11ee5316b56bb"}, {file = "frozenlist-1.3.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:05cdb16d09a0832eedf770cb7bd1fe57d8cf4eaf5aced29c4e41e3f20b30a784"}, {file = "frozenlist-1.3.3-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:8bae29d60768bfa8fb92244b74502b18fae55a80eac13c88eb0b496d4268fd2d"}, {file = "frozenlist-1.3.3-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:eedab4c310c0299961ac285591acd53dc6723a1ebd90a57207c71f6e0c2153ab"}, {file = "frozenlist-1.3.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:3bbdf44855ed8f0fbcd102ef05ec3012d6a4fd7c7562403f76ce6a52aeffb2b1"}, {file = "frozenlist-1.3.3-cp39-cp39-win32.whl", hash = "sha256:efa568b885bca461f7c7b9e032655c0c143d305bf01c30caf6db2854a4532b38"}, {file = "frozenlist-1.3.3-cp39-cp39-win_amd64.whl", hash = "sha256:cfe33efc9cb900a4c46f91a5ceba26d6df370ffddd9ca386eb1d4f0ad97b9ea9"}, {file = "frozenlist-1.3.3.tar.gz", hash = "sha256:58bcc55721e8a90b88332d6cd441261ebb22342e238296bb330968952fbb3a6a"}, ] gql = [ {file = "gql-3.4.0-py2.py3-none-any.whl", hash = "sha256:59c8a0b8f0a2f3b0b2ff970c94de86f82f65cb1da3340bfe57143e5f7ea82f71"}, {file = "gql-3.4.0.tar.gz", hash = "sha256:ca81aa8314fa88a8c57dd1ce34941278e0c352d762eb721edcba0387829ea7c0"}, ] graphql-core = [ {file = "graphql-core-3.2.3.tar.gz", hash = "sha256:06d2aad0ac723e35b1cb47885d3e5c45e956a53bc1b209a9fc5369007fe46676"}, {file = "graphql_core-3.2.3-py3-none-any.whl", hash = "sha256:5766780452bd5ec8ba133f8bf287dc92713e3868ddd83aee4faab9fc3e303dc3"}, ] idna = [ {file = "idna-3.4-py3-none-any.whl", hash = "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"}, {file = "idna-3.4.tar.gz", hash = "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"}, ] imagesize = [ {file = "imagesize-1.4.1-py2.py3-none-any.whl", hash = "sha256:0d8d18d08f840c19d0ee7ca1fd82490fdc3729b7ac93f49870406ddde8ef8d8b"}, {file = "imagesize-1.4.1.tar.gz", hash = "sha256:69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a"}, ] iniconfig = [ {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"}, ] isort = [ {file = "isort-5.10.1-py3-none-any.whl", hash = "sha256:6f62d78e2f89b4500b080fe3a81690850cd254227f27f75c3a0c491a1f351ba7"}, {file = "isort-5.10.1.tar.gz", hash = "sha256:e8443a5e7a020e9d7f97f1d7d9cd17c88bcb3bc7e218bf9cf5095fe550be2951"}, ] jinja2 = [ {file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"}, {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, ] markupsafe = [ {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:86b1f75c4e7c2ac2ccdaec2b9022845dbb81880ca318bb7a0a01fbf7813e3812"}, {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f121a1420d4e173a5d96e47e9a0c0dcff965afdf1626d28de1460815f7c4ee7a"}, {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a49907dd8420c5685cfa064a1335b6754b74541bbb3706c259c02ed65b644b3e"}, {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10c1bfff05d95783da83491be968e8fe789263689c02724e0c691933c52994f5"}, {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b7bd98b796e2b6553da7225aeb61f447f80a1ca64f41d83612e6139ca5213aa4"}, {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b09bf97215625a311f669476f44b8b318b075847b49316d3e28c08e41a7a573f"}, {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:694deca8d702d5db21ec83983ce0bb4b26a578e71fbdbd4fdcd387daa90e4d5e"}, {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:efc1913fd2ca4f334418481c7e595c00aad186563bbc1ec76067848c7ca0a933"}, {file = "MarkupSafe-2.1.1-cp310-cp310-win32.whl", hash = "sha256:4a33dea2b688b3190ee12bd7cfa29d39c9ed176bda40bfa11099a3ce5d3a7ac6"}, {file = "MarkupSafe-2.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:dda30ba7e87fbbb7eab1ec9f58678558fd9a6b8b853530e176eabd064da81417"}, {file = "MarkupSafe-2.1.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:671cd1187ed5e62818414afe79ed29da836dde67166a9fac6d435873c44fdd02"}, {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3799351e2336dc91ea70b034983ee71cf2f9533cdff7c14c90ea126bfd95d65a"}, {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e72591e9ecd94d7feb70c1cbd7be7b3ebea3f548870aa91e2732960fa4d57a37"}, {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6fbf47b5d3728c6aea2abb0589b5d30459e369baa772e0f37a0320185e87c980"}, {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d5ee4f386140395a2c818d149221149c54849dfcfcb9f1debfe07a8b8bd63f9a"}, {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:bcb3ed405ed3222f9904899563d6fc492ff75cce56cba05e32eff40e6acbeaa3"}, {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:e1c0b87e09fa55a220f058d1d49d3fb8df88fbfab58558f1198e08c1e1de842a"}, {file = "MarkupSafe-2.1.1-cp37-cp37m-win32.whl", hash = "sha256:8dc1c72a69aa7e082593c4a203dcf94ddb74bb5c8a731e4e1eb68d031e8498ff"}, {file = "MarkupSafe-2.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:97a68e6ada378df82bc9f16b800ab77cbf4b2fada0081794318520138c088e4a"}, {file = "MarkupSafe-2.1.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:e8c843bbcda3a2f1e3c2ab25913c80a3c5376cd00c6e8c4a86a89a28c8dc5452"}, {file = "MarkupSafe-2.1.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0212a68688482dc52b2d45013df70d169f542b7394fc744c02a57374a4207003"}, {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e576a51ad59e4bfaac456023a78f6b5e6e7651dcd383bcc3e18d06f9b55d6d1"}, {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4b9fe39a2ccc108a4accc2676e77da025ce383c108593d65cc909add5c3bd601"}, {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:96e37a3dc86e80bf81758c152fe66dbf60ed5eca3d26305edf01892257049925"}, {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:6d0072fea50feec76a4c418096652f2c3238eaa014b2f94aeb1d56a66b41403f"}, {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:089cf3dbf0cd6c100f02945abeb18484bd1ee57a079aefd52cffd17fba910b88"}, {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6a074d34ee7a5ce3effbc526b7083ec9731bb3cbf921bbe1d3005d4d2bdb3a63"}, {file = "MarkupSafe-2.1.1-cp38-cp38-win32.whl", hash = "sha256:421be9fbf0ffe9ffd7a378aafebbf6f4602d564d34be190fc19a193232fd12b1"}, {file = "MarkupSafe-2.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:fc7b548b17d238737688817ab67deebb30e8073c95749d55538ed473130ec0c7"}, {file = "MarkupSafe-2.1.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:e04e26803c9c3851c931eac40c695602c6295b8d432cbe78609649ad9bd2da8a"}, {file = "MarkupSafe-2.1.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b87db4360013327109564f0e591bd2a3b318547bcef31b468a92ee504d07ae4f"}, {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:99a2a507ed3ac881b975a2976d59f38c19386d128e7a9a18b7df6fff1fd4c1d6"}, {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:56442863ed2b06d19c37f94d999035e15ee982988920e12a5b4ba29b62ad1f77"}, {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3ce11ee3f23f79dbd06fb3d63e2f6af7b12db1d46932fe7bd8afa259a5996603"}, {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:33b74d289bd2f5e527beadcaa3f401e0df0a89927c1559c8566c066fa4248ab7"}, {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:43093fb83d8343aac0b1baa75516da6092f58f41200907ef92448ecab8825135"}, {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8e3dcf21f367459434c18e71b2a9532d96547aef8a871872a5bd69a715c15f96"}, {file = "MarkupSafe-2.1.1-cp39-cp39-win32.whl", hash = "sha256:d4306c36ca495956b6d568d276ac11fdd9c30a36f1b6eb928070dc5360b22e1c"}, {file = "MarkupSafe-2.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:46d00d6cfecdde84d40e572d63735ef81423ad31184100411e6e3388d405e247"}, {file = "MarkupSafe-2.1.1.tar.gz", hash = "sha256:7f91197cc9e48f989d12e4e6fbc46495c446636dfc81b9ccf50bb0ec74b91d4b"}, ] mccabe = [ {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"}, {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"}, ] multidict = [ {file = "multidict-6.0.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:0b9e95a740109c6047602f4db4da9949e6c5945cefbad34a1299775ddc9a62e2"}, {file = "multidict-6.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ac0e27844758d7177989ce406acc6a83c16ed4524ebc363c1f748cba184d89d3"}, {file = "multidict-6.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:041b81a5f6b38244b34dc18c7b6aba91f9cdaf854d9a39e5ff0b58e2b5773b9c"}, {file = "multidict-6.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5fdda29a3c7e76a064f2477c9aab1ba96fd94e02e386f1e665bca1807fc5386f"}, {file = "multidict-6.0.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3368bf2398b0e0fcbf46d85795adc4c259299fec50c1416d0f77c0a843a3eed9"}, {file = "multidict-6.0.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f4f052ee022928d34fe1f4d2bc743f32609fb79ed9c49a1710a5ad6b2198db20"}, {file = "multidict-6.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:225383a6603c086e6cef0f2f05564acb4f4d5f019a4e3e983f572b8530f70c88"}, {file = "multidict-6.0.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:50bd442726e288e884f7be9071016c15a8742eb689a593a0cac49ea093eef0a7"}, {file = "multidict-6.0.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:47e6a7e923e9cada7c139531feac59448f1f47727a79076c0b1ee80274cd8eee"}, {file = "multidict-6.0.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:0556a1d4ea2d949efe5fd76a09b4a82e3a4a30700553a6725535098d8d9fb672"}, {file = "multidict-6.0.2-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:626fe10ac87851f4cffecee161fc6f8f9853f0f6f1035b59337a51d29ff3b4f9"}, {file = "multidict-6.0.2-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:8064b7c6f0af936a741ea1efd18690bacfbae4078c0c385d7c3f611d11f0cf87"}, {file = "multidict-6.0.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:2d36e929d7f6a16d4eb11b250719c39560dd70545356365b494249e2186bc389"}, {file = "multidict-6.0.2-cp310-cp310-win32.whl", hash = "sha256:fcb91630817aa8b9bc4a74023e4198480587269c272c58b3279875ed7235c293"}, {file = "multidict-6.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:8cbf0132f3de7cc6c6ce00147cc78e6439ea736cee6bca4f068bcf892b0fd658"}, {file = "multidict-6.0.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:05f6949d6169878a03e607a21e3b862eaf8e356590e8bdae4227eedadacf6e51"}, {file = "multidict-6.0.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e2c2e459f7050aeb7c1b1276763364884595d47000c1cddb51764c0d8976e608"}, {file = "multidict-6.0.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d0509e469d48940147e1235d994cd849a8f8195e0bca65f8f5439c56e17872a3"}, {file = "multidict-6.0.2-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:514fe2b8d750d6cdb4712346a2c5084a80220821a3e91f3f71eec11cf8d28fd4"}, {file = "multidict-6.0.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:19adcfc2a7197cdc3987044e3f415168fc5dc1f720c932eb1ef4f71a2067e08b"}, {file = "multidict-6.0.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b9d153e7f1f9ba0b23ad1568b3b9e17301e23b042c23870f9ee0522dc5cc79e8"}, {file = "multidict-6.0.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:aef9cc3d9c7d63d924adac329c33835e0243b5052a6dfcbf7732a921c6e918ba"}, {file = "multidict-6.0.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:4571f1beddff25f3e925eea34268422622963cd8dc395bb8778eb28418248e43"}, {file = "multidict-6.0.2-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:d48b8ee1d4068561ce8033d2c344cf5232cb29ee1a0206a7b828c79cbc5982b8"}, {file = "multidict-6.0.2-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:45183c96ddf61bf96d2684d9fbaf6f3564d86b34cb125761f9a0ef9e36c1d55b"}, {file = "multidict-6.0.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:75bdf08716edde767b09e76829db8c1e5ca9d8bb0a8d4bd94ae1eafe3dac5e15"}, {file = "multidict-6.0.2-cp37-cp37m-win32.whl", hash = "sha256:a45e1135cb07086833ce969555df39149680e5471c04dfd6a915abd2fc3f6dbc"}, {file = "multidict-6.0.2-cp37-cp37m-win_amd64.whl", hash = "sha256:6f3cdef8a247d1eafa649085812f8a310e728bdf3900ff6c434eafb2d443b23a"}, {file = "multidict-6.0.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:0327292e745a880459ef71be14e709aaea2f783f3537588fb4ed09b6c01bca60"}, {file = "multidict-6.0.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:e875b6086e325bab7e680e4316d667fc0e5e174bb5611eb16b3ea121c8951b86"}, {file = "multidict-6.0.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:feea820722e69451743a3d56ad74948b68bf456984d63c1a92e8347b7b88452d"}, {file = "multidict-6.0.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9cc57c68cb9139c7cd6fc39f211b02198e69fb90ce4bc4a094cf5fe0d20fd8b0"}, {file = "multidict-6.0.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:497988d6b6ec6ed6f87030ec03280b696ca47dbf0648045e4e1d28b80346560d"}, {file = "multidict-6.0.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:89171b2c769e03a953d5969b2f272efa931426355b6c0cb508022976a17fd376"}, {file = "multidict-6.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:684133b1e1fe91eda8fa7447f137c9490a064c6b7f392aa857bba83a28cfb693"}, {file = "multidict-6.0.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fd9fc9c4849a07f3635ccffa895d57abce554b467d611a5009ba4f39b78a8849"}, {file = "multidict-6.0.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:e07c8e79d6e6fd37b42f3250dba122053fddb319e84b55dd3a8d6446e1a7ee49"}, {file = "multidict-6.0.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:4070613ea2227da2bfb2c35a6041e4371b0af6b0be57f424fe2318b42a748516"}, {file = "multidict-6.0.2-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:47fbeedbf94bed6547d3aa632075d804867a352d86688c04e606971595460227"}, {file = "multidict-6.0.2-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:5774d9218d77befa7b70d836004a768fb9aa4fdb53c97498f4d8d3f67bb9cfa9"}, {file = "multidict-6.0.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:2957489cba47c2539a8eb7ab32ff49101439ccf78eab724c828c1a54ff3ff98d"}, {file = "multidict-6.0.2-cp38-cp38-win32.whl", hash = "sha256:e5b20e9599ba74391ca0cfbd7b328fcc20976823ba19bc573983a25b32e92b57"}, {file = "multidict-6.0.2-cp38-cp38-win_amd64.whl", hash = "sha256:8004dca28e15b86d1b1372515f32eb6f814bdf6f00952699bdeb541691091f96"}, {file = "multidict-6.0.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:2e4a0785b84fb59e43c18a015ffc575ba93f7d1dbd272b4cdad9f5134b8a006c"}, {file = "multidict-6.0.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6701bf8a5d03a43375909ac91b6980aea74b0f5402fbe9428fc3f6edf5d9677e"}, {file = "multidict-6.0.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a007b1638e148c3cfb6bf0bdc4f82776cef0ac487191d093cdc316905e504071"}, {file = "multidict-6.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:07a017cfa00c9890011628eab2503bee5872f27144936a52eaab449be5eaf032"}, {file = "multidict-6.0.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c207fff63adcdf5a485969131dc70e4b194327666b7e8a87a97fbc4fd80a53b2"}, {file = "multidict-6.0.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:373ba9d1d061c76462d74e7de1c0c8e267e9791ee8cfefcf6b0b2495762c370c"}, {file = "multidict-6.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bfba7c6d5d7c9099ba21f84662b037a0ffd4a5e6b26ac07d19e423e6fdf965a9"}, {file = "multidict-6.0.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:19d9bad105dfb34eb539c97b132057a4e709919ec4dd883ece5838bcbf262b80"}, {file = "multidict-6.0.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:de989b195c3d636ba000ee4281cd03bb1234635b124bf4cd89eeee9ca8fcb09d"}, {file = "multidict-6.0.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:7c40b7bbece294ae3a87c1bc2abff0ff9beef41d14188cda94ada7bcea99b0fb"}, {file = "multidict-6.0.2-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:d16cce709ebfadc91278a1c005e3c17dd5f71f5098bfae1035149785ea6e9c68"}, {file = "multidict-6.0.2-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:a2c34a93e1d2aa35fbf1485e5010337c72c6791407d03aa5f4eed920343dd360"}, {file = "multidict-6.0.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:feba80698173761cddd814fa22e88b0661e98cb810f9f986c54aa34d281e4937"}, {file = "multidict-6.0.2-cp39-cp39-win32.whl", hash = "sha256:23b616fdc3c74c9fe01d76ce0d1ce872d2d396d8fa8e4899398ad64fb5aa214a"}, {file = "multidict-6.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:4bae31803d708f6f15fd98be6a6ac0b6958fcf68fda3c77a048a4f9073704aae"}, {file = "multidict-6.0.2.tar.gz", hash = "sha256:5ff3bd75f38e4c43f1f470f2df7a4d430b821c4ce22be384e1459cb57d6bb013"}, ] mypy = [ {file = "mypy-0.990-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:aaf1be63e0207d7d17be942dcf9a6b641745581fe6c64df9a38deb562a7dbafa"}, {file = "mypy-0.990-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d555aa7f44cecb7ea3c0ac69d58b1a5afb92caa017285a8e9c4efbf0518b61b4"}, {file = "mypy-0.990-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8f694d6d09a460b117dccb6857dda269188e3437c880d7b60fa0014fa872d1e9"}, {file = "mypy-0.990-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:269f0dfb6463b8780333310ff4b5134425157ef0d2b1d614015adaf6d6a7eabd"}, {file = "mypy-0.990-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:8798c8ed83aa809f053abff08664bdca056038f5a02af3660de00b7290b64c47"}, {file = "mypy-0.990-cp310-cp310-win_amd64.whl", hash = "sha256:47a9955214615108c3480a500cfda8513a0b1cd3c09a1ed42764ca0dd7b931dd"}, {file = "mypy-0.990-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:4a8a6c10f4c63fbf6ad6c03eba22c9331b3946a4cec97f008e9ffb4d3b31e8e2"}, {file = "mypy-0.990-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:cd2dd3730ba894ec2a2082cc703fbf3e95a08479f7be84912e3131fc68809d46"}, {file = "mypy-0.990-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:7da0005e47975287a92b43276e460ac1831af3d23032c34e67d003388a0ce8d0"}, {file = "mypy-0.990-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:262c543ef24deb10470a3c1c254bb986714e2b6b1a67d66daf836a548a9f316c"}, {file = "mypy-0.990-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:3ff201a0c6d3ea029d73b1648943387d75aa052491365b101f6edd5570d018ea"}, {file = "mypy-0.990-cp311-cp311-win_amd64.whl", hash = "sha256:1767830da2d1afa4e62b684647af0ff79b401f004d7fa08bc5b0ce2d45bcd5ec"}, {file = "mypy-0.990-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:6826d9c4d85bbf6d68cb279b561de6a4d8d778ca8e9ab2d00ee768ab501a9852"}, {file = "mypy-0.990-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:46897755f944176fbc504178422a5a2875bbf3f7436727374724842c0987b5af"}, {file = "mypy-0.990-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:0680389c34284287fe00e82fc8bccdea9aff318f7e7d55b90d967a13a9606013"}, {file = "mypy-0.990-cp37-cp37m-win_amd64.whl", hash = "sha256:b08541a06eed35b543ae1a6b301590eb61826a1eb099417676ddc5a42aa151c5"}, {file = "mypy-0.990-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:be88d665e76b452c26fb2bdc3d54555c01226fba062b004ede780b190a50f9db"}, {file = "mypy-0.990-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:9b8f4a8213b1fd4b751e26b59ae0e0c12896568d7e805861035c7a15ed6dc9eb"}, {file = "mypy-0.990-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:2b6f85c2ad378e3224e017904a051b26660087b3b76490d533b7344f1546d3ff"}, {file = "mypy-0.990-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1ee5f99817ee70254e7eb5cf97c1b11dda29c6893d846c8b07bce449184e9466"}, {file = "mypy-0.990-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:49082382f571c3186ce9ea0bd627cb1345d4da8d44a8377870f4442401f0a706"}, {file = "mypy-0.990-cp38-cp38-win_amd64.whl", hash = "sha256:aba38e3dd66bdbafbbfe9c6e79637841928ea4c79b32e334099463c17b0d90ef"}, {file = "mypy-0.990-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:9d851c09b981a65d9d283a8ccb5b1d0b698e580493416a10942ef1a04b19fd37"}, {file = "mypy-0.990-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:d847dd23540e2912d9667602271e5ebf25e5788e7da46da5ffd98e7872616e8e"}, {file = "mypy-0.990-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:cc6019808580565040cd2a561b593d7c3c646badd7e580e07d875eb1bf35c695"}, {file = "mypy-0.990-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2a3150d409609a775c8cb65dbe305c4edd7fe576c22ea79d77d1454acd9aeda8"}, {file = "mypy-0.990-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:3227f14fe943524f5794679156488f18bf8d34bfecd4623cf76bc55958d229c5"}, {file = "mypy-0.990-cp39-cp39-win_amd64.whl", hash = "sha256:c76c769c46a1e6062a84837badcb2a7b0cdb153d68601a61f60739c37d41cc74"}, {file = "mypy-0.990-py3-none-any.whl", hash = "sha256:8f1940325a8ed460ba03d19ab83742260fa9534804c317224e5d4e5aa588e2d6"}, {file = "mypy-0.990.tar.gz", hash = "sha256:72382cb609142dba3f04140d016c94b4092bc7b4d98ca718740dc989e5271b8d"}, ] mypy-extensions = [ {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"}, {file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"}, ] packaging = [ {file = "packaging-21.3-py3-none-any.whl", hash = "sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522"}, {file = "packaging-21.3.tar.gz", hash = "sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb"}, ] pastel = [ {file = "pastel-0.2.1-py2.py3-none-any.whl", hash = "sha256:4349225fcdf6c2bb34d483e523475de5bb04a5c10ef711263452cb37d7dd4364"}, {file = "pastel-0.2.1.tar.gz", hash = "sha256:e6581ac04e973cac858828c6202c1e1e81fee1dc7de7683f3e1ffe0bfd8a573d"}, ] pathspec = [ {file = "pathspec-0.10.1-py3-none-any.whl", hash = "sha256:46846318467efc4556ccfd27816e004270a9eeeeb4d062ce5e6fc7a87c573f93"}, {file = "pathspec-0.10.1.tar.gz", hash = "sha256:7ace6161b621d31e7902eb6b5ae148d12cfd23f4a249b9ffb6b9fee12084323d"}, ] platformdirs = [ {file = "platformdirs-2.5.3-py3-none-any.whl", hash = "sha256:0cb405749187a194f444c25c82ef7225232f11564721eabffc6ec70df83b11cb"}, {file = "platformdirs-2.5.3.tar.gz", hash = "sha256:6e52c21afff35cb659c6e52d8b4d61b9bd544557180440538f255d9382c8cbe0"}, ] pluggy = [ {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, ] poethepoet = [ {file = "poethepoet-0.16.4-py3-none-any.whl", hash = "sha256:1f05dce92ca6457d018696b614ba2149261380f30ceb21c196daf19c0c2e1fcd"}, {file = "poethepoet-0.16.4.tar.gz", hash = "sha256:a80f6bba64812515c406ffc218aff833951b17854eb111f724b48c44f9759af5"}, ] pycodestyle = [ {file = "pycodestyle-2.9.1-py2.py3-none-any.whl", hash = "sha256:d1735fc58b418fd7c5f658d28d943854f8a849b01a5d0a1e6f3f3fdd0166804b"}, {file = "pycodestyle-2.9.1.tar.gz", hash = "sha256:2c9607871d58c76354b697b42f5d57e1ada7d261c261efac224b664affdc5785"}, ] pyflakes = [ {file = "pyflakes-2.5.0-py2.py3-none-any.whl", hash = "sha256:4579f67d887f804e67edb544428f264b7b24f435b263c4614f384135cea553d2"}, {file = "pyflakes-2.5.0.tar.gz", hash = "sha256:491feb020dca48ccc562a8c0cbe8df07ee13078df59813b83959cbdada312ea3"}, ] pygments = [ {file = "Pygments-2.13.0-py3-none-any.whl", hash = "sha256:f643f331ab57ba3c9d89212ee4a2dabc6e94f117cf4eefde99a0574720d14c42"}, {file = "Pygments-2.13.0.tar.gz", hash = "sha256:56a8508ae95f98e2b9bdf93a6be5ae3f7d8af858b43e02c5a2ff083726be40c1"}, ] pyparsing = [ {file = "pyparsing-3.0.9-py3-none-any.whl", hash = "sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc"}, {file = "pyparsing-3.0.9.tar.gz", hash = "sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb"}, ] pytest = [ {file = "pytest-7.2.0-py3-none-any.whl", hash = "sha256:892f933d339f068883b6fd5a459f03d85bfcb355e4981e146d2c7616c21fef71"}, {file = "pytest-7.2.0.tar.gz", hash = "sha256:c4014eb40e10f11f355ad4e3c2fb2c6c6d1919c73f3b5a433de4708202cade59"}, ] pytest-mock = [ {file = "pytest-mock-3.10.0.tar.gz", hash = "sha256:fbbdb085ef7c252a326fd8cdcac0aa3b1333d8811f131bdcc701002e1be7ed4f"}, {file = "pytest_mock-3.10.0-py3-none-any.whl", hash = "sha256:f4c973eeae0282963eb293eb173ce91b091a79c1334455acfac9ddee8a1c784b"}, ] python-dateutil = [ {file = "python-dateutil-2.8.2.tar.gz", hash = "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86"}, {file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"}, ] pytz = [ {file = "pytz-2022.6-py2.py3-none-any.whl", hash = "sha256:222439474e9c98fced559f1709d89e6c9cbf8d79c794ff3eb9f8800064291427"}, {file = "pytz-2022.6.tar.gz", hash = "sha256:e89512406b793ca39f5971bc999cc538ce125c0e51c27941bef4568b460095e2"}, ] requests = [ {file = "requests-2.28.1-py3-none-any.whl", hash = "sha256:8fefa2a1a1365bf5520aac41836fbee479da67864514bdb821f31ce07ce65349"}, {file = "requests-2.28.1.tar.gz", hash = "sha256:7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983"}, ] requests-toolbelt = [ {file = "requests-toolbelt-0.10.1.tar.gz", hash = "sha256:62e09f7ff5ccbda92772a29f394a49c3ad6cb181d568b1337626b2abb628a63d"}, {file = "requests_toolbelt-0.10.1-py2.py3-none-any.whl", hash = "sha256:18565aa58116d9951ac39baa288d3adb5b3ff975c4f25eee78555d89e8f247f7"}, ] rich = [ {file = "rich-12.6.0-py3-none-any.whl", hash = "sha256:a4eb26484f2c82589bd9a17c73d32a010b1e29d89f1604cd9bf3a2097b81bb5e"}, {file = "rich-12.6.0.tar.gz", hash = "sha256:ba3a3775974105c221d31141f2c116f4fd65c5ceb0698657a11e9f295ec93fd0"}, ] shellingham = [ {file = "shellingham-1.5.0-py2.py3-none-any.whl", hash = "sha256:a8f02ba61b69baaa13facdba62908ca8690a94b8119b69f5ec5873ea85f7391b"}, {file = "shellingham-1.5.0.tar.gz", hash = "sha256:72fb7f5c63103ca2cb91b23dee0c71fe8ad6fbfd46418ef17dbe40db51592dad"}, ] six = [ {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, ] sniffio = [ {file = "sniffio-1.3.0-py3-none-any.whl", hash = "sha256:eecefdce1e5bbfb7ad2eeaabf7c1eeb404d7757c379bd1f7e5cce9d8bf425384"}, {file = "sniffio-1.3.0.tar.gz", hash = "sha256:e60305c5e5d314f5389259b7f22aaa33d8f7dee49763119234af3755c55b9101"}, ] snowballstemmer = [ {file = "snowballstemmer-2.2.0-py2.py3-none-any.whl", hash = "sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a"}, {file = "snowballstemmer-2.2.0.tar.gz", hash = "sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1"}, ] sphinx = [ {file = "Sphinx-5.3.0.tar.gz", hash = "sha256:51026de0a9ff9fc13c05d74913ad66047e104f56a129ff73e174eb5c3ee794b5"}, {file = "sphinx-5.3.0-py3-none-any.whl", hash = "sha256:060ca5c9f7ba57a08a1219e547b269fadf125ae25b06b9fa7f66768efb652d6d"}, ] sphinx-rtd-theme = [ {file = "sphinx_rtd_theme-1.1.1-py2.py3-none-any.whl", hash = "sha256:31faa07d3e97c8955637fc3f1423a5ab2c44b74b8cc558a51498c202ce5cbda7"}, {file = "sphinx_rtd_theme-1.1.1.tar.gz", hash = "sha256:6146c845f1e1947b3c3dd4432c28998a1693ccc742b4f9ad7c63129f0757c103"}, ] sphinxcontrib-applehelp = [ {file = "sphinxcontrib-applehelp-1.0.2.tar.gz", hash = "sha256:a072735ec80e7675e3f432fcae8610ecf509c5f1869d17e2eecff44389cdbc58"}, {file = "sphinxcontrib_applehelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:806111e5e962be97c29ec4c1e7fe277bfd19e9652fb1a4392105b43e01af885a"}, ] sphinxcontrib-devhelp = [ {file = "sphinxcontrib-devhelp-1.0.2.tar.gz", hash = "sha256:ff7f1afa7b9642e7060379360a67e9c41e8f3121f2ce9164266f61b9f4b338e4"}, {file = "sphinxcontrib_devhelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:8165223f9a335cc1af7ffe1ed31d2871f325254c0423bc0c4c7cd1c1e4734a2e"}, ] sphinxcontrib-htmlhelp = [ {file = "sphinxcontrib-htmlhelp-2.0.0.tar.gz", hash = "sha256:f5f8bb2d0d629f398bf47d0d69c07bc13b65f75a81ad9e2f71a63d4b7a2f6db2"}, {file = "sphinxcontrib_htmlhelp-2.0.0-py2.py3-none-any.whl", hash = "sha256:d412243dfb797ae3ec2b59eca0e52dac12e75a241bf0e4eb861e450d06c6ed07"}, ] sphinxcontrib-jsmath = [ {file = "sphinxcontrib-jsmath-1.0.1.tar.gz", hash = "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8"}, {file = "sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl", hash = "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178"}, ] sphinxcontrib-qthelp = [ {file = "sphinxcontrib-qthelp-1.0.3.tar.gz", hash = "sha256:4c33767ee058b70dba89a6fc5c1892c0d57a54be67ddd3e7875a18d14cba5a72"}, {file = "sphinxcontrib_qthelp-1.0.3-py2.py3-none-any.whl", hash = "sha256:bd9fc24bcb748a8d51fd4ecaade681350aa63009a347a8c14e637895444dfab6"}, ] sphinxcontrib-serializinghtml = [ {file = "sphinxcontrib-serializinghtml-1.1.5.tar.gz", hash = "sha256:aa5f6de5dfdf809ef505c4895e51ef5c9eac17d0f287933eb49ec495280b6952"}, {file = "sphinxcontrib_serializinghtml-1.1.5-py2.py3-none-any.whl", hash = "sha256:352a9a00ae864471d3a7ead8d7d79f5fc0b57e8b3f95e9867eb9eb28999b92fd"}, ] strawberry-graphql = [ {file = "strawberry_graphql-0.140.3-py3-none-any.whl", hash = "sha256:a1b6731afed43976db93c611c897bc8eb25df9569dc10cec6f1363c3ac665dcd"}, {file = "strawberry_graphql-0.140.3.tar.gz", hash = "sha256:cf7de7e88c4aa6d58f24cedc6a723d65758072fab5214d6648054a1167cb015f"}, ] tomli = [ {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, ] typer = [ {file = "typer-0.7.0-py3-none-any.whl", hash = "sha256:b5e704f4e48ec263de1c0b3a2387cd405a13767d2f907f44c1a08cbad96f606d"}, {file = "typer-0.7.0.tar.gz", hash = "sha256:ff797846578a9f2a201b53442aedeb543319466870fbe1c701eab66dd7681165"}, ] typing-extensions = [ {file = "typing_extensions-4.4.0-py3-none-any.whl", hash = "sha256:16fa4864408f655d35ec496218b85f79b3437c829e93320c7c9215ccfd92489e"}, {file = "typing_extensions-4.4.0.tar.gz", hash = "sha256:1511434bb92bf8dd198c12b1cc812e800d4181cfcb867674e0f8279cc93087aa"}, ] urllib3 = [ {file = "urllib3-1.26.12-py2.py3-none-any.whl", hash = "sha256:b930dd878d5a8afb066a637fbb35144fe7901e3b209d1cd4f524bd0e9deee997"}, {file = "urllib3-1.26.12.tar.gz", hash = "sha256:3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e"}, ] yarl = [ {file = "yarl-1.8.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:abc06b97407868ef38f3d172762f4069323de52f2b70d133d096a48d72215d28"}, {file = "yarl-1.8.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:07b21e274de4c637f3e3b7104694e53260b5fc10d51fb3ec5fed1da8e0f754e3"}, {file = "yarl-1.8.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9de955d98e02fab288c7718662afb33aab64212ecb368c5dc866d9a57bf48880"}, {file = "yarl-1.8.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7ec362167e2c9fd178f82f252b6d97669d7245695dc057ee182118042026da40"}, {file = "yarl-1.8.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:20df6ff4089bc86e4a66e3b1380460f864df3dd9dccaf88d6b3385d24405893b"}, {file = "yarl-1.8.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5999c4662631cb798496535afbd837a102859568adc67d75d2045e31ec3ac497"}, {file = "yarl-1.8.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ed19b74e81b10b592084a5ad1e70f845f0aacb57577018d31de064e71ffa267a"}, {file = "yarl-1.8.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e4808f996ca39a6463f45182e2af2fae55e2560be586d447ce8016f389f626f"}, {file = "yarl-1.8.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:2d800b9c2eaf0684c08be5f50e52bfa2aa920e7163c2ea43f4f431e829b4f0fd"}, {file = "yarl-1.8.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:6628d750041550c5d9da50bb40b5cf28a2e63b9388bac10fedd4f19236ef4957"}, {file = "yarl-1.8.1-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:f5af52738e225fcc526ae64071b7e5342abe03f42e0e8918227b38c9aa711e28"}, {file = "yarl-1.8.1-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:76577f13333b4fe345c3704811ac7509b31499132ff0181f25ee26619de2c843"}, {file = "yarl-1.8.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0c03f456522d1ec815893d85fccb5def01ffaa74c1b16ff30f8aaa03eb21e453"}, {file = "yarl-1.8.1-cp310-cp310-win32.whl", hash = "sha256:ea30a42dc94d42f2ba4d0f7c0ffb4f4f9baa1b23045910c0c32df9c9902cb272"}, {file = "yarl-1.8.1-cp310-cp310-win_amd64.whl", hash = "sha256:9130ddf1ae9978abe63808b6b60a897e41fccb834408cde79522feb37fb72fb0"}, {file = "yarl-1.8.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0ab5a138211c1c366404d912824bdcf5545ccba5b3ff52c42c4af4cbdc2c5035"}, {file = "yarl-1.8.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a0fb2cb4204ddb456a8e32381f9a90000429489a25f64e817e6ff94879d432fc"}, {file = "yarl-1.8.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:85cba594433915d5c9a0d14b24cfba0339f57a2fff203a5d4fd070e593307d0b"}, {file = "yarl-1.8.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1ca7e596c55bd675432b11320b4eacc62310c2145d6801a1f8e9ad160685a231"}, {file = "yarl-1.8.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d0f77539733e0ec2475ddcd4e26777d08996f8cd55d2aef82ec4d3896687abda"}, {file = "yarl-1.8.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:29e256649f42771829974e742061c3501cc50cf16e63f91ed8d1bf98242e5507"}, {file = "yarl-1.8.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:7fce6cbc6c170ede0221cc8c91b285f7f3c8b9fe28283b51885ff621bbe0f8ee"}, {file = "yarl-1.8.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:59ddd85a1214862ce7c7c66457f05543b6a275b70a65de366030d56159a979f0"}, {file = "yarl-1.8.1-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:12768232751689c1a89b0376a96a32bc7633c08da45ad985d0c49ede691f5c0d"}, {file = "yarl-1.8.1-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:b19255dde4b4f4c32e012038f2c169bb72e7f081552bea4641cab4d88bc409dd"}, {file = "yarl-1.8.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:6c8148e0b52bf9535c40c48faebb00cb294ee577ca069d21bd5c48d302a83780"}, {file = "yarl-1.8.1-cp37-cp37m-win32.whl", hash = "sha256:de839c3a1826a909fdbfe05f6fe2167c4ab033f1133757b5936efe2f84904c07"}, {file = "yarl-1.8.1-cp37-cp37m-win_amd64.whl", hash = "sha256:dd032e8422a52e5a4860e062eb84ac94ea08861d334a4bcaf142a63ce8ad4802"}, {file = "yarl-1.8.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:19cd801d6f983918a3f3a39f3a45b553c015c5aac92ccd1fac619bd74beece4a"}, {file = "yarl-1.8.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6347f1a58e658b97b0a0d1ff7658a03cb79bdbda0331603bed24dd7054a6dea1"}, {file = "yarl-1.8.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:7c0da7e44d0c9108d8b98469338705e07f4bb7dab96dbd8fa4e91b337db42548"}, {file = "yarl-1.8.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5587bba41399854703212b87071c6d8638fa6e61656385875f8c6dff92b2e461"}, {file = "yarl-1.8.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:31a9a04ecccd6b03e2b0e12e82131f1488dea5555a13a4d32f064e22a6003cfe"}, {file = "yarl-1.8.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:205904cffd69ae972a1707a1bd3ea7cded594b1d773a0ce66714edf17833cdae"}, {file = "yarl-1.8.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ea513a25976d21733bff523e0ca836ef1679630ef4ad22d46987d04b372d57fc"}, {file = "yarl-1.8.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d0b51530877d3ad7a8d47b2fff0c8df3b8f3b8deddf057379ba50b13df2a5eae"}, {file = "yarl-1.8.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:d2b8f245dad9e331540c350285910b20dd913dc86d4ee410c11d48523c4fd546"}, {file = "yarl-1.8.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:ab2a60d57ca88e1d4ca34a10e9fb4ab2ac5ad315543351de3a612bbb0560bead"}, {file = "yarl-1.8.1-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:449c957ffc6bc2309e1fbe67ab7d2c1efca89d3f4912baeb8ead207bb3cc1cd4"}, {file = "yarl-1.8.1-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:a165442348c211b5dea67c0206fc61366212d7082ba8118c8c5c1c853ea4d82e"}, {file = "yarl-1.8.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:b3ded839a5c5608eec8b6f9ae9a62cb22cd037ea97c627f38ae0841a48f09eae"}, {file = "yarl-1.8.1-cp38-cp38-win32.whl", hash = "sha256:c1445a0c562ed561d06d8cbc5c8916c6008a31c60bc3655cdd2de1d3bf5174a0"}, {file = "yarl-1.8.1-cp38-cp38-win_amd64.whl", hash = "sha256:56c11efb0a89700987d05597b08a1efcd78d74c52febe530126785e1b1a285f4"}, {file = "yarl-1.8.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:e80ed5a9939ceb6fda42811542f31c8602be336b1fb977bccb012e83da7e4936"}, {file = "yarl-1.8.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6afb336e23a793cd3b6476c30f030a0d4c7539cd81649683b5e0c1b0ab0bf350"}, {file = "yarl-1.8.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4c322cbaa4ed78a8aac89b2174a6df398faf50e5fc12c4c191c40c59d5e28357"}, {file = "yarl-1.8.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fae37373155f5ef9b403ab48af5136ae9851151f7aacd9926251ab26b953118b"}, {file = "yarl-1.8.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5395da939ffa959974577eff2cbfc24b004a2fb6c346918f39966a5786874e54"}, {file = "yarl-1.8.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:076eede537ab978b605f41db79a56cad2e7efeea2aa6e0fa8f05a26c24a034fb"}, {file = "yarl-1.8.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3d1a50e461615747dd93c099f297c1994d472b0f4d2db8a64e55b1edf704ec1c"}, {file = "yarl-1.8.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7de89c8456525650ffa2bb56a3eee6af891e98f498babd43ae307bd42dca98f6"}, {file = "yarl-1.8.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:4a88510731cd8d4befaba5fbd734a7dd914de5ab8132a5b3dde0bbd6c9476c64"}, {file = "yarl-1.8.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:2d93a049d29df172f48bcb09acf9226318e712ce67374f893b460b42cc1380ae"}, {file = "yarl-1.8.1-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:21ac44b763e0eec15746a3d440f5e09ad2ecc8b5f6dcd3ea8cb4773d6d4703e3"}, {file = "yarl-1.8.1-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:d0272228fabe78ce00a3365ffffd6f643f57a91043e119c289aaba202f4095b0"}, {file = "yarl-1.8.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:99449cd5366fe4608e7226c6cae80873296dfa0cde45d9b498fefa1de315a09e"}, {file = "yarl-1.8.1-cp39-cp39-win32.whl", hash = "sha256:8b0af1cf36b93cee99a31a545fe91d08223e64390c5ecc5e94c39511832a4bb6"}, {file = "yarl-1.8.1-cp39-cp39-win_amd64.whl", hash = "sha256:de49d77e968de6626ba7ef4472323f9d2e5a56c1d85b7c0e2a190b2173d3b9be"}, {file = "yarl-1.8.1.tar.gz", hash = "sha256:af887845b8c2e060eb5605ff72b6f2dd2aab7a761379373fd89d314f4752abbf"}, ]
closed
dagger/dagger
https://github.com/dagger/dagger
3,690
Hide IDs in API client
See: - https://github.com/dagger/dagger/issues/3558 - https://github.com/dagger/dagger/pull/3598
https://github.com/dagger/dagger/issues/3690
https://github.com/dagger/dagger/pull/3870
adaf88cf312696118750593380d129ef51c07955
10e89ac6c3b3a20d1ecdde6bf2b9a320d1a3881c
"2022-11-04T19:11:48Z"
go
"2022-11-16T15:09:11Z"
sdk/python/pyproject.toml
[build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" [tool.poetry] name = "dagger-io" version = "0.0.0" description = "A client package for running Dagger pipelines in Python." license = "Apache-2.0" authors = ["Dagger <hello@dagger.io>"] readme = "README.md" homepage = "https://dagger.io" documentation = "https://docs.dagger.io/sdk/python" repository = "https://github.com/dagger/dagger/tree/main/sdk/python" classifiers = [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Framework :: AnyIO", "Framework :: Pytest", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "License :: OSI Approved :: Apache Software License", # "Operating System :: OS Independent", "Typing :: Typed", ] packages = [ { include = "dagger", from = "src" }, ] [tool.poetry.urls] "Tracker" = "https://github.com/dagger/dagger/issues" "Release Notes" = "https://github.com/dagger/dagger/releases?q=tag%3Asdk%2Fpython%2Fv0" "Community" = "https://discord.gg/ufnyBtc8uY" "Twitter" = "https://twitter.com/dagger_io" [tool.poetry.scripts] # FIXME: uncomment when extensions become available # dagger-server-py = "dagger.server.cli:app" dagger-py = "dagger.cli:app" [tool.poetry.dependencies] python = "^3.10" anyio = ">=3.6.2" attrs = ">=22.1.0" cattrs = ">=22.2.0" gql = {version = ">=3.4.0", extras = ["aiohttp", "requests"]} "strawberry-graphql" = ">=0.133.5" typer = {version = ">=0.6.1", extras = ["all"]} [tool.poetry.group.test.dependencies] pytest = ">=7.2.0" "pytest-mock" = ">=3.10.0" [tool.poetry.group.lint.dependencies] autoflake = ">=1.3.1" black = ">=22.3.0" "flake8-black" = ">=0.3" "flake8-bugbear" = ">=22.9.23" "flake8-eradicate" = ">=1.3.0" "flake8-isort" = ">=5.0.0" flake8 = ">=4.0.1" isort = ">=5.10.1" mypy = ">=0.942" typing_extensions = ">=4.4.0" [tool.poetry.group.dev.dependencies] poethepoet = ">=0.16.4" [tool.poetry.group.docs.dependencies] sphinx = ">=5.3.0" sphinx-rtd-theme = "^1.1.1" [tool.poe.env] GEN_PATH = "./src/dagger/api" [tool.poe.tasks] test = "pytest" typing = "mypy src/dagger tests" [tool.poe.tasks.docs] cmd = "sphinx-build -v . _build" cwd = "docs" [tool.poe.tasks.lint] sequence = [ "flake8 .", "black --check --diff .", "isort --check-only --diff .", ] default_item_type = "cmd" [tool.poe.tasks.fmt] sequence = [ {cmd = "autoflake --in-place ."}, {cmd = "isort ."}, {cmd = "black ."}, {ref = "lint"}, ] [tool.poe.tasks.generate] sequence = [ "dagger-py generate --output ${GEN_PATH}/gen.py", "dagger-py generate --output ${GEN_PATH}/gen_sync.py --sync", "isort ${GEN_PATH}/gen*.py", "black ${GEN_PATH}/gen*.py", ] default_item_type = "cmd" [tool.pytest.ini_options] testpaths = ["tests/"] addopts = [ "--import-mode=importlib", ] markers = [ "slow: mark test as slow (integration)", ] [tool.mypy] disallow_untyped_defs = false follow_imports = "normal" # ignore_missing_imports = true install_types = true non_interactive = true warn_redundant_casts = true pretty = true show_column_numbers = true warn_no_return = false warn_unused_ignores = true plugins = [ "strawberry.ext.mypy_plugin", ] [tool.black] include = '\.pyi?$' target-version = ["py310", "py311"] [tool.isort] profile = "black" known_first_party = ["dagger"] [tool.autoflake] quiet = true recursive = true expand-star-imports = true imports = ["graphql", "gql"] remove-all-unused-imports = true remove-duplicate-keys = true remove-unused-variables = true
closed
dagger/dagger
https://github.com/dagger/dagger
3,690
Hide IDs in API client
See: - https://github.com/dagger/dagger/issues/3558 - https://github.com/dagger/dagger/pull/3598
https://github.com/dagger/dagger/issues/3690
https://github.com/dagger/dagger/pull/3870
adaf88cf312696118750593380d129ef51c07955
10e89ac6c3b3a20d1ecdde6bf2b9a320d1a3881c
"2022-11-04T19:11:48Z"
go
"2022-11-16T15:09:11Z"
sdk/python/src/dagger/api/base.py
import types import typing from collections import deque from typing import Any, NamedTuple, Sequence, TypeVar import attr import attrs import cattrs import gql import graphql from attrs import define from cattrs.preconf.json import make_converter from gql.client import AsyncClientSession, SyncClientSession from gql.dsl import DSLField, DSLQuery, DSLSchema, DSLSelectable, DSLType, dsl_gql from dagger.exceptions import DaggerException _T = TypeVar("_T") def is_optional(t): is_union = typing.get_origin(t) is types.UnionType # noqa return is_union and type(None) in typing.get_args(t) @define class Field: type_name: str name: str args: dict[str, Any] def to_dsl(self, schema: DSLSchema) -> DSLField: type_: DSLType = getattr(schema, self.type_name) field: DSLField = getattr(type_, self.name)(**self.args) return field @define class Context: session: AsyncClientSession | SyncClientSession schema: DSLSchema selections: deque[Field] = attr.ib(factory=deque) converter: cattrs.Converter = attr.ib(factory=make_converter) def select( self, type_name: str, field_name: str, args: dict[str, Any] ) -> "Context": field = Field(type_name, field_name, args) selections = self.selections.copy() selections.append(field) return attrs.evolve(self, selections=selections) def build(self) -> DSLSelectable: if not self.selections: raise InvalidQueryError("No field has been selected") selections = self.selections.copy() selectable = selections.pop().to_dsl(self.schema) for field in reversed(selections): dsl_field = field.to_dsl(self.schema) selectable = dsl_field.select(selectable) return selectable def query(self) -> graphql.DocumentNode: return dsl_gql(DSLQuery(self.build())) async def execute(self, return_type: type[_T]) -> _T: assert isinstance(self.session, AsyncClientSession) query = self.query() result = await self.session.execute(query, get_execution_result=True) return self._get_value(result.data, return_type) def execute_sync(self, return_type: type[_T]) -> _T: assert isinstance(self.session, SyncClientSession) query = self.query() result = self.session.execute(query, get_execution_result=True) return self._get_value(result.data, return_type) def _get_value(self, value: dict[str, Any] | None, return_type: type[_T]) -> _T: if value is not None: value = self._structure_response(value, return_type) if value is None and not is_optional(return_type): raise InvalidQueryError( "Required field got a null response. Check if parent fields are valid." ) return value def _structure_response( self, response: dict[str, Any], return_type: type[_T] ) -> _T: for f in self.selections: response = response[f.name] if response is None: return None return self.converter.structure(response, return_type) class Arg(NamedTuple): name: str value: Any default: Any = attrs.NOTHING @define class Type: _ctx: Context @property def graphql_name(self) -> str: return self.__class__.__name__ def _select(self, field_name: str, args: Sequence[Arg]) -> Context: # The use of Arg class here is just to make it easy to pass a # dict of arguments without having to be limited to a single # `args: dict` parameter in the GraphQL object fields. _args = {k: v for k, v, d in args if v is not d} return self._ctx.select(self.graphql_name, field_name, _args) class Root(Type): @classmethod def from_session(cls, session: AsyncClientSession): assert ( session.client.schema is not None ), "GraphQL session has not been initialized" ds = DSLSchema(session.client.schema) ctx = Context(session, ds) return cls(ctx) @property def graphql_name(self) -> str: return "Query" @property def _session(self) -> AsyncClientSession: return self._ctx.session @property def _gql_client(self) -> gql.Client: return self._session.client @property def _schema(self) -> graphql.GraphQLSchema: return self._ctx.schema._schema class ClientError(DaggerException): """Base class for client errors.""" class InvalidQueryError(ClientError): """Misuse of the query builder."""
closed
dagger/dagger
https://github.com/dagger/dagger
3,690
Hide IDs in API client
See: - https://github.com/dagger/dagger/issues/3558 - https://github.com/dagger/dagger/pull/3598
https://github.com/dagger/dagger/issues/3690
https://github.com/dagger/dagger/pull/3870
adaf88cf312696118750593380d129ef51c07955
10e89ac6c3b3a20d1ecdde6bf2b9a320d1a3881c
"2022-11-04T19:11:48Z"
go
"2022-11-16T15:09:11Z"
sdk/python/src/dagger/api/gen.py
# Code generated by dagger. DO NOT EDIT. # flake8: noqa from typing import NewType from dagger.api.base import Arg, Root, Type CacheID = NewType("CacheID", str) """A global cache volume identifier""" ContainerID = NewType("ContainerID", str) """A unique container identifier. Null designates an empty container (scratch).""" DirectoryID = NewType("DirectoryID", str) """A content-addressed directory identifier""" FileID = NewType("FileID", str) Platform = NewType("Platform", str) SecretID = NewType("SecretID", str) """A unique identifier for a secret""" class CacheVolume(Type): """A directory whose contents persist across runs""" async def id(self) -> CacheID: """Note ---- This is lazyly evaluated, no operation is actually run. Returns ------- CacheID A global cache volume identifier """ _args: list[Arg] = [] _ctx = self._select("id", _args) return await _ctx.execute(CacheID) class Container(Type): """An OCI-compatible container, also known as a docker container""" def build(self, context: DirectoryID, dockerfile: str | None = None) -> "Container": """Initialize this container from a Dockerfile build""" _args = [ Arg("context", context), Arg("dockerfile", dockerfile, None), ] _ctx = self._select("build", _args) return Container(_ctx) async def default_args(self) -> list[str] | None: """Default arguments for future commands Returns ------- list[str] | None The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. """ _args: list[Arg] = [] _ctx = self._select("defaultArgs", _args) return await _ctx.execute(list[str] | None) def directory(self, path: str) -> "Directory": """Retrieve a directory at the given path. Mounts are included.""" _args = [ Arg("path", path), ] _ctx = self._select("directory", _args) return Directory(_ctx) async def entrypoint(self) -> list[str] | None: """Entrypoint to be prepended to the arguments of all commands Returns ------- list[str] | None The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. """ _args: list[Arg] = [] _ctx = self._select("entrypoint", _args) return await _ctx.execute(list[str] | None) async def env_variable(self, name: str) -> str | None: """The value of the specified environment variable Returns ------- str | None The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. """ _args = [ Arg("name", name), ] _ctx = self._select("envVariable", _args) return await _ctx.execute(str | None) def env_variables(self) -> "EnvVariable": """A list of environment variables passed to commands""" _args: list[Arg] = [] _ctx = self._select("envVariables", _args) return EnvVariable(_ctx) def exec( self, args: list[str] | None = None, stdin: str | None = None, redirect_stdout: str | None = None, redirect_stderr: str | None = None, experimental_privileged_nesting: bool | None = None, ) -> "Container": """This container after executing the specified command inside it Parameters ---------- args: Command to run instead of the container's default command stdin: Content to write to the command's standard input before closing redirect_stdout: Redirect the command's standard output to a file in the container redirect_stderr: Redirect the command's standard error to a file in the container experimental_privileged_nesting: Provide dagger access to the executed command Do not use this option unless you trust the command being executed The command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM """ _args = [ Arg("args", args, None), Arg("stdin", stdin, None), Arg("redirectStdout", redirect_stdout, None), Arg("redirectStderr", redirect_stderr, None), Arg("experimentalPrivilegedNesting", experimental_privileged_nesting, None), ] _ctx = self._select("exec", _args) return Container(_ctx) async def exit_code(self) -> int | None: """Exit code of the last executed command. Zero means success. Null if no command has been executed. Returns ------- int | None The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1. """ _args: list[Arg] = [] _ctx = self._select("exitCode", _args) return await _ctx.execute(int | None) async def export( self, path: str, platform_variants: list[ContainerID] | None = None ) -> bool: """Write the container as an OCI tarball to the destination file path on the host Returns ------- bool The `Boolean` scalar type represents `true` or `false`. """ _args = [ Arg("path", path), Arg("platformVariants", platform_variants, None), ] _ctx = self._select("export", _args) return await _ctx.execute(bool) def file(self, path: str) -> "File": """Retrieve a file at the given path. Mounts are included.""" _args = [ Arg("path", path), ] _ctx = self._select("file", _args) return File(_ctx) def from_(self, address: str) -> "Container": """Initialize this container from the base image published at the given address""" _args = [ Arg("address", address), ] _ctx = self._select("from", _args) return Container(_ctx) def fs(self) -> "Directory": """This container's root filesystem. Mounts are not included.""" _args: list[Arg] = [] _ctx = self._select("fs", _args) return Directory(_ctx) async def id(self) -> ContainerID: """A unique identifier for this container Note ---- This is lazyly evaluated, no operation is actually run. Returns ------- ContainerID A unique container identifier. Null designates an empty container (scratch). """ _args: list[Arg] = [] _ctx = self._select("id", _args) return await _ctx.execute(ContainerID) async def mounts(self) -> list[str]: """List of paths where a directory is mounted Returns ------- list[str] The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. """ _args: list[Arg] = [] _ctx = self._select("mounts", _args) return await _ctx.execute(list[str]) async def platform(self) -> Platform: """The platform this container executes and publishes as Returns ------- Platform """ _args: list[Arg] = [] _ctx = self._select("platform", _args) return await _ctx.execute(Platform) async def publish( self, address: str, platform_variants: list[ContainerID] | None = None ) -> str: """Publish this container as a new image, returning a fully qualified ref Returns ------- str The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. """ _args = [ Arg("address", address), Arg("platformVariants", platform_variants, None), ] _ctx = self._select("publish", _args) return await _ctx.execute(str) def stderr(self) -> "File": """The error stream of the last executed command. Null if no command has been executed. """ _args: list[Arg] = [] _ctx = self._select("stderr", _args) return File(_ctx) def stdout(self) -> "File": """The output stream of the last executed command. Null if no command has been executed. """ _args: list[Arg] = [] _ctx = self._select("stdout", _args) return File(_ctx) async def user(self) -> str | None: """The user to be set for all commands Returns ------- str | None The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. """ _args: list[Arg] = [] _ctx = self._select("user", _args) return await _ctx.execute(str | None) def with_default_args(self, args: list[str] | None = None) -> "Container": """Configures default arguments for future commands""" _args = [ Arg("args", args, None), ] _ctx = self._select("withDefaultArgs", _args) return Container(_ctx) def with_entrypoint(self, args: list[str]) -> "Container": """This container but with a different command entrypoint""" _args = [ Arg("args", args), ] _ctx = self._select("withEntrypoint", _args) return Container(_ctx) def with_env_variable(self, name: str, value: str) -> "Container": """This container plus the given environment variable""" _args = [ Arg("name", name), Arg("value", value), ] _ctx = self._select("withEnvVariable", _args) return Container(_ctx) def with_fs(self, id: DirectoryID) -> "Container": """Initialize this container from this DirectoryID""" _args = [ Arg("id", id), ] _ctx = self._select("withFS", _args) return Container(_ctx) def with_mounted_cache( self, path: str, cache: CacheID, source: DirectoryID | None = None ) -> "Container": """This container plus a cache volume mounted at the given path""" _args = [ Arg("path", path), Arg("cache", cache), Arg("source", source, None), ] _ctx = self._select("withMountedCache", _args) return Container(_ctx) def with_mounted_directory(self, path: str, source: DirectoryID) -> "Container": """This container plus a directory mounted at the given path""" _args = [ Arg("path", path), Arg("source", source), ] _ctx = self._select("withMountedDirectory", _args) return Container(_ctx) def with_mounted_file(self, path: str, source: FileID) -> "Container": """This container plus a file mounted at the given path""" _args = [ Arg("path", path), Arg("source", source), ] _ctx = self._select("withMountedFile", _args) return Container(_ctx) def with_mounted_secret(self, path: str, source: SecretID) -> "Container": """This container plus a secret mounted into a file at the given path""" _args = [ Arg("path", path), Arg("source", source), ] _ctx = self._select("withMountedSecret", _args) return Container(_ctx) def with_mounted_temp(self, path: str) -> "Container": """This container plus a temporary directory mounted at the given path""" _args = [ Arg("path", path), ] _ctx = self._select("withMountedTemp", _args) return Container(_ctx) def with_secret_variable(self, name: str, secret: SecretID) -> "Container": """This container plus an env variable containing the given secret""" _args = [ Arg("name", name), Arg("secret", secret), ] _ctx = self._select("withSecretVariable", _args) return Container(_ctx) def with_user(self, name: str) -> "Container": """This container but with a different command user""" _args = [ Arg("name", name), ] _ctx = self._select("withUser", _args) return Container(_ctx) def with_workdir(self, path: str) -> "Container": """This container but with a different working directory""" _args = [ Arg("path", path), ] _ctx = self._select("withWorkdir", _args) return Container(_ctx) def without_env_variable(self, name: str) -> "Container": """This container minus the given environment variable""" _args = [ Arg("name", name), ] _ctx = self._select("withoutEnvVariable", _args) return Container(_ctx) def without_mount(self, path: str) -> "Container": """This container after unmounting everything at the given path.""" _args = [ Arg("path", path), ] _ctx = self._select("withoutMount", _args) return Container(_ctx) async def workdir(self) -> str | None: """The working directory for all commands Returns ------- str | None The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. """ _args: list[Arg] = [] _ctx = self._select("workdir", _args) return await _ctx.execute(str | None) class Directory(Type): """A directory""" def diff(self, other: DirectoryID) -> "Directory": """The difference between this directory and an another directory""" _args = [ Arg("other", other), ] _ctx = self._select("diff", _args) return Directory(_ctx) def directory(self, path: str) -> "Directory": """Retrieve a directory at the given path""" _args = [ Arg("path", path), ] _ctx = self._select("directory", _args) return Directory(_ctx) async def entries(self, path: str | None = None) -> list[str]: """Return a list of files and directories at the given path Returns ------- list[str] The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. """ _args = [ Arg("path", path, None), ] _ctx = self._select("entries", _args) return await _ctx.execute(list[str]) async def export(self, path: str) -> bool: """Write the contents of the directory to a path on the host Returns ------- bool The `Boolean` scalar type represents `true` or `false`. """ _args = [ Arg("path", path), ] _ctx = self._select("export", _args) return await _ctx.execute(bool) def file(self, path: str) -> "File": """Retrieve a file at the given path""" _args = [ Arg("path", path), ] _ctx = self._select("file", _args) return File(_ctx) async def id(self) -> DirectoryID: """The content-addressed identifier of the directory Note ---- This is lazyly evaluated, no operation is actually run. Returns ------- DirectoryID A content-addressed directory identifier """ _args: list[Arg] = [] _ctx = self._select("id", _args) return await _ctx.execute(DirectoryID) def load_project(self, config_path: str) -> "Project": """load a project's metadata""" _args = [ Arg("configPath", config_path), ] _ctx = self._select("loadProject", _args) return Project(_ctx) def with_directory( self, path: str, directory: DirectoryID, exclude: list[str] | None = None, include: list[str] | None = None, ) -> "Directory": """This directory plus a directory written at the given path""" _args = [ Arg("path", path), Arg("directory", directory), Arg("exclude", exclude, None), Arg("include", include, None), ] _ctx = self._select("withDirectory", _args) return Directory(_ctx) def with_file(self, path: str, source: FileID) -> "Directory": """This directory plus the contents of the given file copied to the given path""" _args = [ Arg("path", path), Arg("source", source), ] _ctx = self._select("withFile", _args) return Directory(_ctx) def with_new_directory(self, path: str) -> "Directory": """This directory plus a new directory created at the given path""" _args = [ Arg("path", path), ] _ctx = self._select("withNewDirectory", _args) return Directory(_ctx) def with_new_file(self, path: str, contents: str | None = None) -> "Directory": """This directory plus a new file written at the given path""" _args = [ Arg("path", path), Arg("contents", contents, None), ] _ctx = self._select("withNewFile", _args) return Directory(_ctx) def without_directory(self, path: str) -> "Directory": """This directory with the directory at the given path removed""" _args = [ Arg("path", path), ] _ctx = self._select("withoutDirectory", _args) return Directory(_ctx) def without_file(self, path: str) -> "Directory": """This directory with the file at the given path removed""" _args = [ Arg("path", path), ] _ctx = self._select("withoutFile", _args) return Directory(_ctx) class EnvVariable(Type): """EnvVariable is a simple key value object that represents an environment variable.""" async def name(self) -> str: """name is the environment variable name. Returns ------- str The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. """ _args: list[Arg] = [] _ctx = self._select("name", _args) return await _ctx.execute(str) async def value(self) -> str: """value is the environment variable value Returns ------- str The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. """ _args: list[Arg] = [] _ctx = self._select("value", _args) return await _ctx.execute(str) class File(Type): """A file""" async def contents(self) -> str: """The contents of the file Returns ------- str The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. """ _args: list[Arg] = [] _ctx = self._select("contents", _args) return await _ctx.execute(str) async def export(self, path: str) -> bool: """Write the file to a file path on the host Returns ------- bool The `Boolean` scalar type represents `true` or `false`. """ _args = [ Arg("path", path), ] _ctx = self._select("export", _args) return await _ctx.execute(bool) async def id(self) -> FileID: """The content-addressed identifier of the file Note ---- This is lazyly evaluated, no operation is actually run. Returns ------- FileID """ _args: list[Arg] = [] _ctx = self._select("id", _args) return await _ctx.execute(FileID) def secret(self) -> "Secret": _args: list[Arg] = [] _ctx = self._select("secret", _args) return Secret(_ctx) async def size(self) -> int: """The size of the file, in bytes Returns ------- int The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1. """ _args: list[Arg] = [] _ctx = self._select("size", _args) return await _ctx.execute(int) class GitRef(Type): """A git ref (tag or branch)""" async def digest(self) -> str: """The digest of the current value of this ref Returns ------- str The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. """ _args: list[Arg] = [] _ctx = self._select("digest", _args) return await _ctx.execute(str) def tree(self) -> "Directory": """The filesystem tree at this ref""" _args: list[Arg] = [] _ctx = self._select("tree", _args) return Directory(_ctx) class GitRepository(Type): """A git repository""" def branch(self, name: str) -> "GitRef": """Details on one branch""" _args = [ Arg("name", name), ] _ctx = self._select("branch", _args) return GitRef(_ctx) async def branches(self) -> list[str]: """List of branches on the repository Returns ------- list[str] The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. """ _args: list[Arg] = [] _ctx = self._select("branches", _args) return await _ctx.execute(list[str]) def commit(self, id: str) -> "GitRef": """Details on one commit""" _args = [ Arg("id", id), ] _ctx = self._select("commit", _args) return GitRef(_ctx) def tag(self, name: str) -> "GitRef": """Details on one tag""" _args = [ Arg("name", name), ] _ctx = self._select("tag", _args) return GitRef(_ctx) async def tags(self) -> list[str]: """List of tags on the repository Returns ------- list[str] The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. """ _args: list[Arg] = [] _ctx = self._select("tags", _args) return await _ctx.execute(list[str]) class Host(Type): """Information about the host execution environment""" def directory( self, path: str, exclude: list[str] | None = None, include: list[str] | None = None, ) -> "Directory": """Access a directory on the host""" _args = [ Arg("path", path), Arg("exclude", exclude, None), Arg("include", include, None), ] _ctx = self._select("directory", _args) return Directory(_ctx) def env_variable(self, name: str) -> "HostVariable": """Lookup the value of an environment variable. Null if the variable is not available.""" _args = [ Arg("name", name), ] _ctx = self._select("envVariable", _args) return HostVariable(_ctx) def workdir( self, exclude: list[str] | None = None, include: list[str] | None = None ) -> "Directory": """The current working directory on the host""" _args = [ Arg("exclude", exclude, None), Arg("include", include, None), ] _ctx = self._select("workdir", _args) return Directory(_ctx) class HostVariable(Type): """An environment variable on the host environment""" def secret(self) -> "Secret": """A secret referencing the value of this variable""" _args: list[Arg] = [] _ctx = self._select("secret", _args) return Secret(_ctx) async def value(self) -> str: """The value of this variable Returns ------- str The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. """ _args: list[Arg] = [] _ctx = self._select("value", _args) return await _ctx.execute(str) class Project(Type): """A set of scripts and/or extensions""" def extensions(self) -> "Project": """extensions in this project""" _args: list[Arg] = [] _ctx = self._select("extensions", _args) return Project(_ctx) def generated_code(self) -> "Directory": """Code files generated by the SDKs in the project""" _args: list[Arg] = [] _ctx = self._select("generatedCode", _args) return Directory(_ctx) async def install(self) -> bool: """install the project's schema Returns ------- bool The `Boolean` scalar type represents `true` or `false`. """ _args: list[Arg] = [] _ctx = self._select("install", _args) return await _ctx.execute(bool) async def name(self) -> str: """name of the project Returns ------- str The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. """ _args: list[Arg] = [] _ctx = self._select("name", _args) return await _ctx.execute(str) async def schema(self) -> str | None: """schema provided by the project Returns ------- str | None The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. """ _args: list[Arg] = [] _ctx = self._select("schema", _args) return await _ctx.execute(str | None) async def sdk(self) -> str | None: """sdk used to generate code for and/or execute this project Returns ------- str | None The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. """ _args: list[Arg] = [] _ctx = self._select("sdk", _args) return await _ctx.execute(str | None) class Client(Root): def cache_volume(self, key: str) -> "CacheVolume": """Construct a cache volume for a given cache key""" _args = [ Arg("key", key), ] _ctx = self._select("cacheVolume", _args) return CacheVolume(_ctx) def container( self, id: ContainerID | None = None, platform: Platform | None = None ) -> "Container": """Load a container from ID. Null ID returns an empty container (scratch). Optional platform argument initializes new containers to execute and publish as that platform. Platform defaults to that of the builder's host. """ _args = [ Arg("id", id, None), Arg("platform", platform, None), ] _ctx = self._select("container", _args) return Container(_ctx) async def default_platform(self) -> Platform: """The default platform of the builder. Returns ------- Platform """ _args: list[Arg] = [] _ctx = self._select("defaultPlatform", _args) return await _ctx.execute(Platform) def directory(self, id: DirectoryID | None = None) -> "Directory": """Load a directory by ID. No argument produces an empty directory.""" _args = [ Arg("id", id, None), ] _ctx = self._select("directory", _args) return Directory(_ctx) def file(self, id: FileID) -> "File": """Load a file by ID""" _args = [ Arg("id", id), ] _ctx = self._select("file", _args) return File(_ctx) def git(self, url: str, keep_git_dir: bool | None = None) -> "GitRepository": """Query a git repository""" _args = [ Arg("url", url), Arg("keepGitDir", keep_git_dir, None), ] _ctx = self._select("git", _args) return GitRepository(_ctx) def host(self) -> "Host": """Query the host environment""" _args: list[Arg] = [] _ctx = self._select("host", _args) return Host(_ctx) def http(self, url: str) -> "File": """An http remote""" _args = [ Arg("url", url), ] _ctx = self._select("http", _args) return File(_ctx) def project(self, name: str) -> "Project": """Look up a project by name""" _args = [ Arg("name", name), ] _ctx = self._select("project", _args) return Project(_ctx) def secret(self, id: SecretID) -> "Secret": """Load a secret from its ID""" _args = [ Arg("id", id), ] _ctx = self._select("secret", _args) return Secret(_ctx) class Secret(Type): """A reference to a secret value, which can be handled more safely than the value itself""" async def id(self) -> SecretID: """The identifier for this secret Note ---- This is lazyly evaluated, no operation is actually run. Returns ------- SecretID A unique identifier for a secret """ _args: list[Arg] = [] _ctx = self._select("id", _args) return await _ctx.execute(SecretID) async def plaintext(self) -> str: """The value of this secret Returns ------- str The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. """ _args: list[Arg] = [] _ctx = self._select("plaintext", _args) return await _ctx.execute(str)
closed
dagger/dagger
https://github.com/dagger/dagger
3,690
Hide IDs in API client
See: - https://github.com/dagger/dagger/issues/3558 - https://github.com/dagger/dagger/pull/3598
https://github.com/dagger/dagger/issues/3690
https://github.com/dagger/dagger/pull/3870
adaf88cf312696118750593380d129ef51c07955
10e89ac6c3b3a20d1ecdde6bf2b9a320d1a3881c
"2022-11-04T19:11:48Z"
go
"2022-11-16T15:09:11Z"
sdk/python/src/dagger/api/gen_sync.py
# Code generated by dagger. DO NOT EDIT. # flake8: noqa from typing import NewType from dagger.api.base import Arg, Root, Type CacheID = NewType("CacheID", str) """A global cache volume identifier""" ContainerID = NewType("ContainerID", str) """A unique container identifier. Null designates an empty container (scratch).""" DirectoryID = NewType("DirectoryID", str) """A content-addressed directory identifier""" FileID = NewType("FileID", str) Platform = NewType("Platform", str) SecretID = NewType("SecretID", str) """A unique identifier for a secret""" class CacheVolume(Type): """A directory whose contents persist across runs""" def id(self) -> "CacheID": """Note ---- This is lazyly evaluated, no operation is actually run. Returns ------- CacheID A global cache volume identifier """ _args: list[Arg] = [] _ctx = self._select("id", _args) return _ctx.execute_sync(CacheID) class Container(Type): """An OCI-compatible container, also known as a docker container""" def build(self, context: DirectoryID, dockerfile: str | None = None) -> "Container": """Initialize this container from a Dockerfile build""" _args = [ Arg("context", context), Arg("dockerfile", dockerfile, None), ] _ctx = self._select("build", _args) return Container(_ctx) def default_args(self) -> "list[str] | None": """Default arguments for future commands Returns ------- list[str] | None The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. """ _args: list[Arg] = [] _ctx = self._select("defaultArgs", _args) return _ctx.execute_sync(list[str] | None) def directory(self, path: str) -> "Directory": """Retrieve a directory at the given path. Mounts are included.""" _args = [ Arg("path", path), ] _ctx = self._select("directory", _args) return Directory(_ctx) def entrypoint(self) -> "list[str] | None": """Entrypoint to be prepended to the arguments of all commands Returns ------- list[str] | None The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. """ _args: list[Arg] = [] _ctx = self._select("entrypoint", _args) return _ctx.execute_sync(list[str] | None) def env_variable(self, name: str) -> "str | None": """The value of the specified environment variable Returns ------- str | None The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. """ _args = [ Arg("name", name), ] _ctx = self._select("envVariable", _args) return _ctx.execute_sync(str | None) def env_variables(self) -> "EnvVariable": """A list of environment variables passed to commands""" _args: list[Arg] = [] _ctx = self._select("envVariables", _args) return EnvVariable(_ctx) def exec( self, args: list[str] | None = None, stdin: str | None = None, redirect_stdout: str | None = None, redirect_stderr: str | None = None, experimental_privileged_nesting: bool | None = None, ) -> "Container": """This container after executing the specified command inside it Parameters ---------- args: Command to run instead of the container's default command stdin: Content to write to the command's standard input before closing redirect_stdout: Redirect the command's standard output to a file in the container redirect_stderr: Redirect the command's standard error to a file in the container experimental_privileged_nesting: Provide dagger access to the executed command Do not use this option unless you trust the command being executed The command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM """ _args = [ Arg("args", args, None), Arg("stdin", stdin, None), Arg("redirectStdout", redirect_stdout, None), Arg("redirectStderr", redirect_stderr, None), Arg("experimentalPrivilegedNesting", experimental_privileged_nesting, None), ] _ctx = self._select("exec", _args) return Container(_ctx) def exit_code(self) -> "int | None": """Exit code of the last executed command. Zero means success. Null if no command has been executed. Returns ------- int | None The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1. """ _args: list[Arg] = [] _ctx = self._select("exitCode", _args) return _ctx.execute_sync(int | None) def export( self, path: str, platform_variants: list[ContainerID] | None = None ) -> "bool": """Write the container as an OCI tarball to the destination file path on the host Returns ------- bool The `Boolean` scalar type represents `true` or `false`. """ _args = [ Arg("path", path), Arg("platformVariants", platform_variants, None), ] _ctx = self._select("export", _args) return _ctx.execute_sync(bool) def file(self, path: str) -> "File": """Retrieve a file at the given path. Mounts are included.""" _args = [ Arg("path", path), ] _ctx = self._select("file", _args) return File(_ctx) def from_(self, address: str) -> "Container": """Initialize this container from the base image published at the given address""" _args = [ Arg("address", address), ] _ctx = self._select("from", _args) return Container(_ctx) def fs(self) -> "Directory": """This container's root filesystem. Mounts are not included.""" _args: list[Arg] = [] _ctx = self._select("fs", _args) return Directory(_ctx) def id(self) -> "ContainerID": """A unique identifier for this container Note ---- This is lazyly evaluated, no operation is actually run. Returns ------- ContainerID A unique container identifier. Null designates an empty container (scratch). """ _args: list[Arg] = [] _ctx = self._select("id", _args) return _ctx.execute_sync(ContainerID) def mounts(self) -> "list[str]": """List of paths where a directory is mounted Returns ------- list[str] The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. """ _args: list[Arg] = [] _ctx = self._select("mounts", _args) return _ctx.execute_sync(list[str]) def platform(self) -> "Platform": """The platform this container executes and publishes as Returns ------- Platform """ _args: list[Arg] = [] _ctx = self._select("platform", _args) return _ctx.execute_sync(Platform) def publish( self, address: str, platform_variants: list[ContainerID] | None = None ) -> "str": """Publish this container as a new image, returning a fully qualified ref Returns ------- str The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. """ _args = [ Arg("address", address), Arg("platformVariants", platform_variants, None), ] _ctx = self._select("publish", _args) return _ctx.execute_sync(str) def stderr(self) -> "File": """The error stream of the last executed command. Null if no command has been executed. """ _args: list[Arg] = [] _ctx = self._select("stderr", _args) return File(_ctx) def stdout(self) -> "File": """The output stream of the last executed command. Null if no command has been executed. """ _args: list[Arg] = [] _ctx = self._select("stdout", _args) return File(_ctx) def user(self) -> "str | None": """The user to be set for all commands Returns ------- str | None The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. """ _args: list[Arg] = [] _ctx = self._select("user", _args) return _ctx.execute_sync(str | None) def with_default_args(self, args: list[str] | None = None) -> "Container": """Configures default arguments for future commands""" _args = [ Arg("args", args, None), ] _ctx = self._select("withDefaultArgs", _args) return Container(_ctx) def with_entrypoint(self, args: list[str]) -> "Container": """This container but with a different command entrypoint""" _args = [ Arg("args", args), ] _ctx = self._select("withEntrypoint", _args) return Container(_ctx) def with_env_variable(self, name: str, value: str) -> "Container": """This container plus the given environment variable""" _args = [ Arg("name", name), Arg("value", value), ] _ctx = self._select("withEnvVariable", _args) return Container(_ctx) def with_fs(self, id: DirectoryID) -> "Container": """Initialize this container from this DirectoryID""" _args = [ Arg("id", id), ] _ctx = self._select("withFS", _args) return Container(_ctx) def with_mounted_cache( self, path: str, cache: CacheID, source: DirectoryID | None = None ) -> "Container": """This container plus a cache volume mounted at the given path""" _args = [ Arg("path", path), Arg("cache", cache), Arg("source", source, None), ] _ctx = self._select("withMountedCache", _args) return Container(_ctx) def with_mounted_directory(self, path: str, source: DirectoryID) -> "Container": """This container plus a directory mounted at the given path""" _args = [ Arg("path", path), Arg("source", source), ] _ctx = self._select("withMountedDirectory", _args) return Container(_ctx) def with_mounted_file(self, path: str, source: FileID) -> "Container": """This container plus a file mounted at the given path""" _args = [ Arg("path", path), Arg("source", source), ] _ctx = self._select("withMountedFile", _args) return Container(_ctx) def with_mounted_secret(self, path: str, source: SecretID) -> "Container": """This container plus a secret mounted into a file at the given path""" _args = [ Arg("path", path), Arg("source", source), ] _ctx = self._select("withMountedSecret", _args) return Container(_ctx) def with_mounted_temp(self, path: str) -> "Container": """This container plus a temporary directory mounted at the given path""" _args = [ Arg("path", path), ] _ctx = self._select("withMountedTemp", _args) return Container(_ctx) def with_secret_variable(self, name: str, secret: SecretID) -> "Container": """This container plus an env variable containing the given secret""" _args = [ Arg("name", name), Arg("secret", secret), ] _ctx = self._select("withSecretVariable", _args) return Container(_ctx) def with_user(self, name: str) -> "Container": """This container but with a different command user""" _args = [ Arg("name", name), ] _ctx = self._select("withUser", _args) return Container(_ctx) def with_workdir(self, path: str) -> "Container": """This container but with a different working directory""" _args = [ Arg("path", path), ] _ctx = self._select("withWorkdir", _args) return Container(_ctx) def without_env_variable(self, name: str) -> "Container": """This container minus the given environment variable""" _args = [ Arg("name", name), ] _ctx = self._select("withoutEnvVariable", _args) return Container(_ctx) def without_mount(self, path: str) -> "Container": """This container after unmounting everything at the given path.""" _args = [ Arg("path", path), ] _ctx = self._select("withoutMount", _args) return Container(_ctx) def workdir(self) -> "str | None": """The working directory for all commands Returns ------- str | None The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. """ _args: list[Arg] = [] _ctx = self._select("workdir", _args) return _ctx.execute_sync(str | None) class Directory(Type): """A directory""" def diff(self, other: DirectoryID) -> "Directory": """The difference between this directory and an another directory""" _args = [ Arg("other", other), ] _ctx = self._select("diff", _args) return Directory(_ctx) def directory(self, path: str) -> "Directory": """Retrieve a directory at the given path""" _args = [ Arg("path", path), ] _ctx = self._select("directory", _args) return Directory(_ctx) def entries(self, path: str | None = None) -> "list[str]": """Return a list of files and directories at the given path Returns ------- list[str] The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. """ _args = [ Arg("path", path, None), ] _ctx = self._select("entries", _args) return _ctx.execute_sync(list[str]) def export(self, path: str) -> "bool": """Write the contents of the directory to a path on the host Returns ------- bool The `Boolean` scalar type represents `true` or `false`. """ _args = [ Arg("path", path), ] _ctx = self._select("export", _args) return _ctx.execute_sync(bool) def file(self, path: str) -> "File": """Retrieve a file at the given path""" _args = [ Arg("path", path), ] _ctx = self._select("file", _args) return File(_ctx) def id(self) -> "DirectoryID": """The content-addressed identifier of the directory Note ---- This is lazyly evaluated, no operation is actually run. Returns ------- DirectoryID A content-addressed directory identifier """ _args: list[Arg] = [] _ctx = self._select("id", _args) return _ctx.execute_sync(DirectoryID) def load_project(self, config_path: str) -> "Project": """load a project's metadata""" _args = [ Arg("configPath", config_path), ] _ctx = self._select("loadProject", _args) return Project(_ctx) def with_directory( self, path: str, directory: DirectoryID, exclude: list[str] | None = None, include: list[str] | None = None, ) -> "Directory": """This directory plus a directory written at the given path""" _args = [ Arg("path", path), Arg("directory", directory), Arg("exclude", exclude, None), Arg("include", include, None), ] _ctx = self._select("withDirectory", _args) return Directory(_ctx) def with_file(self, path: str, source: FileID) -> "Directory": """This directory plus the contents of the given file copied to the given path""" _args = [ Arg("path", path), Arg("source", source), ] _ctx = self._select("withFile", _args) return Directory(_ctx) def with_new_directory(self, path: str) -> "Directory": """This directory plus a new directory created at the given path""" _args = [ Arg("path", path), ] _ctx = self._select("withNewDirectory", _args) return Directory(_ctx) def with_new_file(self, path: str, contents: str | None = None) -> "Directory": """This directory plus a new file written at the given path""" _args = [ Arg("path", path), Arg("contents", contents, None), ] _ctx = self._select("withNewFile", _args) return Directory(_ctx) def without_directory(self, path: str) -> "Directory": """This directory with the directory at the given path removed""" _args = [ Arg("path", path), ] _ctx = self._select("withoutDirectory", _args) return Directory(_ctx) def without_file(self, path: str) -> "Directory": """This directory with the file at the given path removed""" _args = [ Arg("path", path), ] _ctx = self._select("withoutFile", _args) return Directory(_ctx) class EnvVariable(Type): """EnvVariable is a simple key value object that represents an environment variable.""" def name(self) -> "str": """name is the environment variable name. Returns ------- str The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. """ _args: list[Arg] = [] _ctx = self._select("name", _args) return _ctx.execute_sync(str) def value(self) -> "str": """value is the environment variable value Returns ------- str The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. """ _args: list[Arg] = [] _ctx = self._select("value", _args) return _ctx.execute_sync(str) class File(Type): """A file""" def contents(self) -> "str": """The contents of the file Returns ------- str The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. """ _args: list[Arg] = [] _ctx = self._select("contents", _args) return _ctx.execute_sync(str) def export(self, path: str) -> "bool": """Write the file to a file path on the host Returns ------- bool The `Boolean` scalar type represents `true` or `false`. """ _args = [ Arg("path", path), ] _ctx = self._select("export", _args) return _ctx.execute_sync(bool) def id(self) -> "FileID": """The content-addressed identifier of the file Note ---- This is lazyly evaluated, no operation is actually run. Returns ------- FileID """ _args: list[Arg] = [] _ctx = self._select("id", _args) return _ctx.execute_sync(FileID) def secret(self) -> "Secret": _args: list[Arg] = [] _ctx = self._select("secret", _args) return Secret(_ctx) def size(self) -> "int": """The size of the file, in bytes Returns ------- int The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1. """ _args: list[Arg] = [] _ctx = self._select("size", _args) return _ctx.execute_sync(int) class GitRef(Type): """A git ref (tag or branch)""" def digest(self) -> "str": """The digest of the current value of this ref Returns ------- str The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. """ _args: list[Arg] = [] _ctx = self._select("digest", _args) return _ctx.execute_sync(str) def tree(self) -> "Directory": """The filesystem tree at this ref""" _args: list[Arg] = [] _ctx = self._select("tree", _args) return Directory(_ctx) class GitRepository(Type): """A git repository""" def branch(self, name: str) -> "GitRef": """Details on one branch""" _args = [ Arg("name", name), ] _ctx = self._select("branch", _args) return GitRef(_ctx) def branches(self) -> "list[str]": """List of branches on the repository Returns ------- list[str] The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. """ _args: list[Arg] = [] _ctx = self._select("branches", _args) return _ctx.execute_sync(list[str]) def commit(self, id: str) -> "GitRef": """Details on one commit""" _args = [ Arg("id", id), ] _ctx = self._select("commit", _args) return GitRef(_ctx) def tag(self, name: str) -> "GitRef": """Details on one tag""" _args = [ Arg("name", name), ] _ctx = self._select("tag", _args) return GitRef(_ctx) def tags(self) -> "list[str]": """List of tags on the repository Returns ------- list[str] The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. """ _args: list[Arg] = [] _ctx = self._select("tags", _args) return _ctx.execute_sync(list[str]) class Host(Type): """Information about the host execution environment""" def directory( self, path: str, exclude: list[str] | None = None, include: list[str] | None = None, ) -> "Directory": """Access a directory on the host""" _args = [ Arg("path", path), Arg("exclude", exclude, None), Arg("include", include, None), ] _ctx = self._select("directory", _args) return Directory(_ctx) def env_variable(self, name: str) -> "HostVariable": """Lookup the value of an environment variable. Null if the variable is not available.""" _args = [ Arg("name", name), ] _ctx = self._select("envVariable", _args) return HostVariable(_ctx) def workdir( self, exclude: list[str] | None = None, include: list[str] | None = None ) -> "Directory": """The current working directory on the host""" _args = [ Arg("exclude", exclude, None), Arg("include", include, None), ] _ctx = self._select("workdir", _args) return Directory(_ctx) class HostVariable(Type): """An environment variable on the host environment""" def secret(self) -> "Secret": """A secret referencing the value of this variable""" _args: list[Arg] = [] _ctx = self._select("secret", _args) return Secret(_ctx) def value(self) -> "str": """The value of this variable Returns ------- str The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. """ _args: list[Arg] = [] _ctx = self._select("value", _args) return _ctx.execute_sync(str) class Project(Type): """A set of scripts and/or extensions""" def extensions(self) -> "Project": """extensions in this project""" _args: list[Arg] = [] _ctx = self._select("extensions", _args) return Project(_ctx) def generated_code(self) -> "Directory": """Code files generated by the SDKs in the project""" _args: list[Arg] = [] _ctx = self._select("generatedCode", _args) return Directory(_ctx) def install(self) -> "bool": """install the project's schema Returns ------- bool The `Boolean` scalar type represents `true` or `false`. """ _args: list[Arg] = [] _ctx = self._select("install", _args) return _ctx.execute_sync(bool) def name(self) -> "str": """name of the project Returns ------- str The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. """ _args: list[Arg] = [] _ctx = self._select("name", _args) return _ctx.execute_sync(str) def schema(self) -> "str | None": """schema provided by the project Returns ------- str | None The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. """ _args: list[Arg] = [] _ctx = self._select("schema", _args) return _ctx.execute_sync(str | None) def sdk(self) -> "str | None": """sdk used to generate code for and/or execute this project Returns ------- str | None The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. """ _args: list[Arg] = [] _ctx = self._select("sdk", _args) return _ctx.execute_sync(str | None) class Client(Root): def cache_volume(self, key: str) -> "CacheVolume": """Construct a cache volume for a given cache key""" _args = [ Arg("key", key), ] _ctx = self._select("cacheVolume", _args) return CacheVolume(_ctx) def container( self, id: ContainerID | None = None, platform: Platform | None = None ) -> "Container": """Load a container from ID. Null ID returns an empty container (scratch). Optional platform argument initializes new containers to execute and publish as that platform. Platform defaults to that of the builder's host. """ _args = [ Arg("id", id, None), Arg("platform", platform, None), ] _ctx = self._select("container", _args) return Container(_ctx) def default_platform(self) -> "Platform": """The default platform of the builder. Returns ------- Platform """ _args: list[Arg] = [] _ctx = self._select("defaultPlatform", _args) return _ctx.execute_sync(Platform) def directory(self, id: DirectoryID | None = None) -> "Directory": """Load a directory by ID. No argument produces an empty directory.""" _args = [ Arg("id", id, None), ] _ctx = self._select("directory", _args) return Directory(_ctx) def file(self, id: FileID) -> "File": """Load a file by ID""" _args = [ Arg("id", id), ] _ctx = self._select("file", _args) return File(_ctx) def git(self, url: str, keep_git_dir: bool | None = None) -> "GitRepository": """Query a git repository""" _args = [ Arg("url", url), Arg("keepGitDir", keep_git_dir, None), ] _ctx = self._select("git", _args) return GitRepository(_ctx) def host(self) -> "Host": """Query the host environment""" _args: list[Arg] = [] _ctx = self._select("host", _args) return Host(_ctx) def http(self, url: str) -> "File": """An http remote""" _args = [ Arg("url", url), ] _ctx = self._select("http", _args) return File(_ctx) def project(self, name: str) -> "Project": """Look up a project by name""" _args = [ Arg("name", name), ] _ctx = self._select("project", _args) return Project(_ctx) def secret(self, id: SecretID) -> "Secret": """Load a secret from its ID""" _args = [ Arg("id", id), ] _ctx = self._select("secret", _args) return Secret(_ctx) class Secret(Type): """A reference to a secret value, which can be handled more safely than the value itself""" def id(self) -> "SecretID": """The identifier for this secret Note ---- This is lazyly evaluated, no operation is actually run. Returns ------- SecretID A unique identifier for a secret """ _args: list[Arg] = [] _ctx = self._select("id", _args) return _ctx.execute_sync(SecretID) def plaintext(self) -> "str": """The value of this secret Returns ------- str The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. """ _args: list[Arg] = [] _ctx = self._select("plaintext", _args) return _ctx.execute_sync(str)
closed
dagger/dagger
https://github.com/dagger/dagger
3,690
Hide IDs in API client
See: - https://github.com/dagger/dagger/issues/3558 - https://github.com/dagger/dagger/pull/3598
https://github.com/dagger/dagger/issues/3690
https://github.com/dagger/dagger/pull/3870
adaf88cf312696118750593380d129ef51c07955
10e89ac6c3b3a20d1ecdde6bf2b9a320d1a3881c
"2022-11-04T19:11:48Z"
go
"2022-11-16T15:09:11Z"
sdk/python/src/dagger/codegen.py
import functools import logging import re from abc import ABC, abstractmethod from datetime import date, datetime, time from decimal import Decimal from enum import Enum from functools import partial from itertools import chain, groupby from keyword import iskeyword from operator import attrgetter from textwrap import dedent from textwrap import indent as base_indent from typing import Any, ClassVar, Generic, Iterator, Protocol, TypeGuard, TypeVar from attrs import define from graphql import ( GraphQLArgument, GraphQLField, GraphQLInputField, GraphQLInputObjectType, GraphQLInputType, GraphQLLeafType, GraphQLList, GraphQLNamedType, GraphQLNonNull, GraphQLObjectType, GraphQLOutputType, GraphQLScalarType, GraphQLSchema, GraphQLType, GraphQLWrappingType, Undefined, is_leaf_type, ) from graphql.pyutils import camel_to_snake ACRONYM_RE = re.compile(r"([A-Z\d]+)(?=[A-Z\d]|$)") """Pattern for grouping initialisms.""" logger = logging.getLogger(__name__) indent = partial(base_indent, prefix=" " * 4) class Scalars(Enum): ID = str Int = int String = str Float = float Boolean = bool Date = date DateTime = datetime Time = time Decimal = Decimal @classmethod def from_type(cls, t: GraphQLScalarType) -> str: try: return cls[t.name].value.__name__ except KeyError: return t.name def joiner(func): """Joins elements with a new line from an iterator.""" @functools.wraps(func) def wrapper(*args, **kwargs) -> str: return "\n".join(func(*args, **kwargs)) return wrapper @joiner def generate(schema: GraphQLSchema, sync: bool = False) -> Iterator[str]: """Code generation main function.""" yield dedent( """\ # Code generated by dagger. DO NOT EDIT. # flake8: noqa from typing import NewType from dagger.api.base import Arg, Root, Type """ ) handlers: tuple[Handler, ...] = ( Scalar(sync), Input(sync), Object(sync), ) def sort_key(t: GraphQLNamedType) -> tuple[int, str]: for i, handler in enumerate(handlers): if handler.predicate(t): return i, t.name return -1, t.name def group_key(t: GraphQLNamedType) -> Handler | None: for handler in handlers: if handler.predicate(t): return handler all_types = sorted(schema.type_map.values(), key=sort_key) for handler, types in groupby(all_types, group_key): for t in types: if handler is None or t.name.startswith("__"): continue yield handler.render(t) # FIXME: these typeguards should be contributed upstream # https://github.com/graphql-python/graphql-core/issues/183 def is_required_type(t: GraphQLType) -> TypeGuard[GraphQLNonNull]: return isinstance(t, GraphQLNonNull) def is_list_type(t: GraphQLType) -> TypeGuard[GraphQLList]: return isinstance(t, GraphQLList) def is_wrapping_type(t: GraphQLType) -> TypeGuard[GraphQLWrappingType]: return isinstance(t, GraphQLWrappingType) def is_scalar_type(t: GraphQLType) -> TypeGuard[GraphQLScalarType]: return isinstance(t, GraphQLScalarType) def is_input_object_type(t: GraphQLType) -> TypeGuard[GraphQLInputObjectType]: return isinstance(t, GraphQLInputObjectType) def is_object_type(t: GraphQLType) -> TypeGuard[GraphQLObjectType]: return isinstance(t, GraphQLObjectType) def is_output_leaf_type(t: GraphQLOutputType) -> TypeGuard[GraphQLLeafType]: return is_leaf_type(t) or (is_wrapping_type(t) and is_output_leaf_type(t.of_type)) def is_custom_scalar_type(t: GraphQLNamedType) -> TypeGuard[GraphQLScalarType]: return is_scalar_type(t) and t.name not in Scalars.__members__ def format_name(s: str) -> str: # rewrite acronyms, initialisms and abbreviations s = ACRONYM_RE.sub(lambda m: m.group(0).title(), s) s = camel_to_snake(s) if iskeyword(s): s += "_" return s def format_input_type(t: GraphQLInputType) -> str: """This may be used in an input object field or an object field parameter.""" if is_required_type(t): t = t.of_type fmt = "%s" else: fmt = "%s | None" if is_list_type(t): return fmt % f"list[{format_input_type(t.of_type)}]" if is_scalar_type(t): return fmt % Scalars.from_type(t) assert not isinstance(t, GraphQLNonNull) return fmt % t.name def format_output_type(t: GraphQLOutputType) -> str: """This may be used as the output type of an object field.""" # only wrap optional and list when ready if is_output_leaf_type(t): return format_input_type(t) # when building the query return shouldn't be None # even if optional to not break the chain while # we're only building the query # FIXME: detect this when returning the scalar # since it affects the result if is_wrapping_type(t): return format_output_type(t.of_type) if is_scalar_type(t): return Scalars.from_type(t) return t.name def output_type_description(t: GraphQLOutputType) -> str: if is_wrapping_type(t): return output_type_description(t.of_type) if isinstance(t, GraphQLNamedType): return t.description return "" def doc(s: str) -> str: """Wrap string in docstring quotes.""" if "\n" in s: s = f"{s}\n" return f'"""{s}"""' class _InputField: """Input object field or object field argument.""" def __init__(self, name: str, graphql: GraphQLInputField | GraphQLArgument) -> None: self.graphql_name = name self.graphql = graphql self.name = format_name(name) self.type = format_input_type(graphql.type) self.description = graphql.description self.has_default = graphql.default_value is not Undefined self.default_value = graphql.default_value if not is_required_type(graphql.type) and not self.has_default: self.default_value = None self.has_default = True def __str__(self) -> str: """Output for an InputObject field.""" sig = self.as_param() if self.description: return f"{sig}\n{doc(self.description)}" return sig def as_param(self) -> str: """As a parameter in a function signature.""" out = f"{self.name}: {self.type}" if self.has_default: out = f"{out} = {repr(self.default_value)}" return out def as_doc(self) -> str: """As a part of a docstring.""" out = f"{self.name}:" if self.description: out = f"{out}\n{indent(self.description)}" return out def as_arg(self) -> str: """As a Arg object for the query builder.""" params = [f"'{self.graphql_name}'", self.name] if self.has_default: params.append(repr(self.default_value)) return f"Arg({', '.join(params)})," class _ObjectField: def __init__(self, name: str, field: GraphQLField, sync: bool) -> None: self.graphql_name = name self.graphql = field self.sync = sync self.name = format_name(name) self.args = sorted( (_InputField(name, arg) for name, arg in field.args.items()), key=attrgetter("has_default"), ) self.description = field.description self.is_leaf = is_output_leaf_type(field.type) self.is_custom_scalar = is_custom_scalar_type(field.type) self.type = format_output_type(field.type) def __str__(self) -> str: return f"{self.func_signature()}:\n{indent(self.func_body())}\n" def func_signature(self) -> str: params = ", ".join(chain(("self",), (a.as_param() for a in self.args))) sig = f"def {self.name}({params})" if self.is_leaf and not self.sync: sig = f"{sig} -> {self.type}" if not self.sync: return f"async {sig}" return sig return f'{sig} -> "{self.type}"' @joiner def func_body(self) -> str: if docstring := self.func_doc(): yield doc(docstring) if not self.args: yield "_args: list[Arg] = []" else: yield "_args = [" yield from (indent(arg.as_arg()) for arg in self.args) yield "]" yield f'_ctx = self._select("{self.graphql_name}", _args)' if self.is_leaf: if self.sync: yield f"return _ctx.execute_sync({self.type})" else: yield f"return await _ctx.execute({self.type})" else: yield f"return {self.type}(_ctx)" def func_doc(self) -> str: def _out(): if self.description: yield (self.description,) if self.name == "id": yield ( "Note", "----", "This is lazyly evaluated, no operation is actually run.", ) if any(arg.description for arg in self.args): yield chain( ( "Parameters", "----------", ), (arg.as_doc() for arg in self.args), ) if self.is_leaf: yield ( "Returns", "-------", self.type, indent(output_type_description(self.graphql.type)), ) return "\n\n".join("\n".join(section) for section in _out()) @joiner def func_doc_params(self): ... _H = TypeVar("_H", bound=GraphQLNamedType) """Handler generic type""" class Predicate(Protocol): def __call__(self, _: Any) -> bool: ... @define class Handler(ABC, Generic[_H]): sync: bool = False predicate: ClassVar[Predicate] = staticmethod(lambda _: True) """Does this handler render the given type?""" def render(self, t: _H) -> str: return f"{self.render_head(t)}\n{self.render_body(t)}" @abstractmethod def render_head(self, t: _H) -> str: ... def render_body(self, t: _H) -> str: return f"{doc(t.description)}\n\n" if t.description else "" @define class Scalar(Handler[GraphQLScalarType]): predicate: ClassVar[Predicate] = staticmethod(is_custom_scalar_type) def render_head(self, t: GraphQLScalarType) -> str: return f'{t.name} = NewType("{t.name}", str)' class Field(Protocol): name: str def __str__(self) -> str: ... _O = TypeVar("_O", GraphQLInputObjectType, GraphQLObjectType) """Object handler generic type""" class ObjectHandler(Handler[_O], Generic[_O]): @property @abstractmethod def field_class(self) -> type[Field]: ... def render_head(self, t: _O) -> str: if t.name == "Query": return "class Client(Root):" return f"class {t.name}(Type):" def render_body(self, t: _O) -> str: return indent(self._render_body(t)) @joiner def _render_body(self, t: _O) -> str: if t.description: yield doc(t.description) yield from ( str(self.field_class(*args, self.sync)) for args in t.fields.items() ) class Input(ObjectHandler[GraphQLInputObjectType]): predicate: ClassVar[Predicate] = staticmethod(is_input_object_type) @property def field_class(self): return _InputField class Object(ObjectHandler[GraphQLObjectType]): predicate: ClassVar[Predicate] = staticmethod(is_object_type) @property def field_class(self): return _ObjectField
closed
dagger/dagger
https://github.com/dagger/dagger
3,690
Hide IDs in API client
See: - https://github.com/dagger/dagger/issues/3558 - https://github.com/dagger/dagger/pull/3598
https://github.com/dagger/dagger/issues/3690
https://github.com/dagger/dagger/pull/3870
adaf88cf312696118750593380d129ef51c07955
10e89ac6c3b3a20d1ecdde6bf2b9a320d1a3881c
"2022-11-04T19:11:48Z"
go
"2022-11-16T15:09:11Z"
sdk/python/src/dagger/connectors/base.py
import logging import os from abc import ABC, abstractmethod from collections import UserDict from pathlib import Path from typing import TextIO, TypeVar from urllib.parse import ParseResult as ParsedURL from urllib.parse import urlparse from attrs import Factory, define, field from gql.client import Client as GraphQLClient from gql.transport import AsyncTransport, Transport from dagger import Client, SyncClient from .engine_version import ENGINE_IMAGE_REF logger = logging.getLogger(__name__) DEFAULT_HOST = f"docker-image://{ENGINE_IMAGE_REF}" @define class Config: """Options for connecting to the Dagger engine. Parameters ---------- host: Address to connect to the engine. workdir: The host workdir loaded into dagger. config_path: Project config file. log_output: A TextIO object to send the logs from the engine. timeout: The maximum time in seconds for establishing a connection to the server. execute_timeout: The maximum time in seconds for the execution of a request before a TimeoutError is raised. Only used for async transport. Passing None results in waiting forever for a response. reconnecting: If True, create a permanent reconnecting session. Only used for async transport. """ host: ParsedURL = field( factory=lambda: os.environ.get("DAGGER_HOST", DEFAULT_HOST), converter=urlparse, ) workdir: Path | str = "" config_path: Path | str = "" log_output: TextIO | None = None timeout: int = 10 execute_timeout: int | float | None = 60 * 5 reconnecting: bool = True @define class Connector(ABC): """Facilitates instantiating a client and possibly provisioning the engine for it. """ cfg: Config = Factory(Config) client: Client | SyncClient | None = None async def connect(self) -> Client: transport = self.make_transport() gql_client = self.make_graphql_client(transport) # FIXME: handle errors from establishing session session = await gql_client.connect_async(reconnecting=self.cfg.reconnecting) self.client = Client.from_session(session) return self.client async def close(self, exc_type) -> None: assert self.client is not None await self.client._gql_client.close_async() def connect_sync(self) -> SyncClient: transport = self.make_sync_transport() gql_client = self.make_graphql_client(transport) # FIXME: handle errors from establishing session session = gql_client.connect_sync() self.client = SyncClient.from_session(session) return self.client def close_sync(self) -> None: assert self.client is not None self.client._gql_client.close_sync() @abstractmethod def make_transport(self) -> AsyncTransport: ... @abstractmethod def make_sync_transport(self) -> Transport: ... def make_graphql_client( self, transport: AsyncTransport | Transport ) -> GraphQLClient: return GraphQLClient( transport=transport, fetch_schema_from_transport=True, execute_timeout=self.cfg.execute_timeout, ) _RT = TypeVar("_RT", bound=type) class _Registry(UserDict[str, type[Connector]]): def add(self, scheme: str): def register(cls: _RT) -> _RT: if scheme not in self.data: if not issubclass(cls, Connector): raise TypeError(f"{cls.__name__} isn't a Connector subclass") self.data[scheme] = cls elif cls is not self.data[scheme]: raise TypeError(f"Can't re-register {scheme} connector: {cls.__name__}") else: # FIXME: make sure imports don't create side effect of registering # multiple times logger.debug(f"Attempted to re-register {scheme} connector") return cls return register def get_(self, cfg: Config) -> Connector: try: cls = self.data[cfg.host.scheme] except KeyError as e: raise ValueError(f'Invalid dagger host "{cfg.host.geturl()}"') from e return cls(cfg) _registry = _Registry() def register_connector(schema: str): return _registry.add(schema) def get_connector(cfg: Config) -> Connector: return _registry.get_(cfg)
closed
dagger/dagger
https://github.com/dagger/dagger
3,690
Hide IDs in API client
See: - https://github.com/dagger/dagger/issues/3558 - https://github.com/dagger/dagger/pull/3598
https://github.com/dagger/dagger/issues/3690
https://github.com/dagger/dagger/pull/3870
adaf88cf312696118750593380d129ef51c07955
10e89ac6c3b3a20d1ecdde6bf2b9a320d1a3881c
"2022-11-04T19:11:48Z"
go
"2022-11-16T15:09:11Z"
sdk/python/src/dagger/connectors/docker.py
import logging import os import platform import subprocess import tempfile from pathlib import Path import anyio from attrs import Factory, define, field from dagger import Client from dagger.exceptions import DaggerException from .base import Config, register_connector from .http import HTTPConnector logger = logging.getLogger(__name__) ENGINE_SESSION_BINARY_PREFIX = "dagger-engine-session-" def get_platform() -> tuple[str, str]: normalized_arch = { "x86_64": "amd64", "aarch64": "arm64", } uname = platform.uname() os_name = uname.system.lower() arch = uname.machine.lower() arch = normalized_arch.get(arch, arch) return os_name, arch class ImageRef: DIGEST_LEN = 16 def __init__(self, ref: str) -> None: self.ref = ref # Check to see if ref contains @sha256:, if so use the digest as the id. if "@sha256:" not in ref: raise ValueError("Image ref must contain a digest") id_ = ref.split("@sha256:", maxsplit=1)[1] # TODO: add verification that the digest is valid # (not something malicious with / or ..) self.id = id_[: self.DIGEST_LEN] @define class Engine: cfg: Config _proc: subprocess.Popen | None = field(default=None, init=False) def start(self) -> None: cache_dir = ( Path(os.environ.get("XDG_CACHE_HOME", "~/.cache")).expanduser() / "dagger" ) cache_dir.mkdir(mode=0o700, parents=True, exist_ok=True) os_, arch = get_platform() image = ImageRef(self.cfg.host.hostname + self.cfg.host.path) engine_session_bin_path = ( cache_dir / f"{ENGINE_SESSION_BINARY_PREFIX}{image.id}" ) if os_ == "windows": engine_session_bin_path = engine_session_bin_path.with_suffix(".exe") if not engine_session_bin_path.exists(): tempfile_args = { "prefix": f"temp-{ENGINE_SESSION_BINARY_PREFIX}", "dir": cache_dir, "delete": False, } with tempfile.NamedTemporaryFile(**tempfile_args) as tmp_bin: def cleanup(): """Remove the tmp_bin on error.""" tmp_bin.close() os.unlink(tmp_bin.name) docker_run_args = [ "docker", "run", "--rm", "--entrypoint", "/bin/cat", image.ref, f"/usr/bin/{ENGINE_SESSION_BINARY_PREFIX}{os_}-{arch}", ] try: subprocess.run( docker_run_args, stdout=tmp_bin, stderr=subprocess.PIPE, encoding="utf-8", check=True, ) except FileNotFoundError as e: raise ProvisionError( f"Command '{docker_run_args[0]}' not found." ) from e except subprocess.CalledProcessError as e: raise ProvisionError( f"Failed to copy engine session binary: {e.stderr}" ) from e else: # Flake8 Ignores # F811 -- redefinition of (yet) unused function # E731 -- assigning a lambda. cleanup = lambda: None # noqa: F811,E731 finally: cleanup() tmp_bin_path = Path(tmp_bin.name) tmp_bin_path.chmod(0o700) engine_session_bin_path = tmp_bin_path.rename(engine_session_bin_path) # garbage collection of old engine_session binaries for bin in cache_dir.glob(f"{ENGINE_SESSION_BINARY_PREFIX}*"): if bin != engine_session_bin_path: bin.unlink() remote = f"docker-image://{image.ref}" engine_session_args = [engine_session_bin_path, "--remote", remote] if self.cfg.workdir: engine_session_args.extend( ["--workdir", str(Path(self.cfg.workdir).absolute())] ) if self.cfg.config_path: engine_session_args.extend( ["--project", str(Path(self.cfg.config_path).absolute())] ) self._proc = subprocess.Popen( engine_session_args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=self.cfg.log_output or subprocess.PIPE, encoding="utf-8", ) try: # read port number from first line of stdout port = int(self._proc.stdout.readline()) except ValueError as e: # Check if the subprocess exited with an error. if not self._proc.poll(): raise e # FIXME: Duplicate writes into a buffer until end of provisioning # instead of reading directly from what the user may set in `log_output` if self._proc.stderr is not None and self._proc.stderr.readable(): raise ProvisionError( f"Dagger engine failed to start: {self._proc.stderr.readline()}" ) from e raise ProvisionError( "Dagger engine failed to start, is docker running?" ) from e # TODO: verify port number is valid self.cfg.host = f"http://localhost:{port}" def is_running(self) -> bool: return self._proc is not None def stop(self, exc_type) -> None: if not self.is_running(): return self._proc.__exit__(exc_type, None, None) def __enter__(self): self.start() return self def __exit__(self, exc_type, *args, **kwargs): self.stop(exc_type) @register_connector("docker-image") @define class DockerConnector(HTTPConnector): """Provision dagger engine from an image with docker""" engine: Engine = Factory(lambda self: Engine(self.cfg), takes_self=True) @property def query_url(self) -> str: return f"{self.cfg.host.geturl()}/query" async def connect(self) -> Client: # FIXME: Create proper async provisioning later. # This is just to support sync faster. await anyio.to_thread.run_sync(self.provision_sync) return await super().connect() async def close(self, exc_type) -> None: # FIXME: need exit stack? await super().close(exc_type) if self.engine.is_running(): await anyio.to_thread.run_sync(self.engine.stop, exc_type) def connect_sync(self) -> Client: self.provision_sync() return super().connect_sync() def provision_sync(self) -> None: # FIXME: handle cancellation, retries and timeout # FIXME: handle errors during provisioning self.engine.start() def close_sync(self, exc_type) -> None: # FIXME: need exit stack? super().close_sync() self.engine.stop(exc_type) class ProvisionError(DaggerException): """Error while provisioning the Dagger engine."""