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
5,124
Deprecate `exitCode`
## Summary I’m proposing we deprecate `exitCode` in favor of [`sync`](https://github.com/dagger/dagger/pull/5071) and [`ExecError`](https://github.com/dagger/dagger/pull/5184) as an alternative solution to https://github.com/dagger/dagger/issues/3192. ## Motivation The `Container.exitCode` field doesn’t make sense because you always get zero on success and you can’t get the non-zero value when the command fails due to a bug: - https://github.com/dagger/dagger/issues/3192 So since the result on success is useless, just replace with `sync`: - https://github.com/dagger/dagger/pull/5071 But if you do need the non-zero exit code value, you can get it from `ExecError`: - https://github.com/dagger/dagger/pull/5184 ## Examples **Don't care about the result** ```diff - _, err := ctr.ExitCode(ctx) + _, err := ctr.Sync(ctx) if err != nil { return err } ``` **Need the exit code** ```go func GetExitCode(ctr *dagger.Container) (int, error) { _, err := ctr.Sync(ctx) if e, ok := err.(*dagger.ExecError); ok { return e.ExitCode, nil } return 0, err } ``` ## Specification Just add the deprecation in the API: ```diff type Container { """ Exit code of the last executed command. Zero means success. Will execute default command if none is set, or error if there's no default. """ - exitCode: Int! + exitCode: Int! @deprecated(reason: "Use `sync` instead.") } ``` ## Caveat There is one big difference between `ExitCode(ctx)` and `Sync(ctx)`. While the former triggers command execution, defaulting to the entrypoint and default args if no `WithExec` is defined in the pipeline, the latter does not. Just “renaming” to a new `.Run(ctx)` that behaves the same doesn’t seem worth it. And some users don’t actually want to run the command (e.g., just do a `Dockerfile` build), so it pays to understand what’s going on. We’ll just have to make this clear in documentation and examples: - https://github.com/dagger/dagger/issues/3617
https://github.com/dagger/dagger/issues/5124
https://github.com/dagger/dagger/pull/5481
9d87f496046ccfc5ec82d86a7c0aea71933df3a1
9aff03b6150c1ab45189523a63f2a97f1ddac283
2023-05-10T15:14:10Z
go
2023-07-18T18:03:07Z
sdk/go/api.gen.go
Permissions int } func (r *Directory) WithFile(path string, source *File, opts ...DirectoryWithFileOpts) *Directory { q := r.q.Select("withFile") for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Permissions) { q = q.Arg("permissions", opts[i].Permissions) } } q = q.Arg("path", path) q = q.Arg("source", source) return &Directory{ q: q, c: r.c, } } type DirectoryWithNewDirectoryOpts struct {
closed
dagger/dagger
https://github.com/dagger/dagger
5,124
Deprecate `exitCode`
## Summary I’m proposing we deprecate `exitCode` in favor of [`sync`](https://github.com/dagger/dagger/pull/5071) and [`ExecError`](https://github.com/dagger/dagger/pull/5184) as an alternative solution to https://github.com/dagger/dagger/issues/3192. ## Motivation The `Container.exitCode` field doesn’t make sense because you always get zero on success and you can’t get the non-zero value when the command fails due to a bug: - https://github.com/dagger/dagger/issues/3192 So since the result on success is useless, just replace with `sync`: - https://github.com/dagger/dagger/pull/5071 But if you do need the non-zero exit code value, you can get it from `ExecError`: - https://github.com/dagger/dagger/pull/5184 ## Examples **Don't care about the result** ```diff - _, err := ctr.ExitCode(ctx) + _, err := ctr.Sync(ctx) if err != nil { return err } ``` **Need the exit code** ```go func GetExitCode(ctr *dagger.Container) (int, error) { _, err := ctr.Sync(ctx) if e, ok := err.(*dagger.ExecError); ok { return e.ExitCode, nil } return 0, err } ``` ## Specification Just add the deprecation in the API: ```diff type Container { """ Exit code of the last executed command. Zero means success. Will execute default command if none is set, or error if there's no default. """ - exitCode: Int! + exitCode: Int! @deprecated(reason: "Use `sync` instead.") } ``` ## Caveat There is one big difference between `ExitCode(ctx)` and `Sync(ctx)`. While the former triggers command execution, defaulting to the entrypoint and default args if no `WithExec` is defined in the pipeline, the latter does not. Just “renaming” to a new `.Run(ctx)` that behaves the same doesn’t seem worth it. And some users don’t actually want to run the command (e.g., just do a `Dockerfile` build), so it pays to understand what’s going on. We’ll just have to make this clear in documentation and examples: - https://github.com/dagger/dagger/issues/3617
https://github.com/dagger/dagger/issues/5124
https://github.com/dagger/dagger/pull/5481
9d87f496046ccfc5ec82d86a7c0aea71933df3a1
9aff03b6150c1ab45189523a63f2a97f1ddac283
2023-05-10T15:14:10Z
go
2023-07-18T18:03:07Z
sdk/go/api.gen.go
Permissions int } func (r *Directory) WithNewDirectory(path string, opts ...DirectoryWithNewDirectoryOpts) *Directory { q := r.q.Select("withNewDirectory") for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Permissions) { q = q.Arg("permissions", opts[i].Permissions) } } q = q.Arg("path", path) return &Directory{ q: q, c: r.c, } } type DirectoryWithNewFileOpts struct {
closed
dagger/dagger
https://github.com/dagger/dagger
5,124
Deprecate `exitCode`
## Summary I’m proposing we deprecate `exitCode` in favor of [`sync`](https://github.com/dagger/dagger/pull/5071) and [`ExecError`](https://github.com/dagger/dagger/pull/5184) as an alternative solution to https://github.com/dagger/dagger/issues/3192. ## Motivation The `Container.exitCode` field doesn’t make sense because you always get zero on success and you can’t get the non-zero value when the command fails due to a bug: - https://github.com/dagger/dagger/issues/3192 So since the result on success is useless, just replace with `sync`: - https://github.com/dagger/dagger/pull/5071 But if you do need the non-zero exit code value, you can get it from `ExecError`: - https://github.com/dagger/dagger/pull/5184 ## Examples **Don't care about the result** ```diff - _, err := ctr.ExitCode(ctx) + _, err := ctr.Sync(ctx) if err != nil { return err } ``` **Need the exit code** ```go func GetExitCode(ctr *dagger.Container) (int, error) { _, err := ctr.Sync(ctx) if e, ok := err.(*dagger.ExecError); ok { return e.ExitCode, nil } return 0, err } ``` ## Specification Just add the deprecation in the API: ```diff type Container { """ Exit code of the last executed command. Zero means success. Will execute default command if none is set, or error if there's no default. """ - exitCode: Int! + exitCode: Int! @deprecated(reason: "Use `sync` instead.") } ``` ## Caveat There is one big difference between `ExitCode(ctx)` and `Sync(ctx)`. While the former triggers command execution, defaulting to the entrypoint and default args if no `WithExec` is defined in the pipeline, the latter does not. Just “renaming” to a new `.Run(ctx)` that behaves the same doesn’t seem worth it. And some users don’t actually want to run the command (e.g., just do a `Dockerfile` build), so it pays to understand what’s going on. We’ll just have to make this clear in documentation and examples: - https://github.com/dagger/dagger/issues/3617
https://github.com/dagger/dagger/issues/5124
https://github.com/dagger/dagger/pull/5481
9d87f496046ccfc5ec82d86a7c0aea71933df3a1
9aff03b6150c1ab45189523a63f2a97f1ddac283
2023-05-10T15:14:10Z
go
2023-07-18T18:03:07Z
sdk/go/api.gen.go
Permissions int } func (r *Directory) WithNewFile(path string, contents string, opts ...DirectoryWithNewFileOpts) *Directory { q := r.q.Select("withNewFile") for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Permissions) { q = q.Arg("permissions", opts[i].Permissions) } } q = q.Arg("path", path) q = q.Arg("contents", contents)
closed
dagger/dagger
https://github.com/dagger/dagger
5,124
Deprecate `exitCode`
## Summary I’m proposing we deprecate `exitCode` in favor of [`sync`](https://github.com/dagger/dagger/pull/5071) and [`ExecError`](https://github.com/dagger/dagger/pull/5184) as an alternative solution to https://github.com/dagger/dagger/issues/3192. ## Motivation The `Container.exitCode` field doesn’t make sense because you always get zero on success and you can’t get the non-zero value when the command fails due to a bug: - https://github.com/dagger/dagger/issues/3192 So since the result on success is useless, just replace with `sync`: - https://github.com/dagger/dagger/pull/5071 But if you do need the non-zero exit code value, you can get it from `ExecError`: - https://github.com/dagger/dagger/pull/5184 ## Examples **Don't care about the result** ```diff - _, err := ctr.ExitCode(ctx) + _, err := ctr.Sync(ctx) if err != nil { return err } ``` **Need the exit code** ```go func GetExitCode(ctr *dagger.Container) (int, error) { _, err := ctr.Sync(ctx) if e, ok := err.(*dagger.ExecError); ok { return e.ExitCode, nil } return 0, err } ``` ## Specification Just add the deprecation in the API: ```diff type Container { """ Exit code of the last executed command. Zero means success. Will execute default command if none is set, or error if there's no default. """ - exitCode: Int! + exitCode: Int! @deprecated(reason: "Use `sync` instead.") } ``` ## Caveat There is one big difference between `ExitCode(ctx)` and `Sync(ctx)`. While the former triggers command execution, defaulting to the entrypoint and default args if no `WithExec` is defined in the pipeline, the latter does not. Just “renaming” to a new `.Run(ctx)` that behaves the same doesn’t seem worth it. And some users don’t actually want to run the command (e.g., just do a `Dockerfile` build), so it pays to understand what’s going on. We’ll just have to make this clear in documentation and examples: - https://github.com/dagger/dagger/issues/3617
https://github.com/dagger/dagger/issues/5124
https://github.com/dagger/dagger/pull/5481
9d87f496046ccfc5ec82d86a7c0aea71933df3a1
9aff03b6150c1ab45189523a63f2a97f1ddac283
2023-05-10T15:14:10Z
go
2023-07-18T18:03:07Z
sdk/go/api.gen.go
return &Directory{ q: q, c: r.c, } } func (r *Directory) WithTimestamps(timestamp int) *Directory { q := r.q.Select("withTimestamps") q = q.Arg("timestamp", timestamp) 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{ q: q, c: r.c, } } type EnvVariable struct {
closed
dagger/dagger
https://github.com/dagger/dagger
5,124
Deprecate `exitCode`
## Summary I’m proposing we deprecate `exitCode` in favor of [`sync`](https://github.com/dagger/dagger/pull/5071) and [`ExecError`](https://github.com/dagger/dagger/pull/5184) as an alternative solution to https://github.com/dagger/dagger/issues/3192. ## Motivation The `Container.exitCode` field doesn’t make sense because you always get zero on success and you can’t get the non-zero value when the command fails due to a bug: - https://github.com/dagger/dagger/issues/3192 So since the result on success is useless, just replace with `sync`: - https://github.com/dagger/dagger/pull/5071 But if you do need the non-zero exit code value, you can get it from `ExecError`: - https://github.com/dagger/dagger/pull/5184 ## Examples **Don't care about the result** ```diff - _, err := ctr.ExitCode(ctx) + _, err := ctr.Sync(ctx) if err != nil { return err } ``` **Need the exit code** ```go func GetExitCode(ctr *dagger.Container) (int, error) { _, err := ctr.Sync(ctx) if e, ok := err.(*dagger.ExecError); ok { return e.ExitCode, nil } return 0, err } ``` ## Specification Just add the deprecation in the API: ```diff type Container { """ Exit code of the last executed command. Zero means success. Will execute default command if none is set, or error if there's no default. """ - exitCode: Int! + exitCode: Int! @deprecated(reason: "Use `sync` instead.") } ``` ## Caveat There is one big difference between `ExitCode(ctx)` and `Sync(ctx)`. While the former triggers command execution, defaulting to the entrypoint and default args if no `WithExec` is defined in the pipeline, the latter does not. Just “renaming” to a new `.Run(ctx)` that behaves the same doesn’t seem worth it. And some users don’t actually want to run the command (e.g., just do a `Dockerfile` build), so it pays to understand what’s going on. We’ll just have to make this clear in documentation and examples: - https://github.com/dagger/dagger/issues/3617
https://github.com/dagger/dagger/issues/5124
https://github.com/dagger/dagger/pull/5481
9d87f496046ccfc5ec82d86a7c0aea71933df3a1
9aff03b6150c1ab45189523a63f2a97f1ddac283
2023-05-10T15:14:10Z
go
2023-07-18T18:03:07Z
sdk/go/api.gen.go
q *querybuilder.Selection c graphql.Client name *string value *string } func (r *EnvVariable) Name(ctx context.Context) (string, error) { if r.name != nil { return *r.name, nil } 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) { if r.value != nil { return *r.value, nil } 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
5,124
Deprecate `exitCode`
## Summary I’m proposing we deprecate `exitCode` in favor of [`sync`](https://github.com/dagger/dagger/pull/5071) and [`ExecError`](https://github.com/dagger/dagger/pull/5184) as an alternative solution to https://github.com/dagger/dagger/issues/3192. ## Motivation The `Container.exitCode` field doesn’t make sense because you always get zero on success and you can’t get the non-zero value when the command fails due to a bug: - https://github.com/dagger/dagger/issues/3192 So since the result on success is useless, just replace with `sync`: - https://github.com/dagger/dagger/pull/5071 But if you do need the non-zero exit code value, you can get it from `ExecError`: - https://github.com/dagger/dagger/pull/5184 ## Examples **Don't care about the result** ```diff - _, err := ctr.ExitCode(ctx) + _, err := ctr.Sync(ctx) if err != nil { return err } ``` **Need the exit code** ```go func GetExitCode(ctr *dagger.Container) (int, error) { _, err := ctr.Sync(ctx) if e, ok := err.(*dagger.ExecError); ok { return e.ExitCode, nil } return 0, err } ``` ## Specification Just add the deprecation in the API: ```diff type Container { """ Exit code of the last executed command. Zero means success. Will execute default command if none is set, or error if there's no default. """ - exitCode: Int! + exitCode: Int! @deprecated(reason: "Use `sync` instead.") } ``` ## Caveat There is one big difference between `ExitCode(ctx)` and `Sync(ctx)`. While the former triggers command execution, defaulting to the entrypoint and default args if no `WithExec` is defined in the pipeline, the latter does not. Just “renaming” to a new `.Run(ctx)` that behaves the same doesn’t seem worth it. And some users don’t actually want to run the command (e.g., just do a `Dockerfile` build), so it pays to understand what’s going on. We’ll just have to make this clear in documentation and examples: - https://github.com/dagger/dagger/issues/3617
https://github.com/dagger/dagger/issues/5124
https://github.com/dagger/dagger/pull/5481
9d87f496046ccfc5ec82d86a7c0aea71933df3a1
9aff03b6150c1ab45189523a63f2a97f1ddac283
2023-05-10T15:14:10Z
go
2023-07-18T18:03:07Z
sdk/go/api.gen.go
q *querybuilder.Selection c graphql.Client contents *string export *bool id *FileID size *int sync *FileID } type WithFileFunc func(r *File) *File func (r *File) With(f WithFileFunc) *File { return f(r) } func (r *File) Contents(ctx context.Context) (string, error) { if r.contents != nil { return *r.contents, nil } q := r.q.Select("contents") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } type FileExportOpts struct {
closed
dagger/dagger
https://github.com/dagger/dagger
5,124
Deprecate `exitCode`
## Summary I’m proposing we deprecate `exitCode` in favor of [`sync`](https://github.com/dagger/dagger/pull/5071) and [`ExecError`](https://github.com/dagger/dagger/pull/5184) as an alternative solution to https://github.com/dagger/dagger/issues/3192. ## Motivation The `Container.exitCode` field doesn’t make sense because you always get zero on success and you can’t get the non-zero value when the command fails due to a bug: - https://github.com/dagger/dagger/issues/3192 So since the result on success is useless, just replace with `sync`: - https://github.com/dagger/dagger/pull/5071 But if you do need the non-zero exit code value, you can get it from `ExecError`: - https://github.com/dagger/dagger/pull/5184 ## Examples **Don't care about the result** ```diff - _, err := ctr.ExitCode(ctx) + _, err := ctr.Sync(ctx) if err != nil { return err } ``` **Need the exit code** ```go func GetExitCode(ctr *dagger.Container) (int, error) { _, err := ctr.Sync(ctx) if e, ok := err.(*dagger.ExecError); ok { return e.ExitCode, nil } return 0, err } ``` ## Specification Just add the deprecation in the API: ```diff type Container { """ Exit code of the last executed command. Zero means success. Will execute default command if none is set, or error if there's no default. """ - exitCode: Int! + exitCode: Int! @deprecated(reason: "Use `sync` instead.") } ``` ## Caveat There is one big difference between `ExitCode(ctx)` and `Sync(ctx)`. While the former triggers command execution, defaulting to the entrypoint and default args if no `WithExec` is defined in the pipeline, the latter does not. Just “renaming” to a new `.Run(ctx)` that behaves the same doesn’t seem worth it. And some users don’t actually want to run the command (e.g., just do a `Dockerfile` build), so it pays to understand what’s going on. We’ll just have to make this clear in documentation and examples: - https://github.com/dagger/dagger/issues/3617
https://github.com/dagger/dagger/issues/5124
https://github.com/dagger/dagger/pull/5481
9d87f496046ccfc5ec82d86a7c0aea71933df3a1
9aff03b6150c1ab45189523a63f2a97f1ddac283
2023-05-10T15:14:10Z
go
2023-07-18T18:03:07Z
sdk/go/api.gen.go
AllowParentDirPath bool } func (r *File) Export(ctx context.Context, path string, opts ...FileExportOpts) (bool, error) { if r.export != nil { return *r.export, nil } q := r.q.Select("export") for i := len(opts) - 1; i >= 0; i-- {
closed
dagger/dagger
https://github.com/dagger/dagger
5,124
Deprecate `exitCode`
## Summary I’m proposing we deprecate `exitCode` in favor of [`sync`](https://github.com/dagger/dagger/pull/5071) and [`ExecError`](https://github.com/dagger/dagger/pull/5184) as an alternative solution to https://github.com/dagger/dagger/issues/3192. ## Motivation The `Container.exitCode` field doesn’t make sense because you always get zero on success and you can’t get the non-zero value when the command fails due to a bug: - https://github.com/dagger/dagger/issues/3192 So since the result on success is useless, just replace with `sync`: - https://github.com/dagger/dagger/pull/5071 But if you do need the non-zero exit code value, you can get it from `ExecError`: - https://github.com/dagger/dagger/pull/5184 ## Examples **Don't care about the result** ```diff - _, err := ctr.ExitCode(ctx) + _, err := ctr.Sync(ctx) if err != nil { return err } ``` **Need the exit code** ```go func GetExitCode(ctr *dagger.Container) (int, error) { _, err := ctr.Sync(ctx) if e, ok := err.(*dagger.ExecError); ok { return e.ExitCode, nil } return 0, err } ``` ## Specification Just add the deprecation in the API: ```diff type Container { """ Exit code of the last executed command. Zero means success. Will execute default command if none is set, or error if there's no default. """ - exitCode: Int! + exitCode: Int! @deprecated(reason: "Use `sync` instead.") } ``` ## Caveat There is one big difference between `ExitCode(ctx)` and `Sync(ctx)`. While the former triggers command execution, defaulting to the entrypoint and default args if no `WithExec` is defined in the pipeline, the latter does not. Just “renaming” to a new `.Run(ctx)` that behaves the same doesn’t seem worth it. And some users don’t actually want to run the command (e.g., just do a `Dockerfile` build), so it pays to understand what’s going on. We’ll just have to make this clear in documentation and examples: - https://github.com/dagger/dagger/issues/3617
https://github.com/dagger/dagger/issues/5124
https://github.com/dagger/dagger/pull/5481
9d87f496046ccfc5ec82d86a7c0aea71933df3a1
9aff03b6150c1ab45189523a63f2a97f1ddac283
2023-05-10T15:14:10Z
go
2023-07-18T18:03:07Z
sdk/go/api.gen.go
if !querybuilder.IsZeroValue(opts[i].AllowParentDirPath) { q = q.Arg("allowParentDirPath", opts[i].AllowParentDirPath) } } q = q.Arg("path", path) var response bool q = q.Bind(&response) return response, q.Execute(ctx, r.c) } func (r *File) ID(ctx context.Context) (FileID, error) { if r.id != nil { return *r.id, nil } 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_GraphQLIDType() string { return "FileID" } func (r *File) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil
closed
dagger/dagger
https://github.com/dagger/dagger
5,124
Deprecate `exitCode`
## Summary I’m proposing we deprecate `exitCode` in favor of [`sync`](https://github.com/dagger/dagger/pull/5071) and [`ExecError`](https://github.com/dagger/dagger/pull/5184) as an alternative solution to https://github.com/dagger/dagger/issues/3192. ## Motivation The `Container.exitCode` field doesn’t make sense because you always get zero on success and you can’t get the non-zero value when the command fails due to a bug: - https://github.com/dagger/dagger/issues/3192 So since the result on success is useless, just replace with `sync`: - https://github.com/dagger/dagger/pull/5071 But if you do need the non-zero exit code value, you can get it from `ExecError`: - https://github.com/dagger/dagger/pull/5184 ## Examples **Don't care about the result** ```diff - _, err := ctr.ExitCode(ctx) + _, err := ctr.Sync(ctx) if err != nil { return err } ``` **Need the exit code** ```go func GetExitCode(ctr *dagger.Container) (int, error) { _, err := ctr.Sync(ctx) if e, ok := err.(*dagger.ExecError); ok { return e.ExitCode, nil } return 0, err } ``` ## Specification Just add the deprecation in the API: ```diff type Container { """ Exit code of the last executed command. Zero means success. Will execute default command if none is set, or error if there's no default. """ - exitCode: Int! + exitCode: Int! @deprecated(reason: "Use `sync` instead.") } ``` ## Caveat There is one big difference between `ExitCode(ctx)` and `Sync(ctx)`. While the former triggers command execution, defaulting to the entrypoint and default args if no `WithExec` is defined in the pipeline, the latter does not. Just “renaming” to a new `.Run(ctx)` that behaves the same doesn’t seem worth it. And some users don’t actually want to run the command (e.g., just do a `Dockerfile` build), so it pays to understand what’s going on. We’ll just have to make this clear in documentation and examples: - https://github.com/dagger/dagger/issues/3617
https://github.com/dagger/dagger/issues/5124
https://github.com/dagger/dagger/pull/5481
9d87f496046ccfc5ec82d86a7c0aea71933df3a1
9aff03b6150c1ab45189523a63f2a97f1ddac283
2023-05-10T15:14:10Z
go
2023-07-18T18:03:07Z
sdk/go/api.gen.go
} 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) { if r.size != nil { return *r.size, nil } q := r.q.Select("size") var response int q = q.Bind(&response) return response, q.Execute(ctx, r.c) } func (r *File) Sync(ctx context.Context) (*File, error) { q := r.q.Select("sync") return r, q.Execute(ctx, r.c) } func (r *File) WithTimestamps(timestamp int) *File { q := r.q.Select("withTimestamps") q = q.Arg("timestamp", timestamp) return &File{ q: q, c: r.c, } } type GitRef struct {
closed
dagger/dagger
https://github.com/dagger/dagger
5,124
Deprecate `exitCode`
## Summary I’m proposing we deprecate `exitCode` in favor of [`sync`](https://github.com/dagger/dagger/pull/5071) and [`ExecError`](https://github.com/dagger/dagger/pull/5184) as an alternative solution to https://github.com/dagger/dagger/issues/3192. ## Motivation The `Container.exitCode` field doesn’t make sense because you always get zero on success and you can’t get the non-zero value when the command fails due to a bug: - https://github.com/dagger/dagger/issues/3192 So since the result on success is useless, just replace with `sync`: - https://github.com/dagger/dagger/pull/5071 But if you do need the non-zero exit code value, you can get it from `ExecError`: - https://github.com/dagger/dagger/pull/5184 ## Examples **Don't care about the result** ```diff - _, err := ctr.ExitCode(ctx) + _, err := ctr.Sync(ctx) if err != nil { return err } ``` **Need the exit code** ```go func GetExitCode(ctr *dagger.Container) (int, error) { _, err := ctr.Sync(ctx) if e, ok := err.(*dagger.ExecError); ok { return e.ExitCode, nil } return 0, err } ``` ## Specification Just add the deprecation in the API: ```diff type Container { """ Exit code of the last executed command. Zero means success. Will execute default command if none is set, or error if there's no default. """ - exitCode: Int! + exitCode: Int! @deprecated(reason: "Use `sync` instead.") } ``` ## Caveat There is one big difference between `ExitCode(ctx)` and `Sync(ctx)`. While the former triggers command execution, defaulting to the entrypoint and default args if no `WithExec` is defined in the pipeline, the latter does not. Just “renaming” to a new `.Run(ctx)` that behaves the same doesn’t seem worth it. And some users don’t actually want to run the command (e.g., just do a `Dockerfile` build), so it pays to understand what’s going on. We’ll just have to make this clear in documentation and examples: - https://github.com/dagger/dagger/issues/3617
https://github.com/dagger/dagger/issues/5124
https://github.com/dagger/dagger/pull/5481
9d87f496046ccfc5ec82d86a7c0aea71933df3a1
9aff03b6150c1ab45189523a63f2a97f1ddac283
2023-05-10T15:14:10Z
go
2023-07-18T18:03:07Z
sdk/go/api.gen.go
q *querybuilder.Selection c graphql.Client } type GitRefTreeOpts struct { SSHKnownHosts string SSHAuthSocket *Socket } func (r *GitRef) Tree(opts ...GitRefTreeOpts) *Directory { q := r.q.Select("tree") for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].SSHKnownHosts) { q = q.Arg("sshKnownHosts", opts[i].SSHKnownHosts) } if !querybuilder.IsZeroValue(opts[i].SSHAuthSocket) { q = q.Arg("sshAuthSocket", opts[i].SSHAuthSocket) } } return &Directory{ q: q, c: r.c, } } type GitRepository struct {
closed
dagger/dagger
https://github.com/dagger/dagger
5,124
Deprecate `exitCode`
## Summary I’m proposing we deprecate `exitCode` in favor of [`sync`](https://github.com/dagger/dagger/pull/5071) and [`ExecError`](https://github.com/dagger/dagger/pull/5184) as an alternative solution to https://github.com/dagger/dagger/issues/3192. ## Motivation The `Container.exitCode` field doesn’t make sense because you always get zero on success and you can’t get the non-zero value when the command fails due to a bug: - https://github.com/dagger/dagger/issues/3192 So since the result on success is useless, just replace with `sync`: - https://github.com/dagger/dagger/pull/5071 But if you do need the non-zero exit code value, you can get it from `ExecError`: - https://github.com/dagger/dagger/pull/5184 ## Examples **Don't care about the result** ```diff - _, err := ctr.ExitCode(ctx) + _, err := ctr.Sync(ctx) if err != nil { return err } ``` **Need the exit code** ```go func GetExitCode(ctr *dagger.Container) (int, error) { _, err := ctr.Sync(ctx) if e, ok := err.(*dagger.ExecError); ok { return e.ExitCode, nil } return 0, err } ``` ## Specification Just add the deprecation in the API: ```diff type Container { """ Exit code of the last executed command. Zero means success. Will execute default command if none is set, or error if there's no default. """ - exitCode: Int! + exitCode: Int! @deprecated(reason: "Use `sync` instead.") } ``` ## Caveat There is one big difference between `ExitCode(ctx)` and `Sync(ctx)`. While the former triggers command execution, defaulting to the entrypoint and default args if no `WithExec` is defined in the pipeline, the latter does not. Just “renaming” to a new `.Run(ctx)` that behaves the same doesn’t seem worth it. And some users don’t actually want to run the command (e.g., just do a `Dockerfile` build), so it pays to understand what’s going on. We’ll just have to make this clear in documentation and examples: - https://github.com/dagger/dagger/issues/3617
https://github.com/dagger/dagger/issues/5124
https://github.com/dagger/dagger/pull/5481
9d87f496046ccfc5ec82d86a7c0aea71933df3a1
9aff03b6150c1ab45189523a63f2a97f1ddac283
2023-05-10T15:14:10Z
go
2023-07-18T18:03:07Z
sdk/go/api.gen.go
q *querybuilder.Selection c graphql.Client } func (r *GitRepository) Branch(name string) *GitRef { q := r.q.Select("branch") q = q.Arg("name", name) return &GitRef{ q: q, c: r.c, } } func (r *GitRepository) Commit(id string) *GitRef { q := r.q.Select("commit") q = q.Arg("id", id) return &GitRef{ q: q, c: 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, } } type Host struct {
closed
dagger/dagger
https://github.com/dagger/dagger
5,124
Deprecate `exitCode`
## Summary I’m proposing we deprecate `exitCode` in favor of [`sync`](https://github.com/dagger/dagger/pull/5071) and [`ExecError`](https://github.com/dagger/dagger/pull/5184) as an alternative solution to https://github.com/dagger/dagger/issues/3192. ## Motivation The `Container.exitCode` field doesn’t make sense because you always get zero on success and you can’t get the non-zero value when the command fails due to a bug: - https://github.com/dagger/dagger/issues/3192 So since the result on success is useless, just replace with `sync`: - https://github.com/dagger/dagger/pull/5071 But if you do need the non-zero exit code value, you can get it from `ExecError`: - https://github.com/dagger/dagger/pull/5184 ## Examples **Don't care about the result** ```diff - _, err := ctr.ExitCode(ctx) + _, err := ctr.Sync(ctx) if err != nil { return err } ``` **Need the exit code** ```go func GetExitCode(ctr *dagger.Container) (int, error) { _, err := ctr.Sync(ctx) if e, ok := err.(*dagger.ExecError); ok { return e.ExitCode, nil } return 0, err } ``` ## Specification Just add the deprecation in the API: ```diff type Container { """ Exit code of the last executed command. Zero means success. Will execute default command if none is set, or error if there's no default. """ - exitCode: Int! + exitCode: Int! @deprecated(reason: "Use `sync` instead.") } ``` ## Caveat There is one big difference between `ExitCode(ctx)` and `Sync(ctx)`. While the former triggers command execution, defaulting to the entrypoint and default args if no `WithExec` is defined in the pipeline, the latter does not. Just “renaming” to a new `.Run(ctx)` that behaves the same doesn’t seem worth it. And some users don’t actually want to run the command (e.g., just do a `Dockerfile` build), so it pays to understand what’s going on. We’ll just have to make this clear in documentation and examples: - https://github.com/dagger/dagger/issues/3617
https://github.com/dagger/dagger/issues/5124
https://github.com/dagger/dagger/pull/5481
9d87f496046ccfc5ec82d86a7c0aea71933df3a1
9aff03b6150c1ab45189523a63f2a97f1ddac283
2023-05-10T15:14:10Z
go
2023-07-18T18:03:07Z
sdk/go/api.gen.go
q *querybuilder.Selection c graphql.Client } type HostDirectoryOpts struct { 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) } if !querybuilder.IsZeroValue(opts[i].Include) { q = q.Arg("include", opts[i].Include) } } q = q.Arg("path", path)
closed
dagger/dagger
https://github.com/dagger/dagger
5,124
Deprecate `exitCode`
## Summary I’m proposing we deprecate `exitCode` in favor of [`sync`](https://github.com/dagger/dagger/pull/5071) and [`ExecError`](https://github.com/dagger/dagger/pull/5184) as an alternative solution to https://github.com/dagger/dagger/issues/3192. ## Motivation The `Container.exitCode` field doesn’t make sense because you always get zero on success and you can’t get the non-zero value when the command fails due to a bug: - https://github.com/dagger/dagger/issues/3192 So since the result on success is useless, just replace with `sync`: - https://github.com/dagger/dagger/pull/5071 But if you do need the non-zero exit code value, you can get it from `ExecError`: - https://github.com/dagger/dagger/pull/5184 ## Examples **Don't care about the result** ```diff - _, err := ctr.ExitCode(ctx) + _, err := ctr.Sync(ctx) if err != nil { return err } ``` **Need the exit code** ```go func GetExitCode(ctr *dagger.Container) (int, error) { _, err := ctr.Sync(ctx) if e, ok := err.(*dagger.ExecError); ok { return e.ExitCode, nil } return 0, err } ``` ## Specification Just add the deprecation in the API: ```diff type Container { """ Exit code of the last executed command. Zero means success. Will execute default command if none is set, or error if there's no default. """ - exitCode: Int! + exitCode: Int! @deprecated(reason: "Use `sync` instead.") } ``` ## Caveat There is one big difference between `ExitCode(ctx)` and `Sync(ctx)`. While the former triggers command execution, defaulting to the entrypoint and default args if no `WithExec` is defined in the pipeline, the latter does not. Just “renaming” to a new `.Run(ctx)` that behaves the same doesn’t seem worth it. And some users don’t actually want to run the command (e.g., just do a `Dockerfile` build), so it pays to understand what’s going on. We’ll just have to make this clear in documentation and examples: - https://github.com/dagger/dagger/issues/3617
https://github.com/dagger/dagger/issues/5124
https://github.com/dagger/dagger/pull/5481
9d87f496046ccfc5ec82d86a7c0aea71933df3a1
9aff03b6150c1ab45189523a63f2a97f1ddac283
2023-05-10T15:14:10Z
go
2023-07-18T18:03:07Z
sdk/go/api.gen.go
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{ q: q, c: r.c, } } func (r *Host) File(path string) *File { q := r.q.Select("file") q = q.Arg("path", path) return &File{ q: q, c: r.c, } } func (r *Host) UnixSocket(path string) *Socket { q := r.q.Select("unixSocket") q = q.Arg("path", path) return &Socket{ q: q, c: r.c, } } type HostWorkdirOpts struct {
closed
dagger/dagger
https://github.com/dagger/dagger
5,124
Deprecate `exitCode`
## Summary I’m proposing we deprecate `exitCode` in favor of [`sync`](https://github.com/dagger/dagger/pull/5071) and [`ExecError`](https://github.com/dagger/dagger/pull/5184) as an alternative solution to https://github.com/dagger/dagger/issues/3192. ## Motivation The `Container.exitCode` field doesn’t make sense because you always get zero on success and you can’t get the non-zero value when the command fails due to a bug: - https://github.com/dagger/dagger/issues/3192 So since the result on success is useless, just replace with `sync`: - https://github.com/dagger/dagger/pull/5071 But if you do need the non-zero exit code value, you can get it from `ExecError`: - https://github.com/dagger/dagger/pull/5184 ## Examples **Don't care about the result** ```diff - _, err := ctr.ExitCode(ctx) + _, err := ctr.Sync(ctx) if err != nil { return err } ``` **Need the exit code** ```go func GetExitCode(ctr *dagger.Container) (int, error) { _, err := ctr.Sync(ctx) if e, ok := err.(*dagger.ExecError); ok { return e.ExitCode, nil } return 0, err } ``` ## Specification Just add the deprecation in the API: ```diff type Container { """ Exit code of the last executed command. Zero means success. Will execute default command if none is set, or error if there's no default. """ - exitCode: Int! + exitCode: Int! @deprecated(reason: "Use `sync` instead.") } ``` ## Caveat There is one big difference between `ExitCode(ctx)` and `Sync(ctx)`. While the former triggers command execution, defaulting to the entrypoint and default args if no `WithExec` is defined in the pipeline, the latter does not. Just “renaming” to a new `.Run(ctx)` that behaves the same doesn’t seem worth it. And some users don’t actually want to run the command (e.g., just do a `Dockerfile` build), so it pays to understand what’s going on. We’ll just have to make this clear in documentation and examples: - https://github.com/dagger/dagger/issues/3617
https://github.com/dagger/dagger/issues/5124
https://github.com/dagger/dagger/pull/5481
9d87f496046ccfc5ec82d86a7c0aea71933df3a1
9aff03b6150c1ab45189523a63f2a97f1ddac283
2023-05-10T15:14:10Z
go
2023-07-18T18:03:07Z
sdk/go/api.gen.go
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) } if !querybuilder.IsZeroValue(opts[i].Include) { q = q.Arg("include", opts[i].Include) } } return &Directory{ q: q, c: r.c, } } type HostVariable struct {
closed
dagger/dagger
https://github.com/dagger/dagger
5,124
Deprecate `exitCode`
## Summary I’m proposing we deprecate `exitCode` in favor of [`sync`](https://github.com/dagger/dagger/pull/5071) and [`ExecError`](https://github.com/dagger/dagger/pull/5184) as an alternative solution to https://github.com/dagger/dagger/issues/3192. ## Motivation The `Container.exitCode` field doesn’t make sense because you always get zero on success and you can’t get the non-zero value when the command fails due to a bug: - https://github.com/dagger/dagger/issues/3192 So since the result on success is useless, just replace with `sync`: - https://github.com/dagger/dagger/pull/5071 But if you do need the non-zero exit code value, you can get it from `ExecError`: - https://github.com/dagger/dagger/pull/5184 ## Examples **Don't care about the result** ```diff - _, err := ctr.ExitCode(ctx) + _, err := ctr.Sync(ctx) if err != nil { return err } ``` **Need the exit code** ```go func GetExitCode(ctr *dagger.Container) (int, error) { _, err := ctr.Sync(ctx) if e, ok := err.(*dagger.ExecError); ok { return e.ExitCode, nil } return 0, err } ``` ## Specification Just add the deprecation in the API: ```diff type Container { """ Exit code of the last executed command. Zero means success. Will execute default command if none is set, or error if there's no default. """ - exitCode: Int! + exitCode: Int! @deprecated(reason: "Use `sync` instead.") } ``` ## Caveat There is one big difference between `ExitCode(ctx)` and `Sync(ctx)`. While the former triggers command execution, defaulting to the entrypoint and default args if no `WithExec` is defined in the pipeline, the latter does not. Just “renaming” to a new `.Run(ctx)` that behaves the same doesn’t seem worth it. And some users don’t actually want to run the command (e.g., just do a `Dockerfile` build), so it pays to understand what’s going on. We’ll just have to make this clear in documentation and examples: - https://github.com/dagger/dagger/issues/3617
https://github.com/dagger/dagger/issues/5124
https://github.com/dagger/dagger/pull/5481
9d87f496046ccfc5ec82d86a7c0aea71933df3a1
9aff03b6150c1ab45189523a63f2a97f1ddac283
2023-05-10T15:14:10Z
go
2023-07-18T18:03:07Z
sdk/go/api.gen.go
q *querybuilder.Selection c graphql.Client value *string } 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) { if r.value != nil { return *r.value, nil } q := r.q.Select("value") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } type Label struct {
closed
dagger/dagger
https://github.com/dagger/dagger
5,124
Deprecate `exitCode`
## Summary I’m proposing we deprecate `exitCode` in favor of [`sync`](https://github.com/dagger/dagger/pull/5071) and [`ExecError`](https://github.com/dagger/dagger/pull/5184) as an alternative solution to https://github.com/dagger/dagger/issues/3192. ## Motivation The `Container.exitCode` field doesn’t make sense because you always get zero on success and you can’t get the non-zero value when the command fails due to a bug: - https://github.com/dagger/dagger/issues/3192 So since the result on success is useless, just replace with `sync`: - https://github.com/dagger/dagger/pull/5071 But if you do need the non-zero exit code value, you can get it from `ExecError`: - https://github.com/dagger/dagger/pull/5184 ## Examples **Don't care about the result** ```diff - _, err := ctr.ExitCode(ctx) + _, err := ctr.Sync(ctx) if err != nil { return err } ``` **Need the exit code** ```go func GetExitCode(ctr *dagger.Container) (int, error) { _, err := ctr.Sync(ctx) if e, ok := err.(*dagger.ExecError); ok { return e.ExitCode, nil } return 0, err } ``` ## Specification Just add the deprecation in the API: ```diff type Container { """ Exit code of the last executed command. Zero means success. Will execute default command if none is set, or error if there's no default. """ - exitCode: Int! + exitCode: Int! @deprecated(reason: "Use `sync` instead.") } ``` ## Caveat There is one big difference between `ExitCode(ctx)` and `Sync(ctx)`. While the former triggers command execution, defaulting to the entrypoint and default args if no `WithExec` is defined in the pipeline, the latter does not. Just “renaming” to a new `.Run(ctx)` that behaves the same doesn’t seem worth it. And some users don’t actually want to run the command (e.g., just do a `Dockerfile` build), so it pays to understand what’s going on. We’ll just have to make this clear in documentation and examples: - https://github.com/dagger/dagger/issues/3617
https://github.com/dagger/dagger/issues/5124
https://github.com/dagger/dagger/pull/5481
9d87f496046ccfc5ec82d86a7c0aea71933df3a1
9aff03b6150c1ab45189523a63f2a97f1ddac283
2023-05-10T15:14:10Z
go
2023-07-18T18:03:07Z
sdk/go/api.gen.go
q *querybuilder.Selection c graphql.Client name *string value *string } func (r *Label) Name(ctx context.Context) (string, error) { if r.name != nil { return *r.name, nil } q := r.q.Select("name") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } func (r *Label) Value(ctx context.Context) (string, error) { if r.value != nil { return *r.value, nil } q := r.q.Select("value") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } type Port struct {
closed
dagger/dagger
https://github.com/dagger/dagger
5,124
Deprecate `exitCode`
## Summary I’m proposing we deprecate `exitCode` in favor of [`sync`](https://github.com/dagger/dagger/pull/5071) and [`ExecError`](https://github.com/dagger/dagger/pull/5184) as an alternative solution to https://github.com/dagger/dagger/issues/3192. ## Motivation The `Container.exitCode` field doesn’t make sense because you always get zero on success and you can’t get the non-zero value when the command fails due to a bug: - https://github.com/dagger/dagger/issues/3192 So since the result on success is useless, just replace with `sync`: - https://github.com/dagger/dagger/pull/5071 But if you do need the non-zero exit code value, you can get it from `ExecError`: - https://github.com/dagger/dagger/pull/5184 ## Examples **Don't care about the result** ```diff - _, err := ctr.ExitCode(ctx) + _, err := ctr.Sync(ctx) if err != nil { return err } ``` **Need the exit code** ```go func GetExitCode(ctr *dagger.Container) (int, error) { _, err := ctr.Sync(ctx) if e, ok := err.(*dagger.ExecError); ok { return e.ExitCode, nil } return 0, err } ``` ## Specification Just add the deprecation in the API: ```diff type Container { """ Exit code of the last executed command. Zero means success. Will execute default command if none is set, or error if there's no default. """ - exitCode: Int! + exitCode: Int! @deprecated(reason: "Use `sync` instead.") } ``` ## Caveat There is one big difference between `ExitCode(ctx)` and `Sync(ctx)`. While the former triggers command execution, defaulting to the entrypoint and default args if no `WithExec` is defined in the pipeline, the latter does not. Just “renaming” to a new `.Run(ctx)` that behaves the same doesn’t seem worth it. And some users don’t actually want to run the command (e.g., just do a `Dockerfile` build), so it pays to understand what’s going on. We’ll just have to make this clear in documentation and examples: - https://github.com/dagger/dagger/issues/3617
https://github.com/dagger/dagger/issues/5124
https://github.com/dagger/dagger/pull/5481
9d87f496046ccfc5ec82d86a7c0aea71933df3a1
9aff03b6150c1ab45189523a63f2a97f1ddac283
2023-05-10T15:14:10Z
go
2023-07-18T18:03:07Z
sdk/go/api.gen.go
q *querybuilder.Selection c graphql.Client description *string port *int protocol *NetworkProtocol } func (r *Port) Description(ctx context.Context) (string, error) { if r.description != nil { return *r.description, nil } q := r.q.Select("description") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } func (r *Port) Port(ctx context.Context) (int, error) { if r.port != nil {
closed
dagger/dagger
https://github.com/dagger/dagger
5,124
Deprecate `exitCode`
## Summary I’m proposing we deprecate `exitCode` in favor of [`sync`](https://github.com/dagger/dagger/pull/5071) and [`ExecError`](https://github.com/dagger/dagger/pull/5184) as an alternative solution to https://github.com/dagger/dagger/issues/3192. ## Motivation The `Container.exitCode` field doesn’t make sense because you always get zero on success and you can’t get the non-zero value when the command fails due to a bug: - https://github.com/dagger/dagger/issues/3192 So since the result on success is useless, just replace with `sync`: - https://github.com/dagger/dagger/pull/5071 But if you do need the non-zero exit code value, you can get it from `ExecError`: - https://github.com/dagger/dagger/pull/5184 ## Examples **Don't care about the result** ```diff - _, err := ctr.ExitCode(ctx) + _, err := ctr.Sync(ctx) if err != nil { return err } ``` **Need the exit code** ```go func GetExitCode(ctr *dagger.Container) (int, error) { _, err := ctr.Sync(ctx) if e, ok := err.(*dagger.ExecError); ok { return e.ExitCode, nil } return 0, err } ``` ## Specification Just add the deprecation in the API: ```diff type Container { """ Exit code of the last executed command. Zero means success. Will execute default command if none is set, or error if there's no default. """ - exitCode: Int! + exitCode: Int! @deprecated(reason: "Use `sync` instead.") } ``` ## Caveat There is one big difference between `ExitCode(ctx)` and `Sync(ctx)`. While the former triggers command execution, defaulting to the entrypoint and default args if no `WithExec` is defined in the pipeline, the latter does not. Just “renaming” to a new `.Run(ctx)` that behaves the same doesn’t seem worth it. And some users don’t actually want to run the command (e.g., just do a `Dockerfile` build), so it pays to understand what’s going on. We’ll just have to make this clear in documentation and examples: - https://github.com/dagger/dagger/issues/3617
https://github.com/dagger/dagger/issues/5124
https://github.com/dagger/dagger/pull/5481
9d87f496046ccfc5ec82d86a7c0aea71933df3a1
9aff03b6150c1ab45189523a63f2a97f1ddac283
2023-05-10T15:14:10Z
go
2023-07-18T18:03:07Z
sdk/go/api.gen.go
return *r.port, nil } q := r.q.Select("port") var response int q = q.Bind(&response) return response, q.Execute(ctx, r.c) } func (r *Port) Protocol(ctx context.Context) (NetworkProtocol, error) { if r.protocol != nil { return *r.protocol, nil } q := r.q.Select("protocol") var response NetworkProtocol q = q.Bind(&response) return response, q.Execute(ctx, r.c) } type Project struct { q *querybuilder.Selection c graphql.Client id *ProjectID name *string } type WithProjectFunc func(r *Project) *Project func (r *Project) With(f WithProjectFunc) *Project { return f(r) } func (r *Project) Commands(ctx context.Context) ([]ProjectCommand, error) { q := r.q.Select("commands") q = q.Select("description id name resultType") type commands struct {
closed
dagger/dagger
https://github.com/dagger/dagger
5,124
Deprecate `exitCode`
## Summary I’m proposing we deprecate `exitCode` in favor of [`sync`](https://github.com/dagger/dagger/pull/5071) and [`ExecError`](https://github.com/dagger/dagger/pull/5184) as an alternative solution to https://github.com/dagger/dagger/issues/3192. ## Motivation The `Container.exitCode` field doesn’t make sense because you always get zero on success and you can’t get the non-zero value when the command fails due to a bug: - https://github.com/dagger/dagger/issues/3192 So since the result on success is useless, just replace with `sync`: - https://github.com/dagger/dagger/pull/5071 But if you do need the non-zero exit code value, you can get it from `ExecError`: - https://github.com/dagger/dagger/pull/5184 ## Examples **Don't care about the result** ```diff - _, err := ctr.ExitCode(ctx) + _, err := ctr.Sync(ctx) if err != nil { return err } ``` **Need the exit code** ```go func GetExitCode(ctr *dagger.Container) (int, error) { _, err := ctr.Sync(ctx) if e, ok := err.(*dagger.ExecError); ok { return e.ExitCode, nil } return 0, err } ``` ## Specification Just add the deprecation in the API: ```diff type Container { """ Exit code of the last executed command. Zero means success. Will execute default command if none is set, or error if there's no default. """ - exitCode: Int! + exitCode: Int! @deprecated(reason: "Use `sync` instead.") } ``` ## Caveat There is one big difference between `ExitCode(ctx)` and `Sync(ctx)`. While the former triggers command execution, defaulting to the entrypoint and default args if no `WithExec` is defined in the pipeline, the latter does not. Just “renaming” to a new `.Run(ctx)` that behaves the same doesn’t seem worth it. And some users don’t actually want to run the command (e.g., just do a `Dockerfile` build), so it pays to understand what’s going on. We’ll just have to make this clear in documentation and examples: - https://github.com/dagger/dagger/issues/3617
https://github.com/dagger/dagger/issues/5124
https://github.com/dagger/dagger/pull/5481
9d87f496046ccfc5ec82d86a7c0aea71933df3a1
9aff03b6150c1ab45189523a63f2a97f1ddac283
2023-05-10T15:14:10Z
go
2023-07-18T18:03:07Z
sdk/go/api.gen.go
Description string Id ProjectCommandID Name string ResultType string } convert := func(fields []commands) []ProjectCommand { out := []ProjectCommand{} for i := range fields { out = append(out, ProjectCommand{description: &fields[i].Description, id: &fields[i].Id, name: &fields[i].Name, resultType: &fields[i].ResultType}) } return out } var response []commands q = q.Bind(&response) err := q.Execute(ctx, r.c) if err != nil { return nil, err } return convert(response), nil } func (r *Project) ID(ctx context.Context) (ProjectID, error) {
closed
dagger/dagger
https://github.com/dagger/dagger
5,124
Deprecate `exitCode`
## Summary I’m proposing we deprecate `exitCode` in favor of [`sync`](https://github.com/dagger/dagger/pull/5071) and [`ExecError`](https://github.com/dagger/dagger/pull/5184) as an alternative solution to https://github.com/dagger/dagger/issues/3192. ## Motivation The `Container.exitCode` field doesn’t make sense because you always get zero on success and you can’t get the non-zero value when the command fails due to a bug: - https://github.com/dagger/dagger/issues/3192 So since the result on success is useless, just replace with `sync`: - https://github.com/dagger/dagger/pull/5071 But if you do need the non-zero exit code value, you can get it from `ExecError`: - https://github.com/dagger/dagger/pull/5184 ## Examples **Don't care about the result** ```diff - _, err := ctr.ExitCode(ctx) + _, err := ctr.Sync(ctx) if err != nil { return err } ``` **Need the exit code** ```go func GetExitCode(ctr *dagger.Container) (int, error) { _, err := ctr.Sync(ctx) if e, ok := err.(*dagger.ExecError); ok { return e.ExitCode, nil } return 0, err } ``` ## Specification Just add the deprecation in the API: ```diff type Container { """ Exit code of the last executed command. Zero means success. Will execute default command if none is set, or error if there's no default. """ - exitCode: Int! + exitCode: Int! @deprecated(reason: "Use `sync` instead.") } ``` ## Caveat There is one big difference between `ExitCode(ctx)` and `Sync(ctx)`. While the former triggers command execution, defaulting to the entrypoint and default args if no `WithExec` is defined in the pipeline, the latter does not. Just “renaming” to a new `.Run(ctx)` that behaves the same doesn’t seem worth it. And some users don’t actually want to run the command (e.g., just do a `Dockerfile` build), so it pays to understand what’s going on. We’ll just have to make this clear in documentation and examples: - https://github.com/dagger/dagger/issues/3617
https://github.com/dagger/dagger/issues/5124
https://github.com/dagger/dagger/pull/5481
9d87f496046ccfc5ec82d86a7c0aea71933df3a1
9aff03b6150c1ab45189523a63f2a97f1ddac283
2023-05-10T15:14:10Z
go
2023-07-18T18:03:07Z
sdk/go/api.gen.go
if r.id != nil { return *r.id, nil } q := r.q.Select("id") var response ProjectID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } func (r *Project) XXX_GraphQLType() string { return "Project" } func (r *Project) XXX_GraphQLIDType() string { return "ProjectID" } func (r *Project) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } func (r *Project) Load(source *Directory, configPath string) *Project { q := r.q.Select("load") q = q.Arg("source", source) q = q.Arg("configPath", configPath) return &Project{ q: q, c: r.c, } }
closed
dagger/dagger
https://github.com/dagger/dagger
5,124
Deprecate `exitCode`
## Summary I’m proposing we deprecate `exitCode` in favor of [`sync`](https://github.com/dagger/dagger/pull/5071) and [`ExecError`](https://github.com/dagger/dagger/pull/5184) as an alternative solution to https://github.com/dagger/dagger/issues/3192. ## Motivation The `Container.exitCode` field doesn’t make sense because you always get zero on success and you can’t get the non-zero value when the command fails due to a bug: - https://github.com/dagger/dagger/issues/3192 So since the result on success is useless, just replace with `sync`: - https://github.com/dagger/dagger/pull/5071 But if you do need the non-zero exit code value, you can get it from `ExecError`: - https://github.com/dagger/dagger/pull/5184 ## Examples **Don't care about the result** ```diff - _, err := ctr.ExitCode(ctx) + _, err := ctr.Sync(ctx) if err != nil { return err } ``` **Need the exit code** ```go func GetExitCode(ctr *dagger.Container) (int, error) { _, err := ctr.Sync(ctx) if e, ok := err.(*dagger.ExecError); ok { return e.ExitCode, nil } return 0, err } ``` ## Specification Just add the deprecation in the API: ```diff type Container { """ Exit code of the last executed command. Zero means success. Will execute default command if none is set, or error if there's no default. """ - exitCode: Int! + exitCode: Int! @deprecated(reason: "Use `sync` instead.") } ``` ## Caveat There is one big difference between `ExitCode(ctx)` and `Sync(ctx)`. While the former triggers command execution, defaulting to the entrypoint and default args if no `WithExec` is defined in the pipeline, the latter does not. Just “renaming” to a new `.Run(ctx)` that behaves the same doesn’t seem worth it. And some users don’t actually want to run the command (e.g., just do a `Dockerfile` build), so it pays to understand what’s going on. We’ll just have to make this clear in documentation and examples: - https://github.com/dagger/dagger/issues/3617
https://github.com/dagger/dagger/issues/5124
https://github.com/dagger/dagger/pull/5481
9d87f496046ccfc5ec82d86a7c0aea71933df3a1
9aff03b6150c1ab45189523a63f2a97f1ddac283
2023-05-10T15:14:10Z
go
2023-07-18T18:03:07Z
sdk/go/api.gen.go
func (r *Project) Name(ctx context.Context) (string, error) { if r.name != nil { return *r.name, nil } q := r.q.Select("name") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } type ProjectCommand struct { q *querybuilder.Selection c graphql.Client description *string id *ProjectCommandID name *string resultType *string } func (r *ProjectCommand) Description(ctx context.Context) (string, error) { if r.description != nil { return *r.description, nil } q := r.q.Select("description") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } func (r *ProjectCommand) Flags(ctx context.Context) ([]ProjectCommandFlag, error) { q := r.q.Select("flags") q = q.Select("description name") type flags struct {
closed
dagger/dagger
https://github.com/dagger/dagger
5,124
Deprecate `exitCode`
## Summary I’m proposing we deprecate `exitCode` in favor of [`sync`](https://github.com/dagger/dagger/pull/5071) and [`ExecError`](https://github.com/dagger/dagger/pull/5184) as an alternative solution to https://github.com/dagger/dagger/issues/3192. ## Motivation The `Container.exitCode` field doesn’t make sense because you always get zero on success and you can’t get the non-zero value when the command fails due to a bug: - https://github.com/dagger/dagger/issues/3192 So since the result on success is useless, just replace with `sync`: - https://github.com/dagger/dagger/pull/5071 But if you do need the non-zero exit code value, you can get it from `ExecError`: - https://github.com/dagger/dagger/pull/5184 ## Examples **Don't care about the result** ```diff - _, err := ctr.ExitCode(ctx) + _, err := ctr.Sync(ctx) if err != nil { return err } ``` **Need the exit code** ```go func GetExitCode(ctr *dagger.Container) (int, error) { _, err := ctr.Sync(ctx) if e, ok := err.(*dagger.ExecError); ok { return e.ExitCode, nil } return 0, err } ``` ## Specification Just add the deprecation in the API: ```diff type Container { """ Exit code of the last executed command. Zero means success. Will execute default command if none is set, or error if there's no default. """ - exitCode: Int! + exitCode: Int! @deprecated(reason: "Use `sync` instead.") } ``` ## Caveat There is one big difference between `ExitCode(ctx)` and `Sync(ctx)`. While the former triggers command execution, defaulting to the entrypoint and default args if no `WithExec` is defined in the pipeline, the latter does not. Just “renaming” to a new `.Run(ctx)` that behaves the same doesn’t seem worth it. And some users don’t actually want to run the command (e.g., just do a `Dockerfile` build), so it pays to understand what’s going on. We’ll just have to make this clear in documentation and examples: - https://github.com/dagger/dagger/issues/3617
https://github.com/dagger/dagger/issues/5124
https://github.com/dagger/dagger/pull/5481
9d87f496046ccfc5ec82d86a7c0aea71933df3a1
9aff03b6150c1ab45189523a63f2a97f1ddac283
2023-05-10T15:14:10Z
go
2023-07-18T18:03:07Z
sdk/go/api.gen.go
Description string Name string } convert := func(fields []flags) []ProjectCommandFlag { out := []ProjectCommandFlag{} for i := range fields { out = append(out, ProjectCommandFlag{description: &fields[i].Description, name: &fields[i].Name}) } return out } var response []flags q = q.Bind(&response) err := q.Execute(ctx, r.c) if err != nil { return nil, err } return convert(response), nil } func (r *ProjectCommand) ID(ctx context.Context) (ProjectCommandID, error) { if r.id != nil { return *r.id, nil } q := r.q.Select("id") var response ProjectCommandID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } func (r *ProjectCommand) XXX_GraphQLType() string { return "ProjectCommand"
closed
dagger/dagger
https://github.com/dagger/dagger
5,124
Deprecate `exitCode`
## Summary I’m proposing we deprecate `exitCode` in favor of [`sync`](https://github.com/dagger/dagger/pull/5071) and [`ExecError`](https://github.com/dagger/dagger/pull/5184) as an alternative solution to https://github.com/dagger/dagger/issues/3192. ## Motivation The `Container.exitCode` field doesn’t make sense because you always get zero on success and you can’t get the non-zero value when the command fails due to a bug: - https://github.com/dagger/dagger/issues/3192 So since the result on success is useless, just replace with `sync`: - https://github.com/dagger/dagger/pull/5071 But if you do need the non-zero exit code value, you can get it from `ExecError`: - https://github.com/dagger/dagger/pull/5184 ## Examples **Don't care about the result** ```diff - _, err := ctr.ExitCode(ctx) + _, err := ctr.Sync(ctx) if err != nil { return err } ``` **Need the exit code** ```go func GetExitCode(ctr *dagger.Container) (int, error) { _, err := ctr.Sync(ctx) if e, ok := err.(*dagger.ExecError); ok { return e.ExitCode, nil } return 0, err } ``` ## Specification Just add the deprecation in the API: ```diff type Container { """ Exit code of the last executed command. Zero means success. Will execute default command if none is set, or error if there's no default. """ - exitCode: Int! + exitCode: Int! @deprecated(reason: "Use `sync` instead.") } ``` ## Caveat There is one big difference between `ExitCode(ctx)` and `Sync(ctx)`. While the former triggers command execution, defaulting to the entrypoint and default args if no `WithExec` is defined in the pipeline, the latter does not. Just “renaming” to a new `.Run(ctx)` that behaves the same doesn’t seem worth it. And some users don’t actually want to run the command (e.g., just do a `Dockerfile` build), so it pays to understand what’s going on. We’ll just have to make this clear in documentation and examples: - https://github.com/dagger/dagger/issues/3617
https://github.com/dagger/dagger/issues/5124
https://github.com/dagger/dagger/pull/5481
9d87f496046ccfc5ec82d86a7c0aea71933df3a1
9aff03b6150c1ab45189523a63f2a97f1ddac283
2023-05-10T15:14:10Z
go
2023-07-18T18:03:07Z
sdk/go/api.gen.go
} func (r *ProjectCommand) XXX_GraphQLIDType() string { return "ProjectCommandID" } func (r *ProjectCommand) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } func (r *ProjectCommand) Name(ctx context.Context) (string, error) { if r.name != nil { return *r.name, nil } q := r.q.Select("name") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } func (r *ProjectCommand) ResultType(ctx context.Context) (string, error) { if r.resultType != nil { return *r.resultType, nil } q := r.q.Select("resultType") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } func (r *ProjectCommand) Subcommands(ctx context.Context) ([]ProjectCommand, error) {
closed
dagger/dagger
https://github.com/dagger/dagger
5,124
Deprecate `exitCode`
## Summary I’m proposing we deprecate `exitCode` in favor of [`sync`](https://github.com/dagger/dagger/pull/5071) and [`ExecError`](https://github.com/dagger/dagger/pull/5184) as an alternative solution to https://github.com/dagger/dagger/issues/3192. ## Motivation The `Container.exitCode` field doesn’t make sense because you always get zero on success and you can’t get the non-zero value when the command fails due to a bug: - https://github.com/dagger/dagger/issues/3192 So since the result on success is useless, just replace with `sync`: - https://github.com/dagger/dagger/pull/5071 But if you do need the non-zero exit code value, you can get it from `ExecError`: - https://github.com/dagger/dagger/pull/5184 ## Examples **Don't care about the result** ```diff - _, err := ctr.ExitCode(ctx) + _, err := ctr.Sync(ctx) if err != nil { return err } ``` **Need the exit code** ```go func GetExitCode(ctr *dagger.Container) (int, error) { _, err := ctr.Sync(ctx) if e, ok := err.(*dagger.ExecError); ok { return e.ExitCode, nil } return 0, err } ``` ## Specification Just add the deprecation in the API: ```diff type Container { """ Exit code of the last executed command. Zero means success. Will execute default command if none is set, or error if there's no default. """ - exitCode: Int! + exitCode: Int! @deprecated(reason: "Use `sync` instead.") } ``` ## Caveat There is one big difference between `ExitCode(ctx)` and `Sync(ctx)`. While the former triggers command execution, defaulting to the entrypoint and default args if no `WithExec` is defined in the pipeline, the latter does not. Just “renaming” to a new `.Run(ctx)` that behaves the same doesn’t seem worth it. And some users don’t actually want to run the command (e.g., just do a `Dockerfile` build), so it pays to understand what’s going on. We’ll just have to make this clear in documentation and examples: - https://github.com/dagger/dagger/issues/3617
https://github.com/dagger/dagger/issues/5124
https://github.com/dagger/dagger/pull/5481
9d87f496046ccfc5ec82d86a7c0aea71933df3a1
9aff03b6150c1ab45189523a63f2a97f1ddac283
2023-05-10T15:14:10Z
go
2023-07-18T18:03:07Z
sdk/go/api.gen.go
q := r.q.Select("subcommands") q = q.Select("description id name resultType") type subcommands struct { Description string Id ProjectCommandID Name string ResultType string } convert := func(fields []subcommands) []ProjectCommand { out := []ProjectCommand{} for i := range fields { out = append(out, ProjectCommand{description: &fields[i].Description, id: &fields[i].Id, name: &fields[i].Name, resultType: &fields[i].ResultType}) } return out } var response []subcommands q = q.Bind(&response) err := q.Execute(ctx, r.c) if err != nil { return nil, err } return convert(response), nil } type ProjectCommandFlag struct { q *querybuilder.Selection c graphql.Client description *string name *string } func (r *ProjectCommandFlag) Description(ctx context.Context) (string, error) {
closed
dagger/dagger
https://github.com/dagger/dagger
5,124
Deprecate `exitCode`
## Summary I’m proposing we deprecate `exitCode` in favor of [`sync`](https://github.com/dagger/dagger/pull/5071) and [`ExecError`](https://github.com/dagger/dagger/pull/5184) as an alternative solution to https://github.com/dagger/dagger/issues/3192. ## Motivation The `Container.exitCode` field doesn’t make sense because you always get zero on success and you can’t get the non-zero value when the command fails due to a bug: - https://github.com/dagger/dagger/issues/3192 So since the result on success is useless, just replace with `sync`: - https://github.com/dagger/dagger/pull/5071 But if you do need the non-zero exit code value, you can get it from `ExecError`: - https://github.com/dagger/dagger/pull/5184 ## Examples **Don't care about the result** ```diff - _, err := ctr.ExitCode(ctx) + _, err := ctr.Sync(ctx) if err != nil { return err } ``` **Need the exit code** ```go func GetExitCode(ctr *dagger.Container) (int, error) { _, err := ctr.Sync(ctx) if e, ok := err.(*dagger.ExecError); ok { return e.ExitCode, nil } return 0, err } ``` ## Specification Just add the deprecation in the API: ```diff type Container { """ Exit code of the last executed command. Zero means success. Will execute default command if none is set, or error if there's no default. """ - exitCode: Int! + exitCode: Int! @deprecated(reason: "Use `sync` instead.") } ``` ## Caveat There is one big difference between `ExitCode(ctx)` and `Sync(ctx)`. While the former triggers command execution, defaulting to the entrypoint and default args if no `WithExec` is defined in the pipeline, the latter does not. Just “renaming” to a new `.Run(ctx)` that behaves the same doesn’t seem worth it. And some users don’t actually want to run the command (e.g., just do a `Dockerfile` build), so it pays to understand what’s going on. We’ll just have to make this clear in documentation and examples: - https://github.com/dagger/dagger/issues/3617
https://github.com/dagger/dagger/issues/5124
https://github.com/dagger/dagger/pull/5481
9d87f496046ccfc5ec82d86a7c0aea71933df3a1
9aff03b6150c1ab45189523a63f2a97f1ddac283
2023-05-10T15:14:10Z
go
2023-07-18T18:03:07Z
sdk/go/api.gen.go
if r.description != nil { return *r.description, nil } q := r.q.Select("description") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } func (r *ProjectCommandFlag) Name(ctx context.Context) (string, error) { if r.name != nil { return *r.name, nil } q := r.q.Select("name") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } type WithClientFunc func(r *Client) *Client func (r *Client) With(f WithClientFunc) *Client { return f(r) } func (r *Client) CacheVolume(key string) *CacheVolume { q := r.q.Select("cacheVolume") q = q.Arg("key", key) return &CacheVolume{ q: q, c: r.c, } } type ContainerOpts struct {
closed
dagger/dagger
https://github.com/dagger/dagger
5,124
Deprecate `exitCode`
## Summary I’m proposing we deprecate `exitCode` in favor of [`sync`](https://github.com/dagger/dagger/pull/5071) and [`ExecError`](https://github.com/dagger/dagger/pull/5184) as an alternative solution to https://github.com/dagger/dagger/issues/3192. ## Motivation The `Container.exitCode` field doesn’t make sense because you always get zero on success and you can’t get the non-zero value when the command fails due to a bug: - https://github.com/dagger/dagger/issues/3192 So since the result on success is useless, just replace with `sync`: - https://github.com/dagger/dagger/pull/5071 But if you do need the non-zero exit code value, you can get it from `ExecError`: - https://github.com/dagger/dagger/pull/5184 ## Examples **Don't care about the result** ```diff - _, err := ctr.ExitCode(ctx) + _, err := ctr.Sync(ctx) if err != nil { return err } ``` **Need the exit code** ```go func GetExitCode(ctr *dagger.Container) (int, error) { _, err := ctr.Sync(ctx) if e, ok := err.(*dagger.ExecError); ok { return e.ExitCode, nil } return 0, err } ``` ## Specification Just add the deprecation in the API: ```diff type Container { """ Exit code of the last executed command. Zero means success. Will execute default command if none is set, or error if there's no default. """ - exitCode: Int! + exitCode: Int! @deprecated(reason: "Use `sync` instead.") } ``` ## Caveat There is one big difference between `ExitCode(ctx)` and `Sync(ctx)`. While the former triggers command execution, defaulting to the entrypoint and default args if no `WithExec` is defined in the pipeline, the latter does not. Just “renaming” to a new `.Run(ctx)` that behaves the same doesn’t seem worth it. And some users don’t actually want to run the command (e.g., just do a `Dockerfile` build), so it pays to understand what’s going on. We’ll just have to make this clear in documentation and examples: - https://github.com/dagger/dagger/issues/3617
https://github.com/dagger/dagger/issues/5124
https://github.com/dagger/dagger/pull/5481
9d87f496046ccfc5ec82d86a7c0aea71933df3a1
9aff03b6150c1ab45189523a63f2a97f1ddac283
2023-05-10T15:14:10Z
go
2023-07-18T18:03:07Z
sdk/go/api.gen.go
ID ContainerID Platform Platform } func (r *Client) 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) } if !querybuilder.IsZeroValue(opts[i].Platform) { q = q.Arg("platform", opts[i].Platform) } } return &Container{ q: q, c: r.c, } } func (r *Client) 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
5,124
Deprecate `exitCode`
## Summary I’m proposing we deprecate `exitCode` in favor of [`sync`](https://github.com/dagger/dagger/pull/5071) and [`ExecError`](https://github.com/dagger/dagger/pull/5184) as an alternative solution to https://github.com/dagger/dagger/issues/3192. ## Motivation The `Container.exitCode` field doesn’t make sense because you always get zero on success and you can’t get the non-zero value when the command fails due to a bug: - https://github.com/dagger/dagger/issues/3192 So since the result on success is useless, just replace with `sync`: - https://github.com/dagger/dagger/pull/5071 But if you do need the non-zero exit code value, you can get it from `ExecError`: - https://github.com/dagger/dagger/pull/5184 ## Examples **Don't care about the result** ```diff - _, err := ctr.ExitCode(ctx) + _, err := ctr.Sync(ctx) if err != nil { return err } ``` **Need the exit code** ```go func GetExitCode(ctr *dagger.Container) (int, error) { _, err := ctr.Sync(ctx) if e, ok := err.(*dagger.ExecError); ok { return e.ExitCode, nil } return 0, err } ``` ## Specification Just add the deprecation in the API: ```diff type Container { """ Exit code of the last executed command. Zero means success. Will execute default command if none is set, or error if there's no default. """ - exitCode: Int! + exitCode: Int! @deprecated(reason: "Use `sync` instead.") } ``` ## Caveat There is one big difference between `ExitCode(ctx)` and `Sync(ctx)`. While the former triggers command execution, defaulting to the entrypoint and default args if no `WithExec` is defined in the pipeline, the latter does not. Just “renaming” to a new `.Run(ctx)` that behaves the same doesn’t seem worth it. And some users don’t actually want to run the command (e.g., just do a `Dockerfile` build), so it pays to understand what’s going on. We’ll just have to make this clear in documentation and examples: - https://github.com/dagger/dagger/issues/3617
https://github.com/dagger/dagger/issues/5124
https://github.com/dagger/dagger/pull/5481
9d87f496046ccfc5ec82d86a7c0aea71933df3a1
9aff03b6150c1ab45189523a63f2a97f1ddac283
2023-05-10T15:14:10Z
go
2023-07-18T18:03:07Z
sdk/go/api.gen.go
ID DirectoryID } func (r *Client) 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) } } return &Directory{ q: q, c: r.c, } } func (r *Client) File(id FileID) *File { q := r.q.Select("file") q = q.Arg("id", id) return &File{ q: q, c: r.c, } } type GitOpts struct {
closed
dagger/dagger
https://github.com/dagger/dagger
5,124
Deprecate `exitCode`
## Summary I’m proposing we deprecate `exitCode` in favor of [`sync`](https://github.com/dagger/dagger/pull/5071) and [`ExecError`](https://github.com/dagger/dagger/pull/5184) as an alternative solution to https://github.com/dagger/dagger/issues/3192. ## Motivation The `Container.exitCode` field doesn’t make sense because you always get zero on success and you can’t get the non-zero value when the command fails due to a bug: - https://github.com/dagger/dagger/issues/3192 So since the result on success is useless, just replace with `sync`: - https://github.com/dagger/dagger/pull/5071 But if you do need the non-zero exit code value, you can get it from `ExecError`: - https://github.com/dagger/dagger/pull/5184 ## Examples **Don't care about the result** ```diff - _, err := ctr.ExitCode(ctx) + _, err := ctr.Sync(ctx) if err != nil { return err } ``` **Need the exit code** ```go func GetExitCode(ctr *dagger.Container) (int, error) { _, err := ctr.Sync(ctx) if e, ok := err.(*dagger.ExecError); ok { return e.ExitCode, nil } return 0, err } ``` ## Specification Just add the deprecation in the API: ```diff type Container { """ Exit code of the last executed command. Zero means success. Will execute default command if none is set, or error if there's no default. """ - exitCode: Int! + exitCode: Int! @deprecated(reason: "Use `sync` instead.") } ``` ## Caveat There is one big difference between `ExitCode(ctx)` and `Sync(ctx)`. While the former triggers command execution, defaulting to the entrypoint and default args if no `WithExec` is defined in the pipeline, the latter does not. Just “renaming” to a new `.Run(ctx)` that behaves the same doesn’t seem worth it. And some users don’t actually want to run the command (e.g., just do a `Dockerfile` build), so it pays to understand what’s going on. We’ll just have to make this clear in documentation and examples: - https://github.com/dagger/dagger/issues/3617
https://github.com/dagger/dagger/issues/5124
https://github.com/dagger/dagger/pull/5481
9d87f496046ccfc5ec82d86a7c0aea71933df3a1
9aff03b6150c1ab45189523a63f2a97f1ddac283
2023-05-10T15:14:10Z
go
2023-07-18T18:03:07Z
sdk/go/api.gen.go
KeepGitDir bool ExperimentalServiceHost *Container } func (r *Client) Git(url string, opts ...GitOpts) *GitRepository { q := r.q.Select("git") for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].KeepGitDir) { q = q.Arg("keepGitDir", opts[i].KeepGitDir) } if !querybuilder.IsZeroValue(opts[i].ExperimentalServiceHost) { q = q.Arg("experimentalServiceHost", opts[i].ExperimentalServiceHost) } } q = q.Arg("url", url) return &GitRepository{
closed
dagger/dagger
https://github.com/dagger/dagger
5,124
Deprecate `exitCode`
## Summary I’m proposing we deprecate `exitCode` in favor of [`sync`](https://github.com/dagger/dagger/pull/5071) and [`ExecError`](https://github.com/dagger/dagger/pull/5184) as an alternative solution to https://github.com/dagger/dagger/issues/3192. ## Motivation The `Container.exitCode` field doesn’t make sense because you always get zero on success and you can’t get the non-zero value when the command fails due to a bug: - https://github.com/dagger/dagger/issues/3192 So since the result on success is useless, just replace with `sync`: - https://github.com/dagger/dagger/pull/5071 But if you do need the non-zero exit code value, you can get it from `ExecError`: - https://github.com/dagger/dagger/pull/5184 ## Examples **Don't care about the result** ```diff - _, err := ctr.ExitCode(ctx) + _, err := ctr.Sync(ctx) if err != nil { return err } ``` **Need the exit code** ```go func GetExitCode(ctr *dagger.Container) (int, error) { _, err := ctr.Sync(ctx) if e, ok := err.(*dagger.ExecError); ok { return e.ExitCode, nil } return 0, err } ``` ## Specification Just add the deprecation in the API: ```diff type Container { """ Exit code of the last executed command. Zero means success. Will execute default command if none is set, or error if there's no default. """ - exitCode: Int! + exitCode: Int! @deprecated(reason: "Use `sync` instead.") } ``` ## Caveat There is one big difference between `ExitCode(ctx)` and `Sync(ctx)`. While the former triggers command execution, defaulting to the entrypoint and default args if no `WithExec` is defined in the pipeline, the latter does not. Just “renaming” to a new `.Run(ctx)` that behaves the same doesn’t seem worth it. And some users don’t actually want to run the command (e.g., just do a `Dockerfile` build), so it pays to understand what’s going on. We’ll just have to make this clear in documentation and examples: - https://github.com/dagger/dagger/issues/3617
https://github.com/dagger/dagger/issues/5124
https://github.com/dagger/dagger/pull/5481
9d87f496046ccfc5ec82d86a7c0aea71933df3a1
9aff03b6150c1ab45189523a63f2a97f1ddac283
2023-05-10T15:14:10Z
go
2023-07-18T18:03:07Z
sdk/go/api.gen.go
q: q, c: r.c, } } func (r *Client) Host() *Host { q := r.q.Select("host") return &Host{ q: q, c: r.c, } } type HTTPOpts struct { ExperimentalServiceHost *Container } func (r *Client) HTTP(url string, opts ...HTTPOpts) *File { q := r.q.Select("http") for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].ExperimentalServiceHost) { q = q.Arg("experimentalServiceHost", opts[i].ExperimentalServiceHost) } } q = q.Arg("url", url) return &File{ q: q, c: r.c, } } type PipelineOpts struct {
closed
dagger/dagger
https://github.com/dagger/dagger
5,124
Deprecate `exitCode`
## Summary I’m proposing we deprecate `exitCode` in favor of [`sync`](https://github.com/dagger/dagger/pull/5071) and [`ExecError`](https://github.com/dagger/dagger/pull/5184) as an alternative solution to https://github.com/dagger/dagger/issues/3192. ## Motivation The `Container.exitCode` field doesn’t make sense because you always get zero on success and you can’t get the non-zero value when the command fails due to a bug: - https://github.com/dagger/dagger/issues/3192 So since the result on success is useless, just replace with `sync`: - https://github.com/dagger/dagger/pull/5071 But if you do need the non-zero exit code value, you can get it from `ExecError`: - https://github.com/dagger/dagger/pull/5184 ## Examples **Don't care about the result** ```diff - _, err := ctr.ExitCode(ctx) + _, err := ctr.Sync(ctx) if err != nil { return err } ``` **Need the exit code** ```go func GetExitCode(ctr *dagger.Container) (int, error) { _, err := ctr.Sync(ctx) if e, ok := err.(*dagger.ExecError); ok { return e.ExitCode, nil } return 0, err } ``` ## Specification Just add the deprecation in the API: ```diff type Container { """ Exit code of the last executed command. Zero means success. Will execute default command if none is set, or error if there's no default. """ - exitCode: Int! + exitCode: Int! @deprecated(reason: "Use `sync` instead.") } ``` ## Caveat There is one big difference between `ExitCode(ctx)` and `Sync(ctx)`. While the former triggers command execution, defaulting to the entrypoint and default args if no `WithExec` is defined in the pipeline, the latter does not. Just “renaming” to a new `.Run(ctx)` that behaves the same doesn’t seem worth it. And some users don’t actually want to run the command (e.g., just do a `Dockerfile` build), so it pays to understand what’s going on. We’ll just have to make this clear in documentation and examples: - https://github.com/dagger/dagger/issues/3617
https://github.com/dagger/dagger/issues/5124
https://github.com/dagger/dagger/pull/5481
9d87f496046ccfc5ec82d86a7c0aea71933df3a1
9aff03b6150c1ab45189523a63f2a97f1ddac283
2023-05-10T15:14:10Z
go
2023-07-18T18:03:07Z
sdk/go/api.gen.go
Description string Labels []PipelineLabel } func (r *Client) Pipeline(name string, opts ...PipelineOpts) *Client { q := r.q.Select("pipeline") for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Description) { q = q.Arg("description", opts[i].Description) } if !querybuilder.IsZeroValue(opts[i].Labels) { q = q.Arg("labels", opts[i].Labels) } } q = q.Arg("name", name) return &Client{ q: q, c: r.c, } } type ProjectOpts struct {
closed
dagger/dagger
https://github.com/dagger/dagger
5,124
Deprecate `exitCode`
## Summary I’m proposing we deprecate `exitCode` in favor of [`sync`](https://github.com/dagger/dagger/pull/5071) and [`ExecError`](https://github.com/dagger/dagger/pull/5184) as an alternative solution to https://github.com/dagger/dagger/issues/3192. ## Motivation The `Container.exitCode` field doesn’t make sense because you always get zero on success and you can’t get the non-zero value when the command fails due to a bug: - https://github.com/dagger/dagger/issues/3192 So since the result on success is useless, just replace with `sync`: - https://github.com/dagger/dagger/pull/5071 But if you do need the non-zero exit code value, you can get it from `ExecError`: - https://github.com/dagger/dagger/pull/5184 ## Examples **Don't care about the result** ```diff - _, err := ctr.ExitCode(ctx) + _, err := ctr.Sync(ctx) if err != nil { return err } ``` **Need the exit code** ```go func GetExitCode(ctr *dagger.Container) (int, error) { _, err := ctr.Sync(ctx) if e, ok := err.(*dagger.ExecError); ok { return e.ExitCode, nil } return 0, err } ``` ## Specification Just add the deprecation in the API: ```diff type Container { """ Exit code of the last executed command. Zero means success. Will execute default command if none is set, or error if there's no default. """ - exitCode: Int! + exitCode: Int! @deprecated(reason: "Use `sync` instead.") } ``` ## Caveat There is one big difference between `ExitCode(ctx)` and `Sync(ctx)`. While the former triggers command execution, defaulting to the entrypoint and default args if no `WithExec` is defined in the pipeline, the latter does not. Just “renaming” to a new `.Run(ctx)` that behaves the same doesn’t seem worth it. And some users don’t actually want to run the command (e.g., just do a `Dockerfile` build), so it pays to understand what’s going on. We’ll just have to make this clear in documentation and examples: - https://github.com/dagger/dagger/issues/3617
https://github.com/dagger/dagger/issues/5124
https://github.com/dagger/dagger/pull/5481
9d87f496046ccfc5ec82d86a7c0aea71933df3a1
9aff03b6150c1ab45189523a63f2a97f1ddac283
2023-05-10T15:14:10Z
go
2023-07-18T18:03:07Z
sdk/go/api.gen.go
ID ProjectID } func (r *Client) Project(opts ...ProjectOpts) *Project { q := r.q.Select("project") for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].ID) { q = q.Arg("id", opts[i].ID) } } return &Project{ q: q, c: r.c, } } type ProjectCommandOpts struct {
closed
dagger/dagger
https://github.com/dagger/dagger
5,124
Deprecate `exitCode`
## Summary I’m proposing we deprecate `exitCode` in favor of [`sync`](https://github.com/dagger/dagger/pull/5071) and [`ExecError`](https://github.com/dagger/dagger/pull/5184) as an alternative solution to https://github.com/dagger/dagger/issues/3192. ## Motivation The `Container.exitCode` field doesn’t make sense because you always get zero on success and you can’t get the non-zero value when the command fails due to a bug: - https://github.com/dagger/dagger/issues/3192 So since the result on success is useless, just replace with `sync`: - https://github.com/dagger/dagger/pull/5071 But if you do need the non-zero exit code value, you can get it from `ExecError`: - https://github.com/dagger/dagger/pull/5184 ## Examples **Don't care about the result** ```diff - _, err := ctr.ExitCode(ctx) + _, err := ctr.Sync(ctx) if err != nil { return err } ``` **Need the exit code** ```go func GetExitCode(ctr *dagger.Container) (int, error) { _, err := ctr.Sync(ctx) if e, ok := err.(*dagger.ExecError); ok { return e.ExitCode, nil } return 0, err } ``` ## Specification Just add the deprecation in the API: ```diff type Container { """ Exit code of the last executed command. Zero means success. Will execute default command if none is set, or error if there's no default. """ - exitCode: Int! + exitCode: Int! @deprecated(reason: "Use `sync` instead.") } ``` ## Caveat There is one big difference between `ExitCode(ctx)` and `Sync(ctx)`. While the former triggers command execution, defaulting to the entrypoint and default args if no `WithExec` is defined in the pipeline, the latter does not. Just “renaming” to a new `.Run(ctx)` that behaves the same doesn’t seem worth it. And some users don’t actually want to run the command (e.g., just do a `Dockerfile` build), so it pays to understand what’s going on. We’ll just have to make this clear in documentation and examples: - https://github.com/dagger/dagger/issues/3617
https://github.com/dagger/dagger/issues/5124
https://github.com/dagger/dagger/pull/5481
9d87f496046ccfc5ec82d86a7c0aea71933df3a1
9aff03b6150c1ab45189523a63f2a97f1ddac283
2023-05-10T15:14:10Z
go
2023-07-18T18:03:07Z
sdk/go/api.gen.go
ID ProjectCommandID } func (r *Client) ProjectCommand(opts ...ProjectCommandOpts) *ProjectCommand { q := r.q.Select("projectCommand") for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].ID) { q = q.Arg("id", opts[i].ID) } } return &ProjectCommand{ q: q, c: r.c, } } func (r *Client) Secret(id SecretID) *Secret { q := r.q.Select("secret") q = q.Arg("id", id) return &Secret{
closed
dagger/dagger
https://github.com/dagger/dagger
5,124
Deprecate `exitCode`
## Summary I’m proposing we deprecate `exitCode` in favor of [`sync`](https://github.com/dagger/dagger/pull/5071) and [`ExecError`](https://github.com/dagger/dagger/pull/5184) as an alternative solution to https://github.com/dagger/dagger/issues/3192. ## Motivation The `Container.exitCode` field doesn’t make sense because you always get zero on success and you can’t get the non-zero value when the command fails due to a bug: - https://github.com/dagger/dagger/issues/3192 So since the result on success is useless, just replace with `sync`: - https://github.com/dagger/dagger/pull/5071 But if you do need the non-zero exit code value, you can get it from `ExecError`: - https://github.com/dagger/dagger/pull/5184 ## Examples **Don't care about the result** ```diff - _, err := ctr.ExitCode(ctx) + _, err := ctr.Sync(ctx) if err != nil { return err } ``` **Need the exit code** ```go func GetExitCode(ctr *dagger.Container) (int, error) { _, err := ctr.Sync(ctx) if e, ok := err.(*dagger.ExecError); ok { return e.ExitCode, nil } return 0, err } ``` ## Specification Just add the deprecation in the API: ```diff type Container { """ Exit code of the last executed command. Zero means success. Will execute default command if none is set, or error if there's no default. """ - exitCode: Int! + exitCode: Int! @deprecated(reason: "Use `sync` instead.") } ``` ## Caveat There is one big difference between `ExitCode(ctx)` and `Sync(ctx)`. While the former triggers command execution, defaulting to the entrypoint and default args if no `WithExec` is defined in the pipeline, the latter does not. Just “renaming” to a new `.Run(ctx)` that behaves the same doesn’t seem worth it. And some users don’t actually want to run the command (e.g., just do a `Dockerfile` build), so it pays to understand what’s going on. We’ll just have to make this clear in documentation and examples: - https://github.com/dagger/dagger/issues/3617
https://github.com/dagger/dagger/issues/5124
https://github.com/dagger/dagger/pull/5481
9d87f496046ccfc5ec82d86a7c0aea71933df3a1
9aff03b6150c1ab45189523a63f2a97f1ddac283
2023-05-10T15:14:10Z
go
2023-07-18T18:03:07Z
sdk/go/api.gen.go
q: q, c: r.c, } } func (r *Client) SetSecret(name string, plaintext string) *Secret { q := r.q.Select("setSecret") q = q.Arg("name", name) q = q.Arg("plaintext", plaintext) return &Secret{ q: q, c: r.c, } } type SocketOpts struct { ID SocketID } func (r *Client) Socket(opts ...SocketOpts) *Socket { q := r.q.Select("socket") for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].ID) { q = q.Arg("id", opts[i].ID) } } return &Socket{ q: q, c: r.c, } } type Secret struct {
closed
dagger/dagger
https://github.com/dagger/dagger
5,124
Deprecate `exitCode`
## Summary I’m proposing we deprecate `exitCode` in favor of [`sync`](https://github.com/dagger/dagger/pull/5071) and [`ExecError`](https://github.com/dagger/dagger/pull/5184) as an alternative solution to https://github.com/dagger/dagger/issues/3192. ## Motivation The `Container.exitCode` field doesn’t make sense because you always get zero on success and you can’t get the non-zero value when the command fails due to a bug: - https://github.com/dagger/dagger/issues/3192 So since the result on success is useless, just replace with `sync`: - https://github.com/dagger/dagger/pull/5071 But if you do need the non-zero exit code value, you can get it from `ExecError`: - https://github.com/dagger/dagger/pull/5184 ## Examples **Don't care about the result** ```diff - _, err := ctr.ExitCode(ctx) + _, err := ctr.Sync(ctx) if err != nil { return err } ``` **Need the exit code** ```go func GetExitCode(ctr *dagger.Container) (int, error) { _, err := ctr.Sync(ctx) if e, ok := err.(*dagger.ExecError); ok { return e.ExitCode, nil } return 0, err } ``` ## Specification Just add the deprecation in the API: ```diff type Container { """ Exit code of the last executed command. Zero means success. Will execute default command if none is set, or error if there's no default. """ - exitCode: Int! + exitCode: Int! @deprecated(reason: "Use `sync` instead.") } ``` ## Caveat There is one big difference between `ExitCode(ctx)` and `Sync(ctx)`. While the former triggers command execution, defaulting to the entrypoint and default args if no `WithExec` is defined in the pipeline, the latter does not. Just “renaming” to a new `.Run(ctx)` that behaves the same doesn’t seem worth it. And some users don’t actually want to run the command (e.g., just do a `Dockerfile` build), so it pays to understand what’s going on. We’ll just have to make this clear in documentation and examples: - https://github.com/dagger/dagger/issues/3617
https://github.com/dagger/dagger/issues/5124
https://github.com/dagger/dagger/pull/5481
9d87f496046ccfc5ec82d86a7c0aea71933df3a1
9aff03b6150c1ab45189523a63f2a97f1ddac283
2023-05-10T15:14:10Z
go
2023-07-18T18:03:07Z
sdk/go/api.gen.go
q *querybuilder.Selection c graphql.Client id *SecretID plaintext *string } func (r *Secret) ID(ctx context.Context) (SecretID, error) { if r.id != nil { return *r.id, nil } 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_GraphQLIDType() string { return "SecretID" } func (r *Secret) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil }
closed
dagger/dagger
https://github.com/dagger/dagger
5,124
Deprecate `exitCode`
## Summary I’m proposing we deprecate `exitCode` in favor of [`sync`](https://github.com/dagger/dagger/pull/5071) and [`ExecError`](https://github.com/dagger/dagger/pull/5184) as an alternative solution to https://github.com/dagger/dagger/issues/3192. ## Motivation The `Container.exitCode` field doesn’t make sense because you always get zero on success and you can’t get the non-zero value when the command fails due to a bug: - https://github.com/dagger/dagger/issues/3192 So since the result on success is useless, just replace with `sync`: - https://github.com/dagger/dagger/pull/5071 But if you do need the non-zero exit code value, you can get it from `ExecError`: - https://github.com/dagger/dagger/pull/5184 ## Examples **Don't care about the result** ```diff - _, err := ctr.ExitCode(ctx) + _, err := ctr.Sync(ctx) if err != nil { return err } ``` **Need the exit code** ```go func GetExitCode(ctr *dagger.Container) (int, error) { _, err := ctr.Sync(ctx) if e, ok := err.(*dagger.ExecError); ok { return e.ExitCode, nil } return 0, err } ``` ## Specification Just add the deprecation in the API: ```diff type Container { """ Exit code of the last executed command. Zero means success. Will execute default command if none is set, or error if there's no default. """ - exitCode: Int! + exitCode: Int! @deprecated(reason: "Use `sync` instead.") } ``` ## Caveat There is one big difference between `ExitCode(ctx)` and `Sync(ctx)`. While the former triggers command execution, defaulting to the entrypoint and default args if no `WithExec` is defined in the pipeline, the latter does not. Just “renaming” to a new `.Run(ctx)` that behaves the same doesn’t seem worth it. And some users don’t actually want to run the command (e.g., just do a `Dockerfile` build), so it pays to understand what’s going on. We’ll just have to make this clear in documentation and examples: - https://github.com/dagger/dagger/issues/3617
https://github.com/dagger/dagger/issues/5124
https://github.com/dagger/dagger/pull/5481
9d87f496046ccfc5ec82d86a7c0aea71933df3a1
9aff03b6150c1ab45189523a63f2a97f1ddac283
2023-05-10T15:14:10Z
go
2023-07-18T18:03:07Z
sdk/go/api.gen.go
func (r *Secret) Plaintext(ctx context.Context) (string, error) { if r.plaintext != nil { return *r.plaintext, nil } q := r.q.Select("plaintext") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } type Socket struct { q *querybuilder.Selection c graphql.Client id *SocketID } func (r *Socket) ID(ctx context.Context) (SocketID, error) { if r.id != nil { return *r.id, nil } q := r.q.Select("id") var response SocketID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } func (r *Socket) XXX_GraphQLType() string { return "Socket" } func (r *Socket) XXX_GraphQLIDType() string { return "SocketID" } func (r *Socket) XXX_GraphQLID(ctx context.Context) (string, error) {
closed
dagger/dagger
https://github.com/dagger/dagger
5,124
Deprecate `exitCode`
## Summary I’m proposing we deprecate `exitCode` in favor of [`sync`](https://github.com/dagger/dagger/pull/5071) and [`ExecError`](https://github.com/dagger/dagger/pull/5184) as an alternative solution to https://github.com/dagger/dagger/issues/3192. ## Motivation The `Container.exitCode` field doesn’t make sense because you always get zero on success and you can’t get the non-zero value when the command fails due to a bug: - https://github.com/dagger/dagger/issues/3192 So since the result on success is useless, just replace with `sync`: - https://github.com/dagger/dagger/pull/5071 But if you do need the non-zero exit code value, you can get it from `ExecError`: - https://github.com/dagger/dagger/pull/5184 ## Examples **Don't care about the result** ```diff - _, err := ctr.ExitCode(ctx) + _, err := ctr.Sync(ctx) if err != nil { return err } ``` **Need the exit code** ```go func GetExitCode(ctr *dagger.Container) (int, error) { _, err := ctr.Sync(ctx) if e, ok := err.(*dagger.ExecError); ok { return e.ExitCode, nil } return 0, err } ``` ## Specification Just add the deprecation in the API: ```diff type Container { """ Exit code of the last executed command. Zero means success. Will execute default command if none is set, or error if there's no default. """ - exitCode: Int! + exitCode: Int! @deprecated(reason: "Use `sync` instead.") } ``` ## Caveat There is one big difference between `ExitCode(ctx)` and `Sync(ctx)`. While the former triggers command execution, defaulting to the entrypoint and default args if no `WithExec` is defined in the pipeline, the latter does not. Just “renaming” to a new `.Run(ctx)` that behaves the same doesn’t seem worth it. And some users don’t actually want to run the command (e.g., just do a `Dockerfile` build), so it pays to understand what’s going on. We’ll just have to make this clear in documentation and examples: - https://github.com/dagger/dagger/issues/3617
https://github.com/dagger/dagger/issues/5124
https://github.com/dagger/dagger/pull/5481
9d87f496046ccfc5ec82d86a7c0aea71933df3a1
9aff03b6150c1ab45189523a63f2a97f1ddac283
2023-05-10T15:14:10Z
go
2023-07-18T18:03:07Z
sdk/go/api.gen.go
id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } type CacheSharingMode string const ( Locked CacheSharingMode = "LOCKED" Private CacheSharingMode = "PRIVATE" Shared CacheSharingMode = "SHARED" ) type ImageLayerCompression string const ( Estargz ImageLayerCompression = "EStarGZ" Gzip ImageLayerCompression = "Gzip" Uncompressed ImageLayerCompression = "Uncompressed" Zstd ImageLayerCompression = "Zstd" ) type ImageMediaTypes string const ( Dockermediatypes ImageMediaTypes = "DockerMediaTypes" Ocimediatypes ImageMediaTypes = "OCIMediaTypes" ) type NetworkProtocol string const ( Tcp NetworkProtocol = "TCP" Udp NetworkProtocol = "UDP" )
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
core/schema/container.go
package schema import ( "fmt" "os" "path" "strconv" "strings" "github.com/containerd/containerd/content" "github.com/dagger/dagger/core" "github.com/dagger/dagger/core/pipeline" "github.com/dagger/dagger/router" "github.com/moby/buildkit/frontend/dockerfile/shell" specs "github.com/opencontainers/image-spec/specs-go/v1" ) type containerSchema struct {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
core/schema/container.go
*baseSchema host *core.Host ociStore content.Store } var _ router.ExecutableSchema = &containerSchema{} func (s *containerSchema) Name() string { return "container" } func (s *containerSchema) Schema() string { return Container } func (s *containerSchema) Resolvers() router.Resolvers { return router.Resolvers{ "ContainerID": stringResolver(core.ContainerID("")), "Query": router.ObjectResolver{ "container": router.ToResolver(s.container), }, "Container": router.ObjectResolver{ "id": router.ToResolver(s.id), "sync": router.ToResolver(s.sync), "from": router.ToResolver(s.from), "build": router.ToResolver(s.build), "rootfs": router.ToResolver(s.rootfs), "pipeline": router.ToResolver(s.pipeline), "fs": router.ToResolver(s.rootfs),
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
core/schema/container.go
"withRootfs": router.ToResolver(s.withRootfs), "withFS": router.ToResolver(s.withRootfs), "file": router.ToResolver(s.file), "directory": router.ToResolver(s.directory), "user": router.ToResolver(s.user), "withUser": router.ToResolver(s.withUser), "workdir": router.ToResolver(s.workdir), "withWorkdir": router.ToResolver(s.withWorkdir), "envVariables": router.ToResolver(s.envVariables), "envVariable": router.ToResolver(s.envVariable), "withEnvVariable": router.ToResolver(s.withEnvVariable), "withSecretVariable": router.ToResolver(s.withSecretVariable), "withoutEnvVariable": router.ToResolver(s.withoutEnvVariable), "withLabel": router.ToResolver(s.withLabel), "label": router.ToResolver(s.label), "labels": router.ToResolver(s.labels), "withoutLabel": router.ToResolver(s.withoutLabel), "entrypoint": router.ToResolver(s.entrypoint), "withEntrypoint": router.ToResolver(s.withEntrypoint), "defaultArgs": router.ToResolver(s.defaultArgs), "withDefaultArgs": router.ToResolver(s.withDefaultArgs), "mounts": router.ToResolver(s.mounts), "withMountedDirectory": router.ToResolver(s.withMountedDirectory), "withMountedFile": router.ToResolver(s.withMountedFile), "withMountedTemp": router.ToResolver(s.withMountedTemp), "withMountedCache": router.ToResolver(s.withMountedCache), "withMountedSecret": router.ToResolver(s.withMountedSecret), "withUnixSocket": router.ToResolver(s.withUnixSocket), "withoutUnixSocket": router.ToResolver(s.withoutUnixSocket), "withoutMount": router.ToResolver(s.withoutMount),
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
core/schema/container.go
"withFile": router.ToResolver(s.withFile), "withNewFile": router.ToResolver(s.withNewFile), "withDirectory": router.ToResolver(s.withDirectory), "withExec": router.ToResolver(s.withExec), "exec": router.ToResolver(s.withExec), "exitCode": router.ToResolver(s.exitCode), "stdout": router.ToResolver(s.stdout), "stderr": router.ToResolver(s.stderr), "publish": router.ToResolver(s.publish), "platform": router.ToResolver(s.platform), "export": router.ToResolver(s.export), "import": router.ToResolver(s.import_), "withRegistryAuth": router.ToResolver(s.withRegistryAuth), "withoutRegistryAuth": router.ToResolver(s.withoutRegistryAuth), "imageRef": router.ToResolver(s.imageRef), "withExposedPort": router.ToResolver(s.withExposedPort), "withoutExposedPort": router.ToResolver(s.withoutExposedPort), "exposedPorts": router.ToResolver(s.exposedPorts), "hostname": router.ToResolver(s.hostname), "endpoint": router.ToResolver(s.endpoint), "withServiceBinding": router.ToResolver(s.withServiceBinding), "withFocus": router.ToResolver(s.withFocus), "withoutFocus": router.ToResolver(s.withoutFocus), }, } } func (s *containerSchema) Dependencies() []router.ExecutableSchema { return nil } type containerArgs struct {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
core/schema/container.go
ID core.ContainerID Platform *specs.Platform } func (s *containerSchema) container(ctx *router.Context, parent *core.Query, args containerArgs) (*core.Container, error) { platform := s.baseSchema.platform if args.Platform != nil { if args.ID != "" { return nil, fmt.Errorf("cannot specify both existing container ID and platform") } platform = *args.Platform } ctr, err := core.NewContainer(args.ID, parent.PipelinePath(), platform) if err != nil { return nil, err } return ctr, err } func (s *containerSchema) sync(ctx *router.Context, parent *core.Container, _ any) (core.ContainerID, error) { err := parent.Evaluate(ctx.Context, s.gw) if err != nil { return "", err } return parent.ID() } func (s *containerSchema) id(ctx *router.Context, parent *core.Container, args any) (core.ContainerID, error) { return parent.ID() } type containerFromArgs struct {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
core/schema/container.go
Address string } func (s *containerSchema) from(ctx *router.Context, parent *core.Container, args containerFromArgs) (*core.Container, error) { return parent.From(ctx, s.gw, args.Address) } type containerBuildArgs struct { Context core.DirectoryID Dockerfile string BuildArgs []core.BuildArg Target string Secrets []core.SecretID } func (s *containerSchema) build(ctx *router.Context, parent *core.Container, args containerBuildArgs) (*core.Container, error) { dir, err := args.Context.ToDirectory() if err != nil { return nil, err } return parent.Build(ctx, s.gw, dir, args.Dockerfile, args.BuildArgs, args.Target, args.Secrets) } type containerWithRootFSArgs struct {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
core/schema/container.go
ID core.DirectoryID } func (s *containerSchema) withRootfs(ctx *router.Context, parent *core.Container, args containerWithRootFSArgs) (*core.Container, error) { dir, err := args.ID.ToDirectory() if err != nil { return nil, err } return parent.WithRootFS(ctx, dir) } type containerPipelineArgs struct { Name string Description string Labels []pipeline.Label } func (s *containerSchema) pipeline(ctx *router.Context, parent *core.Container, args containerPipelineArgs) (*core.Container, error) { return parent.WithPipeline(ctx, args.Name, args.Description, args.Labels) } func (s *containerSchema) rootfs(ctx *router.Context, parent *core.Container, args any) (*core.Directory, error) { return parent.RootFS(ctx) } type containerExecArgs struct {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
core/schema/container.go
core.ContainerExecOpts } func (s *containerSchema) withExec(ctx *router.Context, parent *core.Container, args containerExecArgs) (*core.Container, error) { progSock := &core.Socket{HostPath: s.progSock} return parent.WithExec(ctx, s.gw, progSock, s.baseSchema.platform, args.ContainerExecOpts) } func (s *containerSchema) withDefaultExec(ctx *router.Context, parent *core.Container) (*core.Container, error) { if parent.Meta == nil { return s.withExec(ctx, parent, containerExecArgs{}) } return parent, nil } func (s *containerSchema) exitCode(ctx *router.Context, parent *core.Container, args any) (int, error) { progSock := &core.Socket{HostPath: s.progSock} return parent.ExitCode(ctx, s.gw, progSock) } func (s *containerSchema) stdout(ctx *router.Context, parent *core.Container, args any) (string, error) { progSock := &core.Socket{HostPath: s.progSock} return parent.MetaFileContents(ctx, s.gw, progSock, "stdout") } func (s *containerSchema) stderr(ctx *router.Context, parent *core.Container, args any) (string, error) { progSock := &core.Socket{HostPath: s.progSock} return parent.MetaFileContents(ctx, s.gw, progSock, "stderr") } type containerWithEntrypointArgs struct {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
core/schema/container.go
Args []string } func (s *containerSchema) withEntrypoint(ctx *router.Context, parent *core.Container, args containerWithEntrypointArgs) (*core.Container, error) { return parent.UpdateImageConfig(ctx, func(cfg specs.ImageConfig) specs.ImageConfig { cfg.Entrypoint = args.Args return cfg }) } func (s *containerSchema) entrypoint(ctx *router.Context, parent *core.Container, args containerWithVariableArgs) ([]string, error) { cfg, err := parent.ImageConfig(ctx) if err != nil { return nil, err } return cfg.Entrypoint, nil } type containerWithDefaultArgs struct {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
core/schema/container.go
Args *[]string } func (s *containerSchema) withDefaultArgs(ctx *router.Context, parent *core.Container, args containerWithDefaultArgs) (*core.Container, error) { return parent.UpdateImageConfig(ctx, func(cfg specs.ImageConfig) specs.ImageConfig { if args.Args == nil { cfg.Cmd = []string{} return cfg } cfg.Cmd = *args.Args return cfg }) } func (s *containerSchema) defaultArgs(ctx *router.Context, parent *core.Container, args any) ([]string, error) { cfg, err := parent.ImageConfig(ctx) if err != nil { return nil, err } return cfg.Cmd, nil } type containerWithUserArgs struct {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
core/schema/container.go
Name string } func (s *containerSchema) withUser(ctx *router.Context, parent *core.Container, args containerWithUserArgs) (*core.Container, error) { return parent.UpdateImageConfig(ctx, func(cfg specs.ImageConfig) specs.ImageConfig { cfg.User = args.Name return cfg }) } func (s *containerSchema) user(ctx *router.Context, parent *core.Container, args containerWithVariableArgs) (string, error) { cfg, err := parent.ImageConfig(ctx) if err != nil { return "", err } return cfg.User, nil } type containerWithWorkdirArgs struct {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
core/schema/container.go
Path string } func (s *containerSchema) withWorkdir(ctx *router.Context, parent *core.Container, args containerWithWorkdirArgs) (*core.Container, error) { return parent.UpdateImageConfig(ctx, func(cfg specs.ImageConfig) specs.ImageConfig { cfg.WorkingDir = absPath(cfg.WorkingDir, args.Path) return cfg }) } func (s *containerSchema) workdir(ctx *router.Context, parent *core.Container, args containerWithVariableArgs) (string, error) { cfg, err := parent.ImageConfig(ctx) if err != nil { return "", err } return cfg.WorkingDir, nil } type containerWithVariableArgs struct {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
core/schema/container.go
Name string Value string Expand bool } func (s *containerSchema) withEnvVariable(ctx *router.Context, parent *core.Container, args containerWithVariableArgs) (*core.Container, error) { return parent.UpdateImageConfig(ctx, func(cfg specs.ImageConfig) specs.ImageConfig { value := args.Value if args.Expand { value = os.Expand(value, func(k string) string { v, _ := core.LookupEnv(cfg.Env, k) return v }) } cfg.Env = core.AddEnv(cfg.Env, args.Name, value) return cfg }) } type containerWithoutVariableArgs struct {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
core/schema/container.go
Name string } func (s *containerSchema) withoutEnvVariable(ctx *router.Context, parent *core.Container, args containerWithoutVariableArgs) (*core.Container, error) { return parent.UpdateImageConfig(ctx, func(cfg specs.ImageConfig) specs.ImageConfig { newEnv := []string{} core.WalkEnv(cfg.Env, func(k, _, env string) { if !shell.EqualEnvKeys(k, args.Name) { newEnv = append(newEnv, env) } }) cfg.Env = newEnv return cfg }) } type EnvVariable struct {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
core/schema/container.go
Name string `json:"name"` Value string `json:"value"` } func (s *containerSchema) envVariables(ctx *router.Context, parent *core.Container, args any) ([]EnvVariable, error) { cfg, err := parent.ImageConfig(ctx) if err != nil { return nil, err } vars := make([]EnvVariable, 0, len(cfg.Env)) core.WalkEnv(cfg.Env, func(k, v, _ string) { vars = append(vars, EnvVariable{Name: k, Value: v}) }) return vars, nil } type containerVariableArgs struct { Name string } func (s *containerSchema) envVariable(ctx *router.Context, parent *core.Container, args containerVariableArgs) (*string, error) { cfg, err := parent.ImageConfig(ctx) if err != nil { return nil, err } if val, ok := core.LookupEnv(cfg.Env, args.Name); ok { return &val, nil } return nil, nil } type Label struct {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
core/schema/container.go
Name string `json:"name"` Value string `json:"value"` } func (s *containerSchema) labels(ctx *router.Context, parent *core.Container, args any) ([]Label, error) { cfg, err := parent.ImageConfig(ctx) if err != nil { return nil, err } labels := make([]Label, 0, len(cfg.Labels)) for name, value := range cfg.Labels { label := Label{ Name: name, Value: value, } labels = append(labels, label) } return labels, nil } type containerLabelArgs struct {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
core/schema/container.go
Name string } func (s *containerSchema) label(ctx *router.Context, parent *core.Container, args containerLabelArgs) (*string, error) { cfg, err := parent.ImageConfig(ctx) if err != nil { return nil, err } if val, ok := cfg.Labels[args.Name]; ok { return &val, nil } return nil, nil } type containerWithMountedDirectoryArgs struct { Path string Source core.DirectoryID Owner string } func (s *containerSchema) withMountedDirectory(ctx *router.Context, parent *core.Container, args containerWithMountedDirectoryArgs) (*core.Container, error) { dir, err := args.Source.ToDirectory() if err != nil { return nil, err } return parent.WithMountedDirectory(ctx, s.gw, args.Path, dir, args.Owner) } type containerPublishArgs struct {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
core/schema/container.go
Address string PlatformVariants []core.ContainerID ForcedCompression core.ImageLayerCompression MediaTypes core.ImageMediaTypes } func (s *containerSchema) publish(ctx *router.Context, parent *core.Container, args containerPublishArgs) (string, error) { return parent.Publish(ctx, args.Address, args.PlatformVariants, args.ForcedCompression, args.MediaTypes, s.bkClient, s.solveOpts, s.solveCh) } type containerWithMountedFileArgs struct { Path string Source core.FileID Owner string } func (s *containerSchema) withMountedFile(ctx *router.Context, parent *core.Container, args containerWithMountedFileArgs) (*core.Container, error) { file, err := args.Source.ToFile() if err != nil { return nil, err } return parent.WithMountedFile(ctx, s.gw, args.Path, file, args.Owner) } type containerWithMountedCacheArgs struct {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
core/schema/container.go
Path string Cache core.CacheID Source core.DirectoryID Concurrency core.CacheSharingMode Owner string } func (s *containerSchema) withMountedCache(ctx *router.Context, parent *core.Container, args containerWithMountedCacheArgs) (*core.Container, error) { var dir *core.Directory if args.Source != "" { var err error dir, err = args.Source.ToDirectory() if err != nil { return nil, err } } cache, err := args.Cache.ToCacheVolume() if err != nil { return nil, err } return parent.WithMountedCache(ctx, s.gw, args.Path, cache, dir, args.Concurrency, args.Owner) } type containerWithMountedTempArgs struct {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
core/schema/container.go
Path string } func (s *containerSchema) withMountedTemp(ctx *router.Context, parent *core.Container, args containerWithMountedTempArgs) (*core.Container, error) { return parent.WithMountedTemp(ctx, args.Path) } type containerWithoutMountArgs struct { Path string } func (s *containerSchema) withoutMount(ctx *router.Context, parent *core.Container, args containerWithoutMountArgs) (*core.Container, error) { return parent.WithoutMount(ctx, args.Path) } func (s *containerSchema) mounts(ctx *router.Context, parent *core.Container, _ any) ([]string, error) { return parent.MountTargets(ctx) } type containerWithLabelArgs struct {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
core/schema/container.go
Name string Value string } func (s *containerSchema) withLabel(ctx *router.Context, parent *core.Container, args containerWithLabelArgs) (*core.Container, error) { return parent.UpdateImageConfig(ctx, func(cfg specs.ImageConfig) specs.ImageConfig { if cfg.Labels == nil { cfg.Labels = make(map[string]string) } cfg.Labels[args.Name] = args.Value return cfg }) } type containerWithoutLabelArgs struct { Name string } func (s *containerSchema) withoutLabel(ctx *router.Context, parent *core.Container, args containerWithoutLabelArgs) (*core.Container, error) { return parent.UpdateImageConfig(ctx, func(cfg specs.ImageConfig) specs.ImageConfig { delete(cfg.Labels, args.Name) return cfg }) } type containerDirectoryArgs struct { Path string } func (s *containerSchema) directory(ctx *router.Context, parent *core.Container, args containerDirectoryArgs) (*core.Directory, error) { return parent.Directory(ctx, s.gw, args.Path) } type containerFileArgs struct {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
core/schema/container.go
Path string } func (s *containerSchema) file(ctx *router.Context, parent *core.Container, args containerFileArgs) (*core.File, error) { return parent.File(ctx, s.gw, args.Path) } func absPath(workDir string, containerPath string) string { if path.IsAbs(containerPath) { return containerPath } if workDir == "" { workDir = "/" } return path.Join(workDir, containerPath) } type containerWithSecretVariableArgs struct { Name string Secret core.SecretID } func (s *containerSchema) withSecretVariable(ctx *router.Context, parent *core.Container, args containerWithSecretVariableArgs) (*core.Container, error) { secret, err := args.Secret.ToSecret() if err != nil { return nil, err } return parent.WithSecretVariable(ctx, args.Name, secret) } type containerWithMountedSecretArgs struct {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
core/schema/container.go
Path string Source core.SecretID Owner string } func (s *containerSchema) withMountedSecret(ctx *router.Context, parent *core.Container, args containerWithMountedSecretArgs) (*core.Container, error) { secret, err := args.Source.ToSecret() if err != nil { return nil, err } return parent.WithMountedSecret(ctx, s.gw, args.Path, secret, args.Owner) } type containerWithDirectoryArgs struct { withDirectoryArgs Owner string } func (s *containerSchema) withDirectory(ctx *router.Context, parent *core.Container, args containerWithDirectoryArgs) (*core.Container, error) { dir, err := args.Directory.ToDirectory() if err != nil { return nil, err } return parent.WithDirectory(ctx, s.gw, args.Path, dir, args.CopyFilter, args.Owner) } type containerWithFileArgs struct {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
core/schema/container.go
withFileArgs Owner string } func (s *containerSchema) withFile(ctx *router.Context, parent *core.Container, args containerWithFileArgs) (*core.Container, error) { file, err := args.Source.ToFile() if err != nil { return nil, err } return parent.WithFile(ctx, s.gw, args.Path, file, args.Permissions, args.Owner) } type containerWithNewFileArgs struct { withNewFileArgs Owner string } func (s *containerSchema) withNewFile(ctx *router.Context, parent *core.Container, args containerWithNewFileArgs) (*core.Container, error) { return parent.WithNewFile(ctx, s.gw, args.Path, []byte(args.Contents), args.Permissions, args.Owner) } type containerWithUnixSocketArgs struct { Path string Source core.SocketID Owner string } func (s *containerSchema) withUnixSocket(ctx *router.Context, parent *core.Container, args containerWithUnixSocketArgs) (*core.Container, error) { socket, err := args.Source.ToSocket() if err != nil { return nil, err } return parent.WithUnixSocket(ctx, s.gw, args.Path, socket, args.Owner) } type containerWithoutUnixSocketArgs struct {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
core/schema/container.go
Path string } func (s *containerSchema) withoutUnixSocket(ctx *router.Context, parent *core.Container, args containerWithoutUnixSocketArgs) (*core.Container, error) { return parent.WithoutUnixSocket(ctx, args.Path) } func (s *containerSchema) platform(ctx *router.Context, parent *core.Container, args any) (specs.Platform, error) { return parent.Platform, nil } type containerExportArgs struct { Path string PlatformVariants []core.ContainerID ForcedCompression core.ImageLayerCompression MediaTypes core.ImageMediaTypes } func (s *containerSchema) export(ctx *router.Context, parent *core.Container, args containerExportArgs) (bool, error) { if err := parent.Export(ctx, s.host, args.Path, args.PlatformVariants, args.ForcedCompression, args.MediaTypes, s.bkClient, s.solveOpts, s.solveCh); err != nil { return false, err } return true, nil } type containerImportArgs struct {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
core/schema/container.go
Source core.FileID Tag string } func (s *containerSchema) import_(ctx *router.Context, parent *core.Container, args containerImportArgs) (*core.Container, error) { return parent.Import(ctx, s.gw, s.host, args.Source, args.Tag, s.ociStore) } type containerWithRegistryAuthArgs struct { Address string `json:"address"` Username string `json:"username"` Secret core.SecretID `json:"secret"` } func (s *containerSchema) withRegistryAuth(ctx *router.Context, parents *core.Container, args containerWithRegistryAuthArgs) (*core.Container, error) { secretBytes, err := s.secrets.GetSecret(ctx, args.Secret.String()) if err != nil { return nil, err } if err := s.auth.AddCredential(args.Address, args.Username, string(secretBytes)); err != nil { return nil, err } return parents, nil } type containerWithoutRegistryAuthArgs struct {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
core/schema/container.go
Address string } func (s *containerSchema) withoutRegistryAuth(_ *router.Context, parents *core.Container, args containerWithoutRegistryAuthArgs) (*core.Container, error) { if err := s.auth.RemoveCredential(args.Address); err != nil { return nil, err } return parents, nil } func (s *containerSchema) imageRef(ctx *router.Context, parent *core.Container, args containerWithVariableArgs) (string, error) { return parent.ImageRefOrErr(ctx, s.gw) } func (s *containerSchema) hostname(ctx *router.Context, parent *core.Container, args any) (string, error) { if !s.servicesEnabled { return "", ErrServicesDisabled } parent, err := s.withDefaultExec(ctx, parent) if err != nil { return "", err } return parent.HostnameOrErr() } type containerEndpointArgs struct {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
core/schema/container.go
Port int Scheme string } func (s *containerSchema) endpoint(ctx *router.Context, parent *core.Container, args containerEndpointArgs) (string, error) { if !s.servicesEnabled { return "", ErrServicesDisabled } parent, err := s.withDefaultExec(ctx, parent) if err != nil { return "", err } return parent.Endpoint(args.Port, args.Scheme) } type containerWithServiceDependencyArgs struct {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
core/schema/container.go
Service core.ContainerID Alias string } func (s *containerSchema) withServiceBinding(ctx *router.Context, parent *core.Container, args containerWithServiceDependencyArgs) (*core.Container, error) { if !s.servicesEnabled { return nil, ErrServicesDisabled } svc, err := args.Service.ToContainer() if err != nil { return nil, err } svc, err = s.withDefaultExec(ctx, svc) if err != nil { return nil, err } return parent.WithServiceBinding(svc, args.Alias) } type containerWithExposedPortArgs struct {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
core/schema/container.go
Protocol core.NetworkProtocol Port int Description *string } func (s *containerSchema) withExposedPort(ctx *router.Context, parent *core.Container, args containerWithExposedPortArgs) (*core.Container, error) { if !s.servicesEnabled { return nil, ErrServicesDisabled } return parent.WithExposedPort(core.ContainerPort{ Protocol: args.Protocol, Port: args.Port, Description: args.Description, }) } type containerWithoutExposedPortArgs struct { Protocol core.NetworkProtocol Port int } func (s *containerSchema) withoutExposedPort(ctx *router.Context, parent *core.Container, args containerWithoutExposedPortArgs) (*core.Container, error) { if !s.servicesEnabled { return nil, ErrServicesDisabled } return parent.WithoutExposedPort(args.Port, args.Protocol) } type ExposedPort struct {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
core/schema/container.go
Port int `json:"port"` Protocol string `json:"protocol"` Description *string `json:"description,omitempty"` } func (s *containerSchema) exposedPorts(ctx *router.Context, parent *core.Container, args any) ([]ExposedPort, error) { if !s.servicesEnabled { return nil, ErrServicesDisabled } ports := make(map[string]ExposedPort, len(parent.Ports)) for _, p := range parent.Ports { ociPort := fmt.Sprintf("%d/%s", p.Port, p.Protocol.Network()) ports[ociPort] = ExposedPort{ Port: p.Port, Protocol: string(p.Protocol), Description: p.Description, } } exposedPorts := []ExposedPort{} for ociPort := range parent.Config.ExposedPorts { p, exists := ports[ociPort]
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
core/schema/container.go
if !exists { port, proto, ok := strings.Cut(ociPort, "/") if !ok { continue } portNr, err := strconv.Atoi(port) if err != nil { continue } p = ExposedPort{ Port: portNr, Protocol: strings.ToUpper(proto), } } exposedPorts = append(exposedPorts, p) } return exposedPorts, nil } func (s *containerSchema) withFocus(ctx *router.Context, parent *core.Container, args any) (*core.Container, error) { child := parent.Clone() child.Focused = true return child, nil } func (s *containerSchema) withoutFocus(ctx *router.Context, parent *core.Container, args any) (*core.Container, error) { child := parent.Clone() child.Focused = false return child, nil }
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
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 ProjectCommandID string type ProjectID string type SecretID string type SocketID string type BuildArg struct { Name string `json:"name"` Value string `json:"value"` } type PipelineLabel struct { Name string `json:"name"` Value string `json:"value"` } type CacheVolume struct {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
sdk/go/api.gen.go
q *querybuilder.Selection c graphql.Client id *CacheID } func (r *CacheVolume) ID(ctx context.Context) (CacheID, error) { if r.id != nil { return *r.id, nil } 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_GraphQLIDType() string { return "CacheID" } 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
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
sdk/go/api.gen.go
q *querybuilder.Selection c graphql.Client endpoint *string envVariable *string exitCode *int export *bool hostname *string id *ContainerID imageRef *string label *string platform *Platform publish *string stderr *string stdout *string sync *ContainerID user *string workdir *string } type WithContainerFunc func(r *Container) *Container func (r *Container) With(f WithContainerFunc) *Container { return f(r) } type ContainerBuildOpts struct {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
sdk/go/api.gen.go
Dockerfile string BuildArgs []BuildArg Target string Secrets []*Secret } func (r *Container) Build(context *Directory, opts ...ContainerBuildOpts) *Container { q := r.q.Select("build") for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Dockerfile) { q = q.Arg("dockerfile", opts[i].Dockerfile) } if !querybuilder.IsZeroValue(opts[i].BuildArgs) { q = q.Arg("buildArgs", opts[i].BuildArgs) }
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
sdk/go/api.gen.go
if !querybuilder.IsZeroValue(opts[i].Target) { q = q.Arg("target", opts[i].Target) } if !querybuilder.IsZeroValue(opts[i].Secrets) { q = q.Arg("secrets", opts[i].Secrets) } } q = q.Arg("context", context) 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, } } type ContainerEndpointOpts struct {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
sdk/go/api.gen.go
Port int Scheme string } func (r *Container) Endpoint(ctx context.Context, opts ...ContainerEndpointOpts) (string, error) { if r.endpoint != nil { return *r.endpoint, nil } q := r.q.Select("endpoint") for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Port) { q = q.Arg("port", opts[i].Port)
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
sdk/go/api.gen.go
} if !querybuilder.IsZeroValue(opts[i].Scheme) { q = q.Arg("scheme", opts[i].Scheme) } } var response string q = q.Bind(&response) return response, q.Execute(ctx, 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) { if r.envVariable != nil { return *r.envVariable, nil } 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") q = q.Select("name value") type envVariables struct {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
sdk/go/api.gen.go
Name string Value string } convert := func(fields []envVariables) []EnvVariable { out := []EnvVariable{} for i := range fields { out = append(out, EnvVariable{name: &fields[i].Name, value: &fields[i].Value}) } return out } var response []envVariables q = q.Bind(&response) err := q.Execute(ctx, r.c) if err != nil { return nil, err } return convert(response), nil } type ContainerExecOpts struct {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
sdk/go/api.gen.go
Args []string Stdin string RedirectStdout string RedirectStderr string ExperimentalPrivilegedNesting bool } 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) } if !querybuilder.IsZeroValue(opts[i].Stdin) {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
sdk/go/api.gen.go
q = q.Arg("stdin", opts[i].Stdin) } if !querybuilder.IsZeroValue(opts[i].RedirectStdout) { q = q.Arg("redirectStdout", opts[i].RedirectStdout) } if !querybuilder.IsZeroValue(opts[i].RedirectStderr) { q = q.Arg("redirectStderr", opts[i].RedirectStderr) } if !querybuilder.IsZeroValue(opts[i].ExperimentalPrivilegedNesting) { q = q.Arg("experimentalPrivilegedNesting", opts[i].ExperimentalPrivilegedNesting) } } return &Container{ q: q, c: r.c, } } func (r *Container) ExitCode(ctx context.Context) (int, error) { if r.exitCode != nil { return *r.exitCode, nil } q := r.q.Select("exitCode") var response int q = q.Bind(&response) return response, q.Execute(ctx, r.c) } type ContainerExportOpts struct {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
sdk/go/api.gen.go
PlatformVariants []*Container ForcedCompression ImageLayerCompression
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
sdk/go/api.gen.go
MediaTypes ImageMediaTypes } func (r *Container) Export(ctx context.Context, path string, opts ...ContainerExportOpts) (bool, error) { if r.export != nil { return *r.export, nil } q := r.q.Select("export") for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].PlatformVariants) { q = q.Arg("platformVariants", opts[i].PlatformVariants) } if !querybuilder.IsZeroValue(opts[i].ForcedCompression) { q = q.Arg("forcedCompression", opts[i].ForcedCompression) } if !querybuilder.IsZeroValue(opts[i].MediaTypes) { q = q.Arg("mediaTypes", opts[i].MediaTypes) } } q = q.Arg("path", path) var response bool q = q.Bind(&response) return response, q.Execute(ctx, r.c) } func (r *Container) ExposedPorts(ctx context.Context) ([]Port, error) { q := r.q.Select("exposedPorts") q = q.Select("description port protocol") type exposedPorts struct {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
sdk/go/api.gen.go
Description string Port int Protocol NetworkProtocol } convert := func(fields []exposedPorts) []Port { out := []Port{} for i := range fields { out = append(out, Port{description: &fields[i].Description, port: &fields[i].Port, protocol: &fields[i].Protocol}) } return out } var response []exposedPorts q = q.Bind(&response) err := q.Execute(ctx, r.c) if err != nil { return nil, err } return convert(response), nil } func (r *Container) File(path string) *File { q := r.q.Select("file") q = q.Arg("path", path) return &File{
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
sdk/go/api.gen.go
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, } } func (r *Container) Hostname(ctx context.Context) (string, error) { if r.hostname != nil { return *r.hostname, nil } q := r.q.Select("hostname") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } func (r *Container) ID(ctx context.Context) (ContainerID, error) { if r.id != nil {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
sdk/go/api.gen.go
return *r.id, nil } 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_GraphQLIDType() string { return "ContainerID" } 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) ImageRef(ctx context.Context) (string, error) { if r.imageRef != nil { return *r.imageRef, nil } q := r.q.Select("imageRef") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } type ContainerImportOpts struct {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
sdk/go/api.gen.go
Tag string } func (r *Container) Import(source *File, opts ...ContainerImportOpts) *Container { q := r.q.Select("import") for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Tag) { q = q.Arg("tag", opts[i].Tag) } } q = q.Arg("source", source) return &Container{ q: q, c: r.c, } } func (r *Container) Label(ctx context.Context, name string) (string, error) { if r.label != nil { return *r.label, nil } q := r.q.Select("label") q = q.Arg("name", name) var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c)
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
sdk/go/api.gen.go
} func (r *Container) Labels(ctx context.Context) ([]Label, error) { q := r.q.Select("labels") q = q.Select("name value") type labels struct { Name string Value string } convert := func(fields []labels) []Label { out := []Label{} for i := range fields { out = append(out, Label{name: &fields[i].Name, value: &fields[i].Value}) } return out } var response []labels q = q.Bind(&response) err := q.Execute(ctx, r.c) if err != nil { return nil, err } return convert(response), 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) } type ContainerPipelineOpts struct {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
sdk/go/api.gen.go
Description string Labels []PipelineLabel } func (r *Container) Pipeline(name string, opts ...ContainerPipelineOpts) *Container { q := r.q.Select("pipeline") for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Description) { q = q.Arg("description", opts[i].Description) } if !querybuilder.IsZeroValue(opts[i].Labels) { q = q.Arg("labels", opts[i].Labels) } } q = q.Arg("name", name) return &Container{ q: q,
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
sdk/go/api.gen.go
c: r.c, } } func (r *Container) Platform(ctx context.Context) (Platform, error) { if r.platform != nil { return *r.platform, nil } q := r.q.Select("platform") var response Platform q = q.Bind(&response) return response, q.Execute(ctx, r.c) } type ContainerPublishOpts struct { PlatformVariants []*Container ForcedCompression ImageLayerCompression MediaTypes ImageMediaTypes } func (r *Container) Publish(ctx context.Context, address string, opts ...ContainerPublishOpts) (string, error) { if r.publish != nil { return *r.publish, nil
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
sdk/go/api.gen.go
} q := r.q.Select("publish") for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].PlatformVariants) { q = q.Arg("platformVariants", opts[i].PlatformVariants) } if !querybuilder.IsZeroValue(opts[i].ForcedCompression) { q = q.Arg("forcedCompression", opts[i].ForcedCompression) } if !querybuilder.IsZeroValue(opts[i].MediaTypes) { q = q.Arg("mediaTypes", opts[i].MediaTypes) } } q = q.Arg("address", address) var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } func (r *Container) Rootfs() *Directory { q := r.q.Select("rootfs") return &Directory{ q: q, c: r.c, } } func (r *Container) Stderr(ctx context.Context) (string, error) { if r.stderr != nil {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
sdk/go/api.gen.go
return *r.stderr, nil } q := r.q.Select("stderr") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } func (r *Container) Stdout(ctx context.Context) (string, error) { if r.stdout != nil { return *r.stdout, nil } q := r.q.Select("stdout") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } func (r *Container) Sync(ctx context.Context) (*Container, error) { q := r.q.Select("sync") return r, q.Execute(ctx, r.c) } func (r *Container) User(ctx context.Context) (string, error) { if r.user != nil { return *r.user, nil } q := r.q.Select("user") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } type ContainerWithDefaultArgsOpts struct {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
sdk/go/api.gen.go
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) } } return &Container{ q: q, c: r.c, } } type ContainerWithDirectoryOpts struct { Exclude []string Include []string Owner string } func (r *Container) WithDirectory(path string, directory *Directory, opts ...ContainerWithDirectoryOpts) *Container { q := r.q.Select("withDirectory")
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
sdk/go/api.gen.go
for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Exclude) { q = q.Arg("exclude", opts[i].Exclude) } if !querybuilder.IsZeroValue(opts[i].Include) { q = q.Arg("include", opts[i].Include) } if !querybuilder.IsZeroValue(opts[i].Owner) { q = q.Arg("owner", opts[i].Owner) } } q = q.Arg("path", path) q = q.Arg("directory", directory) 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, } } type ContainerWithEnvVariableOpts struct {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
sdk/go/api.gen.go
Expand bool } func (r *Container) WithEnvVariable(name string, value string, opts ...ContainerWithEnvVariableOpts) *Container { q := r.q.Select("withEnvVariable") for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Expand) { q = q.Arg("expand", opts[i].Expand) } } q = q.Arg("name", name) q = q.Arg("value", value) return &Container{ q: q, c: r.c, } } type ContainerWithExecOpts struct {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
sdk/go/api.gen.go
SkipEntrypoint bool Stdin string RedirectStdout string RedirectStderr string ExperimentalPrivilegedNesting bool InsecureRootCapabilities bool } func (r *Container) WithExec(args []string, opts ...ContainerWithExecOpts) *Container { q := r.q.Select("withExec") for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].SkipEntrypoint) {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
sdk/go/api.gen.go
q = q.Arg("skipEntrypoint", opts[i].SkipEntrypoint) } if !querybuilder.IsZeroValue(opts[i].Stdin) { q = q.Arg("stdin", opts[i].Stdin) } if !querybuilder.IsZeroValue(opts[i].RedirectStdout) { q = q.Arg("redirectStdout", opts[i].RedirectStdout) } if !querybuilder.IsZeroValue(opts[i].RedirectStderr) { q = q.Arg("redirectStderr", opts[i].RedirectStderr) } if !querybuilder.IsZeroValue(opts[i].ExperimentalPrivilegedNesting) { q = q.Arg("experimentalPrivilegedNesting", opts[i].ExperimentalPrivilegedNesting) } if !querybuilder.IsZeroValue(opts[i].InsecureRootCapabilities) { q = q.Arg("insecureRootCapabilities", opts[i].InsecureRootCapabilities) } } q = q.Arg("args", args) return &Container{ q: q, c: r.c, } } type ContainerWithExposedPortOpts struct {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
sdk/go/api.gen.go
Protocol NetworkProtocol Description string } func (r *Container) WithExposedPort(port int, opts ...ContainerWithExposedPortOpts) *Container { q := r.q.Select("withExposedPort") for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Protocol) { q = q.Arg("protocol", opts[i].Protocol) } if !querybuilder.IsZeroValue(opts[i].Description) { q = q.Arg("description", opts[i].Description) } } q = q.Arg("port", port) 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,
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
sdk/go/api.gen.go
c: r.c, } } type ContainerWithFileOpts struct { Permissions int Owner string } func (r *Container) WithFile(path string, source *File, opts ...ContainerWithFileOpts) *Container { q := r.q.Select("withFile") for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Permissions) { q = q.Arg("permissions", opts[i].Permissions) } if !querybuilder.IsZeroValue(opts[i].Owner) { q = q.Arg("owner", opts[i].Owner) } } q = q.Arg("path", path) q = q.Arg("source", source) return &Container{
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
sdk/go/api.gen.go
q: q, c: r.c, } } func (r *Container) WithFocus() *Container { q := r.q.Select("withFocus") return &Container{ q: q, c: r.c, } } func (r *Container) WithLabel(name string, value string) *Container { q := r.q.Select("withLabel") q = q.Arg("name", name) q = q.Arg("value", value) return &Container{ q: q, c: r.c, } } type ContainerWithMountedCacheOpts struct { Source *Directory Sharing CacheSharingMode
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
sdk/go/api.gen.go
Owner string } func (r *Container) WithMountedCache(path string, cache *CacheVolume, opts ...ContainerWithMountedCacheOpts) *Container { q := r.q.Select("withMountedCache") for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Source) { q = q.Arg("source", opts[i].Source) } if !querybuilder.IsZeroValue(opts[i].Sharing) { q = q.Arg("sharing", opts[i].Sharing) } if !querybuilder.IsZeroValue(opts[i].Owner) { q = q.Arg("owner", opts[i].Owner) } } q = q.Arg("path", path) q = q.Arg("cache", cache) return &Container{ q: q, c: r.c, } } type ContainerWithMountedDirectoryOpts struct {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
sdk/go/api.gen.go
Owner string } func (r *Container) WithMountedDirectory(path string, source *Directory, opts ...ContainerWithMountedDirectoryOpts) *Container { q := r.q.Select("withMountedDirectory") for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Owner) { q = q.Arg("owner", opts[i].Owner) } } q = q.Arg("path", path) q = q.Arg("source", source) return &Container{ q: q, c: r.c, } } type ContainerWithMountedFileOpts struct {
closed
dagger/dagger
https://github.com/dagger/dagger
4,192
Rename `id` argument name in fields that don’t return its type
Some top-level fields return an object if you have their ID: ```graphql type Query { container(id: ContainerID, platform: Platform): Container! directory(id: DirectoryID): Directory! file(id: FileID!): File secret(id: SecretID!): Secret! socket(id: SocketID): Socket! } ``` There’s one exception to this “rule”. I think it makes sense for us to rename this parameter to make it more consistent: ```diff type Container { "Initializes this container from this DirectoryID." - withRootfs(id: DirectoryID!): Container! + withRootfs(directory: DirectoryID!): Container! } ``` ### Notes - `directory` is consistent with `withDirectory(path: String!, directory: DirectoryID!)`. `withRootfs` is similar just with `path` set to `/`; - `Container.withFS` doesn’t matter as it’s deprecated and is going to be removed; - Downside is the breaking change but for codegen clients, `withRootfs`‘s `id` being a required argument, the name is hidden from usage so it shouldn’t actually break most users; - This was surfaced in https://github.com/dagger/dagger/issues/4191.
https://github.com/dagger/dagger/issues/4192
https://github.com/dagger/dagger/pull/5513
18f57d142656400fd6318d1d6ed486101f3c14d6
cf4c4689391d801fbfee00a56134ba03417eb8c2
2022-12-13T23:59:19Z
go
2023-07-27T18:08:17Z
sdk/go/api.gen.go
Owner string } func (r *Container) WithMountedFile(path string, source *File, opts ...ContainerWithMountedFileOpts) *Container { q := r.q.Select("withMountedFile") for i := len(opts) - 1; i >= 0; i-- { if !querybuilder.IsZeroValue(opts[i].Owner) { q = q.Arg("owner", opts[i].Owner) } } q = q.Arg("path", path) q = q.Arg("source", source) return &Container{ q: q, c: r.c, } } type ContainerWithMountedSecretOpts struct {