status
stringclasses
1 value
repo_name
stringclasses
31 values
repo_url
stringclasses
31 values
issue_id
int64
1
104k
title
stringlengths
4
233
body
stringlengths
0
186k
issue_url
stringlengths
38
56
pull_url
stringlengths
37
54
before_fix_sha
stringlengths
40
40
after_fix_sha
stringlengths
40
40
report_datetime
timestamp[us, tz=UTC]
language
stringclasses
5 values
commit_datetime
timestamp[us, tz=UTC]
updated_file
stringlengths
7
188
chunk_content
stringlengths
1
1.03M
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
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 {
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
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) {
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
t.Parallel() dirID := newDirWithFiles(t, "some-file", "some-content", "some-dir/sub-file", "sub-content") var res2 struct { Directory struct {
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
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 {
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
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 {
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
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{
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
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/directory.go
package schema import ( "github.com/dagger/dagger/core" "github.com/dagger/dagger/router" ) type directorySchema struct {
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
*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),
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
"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 {
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
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 {
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
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
magefile.go
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" ) type Lint mg.Namespace func (t Lint) All(ctx context.Context) error { mg.Deps( t.Codegen, t.Markdown, ) 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
magefile.go
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
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
} 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 } src, err := c. Host(). Workdir(). File("sdk/go/api.gen.go"). Contents(ctx) if err != nil { return err } diff := cmp.Diff(string(generated), src) if diff != "" { return fmt.Errorf("generated api mismatch. please run `go generate ./...`:\n%s", diff) } return nil } func Build(ctx context.Context) error {
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
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") 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 }
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
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
package dagger import ( "context" "dagger.io/dagger/internal/querybuilder" "github.com/Khan/genqlient/graphql" ) type graphqlMarshaller interface { graphqlType() string graphqlMarshal(ctx context.Context) (any, error) } type CacheID string func (s CacheID) graphqlType() string { return "CacheID" } func (s CacheID) graphqlMarshal(ctx context.Context) (any, error) { return string(s), nil } type ContainerID string func (s ContainerID) graphqlType() string { return "ContainerID" } func (s ContainerID) graphqlMarshal(ctx context.Context) (any, error) { return string(s), 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
} type DirectoryID string func (s DirectoryID) graphqlType() string { return "DirectoryID" } func (s DirectoryID) graphqlMarshal(ctx context.Context) (any, error) { return string(s), nil } type FileID string func (s FileID) graphqlType() string { return "FileID" } func (s FileID) graphqlMarshal(ctx context.Context) (any, error) { return string(s), nil } type Platform string func (s Platform) graphqlType() string { return "Platform" } func (s Platform) graphqlMarshal(ctx context.Context) (any, error) { return string(s), nil } type SecretID string func (s SecretID) graphqlType() string { return "SecretID" } func (s SecretID) graphqlMarshal(ctx context.Context) (any, error) { return string(s), nil } type CacheVolume struct {
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
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) } func (r *CacheVolume) graphqlType() string { return "CacheVolume" } 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 } type Container struct { q *querybuilder.Selection c graphql.Client } type ContainerBuildOpts struct {
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
Dockerfile string } func (r *Container) Build(context DirectoryID, opts ...ContainerBuildOpts) *Container { q := r.q.Select("build") q = q.Arg("context", context) 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, } } 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) } func (r *Container) Directory(path string) *Directory { q := r.q.Select("directory") q = q.Arg("path", path) return &Directory{ q: q, c: 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
sdk/go/api.gen.go
} } 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) } 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) } 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) } type ContainerExecOpts struct { Args []string RedirectStderr string RedirectStdout string Stdin string } func (r *Container) Exec(opts ...ContainerExecOpts) *Container { q := r.q.Select("exec")
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
for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Args) { q = q.Arg("args", opts[i].Args) break } } for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].RedirectStderr) { q = q.Arg("redirectStderr", opts[i].RedirectStderr) break } } for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].RedirectStdout) { q = q.Arg("redirectStdout", opts[i].RedirectStdout) break } } 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,
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
} } 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) } func (r *Container) File(path string) *File { q := r.q.Select("file") q = q.Arg("path", path) return &File{ q: q, c: r.c, } } func (r *Container) From(address string) *Container { q := r.q.Select("from") q = q.Arg("address", address) return &Container{ q: q, c: r.c, } } func (r *Container) FS() *Directory { q := r.q.Select("fs") return &Directory{ q: q, c: 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
sdk/go/api.gen.go
} 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) } func (r *Container) graphqlType() string { return "Container" } 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 } 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) } 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) } type ContainerPublishOpts struct {
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
PlatformVariants []ContainerID } func (r *Container) Publish(ctx context.Context, address string, opts ...ContainerPublishOpts) (string, error) { q := r.q.Select("publish") q = q.Arg("address", address) 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) } func (r *Container) Stderr() *File { q := r.q.Select("stderr") return &File{ q: q, c: r.c, } } func (r *Container) Stdout() *File { q := r.q.Select("stdout") return &File{ q: q, c: 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
sdk/go/api.gen.go
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) } type ContainerWithDefaultArgsOpts struct { Args []string } func (r *Container) WithDefaultArgs(opts ...ContainerWithDefaultArgsOpts) *Container { q := r.q.Select("withDefaultArgs") 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, } } func (r *Container) WithEntrypoint(args []string) *Container { q := r.q.Select("withEntrypoint") q = q.Arg("args", args) return &Container{ q: q, c: 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
sdk/go/api.gen.go
} 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, } } func (r *Container) WithFS(id DirectoryID) *Container { q := r.q.Select("withFS") q = q.Arg("id", id) return &Container{ q: q, c: r.c, } } type ContainerWithMountedCacheOpts struct { Source DirectoryID } 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) for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Source) { q = q.Arg("source", opts[i].Source) break
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
} } return &Container{ q: q, c: r.c, } } 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, } } 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, } } 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{
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
q: q, c: r.c, } } func (r *Container) WithMountedTemp(path string) *Container { q := r.q.Select("withMountedTemp") q = q.Arg("path", path) return &Container{ q: q, c: r.c, } } 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, } } func (r *Container) WithUser(name string) *Container { q := r.q.Select("withUser") q = q.Arg("name", name) return &Container{ q: q, c: r.c, } } func (r *Container) WithWorkdir(path string) *Container {
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
q := r.q.Select("withWorkdir") q = q.Arg("path", path) return &Container{ q: q, c: r.c, } } func (r *Container) WithoutEnvVariable(name string) *Container { q := r.q.Select("withoutEnvVariable") q = q.Arg("name", name) return &Container{ q: q, c: r.c, } } func (r *Container) WithoutMount(path string) *Container { q := r.q.Select("withoutMount") q = q.Arg("path", path) return &Container{ q: q, c: r.c, } } 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) } type Directory struct {
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
q *querybuilder.Selection c graphql.Client } func (r *Directory) Diff(other DirectoryID) *Directory { q := r.q.Select("diff") q = q.Arg("other", other) return &Directory{ q: q, c: r.c, } } func (r *Directory) Directory(path string) *Directory { q := r.q.Select("directory") q = q.Arg("path", path) return &Directory{ q: q, c: r.c, } } type DirectoryEntriesOpts struct { Path string } func (r *Directory) Entries(ctx context.Context, opts ...DirectoryEntriesOpts) ([]string, error) { q := r.q.Select("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
sdk/go/api.gen.go
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) } 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) } func (r *Directory) File(path string) *File { q := r.q.Select("file") q = q.Arg("path", path) return &File{ q: q, c: r.c, } } func (r *Directory) ID(ctx context.Context) (DirectoryID, error) { q := r.q.Select("id") var response DirectoryID q = q.Bind(&response)
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
return response, q.Execute(ctx, r.c) } func (r *Directory) graphqlType() string { return "Directory" } 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 } func (r *Directory) LoadProject(configPath string) *Project { q := r.q.Select("loadProject") q = q.Arg("configPath", configPath) return &Project{ q: q, c: r.c, } } 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, } } type DirectoryWithDirectoryOpts struct {
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
Exclude []string Include []string } func (r *Directory) WithDirectory(directory DirectoryID, path string, opts ...DirectoryWithDirectoryOpts) *Directory { q := r.q.Select("withDirectory") q = q.Arg("directory", directory) for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Exclude) { q = q.Arg("exclude", opts[i].Exclude) break } } 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, } } type DirectoryWithNewFileOpts struct {
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
Contents string } func (r *Directory) WithNewFile(path string, opts ...DirectoryWithNewFileOpts) *Directory { q := r.q.Select("withNewFile") 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, } } func (r *Directory) WithoutDirectory(path string) *Directory { q := r.q.Select("withoutDirectory") q = q.Arg("path", path) return &Directory{ q: q, c: r.c, } } func (r *Directory) WithoutFile(path string) *Directory { q := r.q.Select("withoutFile") q = q.Arg("path", path) return &Directory{
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
q: q, c: r.c, } } type EnvVariable struct { q *querybuilder.Selection c graphql.Client } 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) } 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) } type File struct { q *querybuilder.Selection c graphql.Client } 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) }
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
func (r *File) ID(ctx context.Context) (FileID, error) { q := r.q.Select("id") var response FileID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } func (r *File) graphqlType() string { return "File" } 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, } } 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) } type GitRef struct {
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
q *querybuilder.Selection c graphql.Client } 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) } func (r *GitRef) Tree() *Directory { q := r.q.Select("tree") return &Directory{ q: q, c: r.c, } } type GitRepository struct { q *querybuilder.Selection c graphql.Client } func (r *GitRepository) Branch(name string) *GitRef { q := r.q.Select("branch") q = q.Arg("name", name)
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
return &GitRef{ q: q, c: r.c, } } 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) } func (r *GitRepository) Tag(name string) *GitRef { q := r.q.Select("tag") q = q.Arg("name", name) return &GitRef{ q: q, c: r.c, } } func (r *GitRepository) Tags(ctx context.Context) ([]string, error) { q := r.q.Select("tags") var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } type Host struct { q *querybuilder.Selection c graphql.Client } type HostDirectoryOpts struct {
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
Exclude []string Include []string } func (r *Host) Directory(path string, opts ...HostDirectoryOpts) *Directory { q := r.q.Select("directory") for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Exclude) { q = q.Arg("exclude", opts[i].Exclude) break } } 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, } } func (r *Host) EnvVariable(name string) *HostVariable { q := r.q.Select("envVariable") q = q.Arg("name", name) return &HostVariable{
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
q: q, c: r.c, } } type HostWorkdirOpts struct { Exclude []string Include []string } func (r *Host) Workdir(opts ...HostWorkdirOpts) *Directory { q := r.q.Select("workdir") for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Exclude) { q = q.Arg("exclude", opts[i].Exclude) break } } 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, } } type HostVariable struct {
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
q *querybuilder.Selection c graphql.Client } func (r *HostVariable) Secret() *Secret { q := r.q.Select("secret") return &Secret{ q: q, c: r.c, } } 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) } type Project struct {
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
q *querybuilder.Selection c graphql.Client } 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) } func (r *Project) GeneratedCode() *Directory { q := r.q.Select("generatedCode") return &Directory{ q: q, c: r.c, } } 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) } func (r *Project) Name(ctx context.Context) (string, error) { q := r.q.Select("name")
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
var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } 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) } 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 } func (r *Query) CacheVolume(key string) *CacheVolume { q := r.q.Select("cacheVolume") q = q.Arg("key", key) return &CacheVolume{ q: q, c: r.c, } } type ContainerOpts struct { ID ContainerID
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
Platform Platform } func (r *Query) Container(opts ...ContainerOpts) *Container { q := r.q.Select("container") for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].ID) { q = q.Arg("id", opts[i].ID) break } } 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, } } 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) } type DirectoryOpts struct {
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
ID DirectoryID } func (r *Query) Directory(opts ...DirectoryOpts) *Directory { q := r.q.Select("directory") 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, } } func (r *Query) File(id FileID) *File { q := r.q.Select("file") q = q.Arg("id", id) return &File{ q: q, c: r.c, } } func (r *Query) Git(url string) *GitRepository { q := r.q.Select("git") q = q.Arg("url", url) return &GitRepository{ q: q, c: 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
sdk/go/api.gen.go
} } func (r *Query) Host() *Host { q := r.q.Select("host") return &Host{ q: q, c: r.c, } } func (r *Query) HTTP(url string) *File { q := r.q.Select("http") q = q.Arg("url", url) return &File{ q: q, c: r.c, } } func (r *Query) Project(name string) *Project { q := r.q.Select("project") q = q.Arg("name", name) return &Project{ q: q, c: r.c, } } func (r *Query) Secret(id SecretID) *Secret { q := r.q.Select("secret") q = q.Arg("id", id) return &Secret{ q: q,
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
c: r.c, } } type Secret struct { q *querybuilder.Selection c graphql.Client } 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) } func (r *Secret) graphqlType() string { return "Secret" } 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 } 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,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 {
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
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 {
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
*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 {
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
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 {
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
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
sdk/go/api.gen.go
package dagger import ( "context" "dagger.io/dagger/internal/querybuilder" "github.com/Khan/genqlient/graphql" ) type CacheID string type ContainerID string type DirectoryID string type FileID string type Platform string type SecretID string type CacheVolume struct {
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
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) } func (r *CacheVolume) XXX_GraphQLType() string { return "CacheVolume" } func (r *CacheVolume) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } type Container struct {
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
q *querybuilder.Selection c graphql.Client } type ContainerBuildOpts struct { Dockerfile string } func (r *Container) Build(context *Directory, opts ...ContainerBuildOpts) *Container { q := r.q.Select("build") q = q.Arg("context", context) 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, } } func (r *Container) DefaultArgs(ctx context.Context) ([]string, error) { q := r.q.Select("defaultArgs") var response []string q = q.Bind(&response)
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
return response, q.Execute(ctx, r.c) } func (r *Container) Directory(path string) *Directory { q := r.q.Select("directory") q = q.Arg("path", path) return &Directory{ q: q, c: r.c, } } 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) } 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) } 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) } type ContainerExecOpts struct {
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
Args []string Stdin string RedirectStdout string RedirectStderr string } func (r *Container) Exec(opts ...ContainerExecOpts) *Container { q := r.q.Select("exec") for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Args) { q = q.Arg("args", opts[i].Args) break } } for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Stdin) { q = q.Arg("stdin", opts[i].Stdin) break } } for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].RedirectStdout) { q = q.Arg("redirectStdout", opts[i].RedirectStdout)
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
break } } 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, } } 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) } type ContainerExportOpts struct { PlatformVariants []*Container } func (r *Container) Export(ctx context.Context, path string, opts ...ContainerExportOpts) (bool, error) { q := r.q.Select("export") q = q.Arg("path", path) for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].PlatformVariants) {
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
q = q.Arg("platformVariants", opts[i].PlatformVariants) break } } var response bool q = q.Bind(&response) return response, q.Execute(ctx, r.c) } func (r *Container) File(path string) *File { q := r.q.Select("file") q = q.Arg("path", path) return &File{ q: q, c: r.c, } } func (r *Container) From(address string) *Container { q := r.q.Select("from") q = q.Arg("address", address) return &Container{ q: q, c: r.c, } } func (r *Container) FS() *Directory { q := r.q.Select("fs") return &Directory{ q: q, c: r.c, }
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
} 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) } func (r *Container) XXX_GraphQLType() string { return "Container" } func (r *Container) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } 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) } 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) } type ContainerPublishOpts struct {
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
PlatformVariants []*Container } func (r *Container) Publish(ctx context.Context, address string, opts ...ContainerPublishOpts) (string, error) { q := r.q.Select("publish") q = q.Arg("address", address) 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) } func (r *Container) Stderr() *File { q := r.q.Select("stderr") return &File{ q: q, c: r.c, } } func (r *Container) Stdout() *File { q := r.q.Select("stdout") return &File{ q: q, c: r.c, } }
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
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) } type ContainerWithDefaultArgsOpts struct { Args []string } func (r *Container) WithDefaultArgs(opts ...ContainerWithDefaultArgsOpts) *Container { q := r.q.Select("withDefaultArgs") 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, } } func (r *Container) WithEntrypoint(args []string) *Container { q := r.q.Select("withEntrypoint") q = q.Arg("args", args) return &Container{ q: q, c: r.c, }
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
} 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, } } func (r *Container) WithFS(id *Directory) *Container { q := r.q.Select("withFS") q = q.Arg("id", id) return &Container{ q: q, c: r.c, } } type ContainerWithMountedCacheOpts struct { Source *Directory } 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) for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Source) { q = q.Arg("source", opts[i].Source) break
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
} } return &Container{ q: q, c: r.c, } } 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, } } 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, } } 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{
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
q: q, c: r.c, } } func (r *Container) WithMountedTemp(path string) *Container { q := r.q.Select("withMountedTemp") q = q.Arg("path", path) return &Container{ q: q, c: r.c, } } 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, } } func (r *Container) WithUser(name string) *Container { q := r.q.Select("withUser") q = q.Arg("name", name) return &Container{ q: q, c: r.c, } } func (r *Container) WithWorkdir(path string) *Container {
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
q := r.q.Select("withWorkdir") q = q.Arg("path", path) return &Container{ q: q, c: r.c, } } func (r *Container) WithoutEnvVariable(name string) *Container { q := r.q.Select("withoutEnvVariable") q = q.Arg("name", name) return &Container{ q: q, c: r.c, } } func (r *Container) WithoutMount(path string) *Container { q := r.q.Select("withoutMount") q = q.Arg("path", path) return &Container{ q: q, c: r.c, } } 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) } type Directory struct {
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
q *querybuilder.Selection c graphql.Client } func (r *Directory) Diff(other *Directory) *Directory { q := r.q.Select("diff") q = q.Arg("other", other) return &Directory{ q: q, c: r.c, } } func (r *Directory) Directory(path string) *Directory { q := r.q.Select("directory") q = q.Arg("path", path) return &Directory{ q: q, c: r.c, } } type DirectoryEntriesOpts struct {
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
Path string } func (r *Directory) Entries(ctx context.Context, opts ...DirectoryEntriesOpts) ([]string, error) { q := r.q.Select("entries") 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) } 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) } func (r *Directory) File(path string) *File { q := r.q.Select("file") q = q.Arg("path", path)
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
return &File{ q: q, c: r.c, } } 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) } func (r *Directory) XXX_GraphQLType() string { return "Directory" } func (r *Directory) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } func (r *Directory) LoadProject(configPath string) *Project { q := r.q.Select("loadProject") q = q.Arg("configPath", configPath) return &Project{ q: q, c: r.c, } } type DirectoryWithDirectoryOpts struct {
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
Exclude []string Include []string } 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) for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Exclude) { q = q.Arg("exclude", opts[i].Exclude) break } }
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
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, } } 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, } } func (r *Directory) WithNewDirectory(path string) *Directory { q := r.q.Select("withNewDirectory") q = q.Arg("path", path) return &Directory{ q: q, c: r.c, } } type DirectoryWithNewFileOpts struct {
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
Contents string } func (r *Directory) WithNewFile(path string, opts ...DirectoryWithNewFileOpts) *Directory { q := r.q.Select("withNewFile") q = q.Arg("path", path) 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, } } func (r *Directory) WithoutDirectory(path string) *Directory { q := r.q.Select("withoutDirectory") q = q.Arg("path", path)
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
return &Directory{ q: q, c: r.c, } } func (r *Directory) WithoutFile(path string) *Directory { q := r.q.Select("withoutFile") q = q.Arg("path", path) return &Directory{ q: q, c: r.c, } } type EnvVariable struct { q *querybuilder.Selection c graphql.Client } 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) } 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) } type File struct {
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
q *querybuilder.Selection c graphql.Client } 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) } 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) }
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
func (r *File) ID(ctx context.Context) (FileID, error) { q := r.q.Select("id") var response FileID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } func (r *File) XXX_GraphQLType() string { return "File" } 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, } } 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) } type GitRef struct {
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
q *querybuilder.Selection c graphql.Client } 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) } func (r *GitRef) Tree() *Directory { q := r.q.Select("tree") return &Directory{ q: q, c: r.c, } } type GitRepository struct { q *querybuilder.Selection c graphql.Client } func (r *GitRepository) Branch(name string) *GitRef { q := r.q.Select("branch") q = q.Arg("name", name)
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
return &GitRef{ q: q, c: r.c, } } 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) } func (r *GitRepository) Tag(name string) *GitRef { q := r.q.Select("tag") q = q.Arg("name", name) return &GitRef{ q: q, c: r.c, } } func (r *GitRepository) Tags(ctx context.Context) ([]string, error) { q := r.q.Select("tags") var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } type Host struct { q *querybuilder.Selection c graphql.Client } type HostDirectoryOpts struct {
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
Exclude []string Include []string } func (r *Host) Directory(path string, opts ...HostDirectoryOpts) *Directory { q := r.q.Select("directory") q = q.Arg("path", path) for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Exclude) { q = q.Arg("exclude", opts[i].Exclude) break } } 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, } } func (r *Host) EnvVariable(name string) *HostVariable { q := r.q.Select("envVariable") q = q.Arg("name", name) return &HostVariable{
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
q: q, c: r.c, } } type HostWorkdirOpts struct { Exclude []string Include []string } func (r *Host) Workdir(opts ...HostWorkdirOpts) *Directory { q := r.q.Select("workdir") for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Exclude) { q = q.Arg("exclude", opts[i].Exclude) break } } 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, } } type HostVariable struct {
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
q *querybuilder.Selection c graphql.Client } func (r *HostVariable) Secret() *Secret { q := r.q.Select("secret") return &Secret{ q: q, c: r.c, } } 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) } type Project struct {
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
q *querybuilder.Selection c graphql.Client } 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) } func (r *Project) GeneratedCode() *Directory { q := r.q.Select("generatedCode") return &Directory{ q: q, c: r.c, } } 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) } func (r *Project) Name(ctx context.Context) (string, error) { q := r.q.Select("name")
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
var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } 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) } 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 } func (r *Query) CacheVolume(key string) *CacheVolume { q := r.q.Select("cacheVolume") q = q.Arg("key", key) return &CacheVolume{ q: q, c: r.c, } } type ContainerOpts struct { ID ContainerID
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
Platform Platform } func (r *Query) Container(opts ...ContainerOpts) *Container { q := r.q.Select("container") for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].ID) { q = q.Arg("id", opts[i].ID) break } } 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, } } 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) } type DirectoryOpts struct {
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
ID DirectoryID } func (r *Query) Directory(opts ...DirectoryOpts) *Directory { q := r.q.Select("directory") 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, } } func (r *Query) File(id FileID) *File { q := r.q.Select("file") q = q.Arg("id", id) return &File{ q: q, c: r.c, } } func (r *Query) Git(url string) *GitRepository { q := r.q.Select("git") q = q.Arg("url", url) return &GitRepository{ q: q, c: r.c,
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
} } func (r *Query) Host() *Host { q := r.q.Select("host") return &Host{ q: q, c: r.c, } } func (r *Query) HTTP(url string) *File { q := r.q.Select("http") q = q.Arg("url", url) return &File{ q: q, c: r.c, } } func (r *Query) Project(name string) *Project { q := r.q.Select("project") q = q.Arg("name", name) return &Project{ q: q, c: r.c, } } func (r *Query) Secret(id SecretID) *Secret { q := r.q.Select("secret") q = q.Arg("id", id) return &Secret{ q: q,
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
c: r.c, } } type Secret struct { q *querybuilder.Selection c graphql.Client } 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) } func (r *Secret) XXX_GraphQLType() string { return "Secret" } func (r *Secret) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } 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,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" _ "github.com/moby/buildkit/client/connhelper/kubepod" _ "github.com/moby/buildkit/client/connhelper/podmancontainer" ) const ( mobyBuildkitImage = "moby/buildkit" containerName = "dagger-buildkitd" volumeName = "dagger-buildkitd"
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
buildkitdLockPath = "~/.config/dagger/.buildkitd.lock" lockTimeout = 10 * time.Minute ) 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 }
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
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) {
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
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 } func getGoModVersion() (string, error) {
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
out, err := exec.Command("go", "list", "-m", "github.com/moby/buildkit").CombinedOutput() if err != nil { return "", err } trimmed := strings.TrimSpace(string(out)) _, 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) {
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
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 } func checkBuildkit(ctx context.Context, imageRef string) error {
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
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() config, err := getBuildkitInformation(ctx)
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
if err != nil { 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 } func checkDocker(ctx context.Context) error {
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
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 } func startBuildkit(ctx context.Context) error { cmd := exec.CommandContext(ctx, "docker", "start", containerName, ) _, err := cmd.CombinedOutput() if err != nil { return err } return nil } func installBuildkit(ctx context.Context, ref string) error {
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
cmd := exec.CommandContext(ctx, "docker", "pull", ref) _, err := cmd.CombinedOutput() if err != nil { return err } 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 !strings.Contains(string(output), "Error response from daemon: Conflict.") { return err } } return nil } func waitBuildkit(ctx context.Context, host string) error {
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
c, err := bkclient.New(ctx, host) if err != nil { return err } defer c.Close() 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 {