diff --git a/.changes/.next b/.changes/.next index c777b038a8..2a7a9aba82 100644 --- a/.changes/.next +++ b/.changes/.next @@ -7,5 +7,3 @@ # This file can also be left empty - if it is, then the next version is # automagically determined from release note entries (and then adding to the # patch release). - -v0.15.0 diff --git a/.changes/unreleased/Added-20241026-123323.yaml b/.changes/unreleased/Added-20241026-123323.yaml deleted file mode 100644 index 0d7ac4d450..0000000000 --- a/.changes/unreleased/Added-20241026-123323.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: Added -body: added dagger uninstall command to remove a dependency -time: 2024-10-26T12:33:23.212344+05:30 -custom: - Author: rajatjindal - PR: "8745" diff --git a/.changes/unreleased/Added-20241114-115027.yaml b/.changes/unreleased/Added-20241114-115027.yaml deleted file mode 100644 index 3734818b46..0000000000 --- a/.changes/unreleased/Added-20241114-115027.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: Added -body: 'engine: add memory telemetry for execs' -time: 2024-11-14T11:50:27.77939-08:00 -custom: - Author: cwlbraa - PR: "8880" diff --git a/.changes/unreleased/Added-20241114-123823.yaml b/.changes/unreleased/Added-20241114-123823.yaml deleted file mode 100644 index 8ee315c231..0000000000 --- a/.changes/unreleased/Added-20241114-123823.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: Added -body: 'engine: added network telemetry for execs' -time: 2024-11-14T12:38:23.340204-08:00 -custom: - Author: cwlbraa - PR: "8902" diff --git a/.changes/unreleased/Added-20241120-140601.yaml b/.changes/unreleased/Added-20241120-140601.yaml deleted file mode 100644 index 2edc3d0eb0..0000000000 --- a/.changes/unreleased/Added-20241120-140601.yaml +++ /dev/null @@ -1,15 +0,0 @@ -kind: Added -body: |- - Custom dagger `engine.json` config file - - This new config file in `~/.config/dagger/engine.json` is intended to - eventually replace the old buildkit-style `engine.toml` file that's - currently used for configuration. - - This file can be either mounted directly into a manually started engine at - `/etc/dagger/engine.toml`, or it will automatically mounted from the - `~/.config` location when the engine is started. -time: 2024-11-20T14:06:01.621193876Z -custom: - Author: jedevc - PR: "8800" diff --git a/.changes/unreleased/Added-20241126-203335.yaml b/.changes/unreleased/Added-20241126-203335.yaml deleted file mode 100644 index e09e281cea..0000000000 --- a/.changes/unreleased/Added-20241126-203335.yaml +++ /dev/null @@ -1,11 +0,0 @@ -kind: Added -body: | - Filesync performance is improved - - The engine now re-uses previously loaded data more reliably and in more cases, which speeds up repeated reloads of the same or similar (i.e. overlapping data). - - Uncached filesyncs of large amounts of data is also faster and uses less memory in the engine. -time: 2024-11-26T20:33:35.827404235-08:00 -custom: - Author: sipsma - PR: "8818" diff --git a/.changes/unreleased/Fixed-20241112-151649.yaml b/.changes/unreleased/Fixed-20241112-151649.yaml deleted file mode 100644 index 618f4fe71e..0000000000 --- a/.changes/unreleased/Fixed-20241112-151649.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: Fixed -body: Correctly apply ignore pattern when pulling a directory from git -time: 2024-11-12T15:16:49.67229+01:00 -custom: - Author: TomChv - PR: "8931" diff --git a/.changes/unreleased/Fixed-20241113-221407.yaml b/.changes/unreleased/Fixed-20241113-221407.yaml deleted file mode 100644 index 15dd4679f1..0000000000 --- a/.changes/unreleased/Fixed-20241113-221407.yaml +++ /dev/null @@ -1,7 +0,0 @@ -kind: Fixed -body: | - Directory.terminal API works now -time: 2024-11-13T22:14:07.998787448-08:00 -custom: - Author: sipsma - PR: "8952" diff --git a/.changes/unreleased/Fixed-20241120-160241.yaml b/.changes/unreleased/Fixed-20241120-160241.yaml deleted file mode 100644 index bc40b3be61..0000000000 --- a/.changes/unreleased/Fixed-20241120-160241.yaml +++ /dev/null @@ -1,7 +0,0 @@ -kind: Fixed -body: | - Fix resource leaks in the engine that occurred after each debug terminal was opened. -time: 2024-11-20T16:02:41.381210606-08:00 -custom: - Author: sipsma - PR: "9013" diff --git a/.changes/unreleased/Fixed-20241121-155915.yaml b/.changes/unreleased/Fixed-20241121-155915.yaml deleted file mode 100644 index 0804f2fb14..0000000000 --- a/.changes/unreleased/Fixed-20241121-155915.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: Fixed -body: Allow `Container.withExec` `expect` to catch exit code 128 -time: 2024-11-21T15:59:15.645085385Z -custom: - Author: jedevc - PR: "9027" diff --git a/.changes/unreleased/Fixed-20241121-211357.yaml b/.changes/unreleased/Fixed-20241121-211357.yaml deleted file mode 100644 index f5c76293bb..0000000000 --- a/.changes/unreleased/Fixed-20241121-211357.yaml +++ /dev/null @@ -1,7 +0,0 @@ -kind: Fixed -body: | - Fix cache mounts not being included in interactive debug containers. -time: 2024-11-21T21:13:57.27419464-08:00 -custom: - Author: sipsma - PR: "9034" diff --git a/.changes/v0.15.0.md b/.changes/v0.15.0.md new file mode 100644 index 0000000000..2114c79270 --- /dev/null +++ b/.changes/v0.15.0.md @@ -0,0 +1,40 @@ +## v0.15.0 - 2024-12-11 + +### ๐Ÿ”ฅ Breaking Changes +- `Container.asService` now uses the command specified by `withDefaultArgs` instead of the last `withExec` command by @rajatjindal in https://github.com/dagger/dagger/pull/8865 \ + Users can override the args by providing the `args` option to `asService`. + They can also configure the container to use the container entrypoint by using + `useEntrypoint` option. + +### Added +- Better TUI errors, new cached/pending states, duration accounting and fewer spans by @vito in https://github.com/dagger/dagger/pull/8442 +- Custom dagger `engine.json` config file by @jedevc in https://github.com/dagger/dagger/pull/8800 \ + This new config file format is intended to eventually replace the old + buildkit-style `engine.toml` file that's currently used for configuration. + + This file can be either mounted directly into a manually started engine at + `/etc/dagger/engine.toml`, or it will automatically mounted from the + user's `~/.config/dagger/engine.json` when the engine is started. +- Filesync performance is improved by @sipsma in https://github.com/dagger/dagger/pull/8818 \ + The engine now re-uses previously loaded data more reliably and in more + cases, which speeds up repeated reloads of the same or similar (i.e. + overlapping data). + + Uncached filesyncs of large amounts of data is also faster and uses less + memory in the engine. +- Added `dagger uninstall` command to remove a dependency by @rajatjindal in https://github.com/dagger/dagger/pull/8745 +- Added memory and network telemetry for execs by @cwlbraa in https://github.com/dagger/dagger/pull/8880 https://github.com/dagger/dagger/pull/8902 +- Added `DAGGER_LEAVE_OLD_ENGINE` environment variable to optionally prevent removal of old engine containers during upgrades by [devin](https://github.com/apps/devin-ai-integration) in https://github.com/dagger/dagger/pull/8195 + +### Fixed +- `Directory.terminal` API works now by @sipsma in https://github.com/dagger/dagger/pull/8952 +- Fix resource leaks in the engine that occurred after each debug terminal was opened by @sipsma in https://github.com/dagger/dagger/pull/9013 +- Fix cache mounts not being included in interactive debug containers by @sipsma in https://github.com/dagger/dagger/pull/9034 +- Allow `Container.withExec` `expect` to catch exit code 128 by @jedevc in https://github.com/dagger/dagger/pull/9027 +- Correctly apply ignore pattern when pulling a directory from git by @TomChv in https://github.com/dagger/dagger/pull/8931 +- Fix panic on null `Directory.digest` by @jedevc in https://github.com/dagger/dagger/pull/8946 + +### What to do next? +- Read the [documentation](https://docs.dagger.io) +- Join our [Discord server](https://discord.gg/dagger-io) +- Follow us on [Twitter](https://twitter.com/dagger_io) diff --git a/.changes/v0.15.1.md b/.changes/v0.15.1.md new file mode 100644 index 0000000000..24a4eba550 --- /dev/null +++ b/.changes/v0.15.1.md @@ -0,0 +1,9 @@ +## v0.15.1 - 2024-12-12 + +### Fixed +- Metrics display in the TUI is fixed to display for all executed containers, rather than just services by @sipsma in https://github.com/dagger/dagger/pull/9171 + +### What to do next? +- Read the [documentation](https://docs.dagger.io) +- Join our [Discord server](https://discord.gg/dagger-io) +- Follow us on [Twitter](https://twitter.com/dagger_io) diff --git a/.dagger/build/sdk.go b/.dagger/build/sdk.go index 38d5b6f4ca..b6ff934060 100644 --- a/.dagger/build/sdk.go +++ b/.dagger/build/sdk.go @@ -71,7 +71,7 @@ func (build *Builder) pythonSDKContent(ctx context.Context) (*sdkContent, error) func (build *Builder) typescriptSDKContent(ctx context.Context) (*sdkContent, error) { rootfs := dag.Directory().WithDirectory("/", build.source.Directory("sdk/typescript"), dagger.DirectoryWithDirectoryOpts{ Include: []string{ - "**/*.ts", + "src/**/*.ts", "LICENSE", "README.md", "runtime", @@ -79,13 +79,12 @@ func (build *Builder) typescriptSDKContent(ctx context.Context) (*sdkContent, er "dagger.json", }, Exclude: []string{ - "node_modules", - "dist", - "**/test", - "**/*.spec.ts", - "dev", + "src/**/test/*", + "src/**/*.spec.ts", + "src/provisioning", }, }) + sdkCtrTarball := dag.Container(). WithRootfs(rootfs). WithFile("/codegen", build.CodegenBinary()). diff --git a/.dagger/cli.go b/.dagger/cli.go index c4b2dff462..052439fcf6 100644 --- a/.dagger/cli.go +++ b/.dagger/cli.go @@ -3,8 +3,10 @@ package main import ( "context" "fmt" + "net/url" "strings" + "golang.org/x/mod/semver" "golang.org/x/sync/errgroup" "github.com/dagger/dagger/.dagger/build" @@ -25,7 +27,8 @@ func (cli *CLI) Binary( const ( // https://github.com/goreleaser/goreleaser/releases - goReleaserVersion = "v2.3.2" + goReleaserVersion = "v2.4.8" + goReleaserImage = "ghcr.io/goreleaser/goreleaser-pro:" + goReleaserVersion + "-pro" ) // Publish the CLI using GoReleaser @@ -42,7 +45,6 @@ func (cli *CLI) Publish( awsRegion string, awsBucket string, - awsCloudfrontDistribution string, artefactsFQDN string, ) error { ctr, err := publishEnv(ctx) @@ -87,7 +89,6 @@ func (cli *CLI) Publish( WithSecretVariable("AWS_SECRET_ACCESS_KEY", awsSecretAccessKey). WithEnvVariable("AWS_REGION", awsRegion). WithEnvVariable("AWS_BUCKET", awsBucket). - WithEnvVariable("AWS_CLOUDFRONT_DISTRIBUTION_ID", awsCloudfrontDistribution). WithEnvVariable("ARTEFACTS_FQDN", artefactsFQDN). WithEnvVariable("ENGINE_VERSION", cli.Dagger.Version). WithEnvVariable("ENGINE_TAG", cli.Dagger.Tag). @@ -99,6 +100,57 @@ func (cli *CLI) Publish( return err } +func (cli *CLI) PublishMetadata( + ctx context.Context, + + awsAccessKeyID *dagger.Secret, + awsSecretAccessKey *dagger.Secret, + awsRegion string, + awsBucket string, + awsCloudfrontDistribution string, +) error { + ctr := dag. + Alpine(dagger.AlpineOpts{ + Packages: []string{"aws-cli"}, + }). + Container(). + WithWorkdir("/src"). + WithDirectory(".", cli.Dagger.Source()). + WithSecretVariable("AWS_ACCESS_KEY_ID", awsAccessKeyID). + WithSecretVariable("AWS_SECRET_ACCESS_KEY", awsSecretAccessKey). + WithEnvVariable("AWS_REGION", awsRegion). + WithEnvVariable("AWS_EC2_METADATA_DISABLED", "true") + + // update install scripts + ctr = ctr. + WithExec([]string{"aws", "s3", "cp", "./install.sh", s3Path(awsBucket, "dagger/install.sh")}). + WithExec([]string{"aws", "s3", "cp", "./install.ps1", s3Path(awsBucket, "dagger/install.ps1")}). + WithExec([]string{"aws", "cloudfront", "create-invalidation", "--distribution-id", awsCloudfrontDistribution, "--paths", "/dagger/install.sh", "/dagger/install.ps1"}) + + // update version pointers (only on proper releases) + if version := cli.Dagger.Version; semver.IsValid(version) && semver.Prerelease(version) == "" { + cpOpts := dagger.ContainerWithExecOpts{ + Stdin: strings.TrimPrefix(version, "v"), + } + ctr = ctr. + WithExec([]string{"aws", "s3", "cp", "-", s3Path(awsBucket, "dagger/latest_version")}, cpOpts). + WithExec([]string{"aws", "s3", "cp", "-", s3Path(awsBucket, "dagger/versions/latest")}, cpOpts). + WithExec([]string{"aws", "s3", "cp", "-", s3Path(awsBucket, "dagger/versions/%s", strings.TrimPrefix(semver.MajorMinor(version), "v"))}, cpOpts) + } + + _, err := ctr.Sync(ctx) + return err +} + +func s3Path(bucket string, path string, args ...any) string { + u := url.URL{ + Scheme: "s3", + Host: bucket, + Path: fmt.Sprintf(path, args...), + } + return u.String() +} + // Verify that the CLI builds without actually publishing anything func (cli *CLI) TestPublish(ctx context.Context) error { // TODO: ideally this would also use go releaser, but we want to run this @@ -151,14 +203,14 @@ func (cli *CLI) TestPublish(ctx context.Context) error { } func publishEnv(ctx context.Context) (*dagger.Container, error) { - // TODO: remove after upgrading to GoReleaser Pro has go 1.23.2 (it currently only has go 1.23.1) - go1_23_2 := dag.Container().From("golang:1.23.2-alpine@sha256:9dd2625a1ff2859b8d8b01d8f7822c0f528942fe56cfe7a1e7c38d3b8d72d679").Directory("/usr/local/go") - - ctr := dag.Container(). - From(fmt.Sprintf("ghcr.io/goreleaser/goreleaser-pro:%s-pro", goReleaserVersion)). - WithDirectory("/usr/local/go", go1_23_2). - WithEntrypoint([]string{}). - WithExec([]string{"apk", "add", "aws-cli"}) + ctr := dag.Container().From(goReleaserImage) + + // HACK: this can be enabled to force a go update (e.g. when we need it for + // a security update) + // ctr = ctr.WithDirectory( + // "/usr/local/go", + // dag.Container().From("golang:-alpine@sha256:").Directory("/usr/local/go"), + // ) // install nix ctr = ctr. diff --git a/.dagger/docker.go b/.dagger/docker.go new file mode 100644 index 0000000000..c42df4fc9d --- /dev/null +++ b/.dagger/docker.go @@ -0,0 +1,122 @@ +package main + +import ( + "context" + "fmt" + "strings" + + "github.com/dagger/dagger/.dagger/internal/dagger" + "github.com/dagger/dagger/engine/distconsts" + "github.com/moby/buildkit/identity" +) + +// LoadToDocker loads the engine container into docker +func (e *DaggerEngine) LoadToDocker( + ctx context.Context, + + docker *dagger.Socket, + name string, + + // +optional + platform dagger.Platform, + + // Set target distro + // +optional + image *Distro, + // Enable experimental GPU support + // +optional + gpuSupport bool, +) (*LoadedEngine, error) { + ctr, err := e.Container(ctx, platform, image, gpuSupport) + if err != nil { + return nil, err + } + tar := ctr.AsTarball(dagger.ContainerAsTarballOpts{ + // use gzip to avoid incompatibility w/ older docker versions + ForcedCompression: dagger.ImageLayerCompressionGzip, + }) + + loader := dag.Container(). + From("docker:cli"). + WithUnixSocket("/var/run/docker.sock", docker). + WithMountedFile("/image.tar.gz", tar). + WithEnvVariable("CACHEBUSTER", identity.NewID()) + + stdout, err := loader. + WithExec([]string{"docker", "load", "-i", "/image.tar.gz"}). + Stdout(ctx) + if err != nil { + return nil, fmt.Errorf("docker load failed: %w", err) + } + + _, imageID, ok := strings.Cut(stdout, "Loaded image ID: sha256:") + if !ok { + _, imageID, ok = strings.Cut(stdout, "Loaded image: sha256:") // podman + if !ok { + return nil, fmt.Errorf("unexpected output from docker load") + } + } + imageID = strings.TrimSpace(imageID) + + _, err = loader. + WithExec([]string{"docker", "tag", imageID, name}). + Sync(ctx) + if err != nil { + return nil, fmt.Errorf("docker tag failed: %w", err) + } + + return &LoadedEngine{ + Loader: loader, + Image: name, + GPUSupport: gpuSupport, + }, nil +} + +type LoadedEngine struct { + Loader *dagger.Container // +private + Image string + + GPUSupport bool // +private +} + +// Start the loaded engine container +func (e LoadedEngine) Start( + ctx context.Context, + + // +optional + // +default="dagger-engine.dev" + name string, + // +optional + cloudToken *dagger.Secret, +) error { + loader := e.Loader + + _, err := loader.WithExec([]string{"docker", "rm", "-fv", name}).Sync(ctx) + if err != nil { + return err + } + + args := []string{ + "docker", + "run", + "-d", + } + if e.GPUSupport { + args = append(args, "--gpus", "all") + loader = loader.WithEnvVariable("_EXPERIMENTAL_DAGGER_GPU_SUPPORT", "true") + } + if cloudToken != nil { + // NOTE: this is only for connecting to dagger cloud's cache service + args = append(args, "-e", "DAGGER_CLOUD_TOKEN") + loader = loader.WithSecretVariable("DAGGER_CLOUD_TOKEN", cloudToken) + } + args = append(args, []string{ + "-v", name + ":" + distconsts.EngineDefaultStateDir, + "--name", name, + "--privileged", + }...) + args = append(args, e.Image, "--extra-debug", "--debugaddr=0.0.0.0:6060") + + _, err = loader.WithExec(args).Sync(ctx) + return err +} diff --git a/.dagger/docs.go b/.dagger/docs.go index db95443e95..e858f63c42 100644 --- a/.dagger/docs.go +++ b/.dagger/docs.go @@ -38,7 +38,8 @@ func (d Docs) Site() *dagger.Directory { Docusaurus( d.Dagger.Source(), dagger.DocusaurusOpts{ - Dir: "/src/docs", + Dir: "/src/docs", + Yarn: true, // HACK: cache seems to cause weird ephemeral errors occasionally - // probably because of cache sharing DisableCache: true, diff --git a/.dagger/engine.go b/.dagger/engine.go index ade7c5bc21..ec56caa3f8 100644 --- a/.dagger/engine.go +++ b/.dagger/engine.go @@ -163,14 +163,13 @@ func (e *DaggerEngine) Service( // only one engine can run off it's local state dir at a time; Private means that we will attempt to re-use // these cache volumes if they are not already locked to another running engine but otherwise will create a new // one, which gets us best-effort cache re-use for these nested engine services - Sharing: dagger.Private, - }). - WithExec(nil, dagger.ContainerWithExecOpts{ - UseEntrypoint: true, - InsecureRootCapabilities: true, + Sharing: dagger.CacheSharingModePrivate, }) - return devEngine.AsService(), nil + return devEngine.AsService(dagger.ContainerAsServiceOpts{ + UseEntrypoint: true, + InsecureRootCapabilities: true, + }), nil } // Lint the engine diff --git a/.dagger/go.mod b/.dagger/go.mod index 14f9c7c08c..5da12c99ca 100644 --- a/.dagger/go.mod +++ b/.dagger/go.mod @@ -2,18 +2,18 @@ module github.com/dagger/dagger/.dagger go 1.23.2 -require github.com/dagger/dagger/engine/distconsts v0.14.0 +require github.com/dagger/dagger/engine/distconsts v0.15.0 replace github.com/dagger/dagger/engine/distconsts => ../engine/distconsts require ( - github.com/99designs/gqlgen v0.17.55 + github.com/99designs/gqlgen v0.17.57 github.com/Khan/genqlient v0.7.0 github.com/containerd/platforms v0.2.1 github.com/magefile/mage v1.15.0 github.com/moby/buildkit v0.14.0-rc1.0.20240603193914-3d789eb740a9 github.com/opencontainers/image-spec v1.1.0 - github.com/vektah/gqlparser/v2 v2.5.17 + github.com/vektah/gqlparser/v2 v2.5.19 go.opentelemetry.io/otel v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 @@ -26,8 +26,8 @@ require ( go.opentelemetry.io/proto/otlp v1.3.1 golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 golang.org/x/mod v0.20.0 - golang.org/x/sync v0.8.0 - google.golang.org/grpc v1.66.1 + golang.org/x/sync v0.10.0 + google.golang.org/grpc v1.68.0 ) require ( @@ -42,17 +42,18 @@ require ( github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/sosodev/duration v1.3.1 // indirect + github.com/stretchr/testify v1.10.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect go.opentelemetry.io/otel/metric v1.27.0 go.opentelemetry.io/otel/sdk/metric v1.27.0 golang.org/x/net v0.29.0 // indirect - golang.org/x/sys v0.26.0 // indirect - golang.org/x/text v0.18.0 // indirect + golang.org/x/sys v0.28.0 // indirect + golang.org/x/text v0.21.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect - google.golang.org/protobuf v1.34.2 // indirect + google.golang.org/protobuf v1.35.2 // indirect ) replace go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc => go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 diff --git a/.dagger/go.sum b/.dagger/go.sum index 6c13d106ae..10040609c8 100644 --- a/.dagger/go.sum +++ b/.dagger/go.sum @@ -1,5 +1,5 @@ -github.com/99designs/gqlgen v0.17.55 h1:3vzrNWYyzSZjGDFo68e5j9sSauLxfKvLp+6ioRokVtM= -github.com/99designs/gqlgen v0.17.55/go.mod h1:3Bq768f8hgVPGZxL8aY9MaYmbxa6llPM/qu1IGH1EJo= +github.com/99designs/gqlgen v0.17.57 h1:Ak4p60BRq6QibxY0lEc0JnQhDurfhxA67sp02lMjmPc= +github.com/99designs/gqlgen v0.17.57/go.mod h1:Jx61hzOSTcR4VJy/HFIgXiQ5rJ0Ypw8DxWLjbYDAUw0= github.com/Khan/genqlient v0.7.0 h1:GZ1meyRnzcDTK48EjqB8t3bcfYvHArCUUvgOwpz1D4w= github.com/Khan/genqlient v0.7.0/go.mod h1:HNyy3wZvuYwmW3Y7mkoQLZsa/R5n5yIRajS1kPBvSFM= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= @@ -18,6 +18,8 @@ github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= @@ -48,10 +50,10 @@ github.com/sosodev/duration v1.3.1/go.mod h1:RQIBBX0+fMLc/D9+Jb/fwvVmo0eZvDDEERA github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/vektah/gqlparser/v2 v2.5.17 h1:9At7WblLV7/36nulgekUgIaqHZWn5hxqluxrxGUhOmI= -github.com/vektah/gqlparser/v2 v2.5.17/go.mod h1:1lz1OeCqgQbQepsGxPVywrjdBHW2T08PUS3pJqepRww= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/vektah/gqlparser/v2 v2.5.19 h1:bhCPCX1D4WWzCDvkPl4+TP1N8/kLrWnp43egplt7iSg= +github.com/vektah/gqlparser/v2 v2.5.19/go.mod h1:y7kvl5bBlDeuWIvLtA9849ncyvx6/lj06RsMrEjVy3U= go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 h1:oM0GTNKGlc5qHctWeIGTVyda4iFFalOzMZ3Ehj5rwB4= @@ -90,21 +92,21 @@ golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= -golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= -golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= -golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= -golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 h1:hjSy6tcFQZ171igDaN5QHOw2n6vx40juYbC/x67CEhc= google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:qpvKtACPCQhAdu3PyQgV4l3LMXZEtft7y8QcarRsp9I= google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= -google.golang.org/grpc v1.66.1 h1:hO5qAXR19+/Z44hmvIM4dQFMSYX9XcWsByfoxutBpAM= -google.golang.org/grpc v1.66.1/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= -google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= -google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +google.golang.org/grpc v1.68.0 h1:aHQeeJbo8zAkAa3pRzrVjZlbz6uSfeOXlJNQM0RAbz0= +google.golang.org/grpc v1.68.0/go.mod h1:fmSPC5AsjSBCK54MyHRx48kpOti1/jRfOlwEWywNjWA= +google.golang.org/protobuf v1.35.2 h1:8Ar7bF+apOIoThw1EdZl0p1oWvMqTHmpA2fRTyZO8io= +google.golang.org/protobuf v1.35.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/.dagger/mage/engine.go b/.dagger/mage/engine.go index ca91ff39c6..01e2451025 100644 --- a/.dagger/mage/engine.go +++ b/.dagger/mage/engine.go @@ -21,6 +21,11 @@ var ( EngineContainerName = distconsts.EngineContainerName ) +func shouldLeaveOldEngine() bool { + val := os.Getenv("DAGGER_LEAVE_OLD_ENGINE") + return val != "" && val != "0" && strings.ToLower(val) != "false" +} + func init() { if v, ok := os.LookupEnv(util.DevContainerEnvName); ok { EngineContainerName = v @@ -86,12 +91,14 @@ func (t Engine) Dev(ctx context.Context) error { return fmt.Errorf("docker tag %s %s: %w: %s", imageID, imageName, err, output) } - if output, err := exec.CommandContext(ctx, "docker", - "rm", - "-fv", - containerName, - ).CombinedOutput(); err != nil { - return fmt.Errorf("docker rm: %w: %s", err, output) + if !shouldLeaveOldEngine() { + if output, err := exec.CommandContext(ctx, "docker", + "rm", + "-fv", + containerName, + ).CombinedOutput(); err != nil { + return fmt.Errorf("docker rm: %w: %s", err, output) + } } runArgs := []string{ @@ -126,6 +133,12 @@ func (t Engine) Dev(ctx context.Context) error { } fmt.Println("export _EXPERIMENTAL_DAGGER_CLI_BIN=" + binDest) + + if runtime.GOOS != "linux" { + linuxBinDest := filepath.Join(binDir, "dagger-linux") + fmt.Println("export _TEST_DAGGER_CLI_LINUX_BIN=" + linuxBinDest) + } + fmt.Println("export _EXPERIMENTAL_DAGGER_RUNNER_HOST=docker-container://" + containerName) fmt.Println("export _DAGGER_TESTS_ENGINE_TAR=" + filepath.Join(binDir, "engine.tar")) fmt.Println("export PATH=" + binDir + ":$PATH") @@ -146,6 +159,12 @@ func (t Engine) DevEnv(ctx context.Context) { } fmt.Println("export _EXPERIMENTAL_DAGGER_CLI_BIN=" + binDest) + + if runtime.GOOS != "linux" { + linuxBinDest := filepath.Join(binDir, "dagger-linux") + fmt.Println("export _TEST_DAGGER_CLI_LINUX_BIN=" + linuxBinDest) + } + fmt.Println("export _EXPERIMENTAL_DAGGER_RUNNER_HOST=docker-container://" + EngineContainerName) fmt.Println("export _DAGGER_TESTS_ENGINE_TAR=" + filepath.Join(binDir, "engine.tar")) fmt.Println("export PATH=" + binDir + ":$PATH") diff --git a/.dagger/main.go b/.dagger/main.go index ce1998a996..61b802b021 100644 --- a/.dagger/main.go +++ b/.dagger/main.go @@ -300,13 +300,19 @@ func (dev *DaggerDev) DevExport( }) // FIXME: get path from the cli file (windows is already handled) - cliPath := "dagger" + hostCliPath := "dagger" if platformSpec.OS == "windows" { - cliPath += ".exe" + hostCliPath += ".exe" } dir := dag.Directory(). WithFile("engine.tar", engineTar). - WithFile(cliPath, dag.DaggerCli().Binary(dagger.DaggerCliBinaryOpts{Platform: platform})) + WithFile(hostCliPath, dag.DaggerCli().Binary(dagger.DaggerCliBinaryOpts{Platform: platform})) + + // this allows our integration tests to plumb built cli binaries into containers when the host OS doesn't match + if platformSpec.OS != "linux" { + linuxCliPath := "dagger-linux" + dir = dir.WithFile(linuxCliPath, engineCtr.File(cliPath)) + } return dir, nil } diff --git a/.dagger/sdk_elixir.go b/.dagger/sdk_elixir.go index b965d3ee95..a751068e0b 100644 --- a/.dagger/sdk_elixir.go +++ b/.dagger/sdk_elixir.go @@ -100,7 +100,7 @@ func (t ElixirSDK) Generate(ctx context.Context) (*dagger.Directory, error) { // Test the publishing process func (t ElixirSDK) TestPublish(ctx context.Context, tag string) error { - return t.Publish(ctx, tag, true, nil, "https://github.com/dagger/dagger.git", nil) + return t.Publish(ctx, tag, true, nil, "https://github.com/dagger/dagger.git", nil, nil) } // Publish the Elixir SDK @@ -116,8 +116,11 @@ func (t ElixirSDK) Publish( // +optional // +default="https://github.com/dagger/dagger.git" gitRepoSource string, + // +optional githubToken *dagger.Secret, + // +optional + discordWebhook *dagger.Secret, ) error { version := strings.TrimPrefix(tag, "sdk/elixir/") mixFile := "/sdk/elixir/mix.exs" @@ -155,6 +158,13 @@ func (t ElixirSDK) Publish( }); err != nil { return err } + + if err := dag.Releaser().Notify(ctx, gitRepoSource, "sdk/elixir/"+version, "๐Ÿงช Elixir SDK", dagger.ReleaserNotifyOpts{ + DiscordWebhook: discordWebhook, + DryRun: dryRun, + }); err != nil { + return err + } } return nil diff --git a/.dagger/sdk_go.go b/.dagger/sdk_go.go index 5b8ddcf183..3a314bda76 100644 --- a/.dagger/sdk_go.go +++ b/.dagger/sdk_go.go @@ -94,6 +94,7 @@ func (t GoSDK) TestPublish(ctx context.Context, tag string) error { "dagger-ci", "hello@dagger.io", nil, + nil, ) } @@ -120,6 +121,8 @@ func (t GoSDK) Publish( // +optional githubToken *dagger.Secret, + // +optional + discordWebhook *dagger.Secret, ) error { version := strings.TrimPrefix(tag, "sdk/go/") @@ -148,6 +151,13 @@ func (t GoSDK) Publish( }); err != nil { return err } + + if err := dag.Releaser().Notify(ctx, gitRepoSource, "sdk/go/"+version, "๐Ÿน Go SDK", dagger.ReleaserNotifyOpts{ + DiscordWebhook: discordWebhook, + DryRun: dryRun, + }); err != nil { + return err + } } return nil diff --git a/.dagger/sdk_php.go b/.dagger/sdk_php.go index c00ad52c5f..b9c23c279e 100644 --- a/.dagger/sdk_php.go +++ b/.dagger/sdk_php.go @@ -102,7 +102,7 @@ func (t PHPSDK) Generate(ctx context.Context) (*dagger.Directory, error) { // Test the publishing process func (t PHPSDK) TestPublish(ctx context.Context, tag string) error { - return t.Publish(ctx, tag, true, "https://github.com/dagger/dagger-php-sdk.git", "https://github.com/dagger/dagger.git", "dagger-ci", "hello@dagger.io", nil) + return t.Publish(ctx, tag, true, "https://github.com/dagger/dagger-php-sdk.git", "https://github.com/dagger/dagger.git", "dagger-ci", "hello@dagger.io", nil, nil) } // Publish the PHP SDK @@ -128,6 +128,8 @@ func (t PHPSDK) Publish( // +optional githubToken *dagger.Secret, + // +optional + discordWebhook *dagger.Secret, ) error { version := strings.TrimPrefix(tag, "sdk/php/") @@ -154,6 +156,13 @@ func (t PHPSDK) Publish( }); err != nil { return err } + + if err := dag.Releaser().Notify(ctx, gitRepoSource, "sdk/php/"+version, "๐Ÿ˜ PHP SDK", dagger.ReleaserNotifyOpts{ + DiscordWebhook: discordWebhook, + DryRun: dryRun, + }); err != nil { + return err + } } return nil diff --git a/.dagger/sdk_python.go b/.dagger/sdk_python.go index aaf29200e9..bd794a3798 100644 --- a/.dagger/sdk_python.go +++ b/.dagger/sdk_python.go @@ -135,7 +135,7 @@ func (t PythonSDK) Generate(ctx context.Context) (*dagger.Directory, error) { // Test the publishing process func (t PythonSDK) TestPublish(ctx context.Context, tag string) error { - return t.Publish(ctx, tag, true, "", nil, "https://github.com/dagger/dagger.git", nil) + return t.Publish(ctx, tag, true, "", nil, "https://github.com/dagger/dagger.git", nil, nil) } // Publish the Python SDK @@ -154,8 +154,11 @@ func (t PythonSDK) Publish( // +optional // +default="https://github.com/dagger/dagger.git" gitRepoSource string, + // +optional githubToken *dagger.Secret, + // +optional + discordWebhook *dagger.Secret, ) error { version := strings.TrimPrefix(tag, "sdk/python/") @@ -184,6 +187,13 @@ func (t PythonSDK) Publish( }); err != nil { return err } + + if err := dag.Releaser().Notify(ctx, gitRepoSource, "sdk/python/"+version, "๐Ÿ Python SDK", dagger.ReleaserNotifyOpts{ + DiscordWebhook: discordWebhook, + DryRun: dryRun, + }); err != nil { + return err + } } return nil diff --git a/.dagger/sdk_rust.go b/.dagger/sdk_rust.go index 365caa3ef7..f911702c20 100644 --- a/.dagger/sdk_rust.go +++ b/.dagger/sdk_rust.go @@ -92,7 +92,7 @@ func (r RustSDK) Generate(ctx context.Context) (*dagger.Directory, error) { // Test the publishing process func (r RustSDK) TestPublish(ctx context.Context, tag string) error { - return r.Publish(ctx, tag, true, nil, "https://github.com/dagger/dagger.git", nil) + return r.Publish(ctx, tag, true, nil, "https://github.com/dagger/dagger.git", nil, nil) } // Publish the Rust SDK @@ -109,8 +109,11 @@ func (r RustSDK) Publish( // +optional // +default="https://github.com/dagger/dagger.git" gitRepoSource string, + // +optional githubToken *dagger.Secret, + // +optional + discordWebhook *dagger.Secret, ) error { version := strings.TrimPrefix(tag, "sdk/rust/") @@ -155,6 +158,13 @@ func (r RustSDK) Publish( }); err != nil { return err } + + if err := dag.Releaser().Notify(ctx, gitRepoSource, "sdk/rust/"+version, "โš™๏ธ Rust SDK", dagger.ReleaserNotifyOpts{ + DiscordWebhook: discordWebhook, + DryRun: dryRun, + }); err != nil { + return err + } } return nil diff --git a/.dagger/sdk_typescript.go b/.dagger/sdk_typescript.go index ef4bd9cd73..94230f0a00 100644 --- a/.dagger/sdk_typescript.go +++ b/.dagger/sdk_typescript.go @@ -19,7 +19,7 @@ import ( const ( typescriptRuntimeSubdir = "sdk/typescript/runtime" - typescriptGeneratedAPIPath = "sdk/typescript/api/client.gen.ts" + typescriptGeneratedAPIPath = "sdk/typescript/src/api/client.gen.ts" nodePreviousLTS = "20.18.1" nodeCurrentLTS = "22.11.0" @@ -166,7 +166,7 @@ func (t TypescriptSDK) Generate(ctx context.Context) (*dagger.Directory, error) // Test the publishing process func (t TypescriptSDK) TestPublish(ctx context.Context, tag string) error { - return t.Publish(ctx, tag, true, nil, "https://github.com/dagger/dagger.git", nil) + return t.Publish(ctx, tag, true, nil, "https://github.com/dagger/dagger.git", nil, nil) } // Publish the Typescript SDK @@ -182,8 +182,11 @@ func (t TypescriptSDK) Publish( // +optional // +default="https://github.com/dagger/dagger.git" gitRepoSource string, + // +optional githubToken *dagger.Secret, + // +optional + discordWebhook *dagger.Secret, ) error { version := strings.TrimPrefix(tag, "sdk/typescript/") versionFlag := strings.TrimPrefix(version, "v") @@ -228,6 +231,13 @@ always-auth=true`, plaintext) }); err != nil { return err } + + if err := dag.Releaser().Notify(ctx, gitRepoSource, "sdk/typescript/"+version, "โฌข TypeScript SDK", dagger.ReleaserNotifyOpts{ + DiscordWebhook: discordWebhook, + DryRun: dryRun, + }); err != nil { + return err + } } return nil @@ -243,7 +253,7 @@ func (t TypescriptSDK) Bump(ctx context.Context, version string) (*dagger.Direct // NOTE: if you change this path, be sure to update .github/workflows/publish.yml so that // provision tests run whenever this file changes. - return dag.Directory().WithNewFile("sdk/typescript/provisioning/default.ts", engineReference), nil + return dag.Directory().WithNewFile("sdk/typescript/src/provisioning/default.ts", engineReference), nil } func (t TypescriptSDK) nodeJsBase() *dagger.Container { diff --git a/.dagger/test.go b/.dagger/test.go index f8424f5ba9..7d07abd928 100644 --- a/.dagger/test.go +++ b/.dagger/test.go @@ -85,11 +85,10 @@ func (t *Test) Telemetry( WithServiceBinding("privateregistry", privateRegistry()). WithExposedPort(1234, dagger.ContainerWithExposedPortOpts{Protocol: dagger.NetworkProtocolTcp}). WithMountedCache(distconsts.EngineDefaultStateDir, dag.CacheVolume("dagger-dev-engine-test-state"+identity.NewID())). - WithExec(nil, dagger.ContainerWithExecOpts{ + AsService(dagger.ContainerAsServiceOpts{ UseEntrypoint: true, InsecureRootCapabilities: true, - }). - AsService() + }) endpoint, err := devEngineSvc.Endpoint(ctx, dagger.ServiceEndpointOpts{Port: 1234, Scheme: "tcp"}) if err != nil { @@ -321,11 +320,10 @@ func (t *Test) testCmd(ctx context.Context) (*dagger.Container, error) { WithServiceBinding("privateregistry", privateRegistry()). WithExposedPort(1234, dagger.ContainerWithExposedPortOpts{Protocol: dagger.NetworkProtocolTcp}). WithMountedCache(distconsts.EngineDefaultStateDir, dag.CacheVolume("dagger-dev-engine-test-state"+identity.NewID())). - WithExec(nil, dagger.ContainerWithExecOpts{ + AsService(dagger.ContainerAsServiceOpts{ UseEntrypoint: true, InsecureRootCapabilities: true, - }). - AsService() + }) endpoint, err := devEngineSvc.Endpoint(ctx, dagger.ServiceEndpointOpts{Port: 1234, Scheme: "tcp"}) if err != nil { @@ -358,10 +356,7 @@ func registry() *dagger.Service { return dag.Container(). From("registry:2"). WithExposedPort(5000, dagger.ContainerWithExposedPortOpts{Protocol: dagger.NetworkProtocolTcp}). - WithExec(nil, dagger.ContainerWithExecOpts{ - UseEntrypoint: true, - }). - AsService() + AsService(dagger.ContainerAsServiceOpts{UseEntrypoint: true}) } func privateRegistry() *dagger.Service { @@ -373,8 +368,5 @@ func privateRegistry() *dagger.Service { WithEnvVariable("REGISTRY_AUTH_HTPASSWD_REALM", "Registry Realm"). WithEnvVariable("REGISTRY_AUTH_HTPASSWD_PATH", "/auth/htpasswd"). WithExposedPort(5000, dagger.ContainerWithExposedPortOpts{Protocol: dagger.NetworkProtocolTcp}). - WithExec(nil, dagger.ContainerWithExecOpts{ - UseEntrypoint: true, - }). - AsService() + AsService(dagger.ContainerAsServiceOpts{UseEntrypoint: true}) } diff --git a/.github/actions/call/action.yml b/.github/actions/call/action.yml index 67276649f3..7d3cc60c9f 100644 --- a/.github/actions/call/action.yml +++ b/.github/actions/call/action.yml @@ -13,7 +13,7 @@ inputs: version: description: "Dagger version to run against" - default: "v0.14.0" + default: "v0.15.0" required: false dev-engine: diff --git a/.github/dagger.json b/.github/dagger.json index f7c40b58cb..8f45c4890b 100644 --- a/.github/dagger.json +++ b/.github/dagger.json @@ -1,6 +1,6 @@ { "name": "ci", - "engineVersion": "v0.14.0", + "engineVersion": "v0.15.0", "sdk": "go", "dependencies": [ { diff --git a/.github/go.mod b/.github/go.mod index c8f35151c6..6150316b96 100644 --- a/.github/go.mod +++ b/.github/go.mod @@ -23,7 +23,7 @@ require ( go.opentelemetry.io/otel/trace v1.27.0 go.opentelemetry.io/proto/otlp v1.3.1 golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa - golang.org/x/sync v0.8.0 + golang.org/x/sync v0.10.0 google.golang.org/grpc v1.66.1 ) @@ -37,8 +37,8 @@ require ( github.com/sosodev/duration v1.3.1 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect golang.org/x/net v0.29.0 // indirect - golang.org/x/sys v0.26.0 // indirect - golang.org/x/text v0.18.0 // indirect + golang.org/x/sys v0.28.0 // indirect + golang.org/x/text v0.21.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect google.golang.org/protobuf v1.34.2 // indirect diff --git a/.github/go.sum b/.github/go.sum index 5929f90bb5..e19aa4fa2a 100644 --- a/.github/go.sum +++ b/.github/go.sum @@ -71,12 +71,12 @@ golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8 golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= -golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= -golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= -golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= -golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 h1:hjSy6tcFQZ171igDaN5QHOw2n6vx40juYbC/x67CEhc= google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:qpvKtACPCQhAdu3PyQgV4l3LMXZEtft7y8QcarRsp9I= google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= diff --git a/.github/main.go b/.github/main.go index 6640ab974f..675fad45ab 100644 --- a/.github/main.go +++ b/.github/main.go @@ -9,7 +9,7 @@ import ( ) const ( - daggerVersion = "v0.14.0" + daggerVersion = "v0.15.0" upstreamRepository = "dagger/dagger" defaultRunner = "ubuntu-latest" publicToken = "dag_dagger_sBIv6DsjNerWvTqt2bSFeigBUqWxp9bhh3ONSSgeFnw" @@ -163,19 +163,22 @@ func (ci *CI) withPrepareReleaseWorkflow() *CI { TimeoutMinutes: timeoutMinutes, }), WorkflowDefaults: dag.Gha().Workflow("", dagger.GhaWorkflowOpts{ - PullRequestConcurrency: "queue", - Permissions: []dagger.GhaPermission{dagger.GhaPermissionReadContents}, - OnPullRequestOpened: true, - OnPullRequestPaths: []string{".changes/v*.md"}, + PullRequestConcurrency: "queue", + Permissions: []dagger.GhaPermission{dagger.GhaPermissionReadContents}, + OnPullRequestOpened: true, + OnPullRequestReopened: true, + OnPullRequestSynchronize: true, + OnPullRequestReadyForReview: true, + OnPullRequestPaths: []string{".changes/v*.md"}, }), }) w := gha. Workflow("daggerverse-preview"). WithJob(gha.Job( "deploy", - "deploy-preview-with-dagger-main --github-token=env:DAGGER_CI_GITHUB_TOKEN", + "--github-token=env:RELEASE_DAGGER_CI_TOKEN deploy-preview-with-dagger-main --target $GITHUB_REF_NAME --github-assignee $GITHUB_ACTOR", dagger.GhaJobOpts{ - Secrets: []string{"DAGGER_CI_GITHUB_TOKEN"}, + Secrets: []string{"RELEASE_DAGGER_CI_TOKEN"}, Module: "modules/daggerverse", })) diff --git a/.github/workflows/_dagger_on_depot_local_engine.yml b/.github/workflows/_dagger_on_depot_local_engine.yml index ee6cbd81ca..402b04f308 100644 --- a/.github/workflows/_dagger_on_depot_local_engine.yml +++ b/.github/workflows/_dagger_on_depot_local_engine.yml @@ -10,7 +10,8 @@ on: size: description: "Runner size" type: number - required: true + default: 16 + required: false timeout: description: "Timeout if not finished after this many minutes" type: number diff --git a/.github/workflows/_dagger_on_depot_remote_engine.yml b/.github/workflows/_dagger_on_depot_remote_engine.yml index 7131777429..515741857c 100644 --- a/.github/workflows/_dagger_on_depot_remote_engine.yml +++ b/.github/workflows/_dagger_on_depot_remote_engine.yml @@ -15,7 +15,7 @@ on: dagger: description: "Dagger version" type: string - default: "0.14.0" + default: "0.15.0" required: false ubuntu: description: "Ubuntu version" diff --git a/.github/workflows/_dagger_on_namespace_local_engine.yml b/.github/workflows/_dagger_on_namespace_local_engine.yml new file mode 100644 index 0000000000..dd3927a4c6 --- /dev/null +++ b/.github/workflows/_dagger_on_namespace_local_engine.yml @@ -0,0 +1,49 @@ +name: Dagger on Namespace - Local Engine + +on: + workflow_call: + inputs: + function: + description: "Dagger function" + type: string + required: true + size: + description: "Runner size" + type: number + default: 16 + required: false + timeout: + description: "Timeout if not finished after this many minutes" + type: number + default: 10 + required: false + dev: + description: "Use a development version of Dagger" + type: string + default: "false" + required: false + ubuntu: + description: "Ubuntu version" + type: string + default: "24.04" + required: false + +jobs: + local-dagger-engine: + if: ${{ github.repository == 'dagger/dagger' }} + runs-on: + - nscloud-ubuntu-${{ inputs.ubuntu }}-amd64-${{ inputs.size }}x32 + timeout-minutes: ${{ inputs.timeout }} + steps: + - name: Checkout repo + uses: actions/checkout@v4 + - name: ${{ inputs.function }} + uses: ./.github/actions/call + with: + function: ${{ inputs.function }} + dev-engine: ${{ inputs.dev }} + - name: ${{ inputs.function }} (CACHE TEST) + uses: ./.github/actions/call + with: + function: ${{ inputs.function }} + dev-engine: ${{ inputs.dev }} diff --git a/.github/workflows/_dagger_on_namespace_remote_engine.yml b/.github/workflows/_dagger_on_namespace_remote_engine.yml new file mode 100644 index 0000000000..1eb2b4ce09 --- /dev/null +++ b/.github/workflows/_dagger_on_namespace_remote_engine.yml @@ -0,0 +1,52 @@ +name: Dagger on Namespace - Remote Engine + +on: + workflow_call: + inputs: + function: + description: "Dagger function" + type: string + required: true + size: + description: "Runner size - used by the Dagger Engine too" + type: number + default: 16 + required: false + timeout: + description: "Timeout if not finished after this many minutes" + type: number + default: 10 + required: false + dagger: + description: "Dagger version" + type: string + default: "0.15.0" + required: false + ubuntu: + description: "Ubuntu version" + type: string + default: "24.04" + required: false + +jobs: + remote-dagger-engine: + if: ${{ github.repository == 'dagger/dagger' }} + runs-on: + - nscloud-ubuntu-${{ inputs.ubuntu }}-amd64-${{ inputs.size }}x32 + - namespace-experiments:dagger.integration=enabled;dagger.version=${{ inputs.dagger }} + timeout-minutes: ${{ inputs.timeout }} + steps: + - name: Checkout repo + uses: actions/checkout@v4 + - name: ${{ inputs.function }} + uses: ./.github/actions/call + with: + function: ${{ inputs.function }} + version: v${{ inputs.dagger }} + dev-engine: ${{ inputs.dev }} + - name: ${{ inputs.function }} (CACHE TEST) + uses: ./.github/actions/call + with: + function: ${{ inputs.function }} + version: v${{ inputs.dagger }} + dev-engine: ${{ inputs.dev }} diff --git a/.github/workflows/alternative-ci-runners.yml b/.github/workflows/alternative-ci-runners-1.yml similarity index 83% rename from .github/workflows/alternative-ci-runners.yml rename to .github/workflows/alternative-ci-runners-1.yml index ac1989a6e5..acae81bab5 100644 --- a/.github/workflows/alternative-ci-runners.yml +++ b/.github/workflows/alternative-ci-runners-1.yml @@ -1,4 +1,4 @@ -name: Alternative CI Runners +name: Alternative CI Runners 1 on: # Run the workflow every day TWICE: @@ -17,6 +17,12 @@ jobs: uses: ./.github/workflows/_dagger_on_depot_remote_engine.yml with: function: docs lint + docs-lint-on-depot-local-engine: + uses: ./.github/workflows/_dagger_on_depot_local_engine.yml + with: + function: docs lint + dev: true + timeout: 20 test-cli-engine-on-depot-remote-engine: needs: docs-lint-on-depot-remote-engine @@ -31,11 +37,12 @@ jobs: with: function: check --targets=sdk/go sdk-go-dev-on-depot-local-engine: + needs: sdk-go-on-depot-remote-engine uses: ./.github/workflows/_dagger_on_depot_local_engine.yml with: function: check --targets=sdk/go - size: 4 dev: true + timeout: 15 sdk-python-on-depot-remote-engine: needs: docs-lint-on-depot-remote-engine @@ -43,10 +50,10 @@ jobs: with: function: check --targets=sdk/python sdk-python-dev-on-depot-local-engine: + needs: sdk-python-on-depot-remote-engine uses: ./.github/workflows/_dagger_on_depot_local_engine.yml with: function: check --targets=sdk/python - size: 8 dev: true sdk-typescript-on-depot-remote-engine: @@ -55,8 +62,8 @@ jobs: with: function: check --targets=sdk/typescript sdk-typescript-dev-on-depot-local-engine: + needs: sdk-typescript-on-depot-remote-engine uses: ./.github/workflows/_dagger_on_depot_local_engine.yml with: function: check --targets=sdk/typescript - size: 8 dev: true diff --git a/.github/workflows/alternative-ci-runners-2.yml b/.github/workflows/alternative-ci-runners-2.yml new file mode 100644 index 0000000000..594ddba34e --- /dev/null +++ b/.github/workflows/alternative-ci-runners-2.yml @@ -0,0 +1,69 @@ +name: Alternative CI Runners 2 + +on: + # Run the workflow every day TWICE: + # 1. 9:06AM UTC (low activity) + # 2. 9:26AM UTC (cache test - high chance of no code changes) + schedule: + - cron: "6,26 9 * * *" + # Enable manual trigger for on-demand runs - helps when debugging + workflow_dispatch: + +permissions: + contents: read + +jobs: + docs-lint-on-namespace-remote-engine: + uses: ./.github/workflows/_dagger_on_namespace_remote_engine.yml + with: + function: docs lint + timeout: 20 + docs-lint-on-namespace-local-engine: + uses: ./.github/workflows/_dagger_on_namespace_local_engine.yml + with: + function: docs lint + dev: true + timeout: 20 + + test-cli-engine-on-namespace-remote-engine: + needs: docs-lint-on-namespace-remote-engine + uses: ./.github/workflows/_dagger_on_namespace_remote_engine.yml + with: + function: test specific --run='TestCLI|TestEngine' --race=true --parallel=16 + timeout: 20 + + sdk-go-on-namespace-remote-engine: + needs: docs-lint-on-namespace-remote-engine + uses: ./.github/workflows/_dagger_on_namespace_remote_engine.yml + with: + function: check --targets=sdk/go + sdk-go-dev-on-namespace-local-engine: + needs: sdk-go-on-namespace-remote-engine + uses: ./.github/workflows/_dagger_on_namespace_local_engine.yml + with: + function: check --targets=sdk/go + dev: true + + sdk-python-on-namespace-remote-engine: + needs: docs-lint-on-namespace-remote-engine + uses: ./.github/workflows/_dagger_on_namespace_remote_engine.yml + with: + function: check --targets=sdk/python + sdk-python-dev-on-namespace-local-engine: + needs: sdk-python-on-namespace-remote-engine + uses: ./.github/workflows/_dagger_on_namespace_local_engine.yml + with: + function: check --targets=sdk/python + dev: true + + sdk-typescript-on-namespace-remote-engine: + needs: docs-lint-on-namespace-remote-engine + uses: ./.github/workflows/_dagger_on_namespace_remote_engine.yml + with: + function: check --targets=sdk/typescript + sdk-typescript-dev-on-namespace-local-engine: + needs: sdk-typescript-on-namespace-remote-engine + uses: ./.github/workflows/_dagger_on_namespace_local_engine.yml + with: + function: check --targets=sdk/typescript + dev: true diff --git a/.github/workflows/daggerverse-preview.gen.yml b/.github/workflows/daggerverse-preview.gen.yml index f77641329f..6d6961f157 100644 --- a/.github/workflows/daggerverse-preview.gen.yml +++ b/.github/workflows/daggerverse-preview.gen.yml @@ -3,8 +3,10 @@ name: daggerverse-preview "on": pull_request: types: - - paths - opened + - reopened + - synchronize + - ready_for_review paths: - .changes/v*.md workflow_dispatch: {} @@ -15,7 +17,7 @@ concurrency: jobs: deploy: runs-on: - - ${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-14-0-4c' || 'ubuntu-latest' }} + - ${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-15-0-4c' || 'ubuntu-latest' }} name: deploy steps: - name: Checkout @@ -45,7 +47,7 @@ jobs: # The install.sh script creates path ${prefix_dir}/bin curl -fsS https://dl.dagger.io/dagger/install.sh | BIN_DIR=${prefix_dir}/bin sh env: - DAGGER_VERSION: v0.14.0 + DAGGER_VERSION: v0.15.0 shell: bash - name: scripts/warm-engine.sh id: warm-engine @@ -180,9 +182,9 @@ jobs: exit $EXIT_CODE env: _EXPERIMENTAL_DAGGER_CLOUD_TOKEN: dag_dagger_sBIv6DsjNerWvTqt2bSFeigBUqWxp9bhh3ONSSgeFnw - COMMAND: dagger call -q deploy-preview-with-dagger-main --github-token=env:DAGGER_CI_GITHUB_TOKEN - DAGGER_CI_GITHUB_TOKEN: ${{ secrets.DAGGER_CI_GITHUB_TOKEN }} + COMMAND: dagger call -q --github-token=env:RELEASE_DAGGER_CI_TOKEN deploy-preview-with-dagger-main --target $GITHUB_REF_NAME --github-assignee $GITHUB_ACTOR DAGGER_CLOUD_TOKEN: dag_dagger_sBIv6DsjNerWvTqt2bSFeigBUqWxp9bhh3ONSSgeFnw DAGGER_MODULE: modules/daggerverse + RELEASE_DAGGER_CI_TOKEN: ${{ secrets.RELEASE_DAGGER_CI_TOKEN }} shell: bash timeout-minutes: 10 diff --git a/.github/workflows/docs.gen.yml b/.github/workflows/docs.gen.yml index 21600ac963..19f13141a6 100644 --- a/.github/workflows/docs.gen.yml +++ b/.github/workflows/docs.gen.yml @@ -19,7 +19,7 @@ concurrency: jobs: docs: runs-on: - - ${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-14-0-4c' || 'ubuntu-latest' }} + - ${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-15-0-4c' || 'ubuntu-latest' }} name: Docs steps: - name: Checkout @@ -49,7 +49,7 @@ jobs: # The install.sh script creates path ${prefix_dir}/bin curl -fsS https://dl.dagger.io/dagger/install.sh | BIN_DIR=${prefix_dir}/bin sh env: - DAGGER_VERSION: v0.14.0 + DAGGER_VERSION: v0.15.0 shell: bash - name: scripts/warm-engine.sh id: warm-engine diff --git a/.github/workflows/engine-and-cli.yml b/.github/workflows/engine-and-cli.yml index 3d8af085a9..ff2b8200c6 100644 --- a/.github/workflows/engine-and-cli.yml +++ b/.github/workflows/engine-and-cli.yml @@ -22,7 +22,7 @@ concurrency: jobs: lint: - runs-on: "${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-14-0-16c' || 'ubuntu-latest' }}" + runs-on: "${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-15-0-16c' || 'ubuntu-latest' }}" timeout-minutes: 10 steps: - uses: actions/checkout@v4 @@ -36,7 +36,7 @@ jobs: function: "scripts lint" test-publish: - runs-on: "${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-14-0-16c' || 'ubuntu-latest' }}" + runs-on: "${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-15-0-16c' || 'ubuntu-latest' }}" timeout-minutes: 20 steps: - uses: actions/checkout@v4 @@ -50,7 +50,7 @@ jobs: function: "engine publish --image=dagger-engine.dev --tag=main --dry-run" scan-engine: - runs-on: "${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-14-0-8c' || 'ubuntu-latest' }}" + runs-on: "${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-15-0-8c' || 'ubuntu-latest' }}" timeout-minutes: 10 steps: - uses: actions/checkout@v4 @@ -61,7 +61,7 @@ jobs: # TEMPORARILY DISABLED. Context: https://github.com/dagger/dagger/pull/8998#issuecomment-2491426455 # test: - # runs-on: "${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-14-0-16c-st' || 'ubuntu-latest' }}" + # runs-on: "${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-15-0-16c-st' || 'ubuntu-latest' }}" # timeout-minutes: 30 # steps: # - uses: actions/checkout@v4 @@ -71,7 +71,7 @@ jobs: # function: "test all --race=true --parallel=16" # upload-logs: true test-modules: - runs-on: "${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-14-0-16c-st' || 'ubuntu-latest' }}" + runs-on: "${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-15-0-16c-st' || 'ubuntu-latest' }}" timeout-minutes: 30 steps: - uses: actions/checkout@v4 @@ -82,7 +82,7 @@ jobs: upload-logs: true test-module-runtimes: - runs-on: "${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-14-0-16c-st' || 'ubuntu-latest' }}" + runs-on: "${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-15-0-16c-st' || 'ubuntu-latest' }}" timeout-minutes: 30 steps: - uses: actions/checkout@v4 @@ -93,7 +93,7 @@ jobs: upload-logs: true test-cli-engine: - runs-on: "${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-14-0-16c-st' || 'ubuntu-latest' }}" + runs-on: "${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-15-0-16c-st' || 'ubuntu-latest' }}" timeout-minutes: 30 steps: - uses: actions/checkout@v4 @@ -105,7 +105,7 @@ jobs: test-provision: # HACK: this is split out, since these tests require cgroupsv2 - # runs-on: "${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-14-0-16c-st' || 'ubuntu-latest' }}" + # runs-on: "${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-15-0-16c-st' || 'ubuntu-latest' }}" runs-on: "ubuntu-latest" timeout-minutes: 30 steps: @@ -113,11 +113,11 @@ jobs: - name: "test" uses: ./.github/actions/call with: - function: "test specific --run='TestProvision' --race=true --parallel=16" + function: "test specific --run='TestProvision' --race=true --parallel=1" upload-logs: true test-everything-else: - runs-on: "${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-14-0-16c-st' || 'ubuntu-latest' }}" + runs-on: "${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-15-0-16c-st' || 'ubuntu-latest' }}" timeout-minutes: 30 steps: - uses: actions/checkout@v4 @@ -133,7 +133,7 @@ jobs: # # TEMPORARILY DISABLED. Context: https://github.com/dagger/dagger/pull/8998#issuecomment-2491426455 # testdev: - # runs-on: "${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-14-0-32c-dind-st' || 'ubuntu-latest' }}" + # runs-on: "${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-15-0-32c-dind-st' || 'ubuntu-latest' }}" # timeout-minutes: 30 # steps: # - uses: actions/checkout@v4 @@ -145,7 +145,7 @@ jobs: # upload-logs: true testdev-modules: - runs-on: "${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-14-0-32c-dind-st' || 'ubuntu-latest' }}" + runs-on: "${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-15-0-32c-dind-st' || 'ubuntu-latest' }}" timeout-minutes: 30 steps: - uses: actions/checkout@v4 @@ -157,7 +157,7 @@ jobs: upload-logs: true testdev-module-runtimes: - runs-on: "${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-14-0-32c-dind-st' || 'ubuntu-latest' }}" + runs-on: "${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-15-0-32c-dind-st' || 'ubuntu-latest' }}" timeout-minutes: 30 steps: - uses: actions/checkout@v4 @@ -169,7 +169,7 @@ jobs: upload-logs: true testdev-container: - runs-on: "${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-14-0-32c-dind-st' || 'ubuntu-latest' }}" + runs-on: "${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-15-0-32c-dind-st' || 'ubuntu-latest' }}" timeout-minutes: 30 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/github.gen.yml b/.github/workflows/github.gen.yml index 73f266f18d..41a7703ce1 100644 --- a/.github/workflows/github.gen.yml +++ b/.github/workflows/github.gen.yml @@ -19,7 +19,7 @@ concurrency: jobs: github: runs-on: - - ${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-14-0-4c' || 'ubuntu-latest' }} + - ${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-15-0-4c' || 'ubuntu-latest' }} name: Github steps: - name: Checkout @@ -49,7 +49,7 @@ jobs: # The install.sh script creates path ${prefix_dir}/bin curl -fsS https://dl.dagger.io/dagger/install.sh | BIN_DIR=${prefix_dir}/bin sh env: - DAGGER_VERSION: v0.14.0 + DAGGER_VERSION: v0.15.0 shell: bash - name: scripts/warm-engine.sh id: warm-engine diff --git a/.github/workflows/helm.gen.yml b/.github/workflows/helm.gen.yml index c81d495b82..a8f2ebadd1 100644 --- a/.github/workflows/helm.gen.yml +++ b/.github/workflows/helm.gen.yml @@ -49,7 +49,7 @@ jobs: # The install.sh script creates path ${prefix_dir}/bin curl -fsS https://dl.dagger.io/dagger/install.sh | BIN_DIR=${prefix_dir}/bin sh env: - DAGGER_VERSION: v0.14.0 + DAGGER_VERSION: v0.15.0 shell: bash - name: scripts/warm-engine.sh id: warm-engine diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1cd4d9ec3f..f233fde498 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -14,12 +14,12 @@ on: # run tests in a PR when an SDK is modified... - ./sdk # ...or when we are - - ./.github/workflows/engine-and-cli-publish.yml + - ./.github/workflows/publish.yml jobs: publish: if: ${{ github.repository == 'dagger/dagger' && github.event_name == 'push' }} - runs-on: dagger-g2-v0-14-0-16c + runs-on: dagger-g2-v0-15-0-16c steps: - uses: actions/checkout@v4 - name: "Publish Engine" @@ -51,7 +51,6 @@ jobs: --aws-secret-access-key=env:AWS_SECRET_ACCESS_KEY \ --aws-region="$AWS_REGION" \ --aws-bucket="$AWS_BUCKET" \ - --aws-cloudfront-distribution="$AWS_CLOUDFRONT_DISTRIBUTION" \ --artefacts-fqdn="$ARTEFACTS_FQDN" env: GH_ORG_NAME: ${{ vars.GH_ORG_NAME }} @@ -60,9 +59,26 @@ jobs: AWS_SECRET_ACCESS_KEY: ${{ secrets.RELEASE_AWS_SECRET_ACCESS_KEY }} AWS_REGION: ${{ vars.RELEASE_AWS_REGION }} AWS_BUCKET: ${{ vars.RELEASE_AWS_BUCKET }} - AWS_CLOUDFRONT_DISTRIBUTION: ${{ vars.RELEASE_AWS_CLOUDFRONT_DISTRIBUTION }} ARTEFACTS_FQDN: ${{ vars.RELEASE_FQDN }} GORELEASER_KEY: ${{ secrets.GORELEASER_PRO_LICENSE_KEY }} + - name: "Publish Metadata" + uses: ./.github/actions/call + with: + function: |- + cli \ + publish-metadata \ + --aws-access-key-id=env:AWS_ACCESS_KEY_ID \ + --aws-secret-access-key=env:AWS_SECRET_ACCESS_KEY \ + --aws-region="$AWS_REGION" \ + --aws-bucket="$AWS_BUCKET" \ + --aws-cloudfront-distribution="$AWS_CLOUDFRONT_DISTRIBUTION" + env: + AWS_ACCESS_KEY_ID: ${{ secrets.RELEASE_AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.RELEASE_AWS_SECRET_ACCESS_KEY }} + AWS_REGION: ${{ vars.RELEASE_AWS_REGION }} + AWS_BUCKET: ${{ vars.RELEASE_AWS_BUCKET }} + AWS_CLOUDFRONT_DISTRIBUTION: ${{ vars.RELEASE_AWS_CLOUDFRONT_DISTRIBUTION }} + # TODO: move this into dagger function call - name: "Notify" uses: ./.github/actions/notify if: github.ref_name != 'main' @@ -72,44 +88,34 @@ jobs: publish-sdk-go: needs: publish - runs-on: "${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-14-0-4c' || 'ubuntu-latest' }}" + runs-on: dagger-g2-v0-15-0-4c steps: - uses: actions/checkout@v4 - name: "go publish" uses: ./.github/actions/call env: RELEASE_DAGGER_CI_TOKEN: ${{ secrets.RELEASE_DAGGER_CI_TOKEN }} + RELEASE_DISCORD_WEBHOOK: ${{ secrets.NEW_RELEASE_DISCORD_WEBHOOK }} with: - function: sdk go publish --tag="${{ github.ref_name }}" --github-token=env:RELEASE_DAGGER_CI_TOKEN - - name: "notify" - if: github.ref_name != 'main' - uses: ./.github/actions/notify - with: - message: "๐Ÿน Go SDK: https://github.com/${{ github.repository }}/releases/tag/${{ github.ref_name }}" - discord-webhook: ${{ secrets.NEW_RELEASE_DISCORD_WEBHOOK }} + function: sdk go publish --tag="${{ github.ref_name }}" --github-token=env:RELEASE_DAGGER_CI_TOKEN --discord-webhook=env:RELEASE_DISCORD_WEBHOOK publish-sdk-php: needs: publish - runs-on: "${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-14-0-4c' || 'ubuntu-latest' }}" + runs-on: dagger-g2-v0-15-0-4c steps: - uses: actions/checkout@v4 - name: "php publish" uses: ./.github/actions/call env: RELEASE_DAGGER_CI_TOKEN: ${{ secrets.RELEASE_DAGGER_CI_TOKEN }} + RELEASE_DISCORD_WEBHOOK: ${{ secrets.NEW_RELEASE_DISCORD_WEBHOOK }} with: - function: sdk php publish --tag="${{ github.ref_name }}" --github-token=env:RELEASE_DAGGER_CI_TOKEN - - name: "notify" - if: github.ref_name != 'main' - uses: ./.github/actions/notify - with: - message: "๐Ÿ˜ PHP SDK: https://github.com/${{ github.repository }}/releases/tag/${{ github.ref_name }}" - discord-webhook: ${{ secrets.NEW_RELEASE_DISCORD_WEBHOOK }} + function: sdk php publish --tag="${{ github.ref_name }}" --github-token=env:RELEASE_DAGGER_CI_TOKEN --discord-webhook=env:RELEASE_DISCORD_WEBHOOK publish-sdk-python: needs: publish if: github.ref_name != 'main' - runs-on: "${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-14-0-4c' || 'ubuntu-latest' }}" + runs-on: dagger-g2-v0-15-0-4c steps: - uses: actions/checkout@v4 - name: "python publish" @@ -118,18 +124,14 @@ jobs: RELEASE_DAGGER_CI_TOKEN: ${{ secrets.RELEASE_DAGGER_CI_TOKEN }} RELEASE_PYPI_TOKEN: ${{ secrets.RELEASE_PYPI_TOKEN }} RELEASE_PYPI_REPO: ${{ secrets.RELEASE_PYPI_REPO }} + RELEASE_DISCORD_WEBHOOK: ${{ secrets.NEW_RELEASE_DISCORD_WEBHOOK }} with: - function: sdk python publish --tag="${{ github.ref_name }}" --github-token=env:RELEASE_DAGGER_CI_TOKEN --pypi-repo="$RELEASE_PYPI_REPO" --pypi-token=env:RELEASE_PYPI_TOKEN - - name: "notify" - uses: ./.github/actions/notify - with: - message: "๐Ÿ Python SDK: https://github.com/${{ github.repository }}/releases/tag/${{ github.ref_name }}" - discord-webhook: ${{ secrets.NEW_RELEASE_DISCORD_WEBHOOK }} + function: sdk python publish --tag="${{ github.ref_name }}" --github-token=env:RELEASE_DAGGER_CI_TOKEN --discord-webhook=env:RELEASE_DISCORD_WEBHOOK --pypi-repo="$RELEASE_PYPI_REPO" --pypi-token=env:RELEASE_PYPI_TOKEN publish-sdk-typescript: needs: publish if: github.ref_name != 'main' - runs-on: "${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-14-0-4c' || 'ubuntu-latest' }}" + runs-on: dagger-g2-v0-15-0-4c steps: - uses: actions/checkout@v4 - name: "typescript publish" @@ -137,18 +139,14 @@ jobs: env: RELEASE_DAGGER_CI_TOKEN: ${{ secrets.RELEASE_DAGGER_CI_TOKEN }} RELEASE_NPM_TOKEN: ${{ secrets.RELEASE_NPM_TOKEN }} + RELEASE_DISCORD_WEBHOOK: ${{ secrets.NEW_RELEASE_DISCORD_WEBHOOK }} with: - function: sdk typescript publish --tag="${{ github.ref_name }}" --github-token=env:RELEASE_DAGGER_CI_TOKEN --npm-token=env:RELEASE_NPM_TOKEN - - name: "notify" - uses: ./.github/actions/notify - with: - message: "โฌข TypeScript SDK: https://github.com/${{ github.repository }}/releases/tag/${{ github.ref_name }}" - discord-webhook: ${{ secrets.NEW_RELEASE_DISCORD_WEBHOOK }} + function: sdk typescript publish --tag="${{ github.ref_name }}" --github-token=env:RELEASE_DAGGER_CI_TOKEN --discord-webhook=env:RELEASE_DISCORD_WEBHOOK --npm-token=env:RELEASE_NPM_TOKEN publish-sdk-elixir: needs: publish if: github.ref_name != 'main' - runs-on: "${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-14-0-4c' || 'ubuntu-latest' }}" + runs-on: dagger-g2-v0-15-0-4c steps: - uses: actions/checkout@v4 - name: "elixir publish" @@ -156,32 +154,38 @@ jobs: env: RELEASE_DAGGER_CI_TOKEN: ${{ secrets.RELEASE_DAGGER_CI_TOKEN }} HEX_API_KEY: ${{ secrets.HEX_API_KEY }} + RELEASE_DISCORD_WEBHOOK: ${{ secrets.NEW_RELEASE_DISCORD_WEBHOOK }} with: - function: sdk elixir publish --tag="${{ github.ref_name }}" --github-token=env:RELEASE_DAGGER_CI_TOKEN --hex-apikey=env:HEX_API_KEY - - name: "notify" - uses: ./.github/actions/notify - with: - message: "๐Ÿงช Elixir SDK: https://github.com/${{ github.repository }}/releases/tag/${{ github.ref_name }}" - discord-webhook: ${{ secrets.NEW_RELEASE_DISCORD_WEBHOOK }} + function: sdk elixir publish --tag="${{ github.ref_name }}" --github-token=env:RELEASE_DAGGER_CI_TOKEN --discord-webhook=env:RELEASE_DISCORD_WEBHOOK --hex-apikey=env:HEX_API_KEY publish-helm: needs: publish if: github.ref_name != 'main' - runs-on: "${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-14-0-4c' || 'ubuntu-latest' }}" + runs-on: dagger-g2-v0-15-0-4c steps: - uses: actions/checkout@v4 - name: "helm publish" uses: ./.github/actions/call env: RELEASE_DAGGER_CI_TOKEN: ${{ secrets.RELEASE_DAGGER_CI_TOKEN }} + RELEASE_DISCORD_WEBHOOK: ${{ secrets.NEW_RELEASE_DISCORD_WEBHOOK }} with: - function: publish --tag=${{ github.ref_name }} --github-token=env:RELEASE_DAGGER_CI_TOKEN + function: publish --target=${{ github.ref_name }} --github-token=env:RELEASE_DAGGER_CI_TOKEN --discord-webhook=env:RELEASE_DISCORD_WEBHOOK module: ./helm - - name: "notify" - uses: ./.github/actions/notify + + daggerverse-bump-dagger: + needs: publish + if: github.ref_name != 'main' + runs-on: dagger-g2-v0-15-0-4c + steps: + - uses: actions/checkout@v4 + - name: "Bump Dagger version in Daggerverse" + uses: ./.github/actions/call + env: + RELEASE_DAGGER_CI_TOKEN: ${{ secrets.RELEASE_DAGGER_CI_TOKEN }} with: - message: "โ˜ธ๏ธ Helm Chart: https://github.com/${{ github.repository }}/releases/tag/${{ github.ref_name }}" - discord-webhook: ${{ secrets.NEW_RELEASE_DISCORD_WEBHOOK }} + function: --github-token=env:RELEASE_DAGGER_CI_TOKEN bump-dagger-version --to=${{ github.ref_name }} --github-assignee={{ github.actor }} + module: ./modules/daggerverse # TODO: daggerize provisioning tests test-provision-macos: diff --git a/.github/workflows/sdk-rust-publish.yml b/.github/workflows/sdk-rust-publish.yml index 89636b94a1..6c7ac063bd 100644 --- a/.github/workflows/sdk-rust-publish.yml +++ b/.github/workflows/sdk-rust-publish.yml @@ -5,18 +5,14 @@ on: jobs: publish: if: github.repository == 'dagger/dagger' - runs-on: "${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-14-0-4c' || 'ubuntu-latest' }}" + runs-on: "${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-15-0-4c' || 'ubuntu-latest' }}" steps: - uses: actions/checkout@v4 - name: "go publish" uses: ./.github/actions/call env: RELEASE_DAGGER_CI_TOKEN: ${{ secrets.RELEASE_DAGGER_CI_TOKEN }} + RELEASE_DISCORD_WEBHOOK: ${{ secrets.NEW_RELEASE_DISCORD_WEBHOOK }} CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} with: - function: sdk rust publish --tag="${{ github.ref_name }}" --github-token=env:RELEASE_DAGGER_CI_TOKEN --cargo-registry-token=env:CARGO_REGISTRY_TOKEN - - name: "notify" - uses: ./.github/actions/notify - with: - message: "โš™๏ธ Rust SDK: https://github.com/${{ github.repository }}/releases/tag/${{ github.ref_name }}" - discord-webhook: ${{ secrets.NEW_RELEASE_DISCORD_WEBHOOK }} + function: sdk rust publish --tag="${{ github.ref_name }}" --github-token=env:RELEASE_DAGGER_CI_TOKEN --discord-webhook=env:RELEASE_DISCORD_WEBHOOK --cargo-registry-token=env:CARGO_REGISTRY_TOKEN diff --git a/.github/workflows/sdks.gen.yml b/.github/workflows/sdks.gen.yml index 7286cd19da..6ff2396c48 100644 --- a/.github/workflows/sdks.gen.yml +++ b/.github/workflows/sdks.gen.yml @@ -19,7 +19,7 @@ concurrency: jobs: elixir: runs-on: - - ${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-14-0-4c' || 'ubuntu-latest' }} + - ${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-15-0-4c' || 'ubuntu-latest' }} name: elixir steps: - name: Checkout @@ -49,7 +49,7 @@ jobs: # The install.sh script creates path ${prefix_dir}/bin curl -fsS https://dl.dagger.io/dagger/install.sh | BIN_DIR=${prefix_dir}/bin sh env: - DAGGER_VERSION: v0.14.0 + DAGGER_VERSION: v0.15.0 shell: bash - name: scripts/warm-engine.sh id: warm-engine @@ -190,7 +190,7 @@ jobs: timeout-minutes: 10 elixir-dev: runs-on: - - ${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-14-0-8c-dind' || 'ubuntu-latest' }} + - ${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-15-0-8c-dind' || 'ubuntu-latest' }} name: elixir-dev steps: - name: Checkout @@ -404,7 +404,7 @@ jobs: timeout-minutes: 10 go: runs-on: - - ${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-14-0-4c' || 'ubuntu-latest' }} + - ${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-15-0-4c' || 'ubuntu-latest' }} name: go steps: - name: Checkout @@ -434,7 +434,7 @@ jobs: # The install.sh script creates path ${prefix_dir}/bin curl -fsS https://dl.dagger.io/dagger/install.sh | BIN_DIR=${prefix_dir}/bin sh env: - DAGGER_VERSION: v0.14.0 + DAGGER_VERSION: v0.15.0 shell: bash - name: scripts/warm-engine.sh id: warm-engine @@ -575,7 +575,7 @@ jobs: timeout-minutes: 10 go-dev: runs-on: - - ${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-14-0-8c-dind' || 'ubuntu-latest' }} + - ${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-15-0-8c-dind' || 'ubuntu-latest' }} name: go-dev steps: - name: Checkout @@ -789,7 +789,7 @@ jobs: timeout-minutes: 10 java: runs-on: - - ${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-14-0-4c' || 'ubuntu-latest' }} + - ${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-15-0-4c' || 'ubuntu-latest' }} name: java steps: - name: Checkout @@ -819,7 +819,7 @@ jobs: # The install.sh script creates path ${prefix_dir}/bin curl -fsS https://dl.dagger.io/dagger/install.sh | BIN_DIR=${prefix_dir}/bin sh env: - DAGGER_VERSION: v0.14.0 + DAGGER_VERSION: v0.15.0 shell: bash - name: scripts/warm-engine.sh id: warm-engine @@ -960,7 +960,7 @@ jobs: timeout-minutes: 10 java-dev: runs-on: - - ${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-14-0-8c-dind' || 'ubuntu-latest' }} + - ${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-15-0-8c-dind' || 'ubuntu-latest' }} name: java-dev steps: - name: Checkout @@ -1174,7 +1174,7 @@ jobs: timeout-minutes: 10 php: runs-on: - - ${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-14-0-4c' || 'ubuntu-latest' }} + - ${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-15-0-4c' || 'ubuntu-latest' }} name: php steps: - name: Checkout @@ -1204,7 +1204,7 @@ jobs: # The install.sh script creates path ${prefix_dir}/bin curl -fsS https://dl.dagger.io/dagger/install.sh | BIN_DIR=${prefix_dir}/bin sh env: - DAGGER_VERSION: v0.14.0 + DAGGER_VERSION: v0.15.0 shell: bash - name: scripts/warm-engine.sh id: warm-engine @@ -1345,7 +1345,7 @@ jobs: timeout-minutes: 10 php-dev: runs-on: - - ${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-14-0-8c-dind' || 'ubuntu-latest' }} + - ${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-15-0-8c-dind' || 'ubuntu-latest' }} name: php-dev steps: - name: Checkout @@ -1559,7 +1559,7 @@ jobs: timeout-minutes: 10 python: runs-on: - - ${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-14-0-4c' || 'ubuntu-latest' }} + - ${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-15-0-4c' || 'ubuntu-latest' }} name: python steps: - name: Checkout @@ -1589,7 +1589,7 @@ jobs: # The install.sh script creates path ${prefix_dir}/bin curl -fsS https://dl.dagger.io/dagger/install.sh | BIN_DIR=${prefix_dir}/bin sh env: - DAGGER_VERSION: v0.14.0 + DAGGER_VERSION: v0.15.0 shell: bash - name: scripts/warm-engine.sh id: warm-engine @@ -1730,7 +1730,7 @@ jobs: timeout-minutes: 10 python-dev: runs-on: - - ${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-14-0-8c-dind' || 'ubuntu-latest' }} + - ${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-15-0-8c-dind' || 'ubuntu-latest' }} name: python-dev steps: - name: Checkout @@ -1944,7 +1944,7 @@ jobs: timeout-minutes: 10 rust: runs-on: - - ${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-14-0-4c' || 'ubuntu-latest' }} + - ${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-15-0-4c' || 'ubuntu-latest' }} name: rust steps: - name: Checkout @@ -1974,7 +1974,7 @@ jobs: # The install.sh script creates path ${prefix_dir}/bin curl -fsS https://dl.dagger.io/dagger/install.sh | BIN_DIR=${prefix_dir}/bin sh env: - DAGGER_VERSION: v0.14.0 + DAGGER_VERSION: v0.15.0 shell: bash - name: scripts/warm-engine.sh id: warm-engine @@ -2115,7 +2115,7 @@ jobs: timeout-minutes: 10 rust-dev: runs-on: - - ${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-14-0-8c-dind' || 'ubuntu-latest' }} + - ${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-15-0-8c-dind' || 'ubuntu-latest' }} name: rust-dev steps: - name: Checkout @@ -2329,7 +2329,7 @@ jobs: timeout-minutes: 10 typescript: runs-on: - - ${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-14-0-4c' || 'ubuntu-latest' }} + - ${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-15-0-4c' || 'ubuntu-latest' }} name: typescript steps: - name: Checkout @@ -2359,7 +2359,7 @@ jobs: # The install.sh script creates path ${prefix_dir}/bin curl -fsS https://dl.dagger.io/dagger/install.sh | BIN_DIR=${prefix_dir}/bin sh env: - DAGGER_VERSION: v0.14.0 + DAGGER_VERSION: v0.15.0 shell: bash - name: scripts/warm-engine.sh id: warm-engine @@ -2500,7 +2500,7 @@ jobs: timeout-minutes: 10 typescript-dev: runs-on: - - ${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-14-0-8c-dind' || 'ubuntu-latest' }} + - ${{ github.repository == 'dagger/dagger' && 'dagger-g2-v0-15-0-8c-dind' || 'ubuntu-latest' }} name: typescript-dev steps: - name: Checkout diff --git a/.goreleaser.nightly.yml b/.goreleaser.nightly.yml index 43e01bc1c5..b98f8883f4 100644 --- a/.goreleaser.nightly.yml +++ b/.goreleaser.nightly.yml @@ -38,30 +38,3 @@ blobs: region: "{{ .Env.AWS_REGION }}" bucket: "{{ .Env.AWS_BUCKET }}" directory: "dagger/main/head" - -publishers: - - name: publish-install-sh - cmd: sh -c "aws s3 cp install.sh s3://{{ .Env.AWS_BUCKET }}/dagger/install.sh" - env: - - PATH={{ .Env.PATH }} - - AWS_EC2_METADATA_DISABLED=true - - AWS_ACCESS_KEY_ID={{ .Env.AWS_ACCESS_KEY_ID }} - - AWS_SECRET_ACCESS_KEY={{ .Env.AWS_SECRET_ACCESS_KEY }} - - AWS_REGION={{ .Env.AWS_REGION }} - - name: publish-install-ps1 - cmd: sh -c "aws s3 cp install.ps1 s3://{{ .Env.AWS_BUCKET }}/dagger/install.ps1" - env: - - PATH={{ .Env.PATH }} - - AWS_EC2_METADATA_DISABLED=true - - AWS_ACCESS_KEY_ID={{ .Env.AWS_ACCESS_KEY_ID }} - - AWS_SECRET_ACCESS_KEY={{ .Env.AWS_SECRET_ACCESS_KEY }} - - AWS_REGION={{ .Env.AWS_REGION }} - - name: publish-install-ps1 - cmd: sh -c "aws cloudfront create-invalidation --distribution-id {{ .Env.AWS_CLOUDFRONT_DISTRIBUTION_ID }} --paths /dagger/install.sh /dagger/install.ps1" - env: - - PATH={{ .Env.PATH }} - - AWS_ACCESS_KEY_ID={{ .Env.AWS_ACCESS_KEY_ID }} - - AWS_SECRET_ACCESS_KEY={{ .Env.AWS_SECRET_ACCESS_KEY }} - - AWS_REGION={{ .Env.AWS_REGION }} - - AWS_SECRET_ACCESS_KEY={{ .Env.AWS_SECRET_ACCESS_KEY }} - - AWS_CLOUDFRONT_DISTRIBUTION_ID={{ .Env.AWS_CLOUDFRONT_DISTRIBUTION_ID }} diff --git a/.goreleaser.yml b/.goreleaser.yml index 2fc1c81ef2..d21c0d4e84 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -54,29 +54,3 @@ blobs: region: "{{ .Env.AWS_REGION }}" bucket: "{{ .Env.AWS_BUCKET }}" directory: "dagger/releases/{{ .Version }}" - -publishers: - - name: publish-latest-version - cmd: sh -c "echo {{ .Version }} | aws s3 cp - s3://{{ .Env.AWS_BUCKET }}/dagger/latest_version" - env: - - PATH={{ .Env.PATH }} - - AWS_EC2_METADATA_DISABLED=true - - AWS_ACCESS_KEY_ID={{ .Env.AWS_ACCESS_KEY_ID }} - - AWS_SECRET_ACCESS_KEY={{ .Env.AWS_SECRET_ACCESS_KEY }} - - AWS_REGION={{ .Env.AWS_REGION }} - - name: publish-latest - cmd: sh -c "echo {{ .Version }} | aws s3 cp - s3://{{ .Env.AWS_BUCKET }}/dagger/versions/latest" - env: - - PATH={{ .Env.PATH }} - - AWS_EC2_METADATA_DISABLED=true - - AWS_ACCESS_KEY_ID={{ .Env.AWS_ACCESS_KEY_ID }} - - AWS_SECRET_ACCESS_KEY={{ .Env.AWS_SECRET_ACCESS_KEY }} - - AWS_REGION={{ .Env.AWS_REGION }} - - name: publish-latest-major-minor - cmd: sh -c "echo {{ .Version }} | aws s3 cp - s3://{{ .Env.AWS_BUCKET }}/dagger/versions/{{ .Major }}.{{ .Minor }}" - env: - - PATH={{ .Env.PATH }} - - AWS_EC2_METADATA_DISABLED=true - - AWS_ACCESS_KEY_ID={{ .Env.AWS_ACCESS_KEY_ID }} - - AWS_SECRET_ACCESS_KEY={{ .Env.AWS_SECRET_ACCESS_KEY }} - - AWS_REGION={{ .Env.AWS_REGION }} diff --git a/CHANGELOG.md b/CHANGELOG.md index e791519efb..49ebb4bb5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,57 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), and is generated by [Changie](https://github.com/miniscruff/changie). +## v0.15.1 - 2024-12-12 + +### Fixed +- Metrics display in the TUI is fixed to display for all executed containers, rather than just services by @sipsma in https://github.com/dagger/dagger/pull/9171 + +### What to do next? +- Read the [documentation](https://docs.dagger.io) +- Join our [Discord server](https://discord.gg/dagger-io) +- Follow us on [Twitter](https://twitter.com/dagger_io) + +## v0.15.0 - 2024-12-11 + +### ๐Ÿ”ฅ Breaking Changes +- `Container.asService` now uses the command specified by `withDefaultArgs` instead of the last `withExec` command by @rajatjindal in https://github.com/dagger/dagger/pull/8865 \ + Users can override the args by providing the `args` option to `asService`. + They can also configure the container to use the container entrypoint by using + `useEntrypoint` option. + +### Added +- Better TUI errors, new cached/pending states, duration accounting and fewer spans by @vito in https://github.com/dagger/dagger/pull/8442 +- Custom dagger `engine.json` config file by @jedevc in https://github.com/dagger/dagger/pull/8800 \ + This new config file format is intended to eventually replace the old + buildkit-style `engine.toml` file that's currently used for configuration. + + This file can be either mounted directly into a manually started engine at + `/etc/dagger/engine.toml`, or it will automatically mounted from the + user's `~/.config/dagger/engine.json` when the engine is started. +- Filesync performance is improved by @sipsma in https://github.com/dagger/dagger/pull/8818 \ + The engine now re-uses previously loaded data more reliably and in more + cases, which speeds up repeated reloads of the same or similar (i.e. + overlapping data). + + Uncached filesyncs of large amounts of data is also faster and uses less + memory in the engine. +- Added `dagger uninstall` command to remove a dependency by @rajatjindal in https://github.com/dagger/dagger/pull/8745 +- Added memory and network telemetry for execs by @cwlbraa in https://github.com/dagger/dagger/pull/8880 https://github.com/dagger/dagger/pull/8902 +- Added `DAGGER_LEAVE_OLD_ENGINE` environment variable to optionally prevent removal of old engine containers during upgrades by [devin](https://github.com/apps/devin-ai-integration) in https://github.com/dagger/dagger/pull/8195 + +### Fixed +- `Directory.terminal` API works now by @sipsma in https://github.com/dagger/dagger/pull/8952 +- Fix resource leaks in the engine that occurred after each debug terminal was opened by @sipsma in https://github.com/dagger/dagger/pull/9013 +- Fix cache mounts not being included in interactive debug containers by @sipsma in https://github.com/dagger/dagger/pull/9034 +- Allow `Container.withExec` `expect` to catch exit code 128 by @jedevc in https://github.com/dagger/dagger/pull/9027 +- Correctly apply ignore pattern when pulling a directory from git by @TomChv in https://github.com/dagger/dagger/pull/8931 +- Fix panic on null `Directory.digest` by @jedevc in https://github.com/dagger/dagger/pull/8946 + +### What to do next? +- Read the [documentation](https://docs.dagger.io) +- Join our [Discord server](https://discord.gg/dagger-io) +- Follow us on [Twitter](https://twitter.com/dagger_io) + ## v0.14.0 - 2024-11-08 diff --git a/RELEASING.md b/RELEASING.md index 088fbed8a2..724e53a193 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -220,7 +220,7 @@ git commit -s -m "chore: bump dependencies to $ENGINE_VERSION" - [ ] Push to `dagger/dagger` - we need access to secrets that PRs coming from forks will not have. Open the PR as a draft and capture the PR number: ```console -gh pr create --draft --title "chore: prep for v0.13.7" --body "" | tee /tmp/prep-pr.txt +gh pr create --draft --title "chore: prep for $ENGINE_VERSION" --body "" | tee /tmp/prep-pr.txt export RELEASE_PREP_PR=$(cat /tmp/prep-pr.txt | sed -r 's/^[^0-9]*([0-9]+).*/\1/') ``` @@ -437,8 +437,9 @@ production deployment via Netlify as follows: ## ๐ŸŒŒ Daggerverse โฑ `2mins` -- [ ] Mention in the release thread on Discord that Daggerverse can be updated - to the just-released version. cc @marcosnils @matipan @grouville +- [ ] Merge the newly opened PR in the dagger.io repository (this is created by + the publish workflow). If anything fails, cc the following in the release thread + on Discord: cc @jpadams @kpenfound @matipan @gerhard ## ๐ŸŒฅ๏ธ Dagger Cloud โฑ `2mins` diff --git a/cmd/codegen/generator/typescript/generator.go b/cmd/codegen/generator/typescript/generator.go index baddebc251..ed63f1c18b 100644 --- a/cmd/codegen/generator/typescript/generator.go +++ b/cmd/codegen/generator/typescript/generator.go @@ -63,7 +63,7 @@ func (g *TypeScriptGenerator) Generate(_ context.Context, schema *introspection. target := ClientGenFile if g.Config.ModuleName != "" { - target = filepath.Join(g.Config.ModuleContextPath, "sdk/api", ClientGenFile) + target = filepath.Join(g.Config.ModuleContextPath, "sdk/src/api", ClientGenFile) } if err := mfs.MkdirAll(filepath.Dir(target), 0700); err != nil { return nil, err diff --git a/cmd/codegen/generator/typescript/templates/src/default.ts.gtpl b/cmd/codegen/generator/typescript/templates/src/default.ts.gtpl index 7f813e5e92..2cee4a2ae5 100644 --- a/cmd/codegen/generator/typescript/templates/src/default.ts.gtpl +++ b/cmd/codegen/generator/typescript/templates/src/default.ts.gtpl @@ -1,5 +1,5 @@ {{ define "default" }} -export const dag = new Client({ ctx: defaultContext }) +export const dag = new Client() {{ "" }} {{- end }} diff --git a/cmd/codegen/generator/typescript/templates/src/header.ts.gtpl b/cmd/codegen/generator/typescript/templates/src/header.ts.gtpl index 4bdbc1b8aa..de3a5772e3 100644 --- a/cmd/codegen/generator/typescript/templates/src/header.ts.gtpl +++ b/cmd/codegen/generator/typescript/templates/src/header.ts.gtpl @@ -7,49 +7,13 @@ inherited by futures objects and common types. * This file was auto-generated by `client-gen`. * Do not make direct changes to the file. */ -import { Context, defaultContext } from "../context/context.js" -import { computeQuery } from "./utils.js" - -/** - * @hidden - */ -export type QueryTree = { - operation: string - args?: Record -} - -/** - * @hidden - */ -export type Metadata = { - [key: string]: { - is_enum?: boolean - } -} - -interface ClientConfig { - queryTree?: QueryTree[] - ctx?: Context -} - +import { Context } from "../common/context.js" class BaseClient { - protected _queryTree: QueryTree[] - protected _ctx: Context - /** * @hidden */ - constructor({ queryTree, ctx }: ClientConfig = {}) { - this._queryTree = queryTree || [] - this._ctx = ctx || new Context() - } - /** - * @hidden - */ - get queryTree() { - return this._queryTree - } + constructor(protected _ctx: Context = new Context()) {} } {{- end }} diff --git a/cmd/codegen/generator/typescript/templates/src/method.ts.gtpl b/cmd/codegen/generator/typescript/templates/src/method.ts.gtpl index 4092f31095..b73e094afb 100644 --- a/cmd/codegen/generator/typescript/templates/src/method.ts.gtpl +++ b/cmd/codegen/generator/typescript/templates/src/method.ts.gtpl @@ -31,7 +31,7 @@ {{- $enums := GetEnumValues .Args }} {{- if gt (len $enums) 0 }} - const metadata: Metadata = { + const metadata = { {{- range $v := $enums }} {{ $v.Name | FormatName -}}: { is_enum: true }, {{- end }} @@ -39,31 +39,24 @@ {{ "" -}} {{- end }} - {{- if .TypeRef }} - return new {{ .TypeRef | FormatOutputType }}({ - queryTree: [ - ...this._queryTree, - { - operation: "{{ .Name }}", - - {{- /* Insert arguments. */ -}} - {{- if or $required $optionals }} - args: { {{""}} + const ctx = this._ctx.select( + "{{ .Name }}", +{{- if or $required $optionals }} + { {{""}} {{- with $required }} {{- template "call_args" $required }} {{- end }} {{- with $optionals }} {{- if $required }}, {{ end -}} - ...opts + ...opts {{- end -}} {{- if gt (len $enums) 0 -}}, __metadata: metadata{{- end -}} -{{""}} }, - {{- end }} - }, - ], - ctx: this._ctx, - }) +{{""}} },{{- end }} + ) + + {{- if .TypeRef }} + return new {{ .TypeRef | FormatOutputType }}(ctx) {{- end }} } {{- end }} diff --git a/cmd/codegen/generator/typescript/templates/src/method_solve.ts.gtpl b/cmd/codegen/generator/typescript/templates/src/method_solve.ts.gtpl index 839c1be2e0..2cb1fd8968 100644 --- a/cmd/codegen/generator/typescript/templates/src/method_solve.ts.gtpl +++ b/cmd/codegen/generator/typescript/templates/src/method_solve.ts.gtpl @@ -56,7 +56,7 @@ {{- $enums := GetEnumValues .Args }} {{- if gt (len $enums) 0 }} - const metadata: Metadata = { + const metadata = { {{- range $v := $enums }} {{ $v.Name | FormatName -}}: { is_enum: true }, {{- end }} @@ -66,15 +66,11 @@ {{- end }} {{- if .TypeRef }} - {{ if not .TypeRef.IsVoid }}const response: Awaited<{{ if $convertID }}{{ .TypeRef | FormatOutputType }}{{ else }}{{ $promiseRetType }}{{ end }}> = {{ end }}await computeQuery( - [ - ...this._queryTree, - { - operation: "{{ .Name }}", - - {{- /* Insert arguments. */ -}} + const ctx = this._ctx.select( + "{{ .Name }}", + {{- /* Insert arguments. */ -}} {{- if or $required $optionals }} - args: { {{""}} + { {{""}} {{- with $required }} {{- template "call_args" $required }} {{- end }} @@ -84,42 +80,36 @@ {{- "" }}...opts {{- end }} {{- if gt (len $enums) 0 -}}, __metadata: metadata{{- end -}} -{{- "" }} }, +{{- "" }}}, {{- end }} - }, - {{- /* Add subfields */ -}} - {{- if and .TypeRef.IsList (IsListOfObject .TypeRef) }} - { - operation: "{{- range $i, $v := . | GetArrayField }}{{if $i }} {{ end }}{{ $v.Name | ToLowerCase }}{{- end }}" - }, - {{- end }} - ], - await this._ctx.connection() - ) + ){{- /* Add subfields */ -}} + {{- if and .TypeRef.IsList (IsListOfObject .TypeRef) }}.select("{{- range $i, $v := . | GetArrayField }}{{if $i }} {{ end }}{{ $v.Name | ToLowerCase }}{{- end }}") + {{- end }} + + {{ if not .TypeRef.IsVoid }}const response: Awaited<{{ if $convertID }}{{ .TypeRef | FormatOutputType }}{{ else }}{{ $promiseRetType }}{{ end }}> = {{ end }}await ctx.execute() {{ if $convertID -}} - return new {{ $promiseRetType }}({ - queryTree: [ + return new {{ $promiseRetType }}(new Context( + [ { operation: "load{{ $promiseRetType }}FromID", args: { id: response }, }, ], - ctx: this._ctx, - }) + this._ctx.getConnection(), + )) {{- else if not .TypeRef.IsVoid -}} {{- if and .TypeRef.IsList (IsListOfObject .TypeRef) }} return response.map( - (r) => new {{ . | FormatReturnType | ToSingleType }}( - { - queryTree: [ + (r) => new {{ . | FormatReturnType | ToSingleType }}(new Context( + [ { operation: "load{{. | FormatReturnType | ToSingleType}}FromID", args: { id: r.id } } ], - ctx: this._ctx - }, + this._ctx.getConnection() + ), {{- range $v := . | GetArrayField }} r.{{ $v.Name | ToLowerCase }}, {{- end }} diff --git a/cmd/codegen/generator/typescript/templates/src/object.ts.gtpl b/cmd/codegen/generator/typescript/templates/src/object.ts.gtpl index 9c2e23ebb0..4ea01586d5 100644 --- a/cmd/codegen/generator/typescript/templates/src/object.ts.gtpl +++ b/cmd/codegen/generator/typescript/templates/src/object.ts.gtpl @@ -31,14 +31,14 @@ export class {{ .Name | QueryToClient | FormatName }} extends BaseClient { * Constructor is used for internal usage only, do not create object from it. */ constructor( - parent?: { queryTree?: QueryTree[], ctx: Context }, + ctx?: Context, {{- range $i, $field := .Fields }} {{- if $field.TypeRef.IsScalar }} _{{ $field.Name }}?: {{ $field.TypeRef | FormatOutputType }}, {{- end }} {{- end }} ) { - super(parent) + super(ctx) {{ "" }} {{- range $i, $field := .Fields }} {{- if $field.TypeRef.IsScalar }} diff --git a/cmd/codegen/generator/typescript/templates/src/testdata/object_test_want.ts b/cmd/codegen/generator/typescript/templates/src/testdata/object_test_want.ts index a1300b3710..4d17a7c526 100644 --- a/cmd/codegen/generator/typescript/templates/src/testdata/object_test_want.ts +++ b/cmd/codegen/generator/typescript/templates/src/testdata/object_test_want.ts @@ -5,22 +5,18 @@ export class Container extends BaseClient { * Constructor is used for internal usage only, do not create object from it. */ constructor( - parent?: { queryTree?: QueryTree[], ctx: Context }, + ctx?: Context, ) { - super(parent) + super(ctx) } exec = (opts?: ContainerExecOpts): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "exec", - args: { ...opts }, - }, - ], - ctx: this._ctx, - }) + + const ctx = this._ctx.select( + "exec", + { ...opts }, + ) + return new Container(ctx) } /** diff --git a/cmd/codegen/generator/typescript/templates/src/testdata/objects_test_want.ts b/cmd/codegen/generator/typescript/templates/src/testdata/objects_test_want.ts index bdb7c9208e..1766fda39a 100644 --- a/cmd/codegen/generator/typescript/templates/src/testdata/objects_test_want.ts +++ b/cmd/codegen/generator/typescript/templates/src/testdata/objects_test_want.ts @@ -9,10 +9,10 @@ export class CacheVolume extends BaseClient { * Constructor is used for internal usage only, do not create object from it. */ constructor( - parent?: { queryTree?: QueryTree[], ctx: Context }, + ctx?: Context, _id?: CacheVolumeID, ) { - super(parent) + super(ctx) this._id = _id } @@ -21,16 +21,12 @@ export class CacheVolume extends BaseClient { return this._id } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "id", - }, - ], - await this._ctx.connection() + const ctx = this._ctx.select( + "id", ) + const response: Awaited = await ctx.execute() + return response } @@ -45,9 +41,9 @@ export class Host extends BaseClient { * Constructor is used for internal usage only, do not create object from it. */ constructor( - parent?: { queryTree?: QueryTree[], ctx: Context }, + ctx?: Context, ) { - super(parent) + super(ctx) } @@ -55,47 +51,35 @@ export class Host extends BaseClient { * Access a directory on the host */ directory = (path: string, opts?: HostDirectoryOpts): Directory => { - return new Directory({ - queryTree: [ - ...this._queryTree, - { - operation: "directory", - args: { path, ...opts }, - }, - ], - ctx: this._ctx, - }) + + const ctx = this._ctx.select( + "directory", + { path, ...opts }, + ) + return new Directory(ctx) } /** * Lookup the value of an environment variable. Null if the variable is not available. */ envVariable = (name: string): HostVariable => { - return new HostVariable({ - queryTree: [ - ...this._queryTree, - { - operation: "envVariable", - args: { name }, - }, - ], - ctx: this._ctx, - }) + + const ctx = this._ctx.select( + "envVariable", + { name }, + ) + return new HostVariable(ctx) } /** * The current working directory on the host */ workdir = (opts?: HostWorkdirOpts): Directory => { - return new Directory({ - queryTree: [ - ...this._queryTree, - { - operation: "workdir", - args: { ...opts }, - }, - ], - ctx: this._ctx, - }) + + const ctx = this._ctx.select( + "workdir", + { ...opts }, + ) + return new Directory(ctx) } } diff --git a/cmd/dagger/.dagger/go.mod b/cmd/dagger/.dagger/go.mod index 20dbef5c41..e8ed49a441 100644 --- a/cmd/dagger/.dagger/go.mod +++ b/cmd/dagger/.dagger/go.mod @@ -17,7 +17,7 @@ require ( go.opentelemetry.io/otel/trace v1.27.0 go.opentelemetry.io/proto/otlp v1.3.1 golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa - golang.org/x/sync v0.8.0 + golang.org/x/sync v0.10.0 google.golang.org/grpc v1.65.0 ) @@ -35,8 +35,8 @@ require ( go.opentelemetry.io/otel/metric v1.27.0 go.opentelemetry.io/otel/sdk/metric v1.27.0 golang.org/x/net v0.29.0 // indirect - golang.org/x/sys v0.26.0 // indirect - golang.org/x/text v0.18.0 // indirect + golang.org/x/sys v0.28.0 // indirect + golang.org/x/text v0.21.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect google.golang.org/protobuf v1.34.2 // indirect diff --git a/cmd/dagger/.dagger/go.sum b/cmd/dagger/.dagger/go.sum index cb0bbbff0b..c146adf411 100644 --- a/cmd/dagger/.dagger/go.sum +++ b/cmd/dagger/.dagger/go.sum @@ -71,12 +71,12 @@ golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8 golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= -golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= -golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= -golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= -golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 h1:wKguEg1hsxI2/L3hUYrpo1RVi48K+uTyzKqprwLXsb8= google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142/go.mod h1:d6be+8HhtEtucleCbxpPW9PA9XwISACu8nvpPqF0BVo= google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 h1:e7S5W7MGGLaSu8j3YjdezkZ+m1/Nm0uRVRMEMGk26Xs= diff --git a/cmd/dagger/call.go b/cmd/dagger/call.go index 2e11680a4d..d50ed66808 100644 --- a/cmd/dagger/call.go +++ b/cmd/dagger/call.go @@ -62,7 +62,7 @@ available functions. GroupID: moduleGroup.ID, RunE: func(cmd *cobra.Command, args []string) error { return withEngine(cmd.Context(), client.Params{}, func(ctx context.Context, engineClient *client.Client) (rerr error) { - mod, err := initializeModule(ctx, engineClient.Dagger()) + mod, err := initializeDefaultModule(ctx, engineClient.Dagger()) if err != nil { return err } diff --git a/cmd/dagger/functions.go b/cmd/dagger/functions.go index 69a06ba51d..a96df75172 100644 --- a/cmd/dagger/functions.go +++ b/cmd/dagger/functions.go @@ -268,7 +268,7 @@ func (fc *FuncCommand) execute(c *cobra.Command, a []string) (rerr error) { if fc.DisableModuleLoad { mod, err = initializeCore(ctx, fc.c.Dagger()) } else { - mod, err = initializeModule(ctx, fc.c.Dagger()) + mod, err = initializeDefaultModule(ctx, fc.c.Dagger()) } if err != nil { return err @@ -296,89 +296,6 @@ func (fc *FuncCommand) execute(c *cobra.Command, a []string) (rerr error) { return cmd.RunE(cmd, flags) } -// initializeCore loads the core type definitions. -func initializeCore(ctx context.Context, dag *dagger.Client) (rdef *moduleDef, rerr error) { - def := &moduleDef{} - - ctx, loadSpan := Tracer().Start(ctx, "inspecting core types", telemetry.Encapsulate()) - defer telemetry.End(loadSpan, func() error { return rerr }) - - if err := def.loadTypeDefs(ctx, dag); err != nil { - return nil, err - } - - return def, nil -} - -// initializeModule loads the module's type definitions. -func initializeModule(ctx context.Context, dag *dagger.Client) (*moduleDef, error) { - modRef, _ := getExplicitModuleSourceRef() - return maybeInitializeModule(ctx, dag, modRef, false) -} - -// maybeInitializeModule optionally loads the module's type definitions. -func maybeInitializeModule(ctx context.Context, dag *dagger.Client, srcRef string, optional bool) (rdef *moduleDef, rerr error) { - def := &moduleDef{} - - ctx, span := Tracer().Start(ctx, "loading module") - defer telemetry.End(span, func() error { return rerr }) - - resolveCtx, resolveSpan := Tracer().Start(ctx, "finding module configuration", telemetry.Encapsulate()) - defer telemetry.End(resolveSpan, func() error { return rerr }) - - // the user explicitly set the `-m,--mod` flag - modRefSet := srcRef != "" - - if !modRefSet { - srcRef = moduleURLDefault - } - - modConf, err := getModuleConfigurationForSourceRef(resolveCtx, dag, srcRef, true, true) - if err != nil && (modRefSet || !optional) { - return nil, fmt.Errorf("failed to get configured module: %w", err) - } - resolveSpan.End() - - if modConf == nil || !modConf.FullyInitialized() { - return initializeCore(ctx, dag) - } - - def.Source = modConf.Source - mod := modConf.Source.AsModule().Initialize() - - serveCtx, serveSpan := Tracer().Start(ctx, "serving module", telemetry.Encapsulate()) - err = mod.Serve(serveCtx) - telemetry.End(serveSpan, func() error { return err }) - if err != nil { - return nil, fmt.Errorf("failed to serve module: %w", err) - } - - ctx, loadSpan := Tracer().Start(ctx, "inspecting module", telemetry.Encapsulate()) - defer telemetry.End(loadSpan, func() error { return rerr }) - - name, err := mod.Name(ctx) - if err != nil { - return nil, fmt.Errorf("get module name: %w", err) - } - def.Name = name - - desc, err := mod.Description(ctx) - if err != nil { - return nil, fmt.Errorf("get module description: %w", err) - } - def.Description = desc - - if err := def.loadTypeDefs(ctx, dag); err != nil { - return nil, err - } - - if def.MainObject == nil { - return nil, fmt.Errorf("main object not found, check that your module's name and main object match") - } - - return def, nil -} - // loadCommand finds the leaf command to run. func (fc *FuncCommand) loadCommand(c *cobra.Command, a []string) (rcmd *cobra.Command, rargs []string, rerr error) { ctx := c.Context() @@ -609,25 +526,24 @@ func (fc *FuncCommand) RunE(ctx context.Context, fn *modFunction) func(*cobra.Co // from wrong CLI usage. fc.showUsage = false - return executeRequest(ctx, q, fn.ReturnType, cmd.OutOrStdout(), cmd.ErrOrStderr()) - } -} + o := cmd.OutOrStdout() + e := cmd.ErrOrStderr() -func executeRequest(ctx context.Context, q *querybuilder.Selection, returnType *modTypeDef, o, e io.Writer) error { - // It's possible that a chain ending in an object doesn't have anything - // else to sub-select. In that case `q` will be nil to signal that we - // just want to return the object's name, without making an API request. - if q == nil { - return handleResponse(returnType, nil, o, e) - } + // It's possible that a chain ending in an object doesn't have anything + // else to sub-select. In that case `q` will be nil to signal that we + // just want to return the object's name, without making an API request. + if q == nil { + return handleResponse(fn.ReturnType, nil, o, e) + } - var response any + var response any - if err := makeRequest(ctx, q, &response); err != nil { - return err - } + if err := makeRequest(ctx, q, &response); err != nil { + return err + } - return handleResponse(returnType, response, o, e) + return handleResponse(fn.ReturnType, response, o, e) + } } func handleObjectLeaf(ctx context.Context, q *querybuilder.Selection, typeDef *modTypeDef) (*querybuilder.Selection, error) { @@ -707,7 +623,7 @@ func handleResponse(returnType *modTypeDef, response any, o, e io.Writer) error return nil } - // Handle the `export` convenience. + // Handle the `export` convenience, i.e, -o,--output flag. switch returnType.Name() { case Container, Directory, File: if outputPath != "" { @@ -720,9 +636,7 @@ func handleResponse(returnType *modTypeDef, response any, o, e io.Writer) error } } - var outputFormat string - - // Command chain ended in an object. + // Command chain ended in an object, so add the _type field. if returnType.AsFunctionProvider() != nil { typeName := returnType.AsFunctionProvider().ProviderName() @@ -743,7 +657,39 @@ func handleResponse(returnType *modTypeDef, response any, o, e io.Writer) error } response = r } + } + + buf := new(bytes.Buffer) + frmt := outputFormat(returnType) + if err := printResponse(buf, response, frmt); err != nil { + return err + } + + if outputPath != "" { + if err := writeOutputFile(outputPath, buf); err != nil { + return fmt.Errorf("couldn't write output to file: %w", err) + } + path, err := client.Abs(outputPath) + if err != nil { + // don't fail because at this point the output has been saved successfully + slog.Warn("Failed to get absolute path", "error", err) + path = outputPath + } + fmt.Fprintf(e, "Saved output to %q.\n", path) + } + _, err := buf.WriteTo(o) + if stdoutIsTTY && !strings.HasSuffix(buf.String(), "\n") { + fmt.Fprintln(o) + } + + return err +} + +func outputFormat(typeDef *modTypeDef) string { + var outputFormat string + + if typeDef != nil && typeDef.AsFunctionProvider() != nil { // Use yaml when printing scalars because it's more human-readable // and handles lists and multiline strings well. if stdoutIsTTY { @@ -758,51 +704,32 @@ func handleResponse(returnType *modTypeDef, response any, o, e io.Writer) error outputFormat = "json" } - buf := new(bytes.Buffer) - switch outputFormat { + return outputFormat +} + +func printResponse(w io.Writer, response any, format string) error { + switch format { case "json": // disable HTML escaping to improve readability - encoder := json.NewEncoder(buf) + encoder := json.NewEncoder(w) encoder.SetEscapeHTML(false) encoder.SetIndent("", " ") - if err := encoder.Encode(response); err != nil { - return err - } + return encoder.Encode(response) + case "yaml": out, err := yaml.Marshal(response) if err != nil { return err } - if _, err := buf.Write(out); err != nil { - return err - } - case "": - if err := printFunctionResult(buf, response); err != nil { - return err - } - default: - return fmt.Errorf("wrong output format %q", outputFormat) - } + _, err = w.Write(out) + return err - if outputPath != "" { - if err := writeOutputFile(outputPath, buf); err != nil { - return fmt.Errorf("couldn't write output to file: %w", err) - } - path, err := client.Abs(outputPath) - if err != nil { - // don't fail because at this point the output has been saved successfully - slog.Warn("Failed to get absolute path", "error", err) - path = outputPath - } - fmt.Fprintf(e, "Saved output to %q.\n", path) - } + case "": + return printPlainResult(w, response) - _, err := buf.WriteTo(o) - if stdoutIsTTY && !strings.HasSuffix(buf.String(), "\n") { - fmt.Fprintln(o) + default: + return fmt.Errorf("wrong output format %q", format) } - - return err } // addPayload merges a map into a response from getting an object's values. @@ -844,11 +771,11 @@ func writeOutputFile(path string, buf *bytes.Buffer) error { return os.WriteFile(path, buf.Bytes(), 0o644) //nolint: gosec } -func printFunctionResult(w io.Writer, r any) error { +func printPlainResult(w io.Writer, r any) error { switch t := r.(type) { case []any: for _, v := range t { - if err := printFunctionResult(w, v); err != nil { + if err := printPlainResult(w, v); err != nil { return err } fmt.Fprintln(w) @@ -858,7 +785,7 @@ func printFunctionResult(w io.Writer, r any) error { // NB: we're only interested in values because this is where we unwrap // things like {"container":{"from":{"withExec":{"stdout":"foo"}}}}. for _, v := range t { - if err := printFunctionResult(w, v); err != nil { + if err := printPlainResult(w, v); err != nil { return err } } diff --git a/cmd/dagger/modconf.graphql b/cmd/dagger/modconf.graphql new file mode 100644 index 0000000000..256a25a543 --- /dev/null +++ b/cmd/dagger/modconf.graphql @@ -0,0 +1,19 @@ +query ModuleConfig($source: ModuleSourceID!) { + source: loadModuleSourceFromID(id: $source) { + asString + module: asModule { + name + initialize { + description + } + dependencies { + name + description + source { + asString + pin + } + } + } + } +} diff --git a/cmd/dagger/module.go b/cmd/dagger/module.go index 6abdcac90f..834b79a697 100644 --- a/cmd/dagger/module.go +++ b/cmd/dagger/module.go @@ -21,6 +21,7 @@ import ( "github.com/spf13/pflag" "dagger.io/dagger" + "dagger.io/dagger/telemetry" "github.com/dagger/dagger/analytics" "github.com/dagger/dagger/core/modules" "github.com/dagger/dagger/engine/client" @@ -687,10 +688,11 @@ func getModuleConfigurationForSourceRef( srcRefStr string, doFindUp bool, resolveFromCaller bool, + srcOpts ...dagger.ModuleSourceOpts, ) (*configuredModule, error) { conf := &configuredModule{} - conf.Source = dag.ModuleSource(srcRefStr) + conf.Source = dag.ModuleSource(srcRefStr, srcOpts...) var err error conf.SourceKind, err = conf.Source.Kind(ctx) if err != nil { @@ -724,7 +726,8 @@ func getModuleConfigurationForSourceRef( namedDep, ok := modCfg.DependencyByName(srcRefStr) if ok { - depSrc := dag.ModuleSource(namedDep.Source) + opts := dagger.ModuleSourceOpts{RefPin: namedDep.Pin} + depSrc := dag.ModuleSource(namedDep.Source, opts) depKind, err := depSrc.Kind(ctx) if err != nil { return nil, err @@ -733,7 +736,7 @@ func getModuleConfigurationForSourceRef( if depKind == dagger.ModuleSourceKindLocalSource { depSrcRef = filepath.Join(defaultFindupConfigDir, namedDep.Source) } - return getModuleConfigurationForSourceRef(ctx, dag, depSrcRef, false, resolveFromCaller) + return getModuleConfigurationForSourceRef(ctx, dag, depSrcRef, false, resolveFromCaller, opts) } } @@ -764,6 +767,7 @@ func getModuleConfigurationForSourceRef( if err := os.MkdirAll(srcRefStr, 0755); err != nil { return nil, fmt.Errorf("failed to create directory for %s: %w", srcRefStr, err) } + conf.Source = dag.ModuleSource(srcRefStr) conf.LocalContextPath, err = conf.Source.ResolveContextPathFromCaller(ctx) @@ -858,6 +862,115 @@ func optionalModCmdWrapper( } } +// initializeCore loads the core type definitions only +func initializeCore(ctx context.Context, dag *dagger.Client) (rdef *moduleDef, rerr error) { + def := &moduleDef{} + + if err := def.loadTypeDefs(ctx, dag); err != nil { + return nil, err + } + + return def, nil +} + +// initializeDefaultModule loads the module referenced by the -m,--mod flag +// +// By default, looks for a module in the current directory, or above. +// Returns an error if the module is not found or invalid. +func initializeDefaultModule(ctx context.Context, dag *dagger.Client) (*moduleDef, error) { + modRef, _ := getExplicitModuleSourceRef() + if modRef == "" { + modRef = moduleURLDefault + } + return initializeModule(ctx, dag, modRef, true) +} + +// maybeInitializeDefaultModule optionally loads the module referenced by the -m,--mod flag, +// falling back to the core definitions +func maybeInitializeDefaultModule(ctx context.Context, dag *dagger.Client) (*moduleDef, string, error) { + modRef, _ := getExplicitModuleSourceRef() + if modRef == "" { + modRef = moduleURLDefault + } + return maybeInitializeModule(ctx, dag, modRef) +} + +// initializeModule loads the module at the given source ref +// +// Returns an error if the module is not found or invalid. +func initializeModule( + ctx context.Context, + dag *dagger.Client, + srcRef string, + doFindUp bool, + srcOpts ...dagger.ModuleSourceOpts, +) (rdef *moduleDef, rerr error) { + ctx, span := Tracer().Start(ctx, "load module") + defer telemetry.End(span, func() error { return rerr }) + + findCtx, findSpan := Tracer().Start(ctx, "finding module configuration", telemetry.Encapsulate()) + conf, err := getModuleConfigurationForSourceRef(findCtx, dag, srcRef, doFindUp, true, srcOpts...) + defer telemetry.End(findSpan, func() error { return err }) + + if err != nil { + return nil, fmt.Errorf("failed to get configured module: %w", err) + } + if !conf.FullyInitialized() { + return nil, fmt.Errorf("module must be fully initialized") + } + + return initializeModuleConfig(ctx, dag, conf) +} + +// maybeInitializeModule optionally loads the module at the given source ref, +// falling back to the core definitions if the module isn't found +func maybeInitializeModule(ctx context.Context, dag *dagger.Client, srcRef string) (*moduleDef, string, error) { + if def, err := tryInitializeModule(ctx, dag, srcRef); def != nil || err != nil { + return def, srcRef, err + } + + def, err := initializeCore(ctx, dag) + return def, "", err +} + +// tryInitializeModule tries to load a module if it exists +// +// Returns an error if the module is invalid or couldn't be loaded, but not +// if the module wasn't found. +func tryInitializeModule(ctx context.Context, dag *dagger.Client, srcRef string) (rdef *moduleDef, rerr error) { + ctx, span := Tracer().Start(ctx, "looking for module") + defer telemetry.End(span, func() error { return rerr }) + + findCtx, findSpan := Tracer().Start(ctx, "finding module configuration", telemetry.Encapsulate()) + conf, _ := getModuleConfigurationForSourceRef(findCtx, dag, srcRef, true, true) + findSpan.End() + + if conf == nil || !conf.FullyInitialized() { + return nil, nil + } + + span.SetName("load module") + + return initializeModuleConfig(ctx, dag, conf) +} + +// initializeModuleConfig loads a module using a detected module configuration +func initializeModuleConfig(ctx context.Context, dag *dagger.Client, conf *configuredModule) (rdef *moduleDef, rerr error) { + serveCtx, serveSpan := Tracer().Start(ctx, "initializing module", telemetry.Encapsulate()) + err := conf.Source.AsModule().Initialize().Serve(serveCtx) + telemetry.End(serveSpan, func() error { return err }) + if err != nil { + return nil, fmt.Errorf("failed to serve module: %w", err) + } + + def, err := inspectModule(ctx, dag, conf.Source) + if err != nil { + return nil, err + } + + return def, def.loadTypeDefs(ctx, dag) +} + // moduleDef is a representation of a dagger module. type moduleDef struct { Name string @@ -871,13 +984,112 @@ type moduleDef struct { // the ModuleSource definition for the module, needed by some arg types // applying module-specific configs to the arg value. Source *dagger.ModuleSource + + // ModRef is the human readable module source reference as returned by the API + ModRef string + + Dependencies []*moduleDependency } +type moduleDependency struct { + Name string + Description string + Source *dagger.ModuleSource + + // ModRef is the human readable module source reference as returned by the API + ModRef string + + // RefPin is the module source pin for this dependency, if any + RefPin string +} + +func (m *moduleDependency) Short() string { + s := m.Description + if s == "" { + s = "-" + } + return strings.SplitN(s, "\n", 2)[0] +} + +//go:embed modconf.graphql +var loadModConfQuery string + //go:embed typedefs.graphql var loadTypeDefsQuery string +func inspectModule(ctx context.Context, dag *dagger.Client, source *dagger.ModuleSource) (rdef *moduleDef, rerr error) { + ctx, span := Tracer().Start(ctx, "inspecting module metadata", telemetry.Encapsulate()) + defer telemetry.End(span, func() error { return rerr }) + + // NB: All we need most of the time is the name of the dependencies. + // We need the descriptions when listing the dependencies, and the source + // ref if we need to load a specific dependency. However getting the refs + // and descriptions here, at module load, doesn't add much overhead and + // makes it easier (and faster) later. + + var res struct { + Source struct { + AsString string + Module struct { + Name string + Initialize struct { + Description string + } + Dependencies []struct { + Name string + Description string + Source struct { + AsString string + Pin string + } + } + } + } + } + + id, err := source.ID(ctx) + if err != nil { + return nil, err + } + + err = dag.Do(ctx, &dagger.Request{ + Query: loadModConfQuery, + Variables: map[string]any{ + "source": id, + }, + }, &dagger.Response{ + Data: &res, + }) + if err != nil { + return nil, fmt.Errorf("query module metadata: %w", err) + } + + deps := make([]*moduleDependency, 0, len(res.Source.Module.Dependencies)) + for _, dep := range res.Source.Module.Dependencies { + deps = append(deps, &moduleDependency{ + Name: dep.Name, + Description: dep.Description, + ModRef: dep.Source.AsString, + RefPin: dep.Source.Pin, + }) + } + + def := &moduleDef{ + Source: source, + ModRef: res.Source.AsString, + Name: res.Source.Module.Name, + Description: res.Source.Module.Initialize.Description, + Dependencies: deps, + } + + return def, nil +} + // loadModTypeDefs loads the objects defined by the given module in an easier to use data structure. -func (m *moduleDef) loadTypeDefs(ctx context.Context, dag *dagger.Client) error { +func (m *moduleDef) loadTypeDefs(ctx context.Context, dag *dagger.Client) (rerr error) { + ctx, loadSpan := Tracer().Start(ctx, "loading type definitions", telemetry.Encapsulate()) + defer telemetry.End(loadSpan, func() error { return rerr }) + var res struct { TypeDefs []*modTypeDef } @@ -929,6 +1141,10 @@ func (m *moduleDef) loadTypeDefs(ctx context.Context, dag *dagger.Client) error } } + if m.MainObject == nil { + return fmt.Errorf("main object not found, check that your module's name and main object match") + } + m.LoadFunctionTypeDefs(m.MainObject.AsObject.Constructor) // FIXME: the API doesn't return the module constructor in the Query object @@ -1020,6 +1236,11 @@ func (m *moduleDef) GetObjectFunction(objectName, functionName string) (*modFunc } func (m *moduleDef) GetFunction(fp functionProvider, functionName string) (*modFunction, error) { + // This avoids an issue with module constructors overriding core functions. + // See https://github.com/dagger/dagger/issues/9122 + if m.HasModule() && fp.ProviderName() == "Query" && m.MainObject.AsObject.Constructor.CmdName() == functionName { + return m.MainObject.AsObject.Constructor, nil + } for _, fn := range fp.GetFunctions() { if fn.Name == functionName || fn.CmdName() == functionName { m.LoadFunctionTypeDefs(fn) @@ -1073,6 +1294,15 @@ func (m *moduleDef) GetInput(name string) *modInput { return nil } +func (m *moduleDef) GetDependency(name string) *moduleDependency { + for _, dep := range m.Dependencies { + if dep.Name == name { + return dep + } + } + return nil +} + // HasModule checks if a module's definitions are loaded func (m *moduleDef) HasModule() bool { return m.Name != "" @@ -1083,7 +1313,7 @@ func (m *moduleDef) GetCoreFunctions() []*modFunction { fns := make([]*modFunction, 0, len(all)) for _, fn := range all { - if fn.ReturnType.AsObject != nil && !fn.ReturnType.AsObject.IsCore() { + if fn.ReturnType.AsObject != nil && !fn.ReturnType.AsObject.IsCore() || fn.Name == "" { continue } fns = append(fns, fn) @@ -1092,14 +1322,24 @@ func (m *moduleDef) GetCoreFunctions() []*modFunction { return fns } -// HasCoreFunction checks if there's a core function with the given name. -func (m *moduleDef) HasCoreFunction(name string) bool { +// GetCoreFunction returns a core function with the given name. +func (m *moduleDef) GetCoreFunction(name string) *modFunction { for _, fn := range m.GetCoreFunctions() { if fn.Name == name || fn.CmdName() == name { - return true + return fn } } - return false + return nil +} + +// HasCoreFunction checks if there's a core function with the given name. +func (m *moduleDef) HasCoreFunction(name string) bool { + fn := m.GetCoreFunction(name) + return fn != nil +} + +func (m *moduleDef) HasMainFunction(name string) bool { + return m.HasFunction(m.MainObject.AsFunctionProvider(), name) } // HasFunction checks if an object has a function with the given name. @@ -1111,11 +1351,6 @@ func (m *moduleDef) HasFunction(fp functionProvider, name string) bool { return fn != nil } -func (m *moduleDef) IsModuleConstructor(fn *modFunction) bool { - fp := fn.ReturnType.AsFunctionProvider() - return fp != nil && !fp.IsCore() -} - // LoadTypeDef attempts to replace a function's return object type or argument's // object type with with one from the module's object type definitions, to // recover missing function definitions in those places when chaining functions. diff --git a/cmd/dagger/shell.go b/cmd/dagger/shell.go index b93abc1260..b393b3ccd1 100644 --- a/cmd/dagger/shell.go +++ b/cmd/dagger/shell.go @@ -39,6 +39,10 @@ const ( helpIndent = uint(2) shellHandlerExit = 200 + shellStdlibCmdName = ".stdlib" + shellDepsCmdName = ".deps" + shellCoreCmdName = ".core" + // We need a prompt that conveys the unique nature of the Dagger shell. Per gpt4: // The โ‹ˆ symbol, known as the bowtie, has deep roots in relational databases and set theory, // where it denotes a join operation. This makes it especially fitting for a DAG environment, @@ -69,8 +73,9 @@ var ( ) func init() { - shellCmd.Flags().StringVarP(&shellCode, "code", "c", "", "command to be executed") - shellCmd.Flags().BoolVar(&shellNoLoadModule, "no-load", false, "don't load module during shell startup") + shellCmd.Flags().StringVarP(&shellCode, "code", "c", "", "Command to be executed") + shellCmd.Flags().BoolVar(&shellNoLoadModule, "no-mod", false, "Don't load module during shell startup (mutually exclusive with --mod)") + shellCmd.MarkFlagsMutuallyExclusive("mod", "no-mod") } var shellCmd = &cobra.Command{ @@ -104,15 +109,14 @@ type shellCallHandler struct { stdout io.Writer stderr io.Writer - // modRef is the module reference for the default module to use + // modRef is a key from modDefs, to set the corresponding module as the default + // when no state is present, or when the state's ModRef is empty modRef string - // modDefs has the module type definitions from introspection, keyed by module ref + // modDefs has the cached module definitions, after loading, and keyed by + // module reference as inputed by the user modDefs map[string]*moduleDef - // cfg holds the final values for the module's constructor, i.e., the module configuration - cfg map[string]any - // switch to Frontend.Background for rendering output while the TUI is // running when in interactive mode tui bool @@ -129,6 +133,9 @@ type shellCallHandler struct { // builtins is the list of Dagger Shell builtin commands builtins []*ShellCommand + + // stdlib is the list of standard library commands + stdlib []*ShellCommand } // RunAll is the entry point for the shell command @@ -184,18 +191,14 @@ func (h *shellCallHandler) RunAll(ctx context.Context, args []string) error { if shellNoLoadModule { def, err = initializeCore(ctx, h.dag) } else { - ref, _ = getExplicitModuleSourceRef() - def, err = maybeInitializeModule(ctx, h.dag, ref, true) - if ref == "" { - ref = moduleURLDefault - } + def, ref, err = maybeInitializeDefaultModule(ctx, h.dag) } if err != nil { return err } h.modRef = ref h.modDefs[ref] = def - h.registerBuiltins() + h.registerCommands() // Example: `dagger shell -c 'container | workdir'` if shellCode != "" { @@ -241,26 +244,11 @@ func litWord(s string) *syntax.Word { // run parses code and executes the interpreter's Runner func (h *shellCallHandler) run(ctx context.Context, reader io.Reader, name string) error { - file, err := syntax.NewParser(syntax.Variant(syntax.LangPOSIX)).Parse(reader, name) + file, err := parseShell(reader, name) if err != nil { return err } - syntax.Walk(file, func(node syntax.Node) bool { - if node, ok := node.(*syntax.CmdSubst); ok { - // Rewrite command substitutions from $(foo; bar) to $(exec <&-; foo; bar) - // so that all the original commands run with a closed (nil) standard input. - node.Stmts = append([]*syntax.Stmt{{ - Cmd: &syntax.CallExpr{Args: []*syntax.Word{litWord("..exec")}}, - Redirs: []*syntax.Redirect{{ - Op: syntax.DplIn, - Word: litWord("-"), - }}, - }}, node.Stmts...) - } - return true - }) - h.stdoutBuf.Reset() h.stderrBuf.Reset() @@ -291,18 +279,41 @@ func (h *shellCallHandler) run(ctx context.Context, reader io.Reader, name strin return err } - s, b, err := readShellState(h.stdoutBuf) - if err != nil { + resp, err := h.Result(ctx, h.stdoutBuf, true, handleObjectLeaf) + if err != nil || resp == nil { return err } - if s != nil { - return h.Result(ctx, s) - } return h.withTerminal(func(_ io.Reader, stdout, _ io.Writer) error { - _, err := fmt.Fprint(stdout, string(b)) - return err + fmt.Fprint(stdout, resp) + if sval, ok := resp.(string); ok && stdoutIsTTY && !strings.HasSuffix(sval, "\n") { + fmt.Fprintln(stdout) + } + return nil + }) +} + +func parseShell(reader io.Reader, name string) (*syntax.File, error) { + file, err := syntax.NewParser(syntax.Variant(syntax.LangPOSIX)).Parse(reader, name) + if err != nil { + return nil, err + } + + syntax.Walk(file, func(node syntax.Node) bool { + if node, ok := node.(*syntax.CmdSubst); ok { + // Rewrite command substitutions from $(foo; bar) to $(exec <&-; foo; bar) + // so that all the original commands run with a closed (nil) standard input. + node.Stmts = append([]*syntax.Stmt{{ + Cmd: &syntax.CallExpr{Args: []*syntax.Word{litWord("..exec")}}, + Redirs: []*syntax.Redirect{{ + Op: syntax.DplIn, + Word: litWord("-"), + }}, + }}, node.Stmts...) + } + return true }) + return file, nil } // runPath executes code from a file @@ -420,19 +431,22 @@ func (h *shellCallHandler) loadReadlineConfig(prompt string) (*readline.Config, Prompt: prompt, HistoryFile: filepath.Join(dataRoot, "histfile"), HistoryLimit: 1000, + AutoComplete: &shellAutoComplete{h}, }, nil } func (h *shellCallHandler) Prompt(out *termenv.Output, fg termenv.Color) string { - prompt := out.String(shellPrompt).Foreground(fg).String() - if ps1 := h.ps1(); ps1 != "" { - prompt = out.String(ps1).Faint().String() + " " + prompt + sb := new(strings.Builder) + + if def, _ := h.GetModuleDef(nil); def != nil { + sb.WriteString(out.String(def.ModRef).Bold().Foreground(termenv.ANSICyan).String()) + sb.WriteString(" ") } - return prompt + " " -} -func (h *shellCallHandler) ps1() string { - return h.modDef(nil).Name + sb.WriteString(out.String(shellPrompt).Bold().Foreground(fg).String()) + sb.WriteString(" ") + + return sb.String() } // withTerminal handles using stdin, stdout, and stderr when the TUI is runnin @@ -452,7 +466,7 @@ func (h *shellCallHandler) withTerminal(fn func(stdin io.Reader, stdout, stderr func (h *shellCallHandler) Exec(next interp.ExecHandlerFunc) interp.ExecHandlerFunc { return func(ctx context.Context, args []string) error { if h.debug { - shellLogf(ctx, "[DBG] Exec(%v)[%d]\n", args, len(args)) + shellDebug(ctx, "Exec(%v)", args) } // This avoids interpreter builtins running first, which would make it @@ -462,11 +476,17 @@ func (h *shellCallHandler) Exec(next interp.ExecHandlerFunc) interp.ExecHandlerF args = args[1:] } - err := h.cmd(ctx, args) + st, err := h.cmd(ctx, args) + if err == nil && st != nil { + if h.debug { + shellDebug(ctx, "โ”” OUT(%v): %+v", args, st) + } + err = st.Write(ctx) + } if err != nil { m := err.Error() if h.debug { - shellLogf(ctx, "[DBG] Error(%v): %s\n", args, m) + shellDebug(ctx, "Error(%v): %s", args, m) } // Ensure any error from the handler is written to stdout so that // the next command in the chain knows about it. @@ -486,150 +506,317 @@ func (h *shellCallHandler) Exec(next interp.ExecHandlerFunc) interp.ExecHandlerF } } -// cmd is tt he main logic for executing simple commands -func (h *shellCallHandler) cmd(ctx context.Context, args []string) error { - var st *ShellState - var err error +// cmd is the main logic for executing simple commands +func (h *shellCallHandler) cmd(ctx context.Context, args []string) (*ShellState, error) { + c, a := args[0], args[1:] - builtin, err := h.BuiltinCommand(args[0]) - if err != nil { - return err + if isFirstShellCommand(ctx) { + return h.entrypointCall(ctx, c, a) } - if isFirstShellCommand(ctx) { - if builtin != nil { - return builtin.Execute(ctx, args[1:], nil) - } - st, err = h.entrypointCall(ctx, args) - if err != nil { - return err - } - } else { - var b []byte - st, b, err = shellState(ctx) - if err != nil { - return err - } - if st == nil { - if h.debug { - shellLogf(ctx, "[DBG] IN(%v): %q\n", args, string(b)) - } - return fmt.Errorf("unexpected input for command %q", args[0]) + var b []byte + st, b, err := shellState(ctx) + if err != nil { + return nil, err + } + if st == nil { + if h.debug { + shellDebug(ctx, "IN(%v): %q", args, string(b)) } + return nil, fmt.Errorf("unexpected input for command %q", c) } - if h.debug { - shellLogf(ctx, "[DBG] IN(%v): %v\n", args, st) + shellDebug(ctx, "โ”” IN(%v): %+v", args, st) } + builtin, err := h.BuiltinCommand(c) + if err != nil { + return nil, err + } if builtin != nil { - return builtin.Execute(ctx, args[1:], st) + return nil, builtin.Execute(ctx, h, a, st) } - st, err = h.functionCall(ctx, st, args[0], args[1:]) - if err != nil { - return err - } + if st.IsCommandRoot() { + switch { + case st.IsStdlib(): + // Example: .stdlib | ` + stdlib, err := h.StdlibCommand(c) + if err != nil { + return nil, err + } + return nil, stdlib.Execute(ctx, h, a, nil) - if h.debug { - shellLogf(ctx, "[DBG] OUT(%v): %v\n", args, st) + case st.IsDeps(): + // Example: `.deps | ` + st, def, err := h.GetDependency(ctx, c) + if err != nil { + return nil, err + } + return h.constructorCall(ctx, def, st, a) + + case st.IsCore(): + // Example: `.core | ` + def := h.modDef(st) + if !def.HasCoreFunction(c) { + return nil, fmt.Errorf("core function %q not found", c) + } + // an empty state's first object is Query by default so + // functionCall already handles it + } } - return st.Write(ctx) + // module or core function call + return h.functionCall(ctx, st, c, a) } -// entrypointCall is executed when it's the first in a command pipeline -func (h *shellCallHandler) entrypointCall(ctx context.Context, args []string) (*ShellState, error) { +// entrypointCall is executed when it's the first command in a pipeline +func (h *shellCallHandler) entrypointCall(ctx context.Context, cmd string, args []string) (*ShellState, error) { if h.debug { - shellLogf(ctx, "[DBG] โ”” Entrypoint(%v)\n", args) + shellDebug(ctx, "โ”” Entrypoint(%s, %v)", cmd, args) } - def, err := h.GetModuleDef(nil) + if cmd, _ := h.BuiltinCommand(cmd); cmd != nil { + return nil, cmd.Execute(ctx, h, args, nil) + } + + st, err := h.stateLookup(ctx, cmd) if err != nil { return nil, err } - st := h.newState() + if h.debug { + shellDebug(ctx, "โ”” Found(%s, %v): %+v", cmd, args, st) + } + + if st.IsStdlib() { + cmd, err := h.StdlibCommand(cmd) + if err != nil { + return nil, err + } + return st, cmd.Execute(ctx, h, args, nil) + } + + if md, _ := h.GetModuleDef(st); md != nil { + // Command is a function in current context + if h.isCurrentContextFunction(cmd) { + // We need to assume a constructor call without arguments + st, err := h.constructorCall(ctx, md, st, nil) + if err != nil { + return nil, err + } + return h.functionCall(ctx, st, cmd, args) + } - // Same-module call (eg. 'build') - if def.HasModule() && def.HasFunction(def.MainObject.AsFunctionProvider(), args[0]) { - return h.constructorCall(def, st) + // Command is a dependency or module ref, so this is the constructor call + if st.IsEmpty() { + return h.constructorCall(ctx, md, st, args) + } } - // TODO: Dependency short name (eg. 'wolfi container') + return st, nil +} - return nil, fmt.Errorf("no such function: %q", args[0]) +func (h *shellCallHandler) isCurrentContextFunction(name string) bool { + md, _ := h.GetModuleDef(nil) + return md != nil && md.HasMainFunction(name) } -func (h *shellCallHandler) constructorCall(md *moduleDef, st *ShellState) (*ShellState, error) { - fn := md.MainObject.AsObject.Constructor +func (h *shellCallHandler) stateLookup(ctx context.Context, name string) (*ShellState, error) { + if h.debug { + shellDebug(ctx, " โ”” StateLookup(%v)", name) + } + // Is current context a loaded module? + if md, _ := h.GetModuleDef(nil); md != nil { + // 1. Function in current context + if md.HasMainFunction(name) { + if h.debug { + shellDebug(ctx, " - found in current context") + } + return h.newState(), nil + } - expected := len(fn.RequiredArgs()) - actual := len(h.cfg) + // 2. Dependency short name + if dep := md.GetDependency(name); dep != nil { + if h.debug { + shellDebug(ctx, " - found dependency (%s)", dep.ModRef) + } + depSt, _, err := h.GetDependency(ctx, name) + return depSt, err + } + } - if expected > actual { - usage := shellFunctionUseLine(md, fn) - return nil, fmt.Errorf("missing %d required argument(s) for the module. Use %q to set them", expected-actual, usage) + // 3. Standard library command + if cmd, _ := h.StdlibCommand(name); cmd != nil { + if h.debug { + shellDebug(ctx, " - found stdlib command") + } + return h.newStdlibState(), nil } - return st.WithCall(fn, h.cfg), nil + // 4. Path to local or remote module source + // (local paths are relative to the current working directory, not the loaded module) + st, err := h.getOrInitDefState(name, func() (*moduleDef, error) { + return tryInitializeModule(ctx, h.dag, name) + }) + if err != nil { + return nil, err + } + if st == nil { + return nil, fmt.Errorf("function or module %q not found", name) + } + if h.debug { + shellDebug(ctx, " - found module reference") + } + return st, nil } -// functionCall is executed for every command that the exec handler processes -func (h *shellCallHandler) functionCall(ctx context.Context, prev *ShellState, name string, args []string) (*ShellState, error) { - def := h.modDef(prev) - - // Example: .load | - if def.HasModule() && prev.ModRef != nil && len(prev.Calls) == 0 { - st, err := h.constructorCall(def, prev) - if err != nil { +func (h *shellCallHandler) getOrInitDefState(ref string, fn func() (*moduleDef, error)) (*ShellState, error) { + _, exists := h.modDefs[ref] + if !exists { + if fn == nil { + return nil, fmt.Errorf("module %q not loaded", ref) + } + def, err := fn() + if err != nil || def == nil { return nil, err } - prev = st + h.modDefs[ref] = def + } + return h.newModState(ref), nil +} + +func (h *shellCallHandler) constructorCall(ctx context.Context, md *moduleDef, st *ShellState, args []string) (*ShellState, error) { + fn := md.MainObject.AsObject.Constructor + + values, err := h.parseArgumentValues(ctx, md, fn, args) + if err != nil { + return nil, fmt.Errorf("constructor: %w", err) } - call := prev.Function() + return st.WithCall(fn, values), nil +} + +// functionCall is executed for every command that the exec handler processes +func (h *shellCallHandler) functionCall(ctx context.Context, st *ShellState, name string, args []string) (*ShellState, error) { + def := h.modDef(st) + call := st.Function() fn, err := call.GetNextDef(def, name) if err != nil { - return prev, err + return st, err } argValues, err := h.parseArgumentValues(ctx, def, fn, args) if err != nil { - return prev, fmt.Errorf("could not parse arguments for function %q: %w", fn.CmdName(), err) + return st, fmt.Errorf("could not parse arguments for function %q: %w", fn.CmdName(), err) } - return prev.WithCall(fn, argValues), nil + return st.WithCall(fn, argValues), nil } -// parseArgumentValues returns a map of argument names and their parsed values -func (h *shellCallHandler) parseArgumentValues(ctx context.Context, md *moduleDef, fn *modFunction, args []string) (map[string]any, error) { - req := fn.RequiredArgs() +// shellPreprocessArgs converts positional arguments to flag arguments +// +// Values are not processed. This function is used to leverage pflags to parse +// flags interspersed with positional arguments, so a function's required +// arguments can be placed anywhere. Then we get the unprocessed flags in +// order to validate if the remaining number of positional arguments match +// the number of required arguments. +// +// Required args in dagger shell are positional but we have a lot of power +// in custom flags that we want to reuse, so just add the corresponding +// `--flag-name` args in order for pflags to be able to parse them later. +// +// Additionally, if there's only one required argument that is a list of strings, +// all positional arguments are used as elements of that list. +func shellPreprocessArgs(fn *modFunction, args []string) ([]string, error) { + flags := pflag.NewFlagSet(fn.CmdName(), pflag.ContinueOnError) - // Required args in dagger shell are positional but we have a lot of power - // in custom flags that we want to reuse, so just add the corresponding - // `--flag-name` args in order for pflags to be able to parse them. - pos := make([]string, 0, len(req)*2) - for i, arg := range args { - if strings.HasPrefix(arg, "--") { - break + opts := fn.OptionalArgs() + + // All CLI arguments are strings at first, but booleans can be omitted. + // We don't wan't to process values yet, just validate and consume the flags + // so we get the remaining positional args. + for _, arg := range opts { + name := arg.FlagName() + + switch arg.TypeDef.Kind { + case dagger.TypeDefKindListKind: + switch arg.TypeDef.AsList.ElementTypeDef.Kind { + case dagger.TypeDefKindBooleanKind: + flags.BoolSlice(name, nil, "") + default: + flags.StringSlice(name, nil, "") + } + case dagger.TypeDefKindBooleanKind: + flags.Bool(name, false, "") + default: + flags.String(name, "", "") } - if i >= len(req) { - return nil, fmt.Errorf("accepts at most %d positional argument(s)", len(req)) + } + + if err := flags.Parse(args); err != nil { + return args, err + } + + reqs := fn.RequiredArgs() + + // A command for with-exec could include a `--`, but it's only if it's + // the first positional argument that means we've stopped processing our + // flags. So these are equivalent: + // - with-exec --redirect-stdout /out git checkout -- file + // - with-exec --redirect-stdout /out -- git checkout -- file + pos := flags.Args() + if flags.ArgsLenAtDash() == 1 { + pos = pos[1:] + } + + // Final processed arguments that will be parsed in the second phase later on. + var a []string + + // Convenience for a single required argument of type [String!]! + // All positional arguments become elements in the list. + if len(reqs) == 1 && len(pos) > 1 && reqs[0].TypeDef.String() == "[]string" { + name := reqs[0].FlagName() + a = make([]string, 0, len(opts)+len(pos)) + + for _, value := range pos { + // Instead of creating a CSV value here, repeat the flag for each + // one so that pflags is the only one dealing with CSVs. + a = append(a, fmt.Sprintf("--%s=%v", name, value)) + } + } else { + // Normal use case. Positional arguments should match number of required function arguments + if err := ExactArgs(len(reqs))(pos); err != nil { + return args, err + } + a = make([]string, 0, len(fn.Args)) + // Use the `=` syntax so that each element in the args list corresponds + // to a single argument instead of two. + for i, arg := range reqs { + a = append(a, fmt.Sprintf("--%s=%v", arg.FlagName(), pos[i])) } - pos = append(pos, "--"+req[i].FlagName(), arg) } - if len(req) > len(pos)/2 { - numMissing := len(req) - len(pos)/2 - missing := make([]string, 0, numMissing) - for _, arg := range req[len(req)-numMissing:] { - missing = append(missing, arg.FlagName()) + // Add all the optional flags + flags.Visit(func(f *pflag.Flag) { + if f.Changed { + a = append(a, fmt.Sprintf("--%s=%v", f.Name, f.Value.String())) } - return nil, fmt.Errorf("missing %d positional argument(s): %s", numMissing, strings.Join(missing, ", ")) + }) + + return a, nil +} + +// parseArgumentValues returns a map of argument names and their parsed values +func (h *shellCallHandler) parseArgumentValues(ctx context.Context, md *moduleDef, fn *modFunction, args []string) (map[string]any, error) { + args, err := shellPreprocessArgs(fn, args) + if err != nil { + return nil, err } - rem := args[len(req):] + if h.debug { + shellDebug(ctx, "preprocessed arguments: %v", args) + } flags := pflag.NewFlagSet(fn.CmdName(), pflag.ContinueOnError) flags.SetOutput(interp.HandlerCtx(ctx).Stderr) @@ -669,27 +856,27 @@ func (h *shellCallHandler) parseArgumentValues(ctx context.Context, md *moduleDe if err != nil { return err } - if strings.HasPrefix(value, shellStatePrefix) { - v, replace, err := h.parseStateArgument(ctx, a, value) - if err != nil { - return fmt.Errorf("failed expanding argument %q: %w", a.FlagName(), err) - } - // Flags only support setting their values from strings, so if - // anything else is returned, we just ignore it. - // TODO: try to validate this more to avoid surprises - if sval, ok := v.(string); ok && !replace { - return flags.Set(flag.Name, sval) - } - // This will bypass using a flag for this argument since we're - // saying it's a final value alreadyl - if replace { - values[a.Name] = v - } - return nil + v, bypass, err := h.parseFlagValue(ctx, value, a.TypeDef) + if err != nil { + return fmt.Errorf("cannot expand function argument %q: %w", a.FlagName(), err) } - return flags.Set(flag.Name, value) + if v == nil { + return fmt.Errorf("unexpected nil value while expanding function argument %q", a.FlagName()) + } + // Flags only support setting their values from strings, so if + // anything else is returned, we just ignore it. + // TODO: try to validate this more to avoid surprises + if sval, ok := v.(string); ok && !bypass { + return flags.Set(flag.Name, sval) + } + // This will bypass using a flag for this argument since we're + // saying it's a final value already. + if bypass { + values[a.Name] = v + } + return nil } - if err := flags.ParseAll(append(pos, rem...), f); err != nil { + if err := flags.ParseAll(args, f); err != nil { return nil, err } @@ -715,102 +902,141 @@ func (h *shellCallHandler) parseArgumentValues(ctx context.Context, md *moduleDe return values, nil } -func (h *shellCallHandler) parseStateArgument(ctx context.Context, arg *modFunctionArg, value string) (any, bool, error) { - // Does this replace the source value or do we pass it on to flag parsing? - var replace bool +// parseFlagValue ensures that a flag value with state gets resolved +// +// This happens most commonly when argument is the result of command expansion +// from a sub-shell. +func (h *shellCallHandler) parseFlagValue(ctx context.Context, value string, argType *modTypeDef) (any, bool, error) { + if !strings.HasPrefix(value, shellStatePrefix) { + return value, false, nil + } + + var bypass bool + + handleObjectID := func(_ context.Context, q *querybuilder.Selection, t *modTypeDef) (*querybuilder.Selection, error) { + // When an argument returns an object, assume we want its ID + // TODO: Allow ids in TypeDefs so we can directly check if there's an `id` + // function in this object. + if t.AsFunctionProvider() != nil { + if argType.Name() != t.Name() { + return nil, fmt.Errorf("expected return type %q, got %q", argType.Name(), t.Name()) + } + q = q.Select("id") + bypass = true + } - st, b, err := readShellState(strings.NewReader(value)) - if err != nil { - return nil, replace, err - } - // Not state, but has some other content - if st == nil && len(b) > 0 { - return string(b), replace, nil - } - fn, err := st.Function().GetDef(h.modDef(st)) + // TODO: do a bit more validation. Consider that values that are not + // to be replaced should only be strings, because that's what the + // flagSet supports. This also means the type won't match the expected + // definition. For example, a function that returns a `Directory` object + // could have a subshell return a path string so the flag will turn that + // into the `Directory` object. + + return q, nil + } + v, err := h.Result(ctx, strings.NewReader(value), false, handleObjectID) + return v, bypass, err +} + +// Result reads the state from stdin and returns the final result +func (h *shellCallHandler) Result( + ctx context.Context, + // r is the reader to read the shell state from + r io.Reader, + // doPrintResponse prepares the response for printing according to an output + // format + doPrintResponse bool, + // beforeRequest is a callback that allows modifying the query before making + // the request + // + // It's also useful for validating the query with the function's + // return type. + beforeRequest func(context.Context, *querybuilder.Selection, *modTypeDef) (*querybuilder.Selection, error), +) (any, error) { + st, b, err := readShellState(r) if err != nil { - return nil, false, fmt.Errorf("failed to get function definition: %w", err) + return nil, err } - - q := st.QueryBuilder(h.dag) - - // When an argument returns an object, assume we want its ID - // TODO: Allow ids in TypeDefs so we can directly check if there's an `id` - // function in this object. - if fn.ReturnType.AsFunctionProvider() != nil { - if st.Function().ReturnObject != arg.TypeDef.Name() { - return nil, replace, fmt.Errorf("expected return type %q, got %q", arg.TypeDef.Name(), st.Function().ReturnObject) + if st == nil { + return string(b), nil + } + + if st.IsCommandRoot() { + switch { + case st.IsStdlib(): + return h.CommandsList(st.Cmd, h.Stdlib()), nil + case st.IsDeps(): + return h.DependenciesList(), nil + case st.IsCore(): + def := h.modDef(nil) + return h.FunctionsList(st.Cmd, def.GetCoreFunctions()), nil + default: + return nil, fmt.Errorf("unexpected namespace %q", st.Cmd) } - q = q.Select("id") - replace = true - } - - // TODO: do a bit more validation. Consider that values that are not - // to be replaced should only be strings, because that's what the - // flagSet supports. This also means the type won't match the expected - // definition. For example, a function that returns a `Directory` object - // could have a subshell return a path string so the flag will turn that - // into the `Directory` object. - - var response any - err = makeRequest(ctx, q, &response) - return response, replace, err -} - -// Result handles making the final request and printing the response -func (h *shellCallHandler) Result(ctx context.Context, st *ShellState) error { - if h.debug { - withTerminal(func(_ io.Reader, _, stderr io.Writer) error { - fmt.Fprintf(stderr, "[DBG] Result state: %+v\n", st) - return nil - }) } def := h.modDef(st) - if def.HasModule() && st.ModRef != nil && len(st.Calls) == 0 { - newSt, err := h.constructorCall(def, st) + // Example: `build` (i.e., omitted constructor) + if def.HasModule() && st.IsEmpty() { + st, err = h.constructorCall(ctx, def, st, nil) if err != nil { - return err + return nil, err } - st = newSt } fn, err := st.Function().GetDef(def) if err != nil { - return err + return nil, err } - sel := st.QueryBuilder(h.dag) - q, err := handleObjectLeaf(ctx, sel, fn.ReturnType) - if err != nil { - return err + q := st.QueryBuilder(h.dag) + if beforeRequest != nil { + q, err = beforeRequest(ctx, q, fn.ReturnType) + if err != nil { + return nil, err + } } - return h.executeRequest(ctx, q, fn.ReturnType) -} - -func (h *shellCallHandler) executeRequest(ctx context.Context, q *querybuilder.Selection, returnType *modTypeDef) error { + // The beforeRequest hook has a chance to return a nil `q` to signal + // that we shouldn't proceed with the request. For example, it's + // possible that a pipeline ending in an object doesn't have anything + // to sub-select. if q == nil { - return h.withTerminal(func(stdin io.Reader, stdout, stderr io.Writer) error { - return handleResponse(returnType, nil, stdout, stderr) - }) + return nil, nil } var response any if err := makeRequest(ctx, q, &response); err != nil { - return err + return nil, err } - return h.withTerminal(func(stdin io.Reader, stdout, stderr io.Writer) error { - return handleResponse(returnType, response, stdout, stderr) - }) + if fn.ReturnType.Kind == dagger.TypeDefKindVoidKind { + return nil, nil + } + + if doPrintResponse { + buf := new(bytes.Buffer) + frmt := outputFormat(fn.ReturnType) + if err := printResponse(buf, response, frmt); err != nil { + return nil, err + } + return buf.String(), nil + } + + return response, nil } -func shellLogf(ctx context.Context, msg string, args ...any) { +func shellDebug(ctx context.Context, msg string, args ...any) { hctx := interp.HandlerCtx(ctx) - fmt.Fprintf(hctx.Stderr, msg, args...) + shellFDebug(hctx.Stderr, msg, args...) +} + +func shellFDebug(w io.Writer, msg string, args ...any) { + cat := termenv.String("[DBG]").Foreground(termenv.ANSIMagenta).String() + msg = termenv.String(fmt.Sprintf(msg, args...)).Faint().String() + fmt.Fprintln(w, cat, msg) } // First command in pipeline: e.g., `cmd1 | cmd2 | cmd3` @@ -869,15 +1095,48 @@ func readShellState(r io.Reader) (*ShellState, []byte, error) { // one's stdin. Each handler in the chain should add a corresponding FunctionCall // to the state and write it to stdout for the next handler to read. type ShellState struct { - Calls []FunctionCall `json:"calls,omitempty"` - Error *string `json:"error,omitempty"` - ModRef *string `json:"modRef,omitempty"` + // ModRef is the module reference for the current state + // + // If empty, it must fall back to the default context. + // It matches a key in the modDefs map in the handler, which comes from + // user input, not from the API. + ModRef string `json:"modRef"` + + // Cmd is non-empty if next command comes from a builtin instead of an API object + Cmd string `json:"ns"` + + // Calls is the list of functions for building an API query + Calls []FunctionCall `json:"calls,omitempty"` + + // Error is non-nil if the previous command failed + Error *string `json:"error,omitempty"` } func (st ShellState) IsError() bool { return st.Error != nil } +// IsEmpty returns true if there's no function calls in the chain +func (st ShellState) IsEmpty() bool { + return len(st.Calls) == 0 +} + +func (st ShellState) IsCommandRoot() bool { + return st.IsEmpty() && st.Cmd != "" +} + +func (st ShellState) IsStdlib() bool { + return st.Cmd == shellStdlibCmdName +} + +func (st ShellState) IsCore() bool { + return st.Cmd == shellCoreCmdName +} + +func (st ShellState) IsDeps() bool { + return st.Cmd == shellDepsCmdName +} + // FunctionCall represents a querybyilder.Selection // // The query builder only cares about the name of the function and its arguments, @@ -918,7 +1177,7 @@ func (st ShellState) WriteTo(w io.Writer) error { // Function returns the last function in the chain, if not empty func (st ShellState) Function() FunctionCall { - if len(st.Calls) == 0 { + if st.IsEmpty() { // The first call is a field under Query. return FunctionCall{ ReturnObject: "Query", @@ -931,6 +1190,7 @@ func (st ShellState) Function() FunctionCall { func (st ShellState) WithCall(fn *modFunction, argValues map[string]any) *ShellState { prev := st.Function() return &ShellState{ + Cmd: st.Cmd, ModRef: st.ModRef, Calls: append(st.Calls, FunctionCall{ Object: prev.ReturnObject, @@ -961,7 +1221,7 @@ func (st *ShellState) GetTypeDef(modDef *moduleDef) (*modTypeDef, error) { // GetDef returns the introspection definition for the last function call func (st *ShellState) GetDef(modDef *moduleDef) (*modFunction, error) { - if st == nil || len(st.Calls) == 0 { + if st == nil || st.IsEmpty() { return modDef.MainObject.AsObject.Constructor, nil } return st.Function().GetDef(modDef) @@ -981,36 +1241,34 @@ func (f FunctionCall) GetNextDef(modDef *moduleDef, name string) (*modFunction, return modDef.GetObjectFunction(f.ReturnObject, name) } -// ShellCommand is a Dagger Shell builtin command +// ShellCommand is a Dagger Shell builtin or stdlib command type ShellCommand struct { - // Use is the one-line usage message. + // Use is the one-line usage message Use string - // Short is the short description shown in the '.help' output. - Short string + // Description is the short description shown in the '.help' output + Description string // Expected arguments Args PositionalArgs - // Run is the function that will be executed if it's the first command - // in the pipeline and RunState is not defined. - Run func(cmd *ShellCommand, args []string) error + // Expected state + State StateArg - // RunState is the function for executing a command that can be chained - // in a pipeline. - // - // If defined, it's always used, even if it's the first command in the - // pipeline. For commands that should only be the first, define `Run` instead. - RunState func(cmd *ShellCommand, args []string, st *ShellState) error + // Run is the function that will be executed. + Run func(cmd *ShellCommand, args []string, st *ShellState) error + // Complete provides builtin completions + Complete func(ctx *CompletionContext, args []string) *CompletionContext + + // HelpFunc is a custom function for customizing the help output HelpFunc func(cmd *ShellCommand) string // The group id under which this command is grouped in the '.help' output GroupID string - // Hidden hides the command from `.help`. - Hidden bool - Disabled func() bool + // Hidden hides the command from `.help` + Hidden bool ctx context.Context out io.Writer @@ -1032,6 +1290,11 @@ func (c *ShellCommand) Name() string { return name } +// Short is the the summary for the command +func (c *ShellCommand) Short() string { + return strings.Split(c.Description, "\n")[0] +} + func (c *ShellCommand) Help() string { if c.HelpFunc != nil { return c.HelpFunc(c) @@ -1042,10 +1305,8 @@ func (c *ShellCommand) Help() string { func (c *ShellCommand) defaultHelp() string { var doc ShellDoc - // TODO: Replace "Short" with "Description", use first line as the short - // description and the full thing as the long description. - if c.Short != "" { - doc.Add("", c.Short) + if c.Description != "" { + doc.Add("", c.Description) } doc.Add("Usage", c.Use) @@ -1083,17 +1344,6 @@ func (c *ShellCommand) Send(st *ShellState) error { return st.WriteTo(c.out) } -func (c *ShellCommand) Printer() io.Writer { - return c.out -} - -func (c *ShellCommand) Runnable() bool { - if c.Disabled != nil { - return !c.Disabled() - } - return true -} - type PositionalArgs func(args []string) error func MinimumArgs(n int) PositionalArgs { @@ -1117,7 +1367,7 @@ func MaximumArgs(n int) PositionalArgs { func ExactArgs(n int) PositionalArgs { return func(args []string) error { if len(args) < n { - return fmt.Errorf("is missing %d positional argument(s)", n-len(args)) + return fmt.Errorf("missing %d positional argument(s)", n-len(args)) } if len(args) > n { return fmt.Errorf("accepts at most %d positional argument(s), received %d", n, len(args)) @@ -1133,30 +1383,61 @@ func NoArgs(args []string) error { return nil } -func (c *ShellCommand) Execute(ctx context.Context, args []string, st *ShellState) error { - if st != nil && c.RunState == nil { - return fmt.Errorf("command %q cannot be piped", c.Name()) +type StateArg uint + +const ( + AnyState StateArg = iota + RequiredState + NoState +) + +// Execute is the main dispatcher function for shell builtin commands +func (c *ShellCommand) Execute(ctx context.Context, h *shellCallHandler, args []string, st *ShellState) error { + switch c.State { + case AnyState: + case RequiredState: + if st == nil { + return fmt.Errorf("command %q must be piped\nusage: %s", c.Name(), c.Use) + } + case NoState: + if st != nil { + return fmt.Errorf("command %q cannot be piped\nusage: %s", c.Name(), c.Use) + } } if c.Args != nil { if err := c.Args(args); err != nil { return fmt.Errorf("command %q %w\nusage: %s", c.Name(), err, c.Use) } } - c.SetContext(ctx) - if c.RunState != nil { - return c.RunState(c, args, st) - } - return c.Run(c, args) -} + // Resolve state values in arguments + a := make([]string, 0, len(args)) + for i, arg := range args { + if strings.HasPrefix(arg, shellStatePrefix) { + w := strings.NewReader(arg) + v, err := h.Result(ctx, w, false, nil) + if err != nil { + return fmt.Errorf("cannot expand command argument at %d", i) + } + if v == nil { + return fmt.Errorf("unexpected nil value while expanding argument at %d", i) + } + arg = fmt.Sprintf("%v", v) + } + a = append(a, arg) + } + if h.debug { + shellDebug(ctx, "โ”” CmdExec(%v)", a) + } + c.SetContext(ctx) + return c.Run(c, a, st) +} +// shellFunctionUseLine returns the usage line fine for a function func shellFunctionUseLine(md *moduleDef, fn *modFunction) string { sb := new(strings.Builder) - if md.HasCoreFunction(fn.CmdName()) { - sb.WriteString(".") - } if fn == md.MainObject.AsObject.Constructor { - sb.WriteString(".config") + sb.WriteString(md.ModRef) } else { sb.WriteString(fn.CmdName()) } @@ -1174,43 +1455,50 @@ func shellFunctionUseLine(md *moduleDef, fn *modFunction) string { return sb.String() } -func (h *shellCallHandler) HasBuiltin(name string) bool { - return h.getBuiltin(name) != nil +func (h *shellCallHandler) GroupBuiltins(groupID string) []*ShellCommand { + l := make([]*ShellCommand, 0, len(h.builtins)) + for _, c := range h.Builtins() { + if c.GroupID == groupID { + l = append(l, c) + } + } + return l } -func (h *shellCallHandler) getBuiltin(name string) *ShellCommand { +func (h *shellCallHandler) BuiltinCommand(name string) (*ShellCommand, error) { + if name == "." || !strings.HasPrefix(name, ".") || strings.Contains(name, "/") { + return nil, nil + } for _, c := range h.builtins { if c.Name() == name { - return c + return c, nil } } - return nil + return nil, fmt.Errorf("command not found %q", name) } -func (h *shellCallHandler) BuiltinCommand(name string) (*ShellCommand, error) { - if !strings.HasPrefix(name, ".") { - return nil, nil - } - cmd := h.getBuiltin(name) - if cmd == nil { - return nil, fmt.Errorf("no such command %q", name) +func (h *shellCallHandler) StdlibCommand(name string) (*ShellCommand, error) { + for _, c := range h.stdlib { + if c.Name() == name { + return c, nil + } } - return cmd, nil + return nil, fmt.Errorf("command not found %q", name) } -func (h *shellCallHandler) GroupBuiltins(groupID string) []*ShellCommand { +func (h *shellCallHandler) Builtins() []*ShellCommand { l := make([]*ShellCommand, 0, len(h.builtins)) - for _, c := range h.Builtins() { - if c.GroupID == groupID { + for _, c := range h.builtins { + if !c.Hidden { l = append(l, c) } } return l } -func (h *shellCallHandler) Builtins() []*ShellCommand { - l := make([]*ShellCommand, 0, len(h.builtins)) - for _, c := range h.builtins { +func (h *shellCallHandler) Stdlib() []*ShellCommand { + l := make([]*ShellCommand, 0, len(h.stdlib)) + for _, c := range h.stdlib { if !c.Hidden { l = append(l, c) } @@ -1218,8 +1506,125 @@ func (h *shellCallHandler) Builtins() []*ShellCommand { return l } -func (h *shellCallHandler) addBuiltin(cmds ...*ShellCommand) { - h.builtins = append(h.builtins, cmds...) +func (h *shellCallHandler) FunctionsList(name string, fns []*modFunction) string { + if len(fns) == 0 { + return "" + } + + sb := new(strings.Builder) + + sb.WriteString("Available functions:\n") + for _, f := range fns { + sb.WriteString(" - ") + sb.WriteString(f.CmdName()) + sb.WriteString("\n") + } + + sb.WriteString("\n") + sb.WriteString(fmt.Sprintf(`Use "%s | .doc" for more details.`, name)) + sb.WriteString("\n") + sb.WriteString(fmt.Sprintf(`Use "%s | .doc " for more information on a function.`, name)) + sb.WriteString("\n") + + return sb.String() +} + +func (h *shellCallHandler) CommandsList(name string, cmds []*ShellCommand) string { + if len(cmds) == 0 { + return "" + } + + sb := new(strings.Builder) + + sb.WriteString("Available commands:\n") + for _, c := range cmds { + sb.WriteString(" - ") + sb.WriteString(c.Name()) + sb.WriteString("\n") + } + + sb.WriteString("\n") + sb.WriteString(fmt.Sprintf(`Use "%s | .doc" for more details.`, name)) + sb.WriteString("\n") + sb.WriteString(fmt.Sprintf(`Use "%s | .doc " for more information on a command.`, name)) + sb.WriteString("\n") + + return sb.String() +} + +func (h *shellCallHandler) DependenciesList() string { + // This is validated in the .deps command + def, _ := h.GetModuleDef(nil) + if def == nil || len(def.Dependencies) == 0 { + return "" + } + + sb := new(strings.Builder) + + sb.WriteString("Available dependencies:\n") + for _, dep := range def.Dependencies { + sb.WriteString(" - ") + sb.WriteString(dep.Name) + sb.WriteString("\n") + } + + sb.WriteString("\n") + sb.WriteString(fmt.Sprintf(`Use "%s | .doc" for more details.`, shellDepsCmdName)) + sb.WriteString("\n") + sb.WriteString(fmt.Sprintf(`Use "%s | .doc " for more information on a dependency.`, shellDepsCmdName)) + sb.WriteString("\n") + + return sb.String() +} + +func (h *shellCallHandler) StdlibHelp() string { + var doc ShellDoc + + doc.Add("Commands", nameShortWrapped(h.Stdlib(), func(c *ShellCommand) (string, string) { + return c.Name(), c.Description + })) + + doc.Add("", fmt.Sprintf(`Use "%s | .doc " for more information on a command.`, shellStdlibCmdName)) + + return doc.String() +} + +func (h *shellCallHandler) CoreHelp() string { + var doc ShellDoc + + def := h.modDef(nil) + + doc.Add( + "Available Functions", + nameShortWrapped(def.GetCoreFunctions(), func(f *modFunction) (string, string) { + return f.CmdName(), f.Short() + }), + ) + + doc.Add("", fmt.Sprintf(`Use "%s | .doc " for more information on a function.`, shellCoreCmdName)) + + return doc.String() +} + +func (h *shellCallHandler) DepsHelp() string { + // This is validated in the .deps command + def, _ := h.GetModuleDef(nil) + if def == nil { + return "" + } + + var doc ShellDoc + + doc.Add( + "Module Dependencies", + nameShortWrapped(def.Dependencies, func(dep *moduleDependency) (string, string) { + return dep.Name, dep.Short() + }), + ) + + doc.Add("", fmt.Sprintf(`Use "%s | .doc " for more information on a dependency.`, shellDepsCmdName)) + + return doc.String() } type ShellDoc struct { @@ -1275,6 +1680,95 @@ func (d ShellDoc) String() string { return sb.String() } +func shellModuleDoc(st *ShellState, m *moduleDef) string { + var doc ShellDoc + + meta := new(strings.Builder) + meta.WriteString(m.Name) + if m.Description != "" { + meta.WriteString("\n\n") + meta.WriteString(m.Description) + } + if meta.Len() > 0 { + doc.Add("Module", meta.String()) + } + + fn := m.MainObject.AsObject.Constructor + if len(fn.Args) > 0 { + constructor := new(strings.Builder) + constructor.WriteString("Usage: ") + constructor.WriteString(shellFunctionUseLine(m, fn)) + + if fn.Description != "" { + constructor.WriteString("\n\n") + constructor.WriteString(fn.Description) + } + + doc.Add("Entrypoint", constructor.String()) + + if args := fn.RequiredArgs(); len(args) > 0 { + doc.AddSection( + "Required Arguments", + nameShortWrapped(args, func(a *modFunctionArg) (string, string) { + return strings.TrimPrefix(a.Usage(), "--"), a.Long() + }), + ) + } + if args := fn.OptionalArgs(); len(args) > 0 { + doc.AddSection( + "Optional Arguments", + nameShortWrapped(args, func(a *modFunctionArg) (string, string) { + return a.Usage(), a.Long() + }), + ) + } + } + + // If it's just `.doc` and the current module doesn't have required args, + // can use the default constructor and show available functions. + if st.IsEmpty() && st.ModRef == "" && !fn.HasRequiredArgs() { + if fns := m.MainObject.AsFunctionProvider().GetFunctions(); len(fns) > 0 { + doc.Add( + "Available Functions", + nameShortWrapped(fns, func(f *modFunction) (string, string) { + return f.CmdName(), f.Short() + }), + ) + doc.Add("", `Use ".doc " for more information on a function.`) + } + } + + return doc.String() +} + +func shellTypeDoc(t *modTypeDef) string { + var doc ShellDoc + + fp := t.AsFunctionProvider() + if fp == nil { + doc.Add(t.KindDisplay(), t.Long()) + + // If not an object, only have the type to show. + return doc.String() + } + + if fp.ProviderName() != "Query" { + doc.Add(t.KindDisplay(), t.Long()) + } + + if fns := fp.GetFunctions(); len(fns) > 0 { + doc.Add( + "Available Functions", + nameShortWrapped(fns, func(f *modFunction) (string, string) { + return f.CmdName(), f.Short() + }), + ) + doc.Add("", `Use ".doc " for more information on a function.`) + } + + return doc.String() +} + func shellFunctionDoc(md *moduleDef, fn *modFunction) string { var doc ShellDoc @@ -1310,89 +1804,39 @@ func shellFunctionDoc(md *moduleDef, fn *modFunction) string { } if fn.ReturnType.AsFunctionProvider() != nil { - help := ".doc" - if fn != md.MainObject.AsObject.Constructor { - help = fmt.Sprintf("%s | %s", strings.TrimSuffix(usage, " [options]"), help) - } - doc.Add("", fmt.Sprintf("Use %q for available functions.", help)) + u := strings.TrimSuffix(usage, " [options]") + doc.Add("", fmt.Sprintf(`Use "%s | .doc" for available functions.`, u)) } return doc.String() } -func shellTypeDoc(m *moduleDef, t *modTypeDef) string { - var doc ShellDoc - - fp := t.AsFunctionProvider() - if fp == nil { - doc.Add(t.KindDisplay(), t.Long()) +func (h *shellCallHandler) isDefaultState(st *ShellState) bool { + return st == nil || st.ModRef == "" || st.ModRef == h.modRef +} - // If not an object, only have the type to show. - return doc.String() +func (h *shellCallHandler) newModState(ref string) *ShellState { + return &ShellState{ + ModRef: ref, } +} - // The module constructor creates the main object instance - if !fp.IsCore() && fp.ProviderName() == m.MainObject.Name() { - mod := new(strings.Builder) - mod.WriteString(m.Name) - if m.Description != "" { - mod.WriteString("\n\n") - mod.WriteString(m.Description) - } - if mod.Len() > 0 { - doc.Add("Module", mod.String()) - } - - doc.Add("Main Object", t.Long()) - - fn := m.MainObject.AsObject.Constructor - - constructor := new(strings.Builder) - if len(fn.Args) > 0 { - constructor.WriteString("Usage: ") - constructor.WriteString(shellFunctionUseLine(m, fn)) - } - if fn.Description != "" { - constructor.WriteString("\n\n") - constructor.WriteString(fn.Description) - } - if constructor.Len() > 0 { - doc.Add("Entrypoint", constructor.String()) - } - - if args := fn.RequiredArgs(); len(args) > 0 { - doc.AddSection( - "Required Arguments", - nameShortWrapped(args, func(a *modFunctionArg) (string, string) { - return strings.TrimPrefix(a.Usage(), "--"), a.Long() - }), - ) - } - if args := fn.OptionalArgs(); len(args) > 0 { - doc.AddSection( - "Optional Arguments", - nameShortWrapped(args, func(a *modFunctionArg) (string, string) { - return a.Usage(), a.Long() - }), - ) - } - } else if fp.ProviderName() != "Query" { - doc.Add(t.KindDisplay(), t.Long()) +func (h *shellCallHandler) newStdlibState() *ShellState { + return &ShellState{ + Cmd: shellStdlibCmdName, } +} - if fns := fp.GetFunctions(); len(fns) > 0 { - doc.Add( - "Available Functions", - nameShortWrapped(fns, func(f *modFunction) (string, string) { - return f.CmdName(), f.Short() - }), - ) - - usage := ".doc " - doc.Add("", fmt.Sprintf("Use %q for more information on a function.\n", usage)) +func (h *shellCallHandler) newCoreState() *ShellState { + return &ShellState{ + Cmd: shellCoreCmdName, } +} - return doc.String() +func (h *shellCallHandler) newDepsState() *ShellState { + return &ShellState{ + Cmd: shellDepsCmdName, + } } func (h *shellCallHandler) newState() *ShellState { @@ -1401,8 +1845,8 @@ func (h *shellCallHandler) newState() *ShellState { func (h *shellCallHandler) modDef(st *ShellState) *moduleDef { ref := h.modRef - if st != nil && st.ModRef != nil { - ref = *st.ModRef + if !h.isDefaultState(st) { + ref = st.ModRef } if modDef, ok := h.modDefs[ref]; ok { return modDef @@ -1419,32 +1863,65 @@ func (h *shellCallHandler) GetModuleDef(st *ShellState) (*moduleDef, error) { return nil, fmt.Errorf("module not loaded") } -func (h *shellCallHandler) registerBuiltins() { //nolint:gocyclo - h.addBuiltin( +func (h *shellCallHandler) GetDependency(ctx context.Context, name string) (*ShellState, *moduleDef, error) { + modDef, err := h.GetModuleDef(nil) + if err != nil { + return nil, nil, err + } + dep := modDef.GetDependency(name) + if dep == nil { + return nil, nil, fmt.Errorf("dependency %q not found", name) + } + st, err := h.getOrInitDefState(dep.ModRef, func() (*moduleDef, error) { + var opts []dagger.ModuleSourceOpts + if dep.RefPin != "" { + opts = append(opts, dagger.ModuleSourceOpts{RefPin: dep.RefPin}) + } + return initializeModule(ctx, h.dag, dep.ModRef, false, opts...) + }) + if err != nil { + return nil, nil, err + } + def, err := h.GetModuleDef(st) + if err != nil { + return nil, nil, err + } + return st, def, nil +} + +func (h *shellCallHandler) registerCommands() { //nolint:gocyclo + var builtins []*ShellCommand + var stdlib []*ShellCommand + + builtins = append(builtins, &ShellCommand{ Use: ".debug", Hidden: true, Args: NoArgs, - Run: func(cmd *ShellCommand, args []string) error { + State: NoState, + Run: func(cmd *ShellCommand, args []string, _ *ShellState) error { // Toggles debug mode, which can be useful when in interactive mode h.debug = !h.debug return nil }, }, &ShellCommand{ - Use: ".help [command]", - Short: "Print this help message", - Args: MaximumArgs(1), - Run: func(cmd *ShellCommand, args []string) error { + Use: ".help [command]", + Description: "Print this help message", + Args: MaximumArgs(1), + State: NoState, + Run: func(cmd *ShellCommand, args []string, _ *ShellState) error { if len(args) == 1 { c, err := h.BuiltinCommand(args[0]) if err != nil { return err } if c == nil { - err = fmt.Errorf("no such command %q", args[0]) - if !strings.HasPrefix(args[0], ".") && h.HasBuiltin("."+args[0]) { - err = fmt.Errorf("%w, did you mean %q?", err, "."+args[0]) + err = fmt.Errorf("command not found %q", args[0]) + if !strings.HasPrefix(args[0], ".") { + if builtin, _ := h.BuiltinCommand("." + args[0]); builtin != nil { + err = fmt.Errorf("%w, did you mean %q?", err, "."+args[0]) + } } return err } @@ -1461,7 +1938,7 @@ func (h *shellCallHandler) registerBuiltins() { //nolint:gocyclo doc.Add( group.Title, nameShortWrapped(cmds, func(c *ShellCommand) (string, string) { - return c.Name(), c.Short + return c.Name(), c.Short() }), ) } @@ -1472,201 +1949,202 @@ func (h *shellCallHandler) registerBuiltins() { //nolint:gocyclo }, }, &ShellCommand{ - Use: ".doc [function]", - Short: "Show documentation for a type, or a function", - Args: MaximumArgs(1), - RunState: func(cmd *ShellCommand, args []string, st *ShellState) error { + Use: ".doc [module]\n | .doc [function]", + Description: `Show documentation for a module, a type, or a function + + +Local module paths are resolved relative to the workdir on the host, not relative +to the currently loaded module. +`, + Args: MaximumArgs(1), + Run: func(cmd *ShellCommand, args []string, st *ShellState) error { + var err error + + ctx := cmd.Context() + + // First command in chain + if st == nil { + if len(args) == 0 { + // No arguments, e.g, `.doc`. + st = h.newState() + } else { + // Use the same function lookup as when executing so + // that `> .doc wolfi` documents `> wolfi`. + st, err = h.stateLookup(ctx, args[0]) + if err != nil { + return err + } + if st.ModRef != "" { + // First argument to `.doc` is a module reference, so + // remove it from list of arguments now that it's loaded. + // The rest of the arguments should be passed on to + // the constructor. + args = args[1:] + } + } + } + def := h.modDef(st) + if st.IsEmpty() { + switch { + case st.IsStdlib(): + // Document stdlib + // Example: `.stdlib | .doc` + if len(args) == 0 { + return cmd.Println(h.StdlibHelp()) + } + // Example: .stdlib | .doc ` + c, err := h.StdlibCommand(args[0]) + if err != nil { + return err + } + return cmd.Println(c.Help()) + + case st.IsDeps(): + // Document dependency + // Example: `.deps | .doc` + if len(args) == 0 { + return cmd.Println(h.DepsHelp()) + } + // Example: `.deps | .doc ` + depSt, depDef, err := h.GetDependency(ctx, args[0]) + if err != nil { + return err + } + return cmd.Println(shellModuleDoc(depSt, depDef)) + + case st.IsCore(): + // Document core + // Example: `.core | .doc` + if len(args) == 0 { + return cmd.Println(h.CoreHelp()) + } + // Example: `.core | .doc ` + fn := def.GetCoreFunction(args[0]) + if fn == nil { + return fmt.Errorf("core function %q not found", args[0]) + } + return cmd.Println(shellFunctionDoc(def, fn)) + + case len(args) == 0: + if !def.HasModule() { + return fmt.Errorf("module not loaded.\nUse %q to see what's available", shellStdlibCmdName) + } + // Document module + // Example: `.doc [module]` + return cmd.Println(shellModuleDoc(st, def)) + } + } + t, err := st.GetTypeDef(def) if err != nil { return err } + // Document type + // Example: `container | .doc` if len(args) == 0 { - return cmd.Println(shellTypeDoc(def, t)) + return cmd.Println(shellTypeDoc(t)) } fp := t.AsFunctionProvider() if fp == nil { return fmt.Errorf("type %q does not provide functions", t.String()) } + + // Document function from type + // Example: `container | .doc with-exec` fn, err := def.GetFunction(fp, args[0]) if err != nil { return err } - return cmd.Println(shellFunctionDoc(def, fn)) }, }, &ShellCommand{ - Use: ".load [module]", - Short: "Load a module", - GroupID: moduleGroup.ID, - Args: MaximumArgs(1), - Run: func(cmd *ShellCommand, args []string) error { - var ref string - if len(args) == 0 { - ref, _ = getExplicitModuleSourceRef() - } else { - ref = args[0] - } + Use: ".use ", + Description: `Set a module as the default for the session - modRef := ref - if modRef == "" { - modRef = moduleURLDefault - } - - // TODO: Add a `--force` flag to force loading again? - if _, ok := h.modDefs[modRef]; !ok { - modDef, err := maybeInitializeModule(cmd.Context(), h.dag, ref, false) - if err != nil { - return err - } - h.modDefs[modRef] = modDef - } - - return cmd.Send(&ShellState{ModRef: &modRef}) - }, - }, - &ShellCommand{ - Use: ".use", - Short: "Set a loaded module as the default for the session", +Local module paths are resolved relative to the workdir on the host, not relative +to the currently loaded module. +`, GroupID: moduleGroup.ID, - Args: NoArgs, - RunState: func(cmd *ShellCommand, args []string, st *ShellState) error { - if st == nil { - return fmt.Errorf("usage: .load [module] | .use") + Args: ExactArgs(1), + State: NoState, + Run: func(cmd *ShellCommand, args []string, _ *ShellState) error { + st, err := h.getOrInitDefState(args[0], func() (*moduleDef, error) { + return initializeModule(cmd.Context(), h.dag, args[0], true) + }) + if err != nil { + return err } - if st.ModRef != nil && *st.ModRef != h.modRef { - h.modRef = *st.ModRef + if st.ModRef != h.modRef { + h.modRef = st.ModRef } return nil }, }, &ShellCommand{ - Use: ".config", - Short: "Set module constructor options", - GroupID: moduleGroup.ID, - HelpFunc: func(cmd *ShellCommand) string { - def := h.modDef(nil) - // `.help .config` always refers to the default module - if !def.HasModule() { - // TODO: provide more documentation - return cmd.defaultHelp() - } - return shellFunctionDoc(def, def.MainObject.AsObject.Constructor) - }, - RunState: func(cmd *ShellCommand, args []string, st *ShellState) error { - def, err := h.GetModuleDef(st) + Use: shellDepsCmdName, + Description: "Dependencies from the module loaded in the current context", + GroupID: moduleGroup.ID, + Args: NoArgs, + State: NoState, + Run: func(cmd *ShellCommand, _ []string, _ *ShellState) error { + _, err := h.GetModuleDef(nil) if err != nil { return err } - - // TODO: allow .config (without args) to print current values? - - fn := def.MainObject.AsObject.Constructor - if err := ExactArgs(len(fn.RequiredArgs()))(args); err != nil { - usage := shellFunctionUseLine(def, fn) - return fmt.Errorf("the constructor %w\nusage: %s", err, usage) - } - - cfg, err := h.parseArgumentValues(cmd.Context(), def, fn, args) - if err != nil { - return err - } - - if st == nil { - h.cfg = cfg - return nil + return cmd.Send(h.newDepsState()) + }, + Complete: func(ctx *CompletionContext, _ []string) *CompletionContext { + return &CompletionContext{ + Completer: ctx.Completer, + CmdRoot: shellDepsCmdName, + root: true, } - - return cmd.Send(h.newState().WithCall(fn, cfg)) }, }, &ShellCommand{ - Use: ".deps", - Short: "List module dependencies", - GroupID: moduleGroup.ID, - Args: NoArgs, - RunState: func(cmd *ShellCommand, args []string, st *ShellState) error { - def, err := h.GetModuleDef(st) - if err != nil { - return err - } - - ctx := cmd.Context() - - deps, err := def.Source.AsModule().Dependencies(ctx) - if err != nil { - return err - } - - // Get the Name and Description of each dependency beforehand - // because nameShortWrapped doesn't handle errors. - lines := make([]string, 0, len(deps)) - for _, dep := range deps { - name, err := dep.Name(ctx) - if err != nil { - return err - } - desc, err := dep.Description(ctx) - if err != nil { - return err - } - shortDesc := strings.SplitN(desc, "\n", 2)[0] - if shortDesc == "" { - shortDesc = "-" - } - lines = append(lines, name+"\x00"+shortDesc) + Use: shellStdlibCmdName, + Description: "Standard library functions", + Args: NoArgs, + State: NoState, + Run: func(cmd *ShellCommand, _ []string, _ *ShellState) error { + return cmd.Send(h.newStdlibState()) + }, + Complete: func(ctx *CompletionContext, _ []string) *CompletionContext { + return &CompletionContext{ + Completer: ctx.Completer, + CmdRoot: shellStdlibCmdName, + root: true, } - - var doc ShellDoc - - doc.Add( - "Module Dependencies", - nameShortWrapped(lines, func(line string) (string, string) { - s := strings.SplitN(line, "\x00", 2) - return s[0], s[1] - }), - ) - - return cmd.Println(doc.String()) }, }, &ShellCommand{ - Use: ".core [function]", - Short: "Load a core Dagger type", - // On the "Additional" command group on purpose - GroupID: "", - Run: func(cmd *ShellCommand, args []string) error { - ctx := cmd.Context() - - if len(args) == 0 { - var doc ShellDoc - - def := h.modDef(nil) - - doc.Add( - "Available Functions", - nameShortWrapped(def.GetCoreFunctions(), func(f *modFunction) (string, string) { - return f.CmdName(), f.Short() - }), - ) - - return cmd.Println(doc.String()) - } - - st, err := h.functionCall(ctx, h.newState(), args[0], args[1:]) - if err != nil { - return err + Use: ".core [function]", + Description: "Load any core Dagger type", + State: NoState, + Run: func(cmd *ShellCommand, args []string, _ *ShellState) error { + return cmd.Send(h.newCoreState()) + }, + Complete: func(ctx *CompletionContext, _ []string) *CompletionContext { + return &CompletionContext{ + Completer: ctx.Completer, + CmdRoot: shellCoreCmdName, + root: true, } - - return cmd.Send(st) }, }, + cobraToShellCommand(loginCmd), + cobraToShellCommand(logoutCmd), + cobraToShellCommand(moduleInstallCmd), + cobraToShellCommand(moduleUnInstallCmd), + // TODO: Add update command when available: + // - https://github.com/dagger/dagger/pull/8839 ) def := h.modDef(nil) @@ -1685,19 +2163,19 @@ func (h *shellCallHandler) registerBuiltins() { //nolint:gocyclo "version", } - hidden := !slices.Contains(promoted, fn.CmdName()) + if !slices.Contains(promoted, fn.CmdName()) { + continue + } - h.addBuiltin( + stdlib = append(stdlib, &ShellCommand{ - Use: shellFunctionUseLine(def, fn), - Short: fn.Short(), - GroupID: coreGroup.ID, - Hidden: hidden, - Args: ExactArgs(len(fn.RequiredArgs())), + Use: shellFunctionUseLine(def, fn), + Description: fn.Description, + State: NoState, HelpFunc: func(cmd *ShellCommand) string { return shellFunctionDoc(def, fn) }, - Run: func(cmd *ShellCommand, args []string) error { + Run: func(cmd *ShellCommand, args []string, _ *ShellState) error { ctx := cmd.Context() st := h.newState() @@ -1708,28 +2186,36 @@ func (h *shellCallHandler) registerBuiltins() { //nolint:gocyclo return cmd.Send(st) }, + Complete: func(ctx *CompletionContext, args []string) *CompletionContext { + return &CompletionContext{ + Completer: ctx.Completer, + ModFunction: fn, + root: true, + } + }, }, ) } - h.addBuiltin( - // TODO: Add uninstall command when available. - cobraToShellCommand(moduleInstallCmd), - cobraToShellCommand(loginCmd), - cobraToShellCommand(logoutCmd), - ) + sort.Slice(builtins, func(i, j int) bool { + return builtins[i].Use < builtins[j].Use + }) - sort.Slice(h.builtins, func(i, j int) bool { - return h.builtins[i].Use < h.builtins[j].Use + sort.Slice(stdlib, func(i, j int) bool { + return stdlib[i].Use < stdlib[j].Use }) + + h.builtins = builtins + h.stdlib = stdlib } func cobraToShellCommand(c *cobra.Command) *ShellCommand { return &ShellCommand{ - Use: "." + c.Use, - Short: c.Short, - GroupID: c.GroupID, - Run: func(cmd *ShellCommand, args []string) error { + Use: "." + c.Use, + Description: c.Short, + GroupID: c.GroupID, + State: NoState, + Run: func(cmd *ShellCommand, args []string, _ *ShellState) error { // Re-execute the dagger command (hack) args = append([]string{cmd.CleanName()}, args...) ctx := cmd.Context() diff --git a/cmd/dagger/shell_completion.go b/cmd/dagger/shell_completion.go new file mode 100644 index 0000000000..8c2e9b66a2 --- /dev/null +++ b/cmd/dagger/shell_completion.go @@ -0,0 +1,369 @@ +package main + +import ( + "slices" + "strings" + + "github.com/chzyer/readline" + "mvdan.cc/sh/v3/syntax" +) + +// shellAutoComplete is a wrapper for the shell call handler +type shellAutoComplete struct { + // This is separated out, since we don't want to have to attach all these + // methods to the shellCallHandler directly + *shellCallHandler +} + +var _ readline.AutoCompleter = (*shellAutoComplete)(nil) + +func (h *shellAutoComplete) Do(line []rune, pos int) (newLine [][]rune, length int) { + file, err := parseShell(strings.NewReader(string(line)), "") + if err != nil { + return nil, 0 + } + + // find the smallest stmt next to the cursor - this allows accurate + // completion inside subshells, for example + var stmt *syntax.Stmt + excluded := map[*syntax.Stmt]struct{}{} + syntax.Walk(file, func(node syntax.Node) bool { + switch node := node.(type) { + case *syntax.BinaryCmd: + if node.Op == syntax.Pipe { + // pipes are special, and those statements aren't atomic + // because they're chained off of the previous ones - so avoid + // isolating them + excluded[node.X] = struct{}{} + excluded[node.Y] = struct{}{} + } + case *syntax.Stmt: + if stmt == nil { + stmt = node + break + } + if pos < int(node.Pos().Offset()) || pos > int(node.End().Offset()) { + return false + } + if _, ok := excluded[node]; !ok { + stmt = node + } + } + return true + }) + + var inprogressWord *syntax.Word + syntax.Walk(file, func(node syntax.Node) bool { + if node, ok := node.(*syntax.Word); ok { + if node.End().Offset() == uint(pos) { + inprogressWord = node + return false + } + } + return true + }) + var inprogressPrefix string + if inprogressWord != nil { + inprogressPrefix = inprogressWord.Lit() + } + + // discard the in-progress word for the process of determining the + // auto-completion context (since it's likely to be invalid) + var cursor uint + if inprogressWord == nil { + cursor = uint(pos) + } else { + cursor = inprogressWord.Pos().Offset() + } + + shctx := h.root() + if stmt != nil { + shctx = h.dispatch(shctx, stmt, cursor) + } + if shctx == nil { + return nil, 0 + } + + var results [][]rune + for _, result := range shctx.completions(inprogressPrefix) { + if result, ok := strings.CutPrefix(result, inprogressPrefix); ok { + results = append(results, []rune(result+" ")) + } + } + return results, len(inprogressPrefix) +} + +func (h *shellAutoComplete) dispatch(previous *CompletionContext, stmt *syntax.Stmt, cursor uint) *CompletionContext { + if stmt == nil { + return previous + } + switch cmd := stmt.Cmd.(type) { + case *syntax.CallExpr: + return h.dispatchCall(previous, cmd, cursor) + case *syntax.BinaryCmd: + return h.dispatchPipe(previous, cmd, cursor) + } + return nil +} + +func (h *shellAutoComplete) dispatchCall(previous *CompletionContext, call *syntax.CallExpr, cursor uint) *CompletionContext { + if call.Pos().Offset() >= cursor { + // short-circuit calls once we get past the current cursor context + return previous + } + + args := make([]string, 0, len(call.Args)) + for _, arg := range call.Args { + args = append(args, arg.Lit()) + } + return previous.lookupField(args[0], args[1:]) +} + +func (h *shellAutoComplete) dispatchPipe(previous *CompletionContext, pipe *syntax.BinaryCmd, cursor uint) *CompletionContext { + if pipe.Op != syntax.Pipe { + return nil + } + + previous = h.dispatch(previous, pipe.X, cursor) + if previous == nil { + return nil + } + + if pipe.OpPos.Offset() >= cursor { + // short-circuit pipes once we get past the current cursor context + return previous + } + previous = previous.lookupType() + if previous == nil { + return nil + } + + return h.dispatch(previous, pipe.Y, cursor) +} + +func (h *shellAutoComplete) root() *CompletionContext { + return &CompletionContext{ + Completer: h, + root: true, + } +} + +// CompletionContext provides completions for a specific point in a command +// chain. Each point is represented by one of `Mod` prefixed fields being set +// at a time. +type CompletionContext struct { + Completer *shellAutoComplete + + // CmdRoot is the name of a namespace-setting command. + CmdRoot string + + // ModType indicates the completions should be performed on an + // object/interface/etc. + ModType functionProvider + + // ModFunc indicates the completions should be performed on the arguments + // for a function call. + ModFunction *modFunction + + root bool +} + +func (ctx *CompletionContext) completions(prefix string) []string { + var results []string + switch { + case ctx.ModFunction != nil: + // TODO: also complete required args sometimes (depending on type) + + // complete optional args + if strings.HasPrefix(prefix, "-") { + for _, arg := range ctx.ModFunction.OptionalArgs() { + flag := "--" + arg.FlagName() + results = append(results, flag) + } + } + + case ctx.ModType != nil: + // complete possible functions for this type + for _, f := range ctx.ModType.GetFunctions() { + results = append(results, f.CmdName()) + } + // complete potentially chainable builtins + for _, builtin := range ctx.builtins() { + results = append(results, builtin.Name()) + } + + case ctx.root: + for _, cmd := range slices.Concat(ctx.builtins(), ctx.stdlib()) { + results = append(results, cmd.Name()) + } + if md, _ := ctx.Completer.GetModuleDef(nil); md != nil { + for _, fn := range md.MainObject.AsFunctionProvider().GetFunctions() { + results = append(results, fn.CmdName()) + } + for _, dep := range md.Dependencies { + results = append(results, dep.Name) + } + } + for modRef := range ctx.Completer.modDefs { + if modRef != "" { + results = append(results, modRef) + } + } + + case ctx.CmdRoot == shellStdlibCmdName: + for _, cmd := range ctx.Completer.Stdlib() { + results = append(results, cmd.Name()) + } + + case ctx.CmdRoot == shellDepsCmdName: + if md, _ := ctx.Completer.GetModuleDef(nil); md != nil { + for _, dep := range md.Dependencies { + results = append(results, dep.Name) + } + } + + case ctx.CmdRoot == shellCoreCmdName: + for _, fn := range ctx.Completer.modDef(nil).GetCoreFunctions() { + results = append(results, fn.CmdName()) + } + } + + return results +} + +func (ctx *CompletionContext) lookupField(field string, args []string) *CompletionContext { + if cmd := ctx.builtinCmd(field); cmd != nil { + return cmd.Complete(ctx, args) + } + + def := ctx.Completer.modDef(nil) + + if ctx.ModType != nil { + next, err := def.GetFunction(ctx.ModType, field) + if err != nil { + return nil + } + return &CompletionContext{ + Completer: ctx.Completer, + ModFunction: next, + } + } + + // Limit options for these namespace-setting commands + switch ctx.CmdRoot { + case shellStdlibCmdName: + if cmd := ctx.stdlibCmd(field); cmd != nil { + return cmd.Complete(ctx, args) + } + case shellDepsCmdName: + // TODO: loading other modules isn't supported yet + return nil + + case shellCoreCmdName: + if fn := def.GetCoreFunction(field); fn != nil { + return &CompletionContext{ + Completer: ctx.Completer, + ModFunction: fn, + } + } + } + + // Default lookup and fallbacks after this point, which only happens + // when it's the first command. + if !ctx.root { + return nil + } + + // 1. Current module function + if def.HasMainFunction(field) { + next, err := def.GetFunction(def.MainObject.AsFunctionProvider(), field) + if err != nil { + return nil + } + return &CompletionContext{ + Completer: ctx.Completer, + ModFunction: next, + } + } + + // 2. Dependency + if dep := def.GetDependency(field); dep != nil { + // TODO: loading other modules isn't supported yet + return nil + } + + // 3. Stdlib + if cmd := ctx.stdlibCmd(field); cmd != nil { + return cmd.Complete(ctx, args) + } + + // 4. Module reference + // TODO: loading other modules isn't supported yet + if field == ctx.Completer.modRef { + return &CompletionContext{ + Completer: ctx.Completer, + ModFunction: def.MainObject.AsObject.Constructor, + } + } + + return nil +} + +func (ctx *CompletionContext) lookupType() *CompletionContext { + if ctx.ModType != nil || ctx.CmdRoot != "" { + return ctx + } + if ctx.ModFunction != nil { + def := ctx.Completer.modDef(nil) + next := def.GetFunctionProvider(ctx.ModFunction.ReturnType.Name()) + return &CompletionContext{ + Completer: ctx.Completer, + ModType: next, + } + } + return nil +} + +func (ctx *CompletionContext) builtins() []*ShellCommand { + var cmds []*ShellCommand + for _, cmd := range ctx.Completer.Builtins() { + if ctx.root && cmd.State != RequiredState || !ctx.root && cmd.State != NoState { + cmds = append(cmds, cmd) + } + } + return cmds +} + +func (ctx *CompletionContext) stdlib() []*ShellCommand { + var cmds []*ShellCommand + for _, cmd := range ctx.Completer.Stdlib() { + if ctx.root && cmd.State != RequiredState || !ctx.root && cmd.State != NoState { + cmds = append(cmds, cmd) + } + } + return cmds +} + +func (ctx *CompletionContext) builtinCmd(name string) *ShellCommand { + for _, cmd := range ctx.builtins() { + if cmd.Name() == name { + if cmd.Complete == nil { + return nil + } + return cmd + } + } + return nil +} + +func (ctx *CompletionContext) stdlibCmd(name string) *ShellCommand { + for _, cmd := range ctx.stdlib() { + if cmd.Name() == name { + if cmd.Complete == nil { + return nil + } + return cmd + } + } + return nil +} diff --git a/cmd/dagger/shell_completion_test.go b/cmd/dagger/shell_completion_test.go new file mode 100644 index 0000000000..1652124414 --- /dev/null +++ b/cmd/dagger/shell_completion_test.go @@ -0,0 +1,132 @@ +package main + +import ( + "context" + "io" + "os" + "os/exec" + "path/filepath" + "strings" + "testing" + + "dagger.io/dagger" + "github.com/stretchr/testify/require" +) + +func TestShellAutocomplete(t *testing.T) { + // each cmdline is a prompt input + // the contents of the angle brackets are the word we want to complete - + // everything before the $ sign is already written, and one of the response + // options should include the contents after the $ + + cmdlines := []string{ + // top-level function + ``, + `<$container >`, + ` <$container >`, + ` "alpine:latest"`, + `| directory`, + + // top-level deps + ``, + + // stdlib fallback + ``, + `directory | `, + + // chaining + `container | `, + `container | directory "./path" | `, + // NOTE: this requires parsing partial parse trees + // "container | <$directory >", + + // subshells + // FIXME: this edge case should probably still work + // `container | with-directory $(<$container >)`, + `container | with-directory $()`, + `container | with-directory $(container | )`, + + // args + `container <--$packages >`, + `container <--$packages > | directory`, + `container | directory <--$expand >`, + + // .deps builtin + `<.dep$s >`, + `<$.deps >`, + `.deps | `, + + // .stdlib builtin + `<.std$lib >`, + `<$.stdlib >`, + `.stdlib | `, + `.stdlib | container <--$platform >`, + `.stdlib | container | `, + + // .core builtin + `<.co$re >`, + `<$.core >`, + `.core | `, + `.core | container <--$platform >`, + `.core | container | `, + + // FIXME: avoid inserting extra spaces + // ` `, + } + + wd, err := os.Getwd() + require.NoError(t, err) + + dir := t.TempDir() + require.NoError(t, os.CopyFS(dir, os.DirFS(filepath.Join(wd, "../../modules")))) + cmd := exec.Command("git", "init") + cmd.Dir = dir + require.NoError(t, cmd.Run()) + + os.Chdir(dir) + t.Cleanup(func() { + os.Chdir(wd) + }) + t.Setenv("DAGGER_MODULE", "./wolfi") + + ctx := context.TODO() + + client, err := dagger.Connect(ctx) + require.NoError(t, err) + t.Cleanup(func() { client.Close() }) + + handler := &shellCallHandler{ + dag: client, + stdin: nil, + stdout: io.Discard, + stderr: io.Discard, + debug: debug, + } + require.NoError(t, handler.RunAll(ctx, nil)) + autoComplete := shellAutoComplete{handler} + + for _, cmdline := range cmdlines { + t.Run(cmdline, func(t *testing.T) { + start := strings.IndexRune(cmdline, '<') + end := strings.IndexRune(cmdline, '>') + if start == -1 || end == -1 || !(start < end) { + require.FailNow(t, "invalid cmdline: could not find ") + } + inprogress, expected, ok := strings.Cut(cmdline[start+1:end], "$") + if !ok { + require.FailNow(t, "invalid cmdline: no token '$' in ") + } + + cmdline := cmdline[:start] + inprogress + cmdline[end+1:] + cursor := start + len(inprogress) + + results, length := autoComplete.Do([]rune(cmdline), cursor) + sresults := make([]string, 0, len(results)) + for _, result := range results { + sresults = append(sresults, string(result)) + } + require.Contains(t, sresults, expected) + require.Equal(t, len(inprogress), length) + }) + } +} diff --git a/core/container.go b/core/container.go index 8d0681be10..38d2142c45 100644 --- a/core/container.go +++ b/core/container.go @@ -1675,7 +1675,28 @@ func (container *Container) ImageRefOrErr(ctx context.Context) (string, error) { return "", errors.Errorf("Image reference can only be retrieved immediately after the 'Container.From' call. Error in fetching imageRef as the container image is changed") } -func (container *Container) AsService(ctx context.Context) (*Service, error) { +type ContainerAsServiceArgs struct { + // Command to run instead of the container's default command + Args []string `default:"[]"` + + // If the container has an entrypoint, prepend it to this exec's args + UseEntrypoint bool `default:"false"` + + // Provide the executed command access back to the Dagger API + ExperimentalPrivilegedNesting bool `default:"false"` + + // Grant the process all root capabilities + InsecureRootCapabilities bool `default:"false"` + + // Expand the environment variables in args + Expand bool `default:"false"` + + // Skip the init process injected into containers by default so that the + // user's process is PID 1 + NoInit bool `default:"false"` +} + +func (container *Container) AsServiceLegacy(ctx context.Context) (*Service, error) { if container.Meta == nil { var err error container, err = container.WithExec(ctx, ContainerExecOpts{ @@ -1688,6 +1709,27 @@ func (container *Container) AsService(ctx context.Context) (*Service, error) { return container.Query.NewContainerService(ctx, container), nil } +func (container *Container) AsService(ctx context.Context, args ContainerAsServiceArgs) (*Service, error) { + var cmdargs = container.Config.Cmd + if len(args.Args) > 0 { + cmdargs = args.Args + } + + container, err := container.WithExec(ctx, ContainerExecOpts{ + Args: cmdargs, + UseEntrypoint: args.UseEntrypoint, + ExperimentalPrivilegedNesting: args.ExperimentalPrivilegedNesting, + InsecureRootCapabilities: args.InsecureRootCapabilities, + Expand: args.Expand, + NoInit: args.NoInit, + }) + if err != nil { + return nil, err + } + + return container.Query.NewContainerService(ctx, container), nil +} + func (container *Container) ownership(ctx context.Context, owner string) (*Ownership, error) { if owner == "" { // do not change ownership diff --git a/core/integration/cacert_test.go b/core/integration/cacert_test.go index de44ff309a..d79664ed08 100644 --- a/core/integration/cacert_test.go +++ b/core/integration/cacert_test.go @@ -546,9 +546,9 @@ func customCACertTests( WithMountedFile("/usr/local/share/ca-certificates/dagger-test-custom-ca.crt", certGen.caRootCert). WithServiceBinding("server", serverCtr.AsService()) }) - engineSvc, err := c.Host().Tunnel(devEngine.AsService()).Start(ctx) + engineSvc, err := c.Host().Tunnel(devEngineContainerAsService(devEngine)).Start(ctx) require.NoError(t, err) - t.Cleanup(func() { engineSvc.Stop(ctx) }) + t.Cleanup(func() { _, _ = engineSvc.Stop(ctx) }) endpoint, err := engineSvc.Endpoint(ctx, dagger.ServiceEndpointOpts{Scheme: "tcp"}) require.NoError(t, err) c2, err := dagger.Connect(ctx, dagger.WithRunnerHost(endpoint), dagger.WithLogOutput(testutil.NewTWriter(t))) @@ -756,5 +756,5 @@ ssl_dhparam /etc/ssl/certs/dhparam.pem; WithExec([]string{"nginx", "-t"}). WithExposedPort(80). WithExposedPort(443). - WithExec([]string{"nginx", "-g", "daemon off;"}) + WithDefaultArgs([]string{"nginx", "-g", "daemon off;"}) } diff --git a/core/integration/client_test.go b/core/integration/client_test.go index bb7b814ba4..8356f7b1d7 100644 --- a/core/integration/client_test.go +++ b/core/integration/client_test.go @@ -128,7 +128,7 @@ func (ClientSuite) TestMultiSameTrace(ctx context.Context, t *testctx.T) { func (ClientSuite) TestClientStableID(ctx context.Context, t *testctx.T) { c := connect(ctx, t) devEngine := devEngineContainer(c) - clientCtr := engineClientContainer(ctx, t, c, devEngine.AsService()) + clientCtr := engineClientContainer(ctx, t, c, devEngineContainerAsService(devEngine)) // just run any dagger cli command that connects to the engine stableID, err := clientCtr. diff --git a/core/integration/container_test.go b/core/integration/container_test.go index 17af5daa95..c2ebbc6b21 100644 --- a/core/integration/container_test.go +++ b/core/integration/container_test.go @@ -3632,8 +3632,8 @@ func (ContainerSuite) TestInsecureRootCapabilitesWithService(ctx context.Context // testing it can startup, create containers and bind mount from its filesystem to // them. randID := identity.NewID() - dockerd := dockerService(t, c, "23.0.1", middleware) - out, err := dockerClient(ctx, t, c, dockerd, "23.0.1", middleware). + dockerc := dockerSetup(ctx, t, t.Name(), c, "23.0.1", middleware) + out, err := dockerc. WithExec([]string{"sh", "-e", "-c", strings.Join([]string{ fmt.Sprintf("echo %s-from-outside > /tmp/from-outside", randID), "docker run --rm -v /tmp:/tmp alpine cat /tmp/from-outside", @@ -4213,7 +4213,7 @@ func (ContainerSuite) TestImageLoadCompatibility(ctx context.Context, t *testctx c := connect(ctx, t) for _, dockerVersion := range []string{"20.10", "23.0", "24.0"} { - dockerd := dockerService(t, c, dockerVersion, nil) + dockerc := dockerSetup(ctx, t, t.Name(), c, dockerVersion, nil) for _, mediaType := range []dagger.ImageMediaTypes{dagger.ImageMediaTypesOcimediaTypes, dagger.ImageMediaTypesDockerMediaTypes} { mediaType := mediaType @@ -4231,7 +4231,7 @@ func (ContainerSuite) TestImageLoadCompatibility(ctx context.Context, t *testctx }) require.NoError(t, err) - ctr := dockerClient(ctx, t, c, dockerd, dockerVersion, nil). + ctr := dockerc. WithMountedFile(path.Join("/", path.Base(tmpfile)), c.Host().File(tmpfile)). WithExec([]string{"docker", "load", "-i", "/" + path.Base(tmpfile)}) @@ -4781,3 +4781,74 @@ func (ContainerSuite) TestExecInit(ctx context.Context, t *testctx.T) { require.Contains(t, out, "1 ps") }) } + +func (ContainerSuite) TestContainerAsService(ctx context.Context, t *testctx.T) { + c := connect(ctx, t) + maingo := `package main + +import ( + "fmt" + "net/http" + "os" + "strings" +) + +func main() { + http.HandleFunc("/hello", func(w http.ResponseWriter, r *http.Request) { + fmt.Fprintf(w, "args: %s", strings.Join(os.Args, ",")) + }) + + fmt.Println(http.ListenAndServe(":8080", nil)) +}` + buildctr := c.Container(). + From(golangImage). + WithWorkdir("/work"). + WithNewFile("/work/main.go", maingo). + WithExec([]string{"go", "build", "-o=app", "main.go"}) + + binctr := c.Container(). + From(alpineImage). + WithFile("/bin/app", buildctr.File("/work/app")). + WithEntrypoint([]string{"/bin/app", "via-entrypoint"}). + WithDefaultArgs([]string{"/bin/app", "via-default-args"}). + WithExposedPort(8080) + + curlctr := c.Container(). + From(alpineImage). + WithExec([]string{"sh", "-c", "apk add curl"}) + + t.Run("use default args by default", func(ctx context.Context, t *testctx.T) { + output, err := curlctr. + WithServiceBinding("myapp", binctr.AsService()). + WithExec([]string{"sh", "-c", "curl -vXGET 'http://myapp:8080/hello'"}). + Stdout(ctx) + require.NoError(t, err) + require.Equal(t, "args: /bin/app,via-default-args", output) + }) + + t.Run("can override default args", func(ctx context.Context, t *testctx.T) { + withargsOverwritten := binctr. + AsService(dagger.ContainerAsServiceOpts{Args: []string{"sh", "-c", "/bin/app via-service-override"}}) + + output, err := curlctr. + WithServiceBinding("myapp", withargsOverwritten). + WithExec([]string{"sh", "-c", "curl -vXGET 'http://myapp:8080/hello'"}). + Stdout(ctx) + require.NoError(t, err) + require.Equal(t, "args: /bin/app,via-service-override", output) + }) + + t.Run("can enable entrypoint", func(ctx context.Context, t *testctx.T) { + withargsOverwritten := binctr. + AsService(dagger.ContainerAsServiceOpts{ + UseEntrypoint: true, + }) + + output, err := curlctr. + WithServiceBinding("myapp", withargsOverwritten). + WithExec([]string{"sh", "-c", "curl -vXGET 'http://myapp:8080/hello'"}). + Stdout(ctx) + require.NoError(t, err) + require.Equal(t, "args: /bin/app,via-entrypoint,/bin/app,via-default-args", output) + }) +} diff --git a/core/integration/engine_test.go b/core/integration/engine_test.go index 27cb380055..b416651dfb 100644 --- a/core/integration/engine_test.go +++ b/core/integration/engine_test.go @@ -31,6 +31,13 @@ func TestEngine(t *testing.T) { testctx.Run(testCtx, t, EngineSuite{}, Middleware()...) } +func devEngineContainerAsService(ctr *dagger.Container) *dagger.Service { + return ctr.AsService(dagger.ContainerAsServiceOpts{ + UseEntrypoint: true, + InsecureRootCapabilities: true, + }) +} + // devEngineContainer returns a nested dev engine. func devEngineContainer(c *dagger.Client, withs ...func(*dagger.Container) *dagger.Container) *dagger.Container { // This loads the engine.tar file from the host into the container, that @@ -53,15 +60,12 @@ func devEngineContainer(c *dagger.Client, withs ...func(*dagger.Container) *dagg return ctr. WithMountedCache("/var/lib/dagger", c.CacheVolume("dagger-dev-engine-state-"+identity.NewID())). WithExposedPort(1234, dagger.ContainerWithExposedPortOpts{Protocol: dagger.NetworkProtocolTcp}). - WithExec([]string{ + WithDefaultArgs([]string{ "--addr", "tcp://0.0.0.0:1234", "--addr", "unix:///var/run/buildkit/buildkitd.sock", // avoid network conflicts with other tests "--network-name", deviceName, "--network-cidr", cidr, - }, dagger.ContainerWithExecOpts{ - UseEntrypoint: true, - InsecureRootCapabilities: true, }) } @@ -185,7 +189,7 @@ func (ClientSuite) TestWaitsForEngine(ctx context.Context, t *testctx.T) { WithEntrypoint([]string{"/usr/local/bin/slow-entrypoint.sh"}) }) - clientCtr := engineClientContainer(ctx, t, c, devEngine.AsService()) + clientCtr := engineClientContainer(ctx, t, c, devEngineContainerAsService(devEngine)) _, err := clientCtr. WithNewFile("/query.graphql", `{ version }`). // arbitrary valid query WithExec([]string{"dagger", "query", "--doc", "/query.graphql"}).Sync(ctx) @@ -198,11 +202,11 @@ func (EngineSuite) TestSetsNameFromEnv(ctx context.Context, t *testctx.T) { engineName := "my-special-engine" engineVersion := engine.Version + "-special" - devEngineSvc := devEngineContainer(c, func(c *dagger.Container) *dagger.Container { + devEngineSvc := devEngineContainerAsService(devEngineContainer(c, func(c *dagger.Container) *dagger.Container { return c. WithEnvVariable("_EXPERIMENTAL_DAGGER_ENGINE_NAME", engineName). WithEnvVariable("_EXPERIMENTAL_DAGGER_VERSION", engineVersion) - }).AsService() + })) clientCtr := engineClientContainer(ctx, t, c, devEngineSvc) @@ -223,14 +227,16 @@ func (EngineSuite) TestSetsNameFromEnv(ctx context.Context, t *testctx.T) { func (EngineSuite) TestDaggerRun(ctx context.Context, t *testctx.T) { c := connect(ctx, t) - devEngine := devEngineContainer(c).AsService() + devEngine := devEngineContainerAsService(devEngineContainer(c)) + clientCtr := engineClientContainer(ctx, t, c, devEngine) - runCommand := fmt.Sprintf(` + command := fmt.Sprintf(` export NO_COLOR=1 jq -n '{query:"{container{from(address: \"%s\"){file(path: \"/etc/alpine-release\"){contents}}}}"}' | \ dagger run sh -c 'curl -s \ -u $DAGGER_SESSION_TOKEN: \ + --max-time 30 \ -H "content-type:application/json" \ -d @- \ http://127.0.0.1:$DAGGER_SESSION_PORT/query'`, @@ -239,7 +245,7 @@ func (EngineSuite) TestDaggerRun(ctx context.Context, t *testctx.T) { clientCtr = clientCtr. WithExec([]string{"apk", "add", "jq", "curl"}). - WithExec([]string{"sh", "-c", runCommand}) + WithExec([]string{"sh", "-c", command}) stdout, err := clientCtr.Stdout(ctx) require.NoError(t, err) @@ -255,7 +261,7 @@ func (EngineSuite) TestDaggerRun(ctx context.Context, t *testctx.T) { func (ClientSuite) TestSendsLabelsInTelemetry(ctx context.Context, t *testctx.T) { c := connect(ctx, t) - devEngine := devEngineContainer(c).AsService() + devEngine := devEngineContainerAsService(devEngineContainer(c)) thisRepoPath, err := filepath.Abs("../..") require.NoError(t, err) @@ -280,7 +286,7 @@ func (ClientSuite) TestSendsLabelsInTelemetry(ctx context.Context, t *testctx.T) fakeCloud := withCode. WithMountedCache("/events", eventsVol). - WithExec([]string{ + WithDefaultArgs([]string{ "go", "run", "./core/integration/testdata/telemetry/", }). WithExposedPort(8080). @@ -468,11 +474,12 @@ func (EngineSuite) TestVersionCompat(ctx context.Context, t *testctx.T) { enginesMu.Lock() devEngineSvc, ok := engines[devEngineSvcKey] if !ok { - devEngineSvc = devEngineContainer(c, func(c *dagger.Container) *dagger.Container { + devEngine := devEngineContainer(c, func(c *dagger.Container) *dagger.Container { return c. WithEnvVariable("_EXPERIMENTAL_DAGGER_VERSION", tc.engineVersion). WithEnvVariable("_EXPERIMENTAL_DAGGER_MIN_VERSION", tc.clientMinVersion) - }).AsService() + }) + devEngineSvc = devEngineContainerAsService(devEngine) engines[devEngineSvcKey] = devEngineSvc } enginesMu.Unlock() @@ -580,11 +587,12 @@ func (EngineSuite) TestModuleVersionCompat(ctx context.Context, t *testctx.T) { enginesMu.Lock() devEngineSvc, ok := engines[devEngineSvcKey] if !ok { - devEngineSvc = devEngineContainer(c, func(c *dagger.Container) *dagger.Container { + devEngine := devEngineContainer(c, func(c *dagger.Container) *dagger.Container { return c. WithEnvVariable("_EXPERIMENTAL_DAGGER_VERSION", tc.engineVersion). WithEnvVariable("_EXPERIMENTAL_DAGGER_MIN_VERSION", tc.moduleMinVersion) - }).AsService() + }) + devEngineSvc = devEngineContainerAsService(devEngine) engines[devEngineSvcKey] = devEngineSvc } enginesMu.Unlock() diff --git a/core/integration/future_test.go b/core/integration/future_test.go index e0c06e6f45..d802c2ec33 100644 --- a/core/integration/future_test.go +++ b/core/integration/future_test.go @@ -25,8 +25,8 @@ func futureClient(ctx context.Context, t *testctx.T, futureVersion string) *dagg devEngine := devEngineContainer(c, func(c *dagger.Container) *dagger.Container { return c.WithEnvVariable("_EXPERIMENTAL_DAGGER_VERSION", futureVersion) - }).AsService() - devClient := engineClientContainer(ctx, t, c, devEngine) + }) + devClient := engineClientContainer(ctx, t, c, devEngineContainerAsService(devEngine)) devClient = devClient.WithEnvVariable("_EXPERIMENTAL_DAGGER_VERSION", futureVersion) return devClient. diff --git a/core/integration/git_test.go b/core/integration/git_test.go index 2482b7d1bf..f20b5df21a 100644 --- a/core/integration/git_test.go +++ b/core/integration/git_test.go @@ -254,7 +254,7 @@ sleep infinity sshSvc := hostKeyGen. WithMountedFile("/root/start.sh", setupScript). WithExposedPort(sshPort). - WithExec([]string{"sh", "/root/start.sh"}). + WithDefaultArgs([]string{"sh", "/root/start.sh"}). AsService() sshHost, err := sshSvc.Hostname(ctx) diff --git a/core/integration/legacy_test.go b/core/integration/legacy_test.go index 39ad385960..728300e236 100644 --- a/core/integration/legacy_test.go +++ b/core/integration/legacy_test.go @@ -756,3 +756,119 @@ func (LegacySuite) TestContainerWithFocus(ctx context.Context, t *testctx.T) { }) require.NoError(t, err) } + +func (LegacySuite) TestContainerAsService(ctx context.Context, t *testctx.T) { + // Changed in dagger/dagger#8865 + // + // Ensure that the legacy AsService api uses entrypoint by default + // and use WithExec if that is configured + + c := connect(ctx, t) + + serversource := `package main + +import ( + "fmt" + "net/http" + "os" + "strings" +) + +func main() { + http.HandleFunc("/hello", func(w http.ResponseWriter, r *http.Request) { + fmt.Fprintf(w, "args: %s", strings.Join(os.Args, ",")) + }) + + fmt.Println(http.ListenAndServe(":8080", nil)) +}` + + daggermodmaingo := `package main + +import ( + "context" + "dagger/foo/internal/dagger" +) + +type Foo struct{} + +func (f *Foo) TestServiceUpEntrypoint(ctx context.Context, app *dagger.File) (string, error) { + svc, err := f.StartEntrypointByDefault(ctx, app) + if err != nil { + return "", err + } + + return dag.Container(). + From("alpine:3.20.2"). + WithExec([]string{"sh", "-c", "apk add curl"}). + WithServiceBinding("myapp", svc). + WithExec([]string{"sh", "-c", "curl -vXGET 'http://myapp:8080/hello'"}). + Stdout(ctx) +} + +func (f *Foo) StartEntrypointByDefault(ctx context.Context, app *dagger.File) (*dagger.Service, error) { + return dag.Container(). + From("alpine:3.20.2"). + WithFile("/bin/app", app). + WithEntrypoint([]string{"/bin/app", "via-entrypoint"}). + WithDefaultArgs([]string{"/bin/app", "via-default-args"}). + WithExposedPort(8080). + AsService(), nil +} + +func (f *Foo) TestServiceUpWithExec(ctx context.Context, app *dagger.File) (string, error) { + svc, err := f.UseWithExecWhenAvailable(ctx, app) + if err != nil { + return "", err + } + + return dag.Container(). + From("alpine:3.20.2"). + WithExec([]string{"sh", "-c", "apk add curl"}). + WithServiceBinding("myapp", svc). + WithExec([]string{"sh", "-c", "curl -vXGET 'http://myapp:8080/hello'"}). + Stdout(ctx) +} + +func (f *Foo) UseWithExecWhenAvailable(ctx context.Context, app *dagger.File) (*dagger.Service, error) { + return dag.Container(). + From("alpine:3.20.2"). + WithFile("/bin/app", app). + WithEntrypoint([]string{"/bin/app", "via-entrypoint"}). + WithDefaultArgs([]string{"/bin/app", "via-default-args"}). + WithExec([]string{"/bin/app", "via-withExec"}). + WithExposedPort(8080). + AsService(), nil +} +` + + app := c.Container(). + From(golangImage). + WithWorkdir("/work"). + WithNewFile("main.go", serversource). + WithExec([]string{"go", "build", "-o=app", "main.go"}). + File("/work/app") + + ctr := daggerCliBase(t, c). + WithWorkdir("/work/"). + WithFile("app", app). + WithNewFile("main.go", daggermodmaingo). + WithNewFile("dagger.json", `{"name": "foo", "sdk": "go", "source": ".", "engineVersion": "v0.13.7"}`) + + // verify that the engine uses the entrypoint when serving the legacy AsService api + t.Run("use entrypoint by default", func(ctx context.Context, t *testctx.T) { + output, err := ctr. + With(daggerExec("call", "test-service-up-entrypoint", "--app=app")). + Stdout(ctx) + require.NoError(t, err) + require.Equal(t, "args: /bin/app,via-entrypoint,/bin/app,via-default-args", output) + }) + + // verify that the engine uses the entrypoint when serving the legacy AsService api + t.Run("use withExec when used", func(ctx context.Context, t *testctx.T) { + output, err := ctr. + With(daggerExec("call", "test-service-up-with-exec", "--app=app")). + Stdout(ctx) + require.NoError(t, err) + require.Equal(t, "args: /bin/app,via-withExec", output) + }) +} diff --git a/core/integration/localcache_test.go b/core/integration/localcache_test.go index b362941cfb..28c7ce6e98 100644 --- a/core/integration/localcache_test.go +++ b/core/integration/localcache_test.go @@ -51,7 +51,7 @@ func (EngineSuite) TestLocalCacheGCKeepBytesConfig(ctx context.Context, t *testc }, } { f := func(ctx context.Context, t *testctx.T, engine *dagger.Container) { - engineSvc, err := c.Host().Tunnel(engine.AsService()).Start(ctx) + engineSvc, err := c.Host().Tunnel(devEngineContainerAsService(engine)).Start(ctx) require.NoError(t, err) t.Cleanup(func() { engineSvc.Stop(ctx) }) @@ -148,7 +148,7 @@ func (EngineSuite) TestLocalCacheAutomaticGC(ctx context.Context, t *testctx.T) }, } { f := func(ctx context.Context, t *testctx.T, engine *dagger.Container) { - engineSvc, err := c.Host().Tunnel(engine.AsService()).Start(ctx) + engineSvc, err := c.Host().Tunnel(devEngineContainerAsService(engine)).Start(ctx) require.NoError(t, err) t.Cleanup(func() { engineSvc.Stop(ctx) }) diff --git a/core/integration/module_python_test.go b/core/integration/module_python_test.go index 9064d20e53..6063ed198c 100644 --- a/core/integration/module_python_test.go +++ b/core/integration/module_python_test.go @@ -899,49 +899,6 @@ class Test: require.Equal(t, "https://test.pypi.org/simple\nhttps://pypi.org/simple\n", out) }) - t.Run("backwards compat", func(ctx context.Context, t *testctx.T) { - c := connect(ctx, t) - - out, err := daggerCliBase(t, c). - With(source). - With(pyprojectExtra(nil, ` - [tool.uv] - index-url = "https://test.pypi.org/simple" - extra-index-url = "https://pypi.org/simple" - `)). - With(daggerInitPython()). - With(daggerCall("urls")). - Stdout(ctx) - - require.NoError(t, err) - require.Equal(t, "https://test.pypi.org/simple\nhttps://pypi.org/simple\n", out) - }) - - t.Run("preference", func(ctx context.Context, t *testctx.T) { - c := connect(ctx, t) - - out, err := daggerCliBase(t, c). - With(source). - With(pyprojectExtra(nil, ` - [tool.uv] - index-url = "https://test.example.org/simple" - extra-index-url = "https://example.org/simple" - - [[tool.uv.index]] - url = "https://test.pypi.org/simple" - default = true - - [[tool.uv.index]] - url = "https://pypi.org/simple" - `)). - With(daggerInitPython()). - With(daggerCall("urls")). - Stdout(ctx) - - require.NoError(t, err) - require.Equal(t, "https://test.pypi.org/simple\nhttps://pypi.org/simple\n", out) - }) - t.Run("without", func(ctx context.Context, t *testctx.T) { c := connect(ctx, t) diff --git a/core/integration/module_shell_test.go b/core/integration/module_shell_test.go index 5f52dfcafd..34b0da1875 100644 --- a/core/integration/module_shell_test.go +++ b/core/integration/module_shell_test.go @@ -3,6 +3,8 @@ package core import ( "context" "fmt" + "regexp" + "strings" "testing" "dagger.io/dagger" @@ -24,9 +26,9 @@ func daggerShell(script string) dagger.WithContainerFunc { } } -func daggerShellNoLoad(script string) dagger.WithContainerFunc { +func daggerShellNoMod(script string) dagger.WithContainerFunc { return func(c *dagger.Container) *dagger.Container { - return c.WithExec([]string{"dagger", "shell", "--no-load", "-c", script}, dagger.ContainerWithExecOpts{ + return c.WithExec([]string{"dagger", "shell", "--no-mod", "-c", script}, dagger.ContainerWithExecOpts{ ExperimentalPrivilegedNesting: true, }) } @@ -54,44 +56,346 @@ func (m *Test) Container() *dagger.Container { require.Contains(t, out, "Alpine Linux") } -func (ShellSuite) TestForceCore(ctx context.Context, t *testctx.T) { +func (ShellSuite) TestModuleLookup(ctx context.Context, t *testctx.T) { c := connect(ctx, t) - out, err := modInit(t, c, "go", `package main + setup := modInit(t, c, "go", `// Main module + +package main import ( "dagger/test/internal/dagger" ) -type Test struct{} +func New( + // +defaultPath=. + source *dagger.Directory, +) *Test { + return &Test{Source: source} +} -func (m *Test) Container() *dagger.Container { - return dag.Container().From("`+golangImage+`") +// Test main object +type Test struct{ + Source *dagger.Directory +} + +// Test version +func (Test) Version() string { + return "test function" } + +// Encouragement +func (Test) Go() string { + return "Let's go!" +} `, ). - With(daggerShell(fmt.Sprintf(".container | from %s | with-exec cat,/etc/os-release | stdout", alpineImage))). - Stdout(ctx) - require.NoError(t, err) - require.Contains(t, out, "Alpine Linux") + With(withModInitAt("modules/dep", "go", `// Dependency module + +package main + +func New() *Dep { + return &Dep{ + Version: "dep function", + } +} + +type Dep struct{ + // Dep version + Version string +} +`, + )). + With(withModInitAt("modules/git", "go", `// A git helper + +package main + +func New(url string) *Git { + return &Git{URL: url} +} + +type Git struct{ + URL string +} +`, + )). + With(withModInitAt("modules/go", "go", `// A go helper + +package main + +type Go struct{} + +// Go version +func (Go) Version() string { + return "go version" +} +`, + )). + With(withModInitAt("other", "go", `// A local module + +package main + +type Other struct{} + +func (Other) Version() string { + return "other function" +} +`, + )). + With(daggerExec("install", "./modules/dep")). + With(daggerExec("install", "./modules/git")). + With(daggerExec("install", "./modules/go")) + + t.Run("current module doc", func(ctx context.Context, t *testctx.T) { + out, err := setup. + With(daggerShell(".doc")). + Stdout(ctx) + require.NoError(t, err) + require.Contains(t, out, "MODULE") + require.Contains(t, out, "Main module") + require.Contains(t, out, "ENTRYPOINT") + require.Contains(t, out, "Usage: . [options]") + require.Contains(t, out, "AVAILABLE FUNCTIONS") + require.Contains(t, out, "Encouragement") + }) + + t.Run("current module function takes precedence over dependency", func(ctx context.Context, t *testctx.T) { + out, err := setup. + With(daggerShell("go")). + Stdout(ctx) + require.NoError(t, err) + require.Equal(t, "Let's go!", out) + }) + + t.Run("current module function doc takes precedence over dependency", func(ctx context.Context, t *testctx.T) { + out, err := setup. + With(daggerShell(".doc go")). + Stdout(ctx) + require.NoError(t, err) + require.Contains(t, out, "Encouragement") + require.Contains(t, out, "RETURNS") + }) + + t.Run("disambiguate dependency function", func(ctx context.Context, t *testctx.T) { + out, err := setup. + With(daggerShell(".deps | go | version")). + Stdout(ctx) + require.NoError(t, err) + require.Equal(t, "go version", out) + }) + + t.Run("disambiguate dependency function doc", func(ctx context.Context, t *testctx.T) { + out, err := setup. + With(daggerShell(".deps | .doc go")). + Stdout(ctx) + require.NoError(t, err) + require.Contains(t, out, "MODULE") + require.Contains(t, out, "A go helper") + }) + + t.Run("current module function takes precedence over stdlib", func(ctx context.Context, t *testctx.T) { + out, err := setup. + With(daggerShell("version")). + Stdout(ctx) + require.NoError(t, err) + require.Contains(t, out, "test function") + }) + + t.Run("current module function doc takes precedence over stdlib", func(ctx context.Context, t *testctx.T) { + out, err := setup. + With(daggerShell(".doc version")). + Stdout(ctx) + require.NoError(t, err) + require.Contains(t, out, "Test version") + }) + + t.Run("disambiguate stdlib command", func(ctx context.Context, t *testctx.T) { + out, err := setup. + With(daggerShell(".stdlib | version")). + Stdout(ctx) + require.NoError(t, err) + require.Regexp(t, regexp.MustCompile(`^v0.\d+`), out) + }) + + t.Run("disambiguate stdlib command doc", func(ctx context.Context, t *testctx.T) { + out, err := setup. + With(daggerShell(".stdlib | .doc version")). + Stdout(ctx) + require.NoError(t, err) + require.Contains(t, out, "Get the current Dagger Engine version.") + require.Contains(t, out, "RETURNS") + }) + + t.Run("dependency module function takes precedence over stdlib", func(ctx context.Context, t *testctx.T) { + out, err := setup. + With(daggerShell("git acme.org | url")). + Stdout(ctx) + require.NoError(t, err) + require.Equal(t, "acme.org", out) + }) + + t.Run("dependency module function doc takes precedence over stdlib", func(ctx context.Context, t *testctx.T) { + out, err := setup. + With(daggerShell(".doc git")). + Stdout(ctx) + require.NoError(t, err) + require.Contains(t, out, "A git helper") + require.Contains(t, out, "ENTRYPOINT") + require.NotContains(t, out, "AVAILABLE FUNCTIONS") + }) + + t.Run("other module function", func(ctx context.Context, t *testctx.T) { + out, err := setup. + With(daggerShell("other | version")). + Stdout(ctx) + require.NoError(t, err) + require.Equal(t, "other function", out) + }) + + t.Run("other module doc", func(ctx context.Context, t *testctx.T) { + out, err := setup. + With(daggerShell(".doc other")). + Stdout(ctx) + require.NoError(t, err) + require.Contains(t, out, "A local module") + require.NotContains(t, out, "ENTRYPOINT") + require.NotContains(t, out, "AVAILABLE FUNCTIONS") + }) + + t.Run("current module required constructor arg error", func(ctx context.Context, t *testctx.T) { + _, err := setup. + WithWorkdir("modules/git"). + With(daggerShell("url")). + Sync(ctx) + requireErrOut(t, err, "constructor: missing 1 positional argument") + }) + + t.Run("current module required constructor arg function", func(ctx context.Context, t *testctx.T) { + out, err := setup. + WithWorkdir("modules/git"). + With(daggerShell(". acme.org | url")). + Stdout(ctx) + require.NoError(t, err) + require.Equal(t, "acme.org", out) + }) + + t.Run("dep result", func(ctx context.Context, t *testctx.T) { + out, err := setup. + With(daggerShell("dep")). + Stdout(ctx) + require.NoError(t, err) + require.JSONEq(t, `{"version": "dep function"}`, out) + }) + + t.Run("dep doc type", func(ctx context.Context, t *testctx.T) { + out, err := setup. + With(daggerShell("dep | .doc")). + Stdout(ctx) + require.NoError(t, err) + require.Contains(t, out, "OBJECT") + require.Contains(t, out, "\n Dep\n") + require.Regexp(t, regexp.MustCompile("\n version +Dep version"), out) + }) + + t.Run("deps result", func(ctx context.Context, t *testctx.T) { + out, err := setup. + With(daggerShell(".deps")). + Stdout(ctx) + require.NoError(t, err) + require.Contains(t, out, "- dep") + require.Contains(t, out, "- git") + require.Contains(t, out, "- go") + }) + + t.Run("deps doc", func(ctx context.Context, t *testctx.T) { + out, err := setup. + With(daggerShell(".deps | .doc")). + Stdout(ctx) + require.NoError(t, err) + require.Regexp(t, regexp.MustCompile(`\n dep +Dependency module`), out) + require.Regexp(t, regexp.MustCompile(`\n git +A git helper`), out) + require.Regexp(t, regexp.MustCompile(`\n go +A go helper`), out) + }) + + t.Run("deps doc module", func(ctx context.Context, t *testctx.T) { + out, err := setup. + With(daggerShell(".deps | .doc go")). + Stdout(ctx) + require.NoError(t, err) + require.Contains(t, out, "MODULE") + require.Contains(t, out, "A go helper") + }) + + t.Run("stdlib result", func(ctx context.Context, t *testctx.T) { + out, err := setup. + With(daggerShell(".stdlib")). + Stdout(ctx) + require.NoError(t, err) + require.Contains(t, out, "version") + require.NotContains(t, out, "Get the current Dagger Engine version") + require.NotContains(t, out, "load-container-from-id") + }) + + t.Run("stdlib doc", func(ctx context.Context, t *testctx.T) { + out, err := setup. + With(daggerShell(".stdlib | .doc")). + Stdout(ctx) + require.NoError(t, err) + require.Contains(t, out, "version") + require.Contains(t, out, "Get the current Dagger Engine version") + require.NotContains(t, out, "load-container-from-id") + }) + + t.Run("stdlib doc function", func(ctx context.Context, t *testctx.T) { + out, err := setup. + With(daggerShell(".stdlib | .doc git")). + Stdout(ctx) + require.NoError(t, err) + require.Regexp(t, regexp.MustCompile(`^Queries a Git repository`), out) + require.Contains(t, out, "git [options]") + require.Contains(t, out, "RETURNS") + }) + + t.Run("core result", func(ctx context.Context, t *testctx.T) { + out, err := setup. + With(daggerShell(".core")). + Stdout(ctx) + require.NoError(t, err) + require.Contains(t, out, "- load-container-from-id") + require.NotContains(t, out, "Load a Container") + }) + + t.Run("core doc", func(ctx context.Context, t *testctx.T) { + out, err := setup. + With(daggerShell(".core | .doc")). + Stdout(ctx) + require.NoError(t, err) + require.Contains(t, out, "load-container-from-id") + require.Contains(t, out, "Load a Container from its ID") + }) + + t.Run("core doc function", func(ctx context.Context, t *testctx.T) { + out, err := setup. + With(daggerShell(".core | .doc load-container-from-id")). + Stdout(ctx) + require.NoError(t, err) + require.Regexp(t, regexp.MustCompile(`^Load a Container from its ID`), out) + require.Contains(t, out, "load-container-from-id ") + require.Contains(t, out, "RETURNS") + }) } func (ShellSuite) TestNoModule(ctx context.Context, t *testctx.T) { c := connect(ctx, t) modGen := daggerCliBase(t, c) - t.Run("first command no fallback to core", func(ctx context.Context, t *testctx.T) { - _, err := modGen.With(daggerShell("container")).Sync(ctx) - requireErrOut(t, err, "module not loaded") - }) - t.Run("module builtin does not work", func(ctx context.Context, t *testctx.T) { - _, err := modGen.With(daggerShell(".config")).Sync(ctx) + _, err := modGen.With(daggerShell(".deps")).Sync(ctx) requireErrOut(t, err, "module not loaded") }) - t.Run("no main object doc", func(ctx context.Context, t *testctx.T) { - _, err := modGen.With(daggerShell(".config")).Sync(ctx) + t.Run("no default module doc", func(ctx context.Context, t *testctx.T) { + _, err := modGen.With(daggerShell(".doc")).Sync(ctx) requireErrOut(t, err, "module not loaded") }) } @@ -109,7 +413,7 @@ func (ShellSuite) TestNoLoadModule(ctx context.Context, t *testctx.T) { t.Run("forced no load", func(ctx context.Context, t *testctx.T) { c := connect(ctx, t) _, err := modInit(t, c, "go", ""). - With(daggerShellNoLoad(".config")). + With(daggerShellNoMod(".deps")). Sync(ctx) requireErrOut(t, err, "module not loaded") }) @@ -117,7 +421,7 @@ func (ShellSuite) TestNoLoadModule(ctx context.Context, t *testctx.T) { t.Run("dynamically loaded", func(ctx context.Context, t *testctx.T) { c := connect(ctx, t) out, err := modInit(t, c, "go", ""). - With(daggerShellNoLoad(".load | .use; .doc")). + With(daggerShellNoMod(".use .; .doc")). Stdout(ctx) require.NoError(t, err) require.Contains(t, out, "container-echo") @@ -126,10 +430,20 @@ func (ShellSuite) TestNoLoadModule(ctx context.Context, t *testctx.T) { t.Run("stateless load", func(ctx context.Context, t *testctx.T) { c := connect(ctx, t) out, err := modInit(t, c, "go", ""). - With(daggerShellNoLoad(".load | .doc")). + With(daggerShellNoMod(". | .doc container-echo")). Stdout(ctx) require.NoError(t, err) - require.Contains(t, out, "container-echo") + require.Contains(t, out, "echoes whatever string argument") + }) + + t.Run("stateless .doc load", func(ctx context.Context, t *testctx.T) { + c := connect(ctx, t) + out, err := modInit(t, c, "go", ""). + With(daggerShellNoMod(".doc .")). + Stdout(ctx) + require.NoError(t, err) + require.Contains(t, out, "MODULE") + require.Contains(t, out, "A generated module for Test functions") }) } @@ -160,10 +474,10 @@ type Foo struct{ out, err := modInit(t, c, "go", test). With(daggerExec("init", "--sdk=go", "--source=foo", "foo")). With(sdkSourceAt("foo", "go", foo)). - With(daggerShell(".load foo")). + With(daggerShell("foo")). Stdout(ctx) require.NoError(t, err) - require.JSONEq(t, `{"_type": "Foo", "bar": "foobar"}`, out) + require.JSONEq(t, `{"bar": "foobar"}`, out) }) t.Run("stateful", func(ctx context.Context, t *testctx.T) { @@ -171,7 +485,7 @@ type Foo struct{ out, err := modInit(t, c, "go", test). With(daggerExec("init", "--sdk=go", "--source=foo", "foo")). With(sdkSourceAt("foo", "go", foo)). - With(daggerShell(".load foo | .use; bar")). + With(daggerShell(".use foo; bar")). Stdout(ctx) require.NoError(t, err) require.Contains(t, out, "foobar") @@ -184,7 +498,7 @@ type Foo struct{ With(sdkSourceAt("foo", "go", foo)) out, err := modGen. - With(daggerShell(".load foo | bar")). + With(daggerShell("foo | bar")). Stdout(ctx) require.NoError(t, err) require.Equal(t, "foobar", out) @@ -200,15 +514,15 @@ type Foo struct{ func (ShellSuite) TestNotExists(ctx context.Context, t *testctx.T) { c := connect(ctx, t) _, err := modInit(t, c, "go", ""). - With(daggerShell("container")). + With(daggerShell("load-container-from-id")). Sync(ctx) - requireErrOut(t, err, "no such function") + requireErrOut(t, err, "not found") } func (ShellSuite) TestIntegerArg(ctx context.Context, t *testctx.T) { c := connect(ctx, t) - script := ".container | with-exposed-port 80 | exposed-ports | port" + script := "container | with-exposed-port 80 | exposed-ports | port" out, err := daggerCliBase(t, c). With(daggerShell(script)). Stdout(ctx) @@ -219,7 +533,7 @@ func (ShellSuite) TestIntegerArg(ctx context.Context, t *testctx.T) { func (ShellSuite) TestExport(ctx context.Context, t *testctx.T) { c := connect(ctx, t) - script := ".directory | with-new-file foo bar | export mydir" + script := "directory | with-new-file foo bar | export mydir" out, err := daggerCliBase(t, c). With(daggerShell(script)). File("mydir/foo"). @@ -228,18 +542,6 @@ func (ShellSuite) TestExport(ctx context.Context, t *testctx.T) { require.Equal(t, "bar", out) } -func (ShellSuite) TestBasicGit(ctx context.Context, t *testctx.T) { - c := connect(ctx, t) - - script := ".git https://github.com/dagger/dagger | head | tree | file README.md | contents" - out, err := daggerCliBase(t, c). - With(withModInit("go", "")). - With(daggerShell(script)). - Stdout(ctx) - require.NoError(t, err) - require.Contains(t, out, "What is Dagger?") -} - func (ShellSuite) TestBasicModule(ctx context.Context, t *testctx.T) { c := connect(ctx, t) @@ -266,7 +568,7 @@ func (m *Test) DirectoryID(ctx context.Context) (string, error) { return string(id), err } ` - script := ".load-directory-from-id $(directory-id) | file foo | contents" + script := ".core | load-directory-from-id $(directory-id) | file foo | contents" out, err := modInit(t, c, "go", source). With(daggerShell(script)). @@ -276,38 +578,59 @@ func (m *Test) DirectoryID(ctx context.Context) (string, error) { require.Equal(t, "bar", out) } -func (ShellSuite) TestModuleDoc(ctx context.Context, t *testctx.T) { +func (ShellSuite) TestArgsSpread(ctx context.Context, t *testctx.T) { c := connect(ctx, t) + modGen := daggerCliBase(t, c) - source := `// This is a test module - -package main - -// The entrypoint for the module -func New(foo string, bar string) *Test { - return &Test{ - Foo: foo, - Bar: bar, + for _, tc := range []struct { + command string + expected string + }{ + { + command: `with-exec echo hello world | stdout`, + expected: "hello world\n", + }, + { + command: `with-exec echo with tail options --redirect-stdout /out | file /out | contents`, + expected: "with tail options\n", + }, + { + command: `with-exec --redirect-stdout /out echo with head options | file /out | contents`, + expected: "with head options\n", + }, + { + command: `with-exec --stdin "with interspersed args" cat --redirect-stdout /out | file /out | contents`, + expected: "with interspersed args", + }, + { + command: `with-exec --redirect-stdout /out -- echo -n stop processing flags: --expand | file /out | contents`, + expected: "stop processing flags: --expand", + }, + { + command: `with-env-variable MSG "with double" | with-exec --redirect-stdout /out --expand -- echo -n \$MSG --expand | file /out | contents`, + expected: "with double --expand", + }, + { + command: `with-exec --redirect-stdout /out -- echo -n git checkout -- file | file /out | contents`, + expected: "git checkout -- file", + }, + } { + t.Run(strings.TrimSpace(tc.expected), func(ctx context.Context, t *testctx.T) { + script := fmt.Sprintf("container | from %s | %s", alpineImage, tc.command) + out, err := modGen.With(daggerShell(script)).Stdout(ctx) + require.NoError(t, err) + require.Equal(t, tc.expected, out) + }) } } -type Test struct{ - Foo string - Bar string -} - -// Some function -func (m *Test) FooBar() string { - return m.Foo+m.Bar -} -` - out, err := modInit(t, c, "go", source). - With(daggerShell(".doc")). - Stdout(ctx) - require.NoError(t, err) - require.Contains(t, out, "\n test\n \n This is a test module") - require.Contains(t, out, "Usage: .config \n \n The entrypoint for the module") - require.Regexp(t, "foo-bar +Some function", out) +func (ShellSuite) TestCommandStateArgs(ctx context.Context, t *testctx.T) { + c := connect(ctx, t) + script := fmt.Sprintf("FOO=$(container | from %s | with-exec -- echo -n foo | stdout); .doc $FOO", alpineImage) + _, err := daggerCliBase(t, c). + With(daggerShell(script)). + Sync(ctx) + requireErrOut(t, err, `"foo" not found`) } func (ShellSuite) TestInstall(ctx context.Context, t *testctx.T) { diff --git a/core/integration/module_test.go b/core/integration/module_test.go index f9bfc629b2..30845e9265 100644 --- a/core/integration/module_test.go +++ b/core/integration/module_test.go @@ -3621,7 +3621,7 @@ func (ModuleSuite) TestStartServices(ctx context.Context, t *testctx.T) { ). WithWorkdir("/srv/www"). WithExposedPort(23457). - WithExec([]string{"python", "-m", "http.server", "23457"}). + WithDefaultArgs([]string{"python", "-m", "http.server", "23457"}). AsService() ctr := dag.Container(). @@ -5559,7 +5559,7 @@ func sdkCodegenFile(t *testctx.T, sdk string) string { case "python": return "sdk/src/dagger/client/gen.py" case "typescript": - return "sdk/api/client.gen.ts" + return "sdk/src/api/client.gen.ts" default: panic(fmt.Errorf("unknown sdk %q", sdk)) } diff --git a/core/integration/module_up_test.go b/core/integration/module_up_test.go index 8ce2d24acc..efc190a255 100644 --- a/core/integration/module_up_test.go +++ b/core/integration/module_up_test.go @@ -191,7 +191,7 @@ func daggerUpInitModFn(ctx context.Context, t *testctx.T, defaultPort string) st ). WithWorkdir("/srv/www"). WithExposedPort(port). - WithExec([]string{"python", "-m", "http.server", strconv.Itoa(port)}), + WithDefaultArgs([]string{"python", "-m", "http.server", strconv.Itoa(port)}), } } diff --git a/core/integration/provision_test.go b/core/integration/provision_test.go index 43f9720c6f..66ade6c66b 100644 --- a/core/integration/provision_test.go +++ b/core/integration/provision_test.go @@ -27,8 +27,7 @@ func TestProvision(t *testing.T) { func (ProvisionSuite) TestDockerDriver(ctx context.Context, t *testctx.T) { t.Run("default image", func(ctx context.Context, t *testctx.T) { c := connect(ctx, t) - dockerd := dockerService(t, c, "", nil) - dockerc := dockerClient(ctx, t, c, dockerd, "", nil) + dockerc := dockerSetup(ctx, t, "provisioner", c, "", nil) dockerc = dockerc.WithMountedFile("/bin/dagger", daggerCliFile(t, c)) out, err := dockerc. @@ -41,8 +40,7 @@ func (ProvisionSuite) TestDockerDriver(ctx context.Context, t *testctx.T) { t.Run("specified image", func(ctx context.Context, t *testctx.T) { c := connect(ctx, t) - dockerd := dockerService(t, c, "", nil) - dockerc := dockerClient(ctx, t, c, dockerd, "", nil) + dockerc := dockerSetup(ctx, t, "provisioner", c, "", nil) dockerc = dockerc.WithMountedFile("/bin/dagger", daggerCliFile(t, c)) version := "v0.14.0" @@ -55,8 +53,7 @@ func (ProvisionSuite) TestDockerDriver(ctx context.Context, t *testctx.T) { t.Run("current image", func(ctx context.Context, t *testctx.T) { c := connect(ctx, t) - dockerd := dockerService(t, c, "", nil) - dockerc := dockerClient(ctx, t, c, dockerd, "", nil) + dockerc := dockerSetup(ctx, t, "provisioner", c, "", nil) dockerc = dockerc.WithMountedFile("/bin/dagger", daggerCliFile(t, c)) dockerc, err := dockerLoadEngine(ctx, c, dockerc, "registry.dagger.io/engine:dev") require.NoError(t, err) @@ -78,8 +75,7 @@ func (ProvisionSuite) TestDockerDriverConfig(ctx context.Context, t *testctx.T) return ctr.WithNewFile("/root/.config/dagger/engine.json", configContents) } - dockerd := dockerService(t, c, "", middleware) - dockerc := dockerClient(ctx, t, c, dockerd, "", middleware) + dockerc := dockerSetup(ctx, t, "provisioner", c, "", middleware) dockerc, err := dockerLoadEngine(ctx, c, dockerc, "registry.dagger.io/engine:dev") require.NoError(t, err) dockerc = dockerc. @@ -101,62 +97,129 @@ func (ProvisionSuite) TestDockerDriverConfig(ctx context.Context, t *testctx.T) require.JSONEq(t, configContents, result) } -func dockerService(t *testctx.T, dag *dagger.Client, dockerVersion string, f func(*dagger.Container) *dagger.Container) *dagger.Service { - tag := "dind" - if dockerVersion != "" { - tag = dockerVersion + "-" + tag +func (ProvisionSuite) TestDockerDriverGarbageCollectEngines(ctx context.Context, t *testctx.T) { + dockerPs := func(ctx context.Context, t *testctx.T, dockerc *dagger.Container) []string { + out, err := dockerc. + WithEnvVariable("CACHEBUSTER", identity.NewID()). + WithExec([]string{"docker", "ps", "-q"}). + Stdout(ctx) + require.NoError(t, err) + out = strings.TrimSpace(out) + if out == "" { + return []string{} + } + return strings.Split(out, "\n") } + t.Run("cleanup", func(ctx context.Context, t *testctx.T) { + c := connect(ctx, t) + dockerc := dockerSetup(ctx, t, "provisioner", c, "", nil) + dockerc = dockerc.WithMountedFile("/bin/dagger", daggerCliFile(t, c)) + + require.Len(t, dockerPs(ctx, t, dockerc), 0) + + version := "v0.13.0" + out, err := dockerc. + WithEnvVariable("_EXPERIMENTAL_DAGGER_RUNNER_HOST", "docker-image://registry.dagger.io/engine:"+version). + WithExec([]string{"dagger", "query"}, dagger.ContainerWithExecOpts{Stdin: "{version}"}).Stdout(ctx) + require.NoError(t, err) + require.JSONEq(t, `{"version":"`+version+`"}`, out) + + require.Len(t, dockerPs(ctx, t, dockerc), 1) + + version = "v0.14.0" + out, err = dockerc. + WithEnvVariable("_EXPERIMENTAL_DAGGER_RUNNER_HOST", "docker-image://registry.dagger.io/engine:"+version). + WithExec([]string{"dagger", "query"}, dagger.ContainerWithExecOpts{Stdin: "{version}"}).Stdout(ctx) + require.NoError(t, err) + require.JSONEq(t, `{"version":"`+version+`"}`, out) + + require.Len(t, dockerPs(ctx, t, dockerc), 1) + }) + + t.Run("no cleanup", func(ctx context.Context, t *testctx.T) { + c := connect(ctx, t) + dockerc := dockerSetup(ctx, t, "provisioner", c, "", nil) + dockerc = dockerc.WithMountedFile("/bin/dagger", daggerCliFile(t, c)) + dockerc = dockerc.WithEnvVariable("DAGGER_LEAVE_OLD_ENGINE", "true") + + require.Len(t, dockerPs(ctx, t, dockerc), 0) + + version := "v0.13.0" + out, err := dockerc. + WithEnvVariable("_EXPERIMENTAL_DAGGER_RUNNER_HOST", "docker-image://registry.dagger.io/engine:"+version). + WithExec([]string{"dagger", "query"}, dagger.ContainerWithExecOpts{Stdin: "{version}"}).Stdout(ctx) + require.NoError(t, err) + require.JSONEq(t, `{"version":"`+version+`"}`, out) + + require.Len(t, dockerPs(ctx, t, dockerc), 1) + + version = "v0.14.0" + out, err = dockerc. + WithEnvVariable("_EXPERIMENTAL_DAGGER_RUNNER_HOST", "docker-image://registry.dagger.io/engine:"+version). + WithExec([]string{"dagger", "query"}, dagger.ContainerWithExecOpts{Stdin: "{version}"}).Stdout(ctx) + require.NoError(t, err) + require.JSONEq(t, `{"version":"`+version+`"}`, out) + + require.Len(t, dockerPs(ctx, t, dockerc), 2) + }) +} + +func dockerSetup(ctx context.Context, t *testctx.T, name string, dag *dagger.Client, dockerVersion string, f func(*dagger.Container) *dagger.Container) *dagger.Container { if f == nil { f = func(ctr *dagger.Container) *dagger.Container { return ctr } } + dockerdTag := "dind" + dockercTag := "cli" + if dockerVersion != "" { + dockerdTag = dockerVersion + "-" + dockerdTag + dockercTag = dockerVersion + "-" + dockercTag + } + port := 4000 - dockerd := dag.Container().From("docker:"+tag). + dockerd := dag.Container().From("docker:"+dockerdTag). With(f). - WithMountedCache("/var/lib/docker", dag.CacheVolume(t.Name()+"-"+dockerVersion+"-docker-lib"), dagger.ContainerWithMountedCacheOpts{ + WithMountedCache("/var/lib/docker", dag.CacheVolume(name+"-"+dockerVersion+"-docker-lib"), dagger.ContainerWithMountedCacheOpts{ Sharing: dagger.CacheSharingModePrivate, }). WithExposedPort(port). - WithExec([]string{ - "dockerd", - "--host=tcp://0.0.0.0:" + strconv.Itoa(port), - "--tls=false", - }, dagger.ContainerWithExecOpts{ - InsecureRootCapabilities: true, - }). - AsService() - - return dockerd -} - -func dockerClient(ctx context.Context, t *testctx.T, dag *dagger.Client, dockerd *dagger.Service, dockerVersion string, f func(*dagger.Container) *dagger.Container) *dagger.Container { - tag := "cli" - if dockerVersion != "" { - tag = dockerVersion + "-" + tag - } - - if f == nil { - f = func(ctr *dagger.Container) *dagger.Container { - return ctr - } - } + AsService( + dagger.ContainerAsServiceOpts{ + Args: []string{ + "dockerd", + "--host=tcp://0.0.0.0:" + strconv.Itoa(port), + "--tls=false", + }, + InsecureRootCapabilities: true, + }, + ) + dockerd, err := dockerd.Start(ctx) + require.NoError(t, err) dockerHost, err := dockerd.Endpoint(ctx, dagger.ServiceEndpointOpts{ Scheme: "tcp", }) require.NoError(t, err) - client := dag.Container().From("docker:"+tag). + dockerc := dag.Container().From("docker:"+dockercTag). With(f). With(mountDockerConfig(dag)). WithServiceBinding("docker", dockerd). WithEnvVariable("DOCKER_HOST", dockerHost). WithEnvVariable("CACHEBUSTER", identity.NewID()) - return client + t.Cleanup(func() { + _, err := dockerc.WithExec([]string{"sh", "-c", "docker rm -f $(docker ps -aq); docker system prune --all --volumes; true"}).Sync(ctx) + require.NoError(t, err) + + _, err = dockerd.Stop(ctx) + require.NoError(t, err) + }) + + return dockerc } func dockerLoadEngine(ctx context.Context, dag *dagger.Client, ctr *dagger.Container, engineTag string) (*dagger.Container, error) { diff --git a/core/integration/proxy_test.go b/core/integration/proxy_test.go index 04d19052ab..821f622d44 100644 --- a/core/integration/proxy_test.go +++ b/core/integration/proxy_test.go @@ -175,7 +175,7 @@ http_access allow localhost WithNewFile("/etc/squid/squid.conf", squidConf). WithServiceBinding(httpServerAlias, httpServer.AsService()). WithServiceBinding(noproxyHTTPServerAlias, noproxyHTTPServer.AsService()). - WithExec([]string{"sh", "-c", "chmod -R a+rw /var/log/squidaccess && exec squid --foreground"}). + WithDefaultArgs([]string{"sh", "-c", "chmod -R a+rw /var/log/squidaccess && exec squid --foreground"}). AsService() if os.Getenv(executeTestEnvName) == "" { @@ -208,7 +208,7 @@ http_access allow localhost WithMountedDirectory("/src", thisRepo). WithWorkdir("/src"). WithMountedFile("/ca.pem", certGen.caRootCert). - WithServiceBinding("engine", devEngine.AsService()). + WithServiceBinding("engine", devEngineContainerAsService(devEngine)). WithMountedFile("/bin/dagger", daggerCliFile(t, c)). WithEnvVariable("_EXPERIMENTAL_DAGGER_CLI_BIN", "/bin/dagger"). WithEnvVariable("_EXPERIMENTAL_DAGGER_RUNNER_HOST", "tcp://engine:1234"). @@ -458,7 +458,7 @@ func (ContainerSuite) TestSystemGoProxy(ctx context.Context, t *testctx.T) { With(goCache(c)). WithMountedDirectory("/src", thisRepo). WithWorkdir("/src"). - WithServiceBinding("engine", devEngine.AsService()). + WithServiceBinding("engine", devEngineContainerAsService(devEngine)). WithMountedFile("/bin/dagger", daggerCliFile(t, c)). WithEnvVariable("_EXPERIMENTAL_DAGGER_CLI_BIN", "/bin/dagger"). WithEnvVariable("_EXPERIMENTAL_DAGGER_RUNNER_HOST", "tcp://engine:1234"). diff --git a/core/integration/remotecache_test.go b/core/integration/remotecache_test.go index a9dbcf53bb..94dbc99a11 100644 --- a/core/integration/remotecache_test.go +++ b/core/integration/remotecache_test.go @@ -17,10 +17,11 @@ import ( const cliBinPath = "/.dagger-cli" func getDevEngineForRemoteCache(ctx context.Context, c *dagger.Client, cache *dagger.Service, cacheName string) (devEngineSvc *dagger.Service, endpoint string, err error) { - devEngineSvc = devEngineContainer(c, func(c *dagger.Container) *dagger.Container { + devEngine := devEngineContainer(c, func(c *dagger.Container) *dagger.Container { return c.WithServiceBinding(cacheName, cache) - }).AsService() + }) + devEngineSvc = devEngineContainerAsService(devEngine) endpoint, err = devEngineSvc.Endpoint(ctx, dagger.ServiceEndpointOpts{ Port: 1234, Scheme: "tcp", @@ -41,7 +42,7 @@ func (RemoteCacheSuite) TestRegistry(ctx context.Context, t *testctx.T) { registry := c.Container().From("registry:2"). WithMountedCache("/var/lib/registry/", c.CacheVolume("remote-cache-registry-"+identity.NewID())). WithExposedPort(5000, dagger.ContainerWithExposedPortOpts{Protocol: dagger.NetworkProtocolTcp}). - AsService() + AsService(dagger.ContainerAsServiceOpts{UseEntrypoint: true}) cacheEnv := "type=registry,ref=registry:5000/test-cache,mode=max" @@ -118,7 +119,7 @@ func (RemoteCacheSuite) TestLazyBlobs(ctx context.Context, t *testctx.T) { registry := c.Container().From("registry:2"). WithMountedCache("/var/lib/registry/", c.CacheVolume("remote-cache-registry-"+identity.NewID())). WithExposedPort(5000, dagger.ContainerWithExposedPortOpts{Protocol: dagger.NetworkProtocolTcp}). - AsService() + AsService(dagger.ContainerAsServiceOpts{UseEntrypoint: true}) cacheEnv := "type=registry,ref=registry:5000/test-cache,mode=max" @@ -180,7 +181,7 @@ func (RemoteCacheSuite) TestS3(ctx context.Context, t *testctx.T) { s3 := c.Container().From("minio/minio"). WithMountedCache("/data", c.CacheVolume("minio-cache")). WithExposedPort(9000, dagger.ContainerWithExposedPortOpts{Protocol: dagger.NetworkProtocolTcp}). - WithExec([]string{"minio", "server", "/data"}). + WithDefaultArgs([]string{"minio", "server", "/data"}). AsService() s3Endpoint, err := s3.Endpoint(ctx, dagger.ServiceEndpointOpts{Port: 9000, Scheme: "http"}) @@ -260,7 +261,7 @@ func (RemoteCacheSuite) TestRegistryMultipleConfigs(ctx context.Context, t *test registry := c.Container().From("registry:2"). WithMountedCache("/var/lib/registry/", c.CacheVolume("remote-cache-registry-"+identity.NewID())). WithExposedPort(5000, dagger.ContainerWithExposedPortOpts{Protocol: dagger.NetworkProtocolTcp}). - AsService() + AsService(dagger.ContainerAsServiceOpts{UseEntrypoint: true}) cacheConfigEnv1 := "type=registry,ref=registry:5000/test-cache:latest,mode=max" cacheConfigEnv2 := "type=registry,ref=registry:5000/test-cache-b:latest,mode=max" @@ -358,7 +359,7 @@ func (RemoteCacheSuite) TestRegistrySeparateImportExport(ctx context.Context, t registry := c.Container().From("registry:2"). WithMountedCache("/var/lib/registry/", c.CacheVolume("remote-cache-registry-"+identity.NewID())). WithExposedPort(5000, dagger.ContainerWithExposedPortOpts{Protocol: dagger.NetworkProtocolTcp}). - AsService() + AsService(dagger.ContainerAsServiceOpts{UseEntrypoint: true}) daggerCli := daggerCliFile(t, c) @@ -486,7 +487,7 @@ func (RemoteCacheSuite) TestRegistryFastCacheBlobSource(ctx context.Context, t * registry := c.Container().From("registry:2"). WithMountedCache("/var/lib/registry/", c.CacheVolume("remote-cache-registry-"+identity.NewID())). WithExposedPort(5000, dagger.ContainerWithExposedPortOpts{Protocol: dagger.NetworkProtocolTcp}). - AsService() + AsService(dagger.ContainerAsServiceOpts{UseEntrypoint: true}) cacheConfig := "type=registry,ref=registry:5000/test-cache:latest,mode=max" diff --git a/core/integration/services_test.go b/core/integration/services_test.go index 509f062e7b..532171d3c2 100644 --- a/core/integration/services_test.go +++ b/core/integration/services_test.go @@ -64,7 +64,7 @@ func (ServiceSuite) TestHostnamesAreStable(ctx context.Context, t *testctx.T) { WithEnvVariable("FOO", "123"). WithEnvVariable("BAR", "456"). WithExposedPort(8000). - WithExec([]string{"python", "-m", "http.server"}). + WithDefaultArgs([]string{"python", "-m", "http.server"}). AsService() hostname, err := srv.Hostname(ctx) @@ -79,13 +79,13 @@ func (ServiceSuite) TestHostnamesAreStable(ctx context.Context, t *testctx.T) { srv1 := c.Container(). From("python"). WithExposedPort(8000). - WithExec([]string{"python", "-m", "http.server"}). + WithDefaultArgs([]string{"python", "-m", "http.server"}). AsService() srv2 := c.Container(). From("python"). WithExposedPort(8001). - WithExec([]string{"python", "-m", "http.server", "8081"}). + WithDefaultArgs([]string{"python", "-m", "http.server", "8081"}). AsService() hn1, err := srv1.Hostname(ctx) @@ -126,7 +126,7 @@ func (ServiceSuite) TestHostnameEndpoint(ctx context.Context, t *testctx.T) { srv := c.Container(). From("python"). WithExposedPort(8000). - WithExec([]string{"python", "-m", "http.server"}). + WithDefaultArgs([]string{"python", "-m", "http.server"}). AsService() hn, err := srv.Hostname(ctx) @@ -141,7 +141,7 @@ func (ServiceSuite) TestHostnameEndpoint(ctx context.Context, t *testctx.T) { t.Run("endpoint can specify arbitrary port", func(ctx context.Context, t *testctx.T) { srv := c.Container(). From("python"). - WithExec([]string{"python", "-m", "http.server"}). + WithDefaultArgs([]string{"python", "-m", "http.server"}). AsService() hn, err := srv.Hostname(ctx) @@ -158,7 +158,7 @@ func (ServiceSuite) TestHostnameEndpoint(ctx context.Context, t *testctx.T) { t.Run("endpoint with no port errors if no exposed port", func(ctx context.Context, t *testctx.T) { srv := c.Container(). From("python"). - WithExec([]string{"python", "-m", "http.server"}). + WithDefaultArgs([]string{"python", "-m", "http.server"}). AsService() _, err := srv.Endpoint(ctx) @@ -173,7 +173,7 @@ func (ServiceSuite) TestWithHostname(ctx context.Context, t *testctx.T) { From(busyboxImage). WithWorkdir("/srv"). WithNewFile("index.html", "Hello, world!"). - WithExec([]string{"httpd", "-v", "-f"}). + WithDefaultArgs([]string{"httpd", "-v", "-f"}). WithExposedPort(80). AsService(). WithHostname("wwwhatsup") @@ -223,7 +223,7 @@ func (m *Hoster) Run(ctx context.Context) error { From("`+busyboxImage+`"). WithWorkdir("/srv"). WithNewFile("index.html", "I am the one who hosts."). - WithExec([]string{"httpd", "-v", "-f"}). + WithDefaultArgs([]string{"httpd", "-v", "-f"}). WithExposedPort(80). AsService() @@ -319,7 +319,7 @@ func (m *Hoster) Run(ctx context.Context) error { From("`+golangImage+`"). WithWorkdir("/srv"). WithNewFile("main.go", counterMain). - WithExec([]string{"go", "run", "main.go"}). + WithDefaultArgs([]string{"go", "run", "main.go"}). WithExposedPort(80). AsService() @@ -397,7 +397,7 @@ func (m *Hoster) Run(ctx context.Context) error { From("`+busyboxImage+`"). WithWorkdir("/srv"). WithNewFile("index.html", "I am the one who hosts."). - WithExec([]string{"httpd", "-v", "-f"}). + WithDefaultArgs([]string{"httpd", "-v", "-f"}). WithExposedPort(80). AsService(). WithHostname("wwwhatsup0") @@ -458,7 +458,7 @@ func (m *Caller) Run(ctx context.Context) error { From("`+busyboxImage+`"). WithWorkdir("/srv"). WithNewFile("index.html", "I am within the called module."). - WithExec([]string{"httpd", "-v", "-f"}). + WithDefaultArgs([]string{"httpd", "-v", "-f"}). WithExposedPort(80). AsService(). WithHostname("wwwhatsup1") @@ -501,7 +501,7 @@ func (m *Hoster) Run(ctx context.Context) error { From("`+busyboxImage+`"). WithWorkdir("/srv"). WithNewFile("index.html", "I am the one who hosts."). - WithExec([]string{"httpd", "-v", "-f"}). + WithDefaultArgs([]string{"httpd", "-v", "-f"}). WithExposedPort(80). AsService(). WithHostname("wwwhatsup1") @@ -567,7 +567,7 @@ func (m *Relayer) Service() *dagger.Service { From("`+golangImage+`"). WithWorkdir("/srv"). WithNewFile("main.go", relayMain). - WithExec([]string{"go", "run", "main.go"}). + WithDefaultArgs([]string{"go", "run", "main.go"}). WithExposedPort(80). AsService() } @@ -655,7 +655,7 @@ func (ServiceSuite) TestPorts(ctx context.Context, t *testctx.T) { Description: "nine thousand", Protocol: dagger.NetworkProtocolUdp, }). - WithExec([]string{"python", "-m", "http.server"}). + WithDefaultArgs([]string{"python", "-m", "http.server"}). AsService() portCfgs, err := srv.Ports(ctx) @@ -696,7 +696,7 @@ func (ServiceSuite) TestPortsSkipHealthCheck(ctx context.Context, t *testctx.T) WithExposedPort(6215, dagger.ContainerWithExposedPortOpts{ ExperimentalSkipHealthcheck: true, }). - WithExec([]string{"python", "-m", "http.server"}). + WithDefaultArgs([]string{"python", "-m", "http.server"}). AsService() _, err := srv.Start(ctx) @@ -715,7 +715,7 @@ func (ServiceSuite) TestPortsSkipHealthCheck(ctx context.Context, t *testctx.T) WithExposedPort(6215, dagger.ContainerWithExposedPortOpts{ ExperimentalSkipHealthcheck: true, }). - WithExec([]string{"python", "-m", "http.server", "8000"}). + WithDefaultArgs([]string{"python", "-m", "http.server", "8000"}). AsService() _, err := srv.Start(ctx) @@ -931,7 +931,7 @@ func (ContainerSuite) TestExecServicesError(ctx context.Context, t *testctx.T) { srv := c.Container(). From(alpineImage). WithExposedPort(8080). - WithExec([]string{"sh", "-c", "echo nope; exit 42"}). + WithDefaultArgs([]string{"sh", "-c", "echo nope; exit 42"}). AsService() host, err := srv.Hostname(ctx) @@ -986,7 +986,7 @@ func (ContainerSuite) TestExecUDPServices(ctx context.Context, t *testctx.T) { // use TCP :4322 for health-check to avoid test flakiness, since UDP dial // health-checks aren't really a thing WithExposedPort(4322). - WithExec([]string{"go", "run", "/src/main.go"}). + WithDefaultArgs([]string{"go", "run", "/src/main.go"}). AsService() client := c.Container(). @@ -1039,7 +1039,7 @@ func (ContainerSuite) TestExecServicesDeduping(ctx context.Context, t *testctx.T WithMountedFile("/src/main.go", c.Directory().WithNewFile("main.go", pipeSrc).File("main.go")). WithExposedPort(8080). - WithExec([]string{"go", "run", "/src/main.go"}). + WithDefaultArgs([]string{"go", "run", "/src/main.go"}). AsService() client := c.Container(). @@ -1087,7 +1087,7 @@ func (ContainerSuite) TestExecServicesChained(ctx context.Context, t *testctx.T) WithExec([]string{"sh", "-c", "echo $0 >> /srv/www/index.html", strconv.Itoa(i)}). WithWorkdir("/srv/www"). WithExposedPort(8000). - WithExec([]string{"python", "-m", "http.server"}). + WithDefaultArgs([]string{"python", "-m", "http.server"}). AsService() } @@ -1761,7 +1761,7 @@ func (ServiceSuite) TestHostToContainer(ctx context.Context, t *testctx.T) { ). WithWorkdir("/srv/www"). WithExposedPort(8000). - WithExec([]string{"python", "-m", "http.server"}). + WithDefaultArgs([]string{"python", "-m", "http.server"}). AsService() tunnel, err := c.Host().Tunnel(srv).Start(ctx) @@ -1794,7 +1794,7 @@ func (ServiceSuite) TestHostToContainer(ctx context.Context, t *testctx.T) { c.Directory().WithNewFile("index.html", content+"-1")). WithMountedDirectory("/srv/www2", c.Directory().WithNewFile("index.html", content+"-2")). - WithExec([]string{ + WithDefaultArgs([]string{ "sh", "-c", `( cd /srv/www1 && python -m http.server 8000 ) & ( cd /srv/www2 && python -m http.server 9000 ) & @@ -1840,7 +1840,7 @@ func (ServiceSuite) TestHostToContainer(ctx context.Context, t *testctx.T) { c.Directory().WithNewFile("index.html", content+"-1")). WithMountedDirectory("/srv/www2", c.Directory().WithNewFile("index.html", content+"-2")). - WithExec([]string{ + WithDefaultArgs([]string{ "sh", "-c", `( cd /srv/www1 && python -m http.server 32767 ) & ( cd /srv/www2 && python -m http.server 32766 ) & @@ -1890,7 +1890,7 @@ func (ServiceSuite) TestHostToContainer(ctx context.Context, t *testctx.T) { c.Directory().WithNewFile("index.html", content+"-1")). WithMountedDirectory("/srv/www2", c.Directory().WithNewFile("index.html", content+"-2")). - WithExec([]string{ + WithDefaultArgs([]string{ "sh", "-c", `( cd /srv/www1 && python -m http.server 32765 ) & ( cd /srv/www2 && python -m http.server 32764 ) & @@ -1944,7 +1944,7 @@ func (ServiceSuite) TestHostToContainer(ctx context.Context, t *testctx.T) { ). WithWorkdir("/srv/www"). // WithExposedPort(8000). // INTENTIONAL - WithExec([]string{"python", "-m", "http.server"}). + WithDefaultArgs([]string{"python", "-m", "http.server"}). AsService() _, err := c.Host().Tunnel(srv).ID(ctx) @@ -2087,12 +2087,13 @@ func (ServiceSuite) TestSearchDomainAlwaysSet(ctx context.Context, t *testctx.T) devEngine := devEngineContainer(c, func(ctr *dagger.Container) *dagger.Container { return ctr.WithMountedFile("/etc/resolv.conf", newResolvConf) - }).AsService() + }) + devEngineSvc := devEngineContainerAsService(devEngine) t.Cleanup(func() { - devEngine.Stop(ctx, dagger.ServiceStopOpts{Kill: true}) + devEngineSvc.Stop(ctx, dagger.ServiceStopOpts{Kill: true}) }) - hostSvc, err := c.Host().Tunnel(devEngine, dagger.HostTunnelOpts{ + hostSvc, err := c.Host().Tunnel(devEngineSvc, dagger.HostTunnelOpts{ Ports: []dagger.PortForward{{ Backend: 1234, Frontend: 32132, @@ -2134,7 +2135,7 @@ func httpService(ctx context.Context, t *testctx.T, c *dagger.Client, content st ). WithWorkdir("/srv/www"). WithExposedPort(8000). - WithExec([]string{"python", "-m", "http.server"}). + WithDefaultArgs([]string{"python", "-m", "http.server"}). AsService() httpURL, err := srv.Endpoint(ctx, dagger.ServiceEndpointOpts{ @@ -2159,7 +2160,7 @@ func gitServiceWithBranch(ctx context.Context, t *testctx.T, c *dagger.Client, c WithExec([]string{"apk", "add", "git", "git-daemon"}). WithDirectory("/root/srv", makeGitDir(c, content, branchName)). WithExposedPort(gitPort). - WithExec([]string{"sh", "-c", "git daemon --verbose --export-all --base-path=/root/srv"}). + WithDefaultArgs([]string{"sh", "-c", "git daemon --verbose --export-all --base-path=/root/srv"}). AsService() gitHost, err := gitDaemon.Hostname(ctx) @@ -2214,7 +2215,7 @@ server { Owner: "nginx", }). WithExposedPort(80). - AsService() + AsService(dagger.ContainerAsServiceOpts{UseEntrypoint: true}) gitHost, err := gitDaemon.Hostname(ctx) require.NoError(t, err) @@ -2286,7 +2287,7 @@ with socketserver.TCPServer(("", 8000), http.server.SimpleHTTPRequestHandler) as WithWorkdir("/srv/www"). WithNewFile("signals.txt", ""). WithExposedPort(8000). - WithExec([]string{"python", "/signals.py"}). + WithDefaultArgs([]string{"python", "/signals.py"}). AsService() httpURL, err := srv.Endpoint(ctx, dagger.ServiceEndpointOpts{ diff --git a/core/integration/suite_test.go b/core/integration/suite_test.go index d0f248b3d1..a062438b2b 100644 --- a/core/integration/suite_test.go +++ b/core/integration/suite_test.go @@ -10,6 +10,7 @@ import ( "io" "os" "os/exec" + "runtime" "sync" "testing" "time" @@ -244,12 +245,24 @@ func daggerCliPath(t testing.TB) string { return cliPath } +func daggerLinuxCliPath(t testing.TB) string { + if runtime.GOOS == "linux" { + return daggerCliPath(t) + } + cliPath := os.Getenv("_TEST_DAGGER_CLI_LINUX_BIN") + if cliPath == "" { + t.Log("missing _TEST_DAGGER_CLI_LINUX_BIN") + t.FailNow() + } + return cliPath +} + func daggerCliFile(t testing.TB, c *dagger.Client) *dagger.File { // This loads the dagger-cli binary from the host into the container, that // was set up by the test caller. This is used to communicate with the dev // engine. t.Helper() - return c.Host().File(daggerCliPath(t)) + return c.Host().File(daggerLinuxCliPath(t)) } func daggerCliBase(t testing.TB, c *dagger.Client) *dagger.Container { diff --git a/core/integration/testdata/nested-c2c/main.go b/core/integration/testdata/nested-c2c/main.go index 4a033dcb1a..f281f4e788 100644 --- a/core/integration/testdata/nested-c2c/main.go +++ b/core/integration/testdata/nested-c2c/main.go @@ -155,7 +155,7 @@ func httpService(ctx context.Context, c *dagger.Client, dir *dagger.Directory) ( WithMountedDirectory("/srv/www", dir). WithWorkdir("/srv/www"). WithExposedPort(8000). - WithExec([]string{"python", "-m", "http.server"}). + WithDefaultArgs([]string{"python", "-m", "http.server"}). AsService() httpURL, err := srv.Endpoint(ctx, dagger.ServiceEndpointOpts{ @@ -202,7 +202,7 @@ git daemon --verbose --export-all --base-path=/root/srv `). File("start.sh")). WithExposedPort(gitPort). - WithExec([]string{"sh", "/root/start.sh"}). + WithDefaultArgs([]string{"sh", "/root/start.sh"}). AsService() gitHost, err := gitDaemon.Hostname(ctx) diff --git a/core/modules/config.go b/core/modules/config.go index 426d9b7199..56a97a8f7a 100644 --- a/core/modules/config.go +++ b/core/modules/config.go @@ -84,7 +84,7 @@ type ModuleConfigDependency struct { Source string `json:"source"` // The pinned version of the module dependency. - Pin string `json:"pin"` + Pin string `json:"pin,omitempty"` } func (depCfg *ModuleConfigDependency) UnmarshalJSON(data []byte) error { diff --git a/core/schema/container.go b/core/schema/container.go index ce5bf6159d..8c9218b672 100644 --- a/core/schema/container.go +++ b/core/schema/container.go @@ -376,7 +376,7 @@ func (s *containerSchema) Install() { View(AllVersion). Doc(`Retrieves this container after executing the specified command inside it.`). ArgDoc("args", - `Command to run instead of the container's default command (e.g., ["run", "main.go"]).`, + `Command to run instead of the container's default command (e.g., ["go", "run", "main.go"]).`, `If empty, the container's default command is used.`). ArgDoc("useEntrypoint", `If the container has an entrypoint, prepend it to the args.`). diff --git a/core/schema/module.go b/core/schema/module.go index 8d493813c2..045978b595 100644 --- a/core/schema/module.go +++ b/core/schema/module.go @@ -157,6 +157,9 @@ func (s *moduleSchema) Install() { dagql.Func("asString", s.moduleSourceAsString). Doc(`A human readable ref string representation of this module source.`), + dagql.Func("pin", s.moduleSourcePin). + Doc(`The pinned version of this module source.`), + dagql.NodeFunc("asModule", s.moduleSourceAsModule). Doc(`Load the source as a module. If this is a local source, the parent directory must have been provided during module source creation`). ArgDoc("engineVersion", `The engine version to upgrade to.`), diff --git a/core/schema/modulesource.go b/core/schema/modulesource.go index e55d0755fe..998aafff76 100644 --- a/core/schema/modulesource.go +++ b/core/schema/modulesource.go @@ -377,6 +377,10 @@ func (s *moduleSchema) moduleSourceAsString(ctx context.Context, src *core.Modul return src.RefString() } +func (s *moduleSchema) moduleSourcePin(ctx context.Context, src *core.ModuleSource, args struct{}) (string, error) { + return src.Pin() +} + func (s *moduleSchema) gitModuleSourceHTMLURL( ctx context.Context, ref *core.GitModuleSource, @@ -897,7 +901,9 @@ func (s *moduleSchema) moduleSourceResolveFromCaller( // ensure sourceRootRelPath has a local path structure // even when subdir relative to git source has ref structure // (cf. test TestRefFormat) - sourceRootRelPath = "./" + sourceRootRelPath + if sourceRootRelPath != "." { + sourceRootRelPath = "./" + sourceRootRelPath + } collectedDeps := dagql.NewCacheMap[string, *callerLocalDep]() if err := s.collectCallerLocalDeps(ctx, src.Query, contextAbsPath, sourceRootAbsPath, true, src, collectedDeps); err != nil { diff --git a/core/schema/service.go b/core/schema/service.go index 2afae4ba4e..228deba07e 100644 --- a/core/schema/service.go +++ b/core/schema/service.go @@ -18,9 +18,40 @@ var _ SchemaResolvers = &serviceSchema{} func (s *serviceSchema) Install() { dagql.Fields[*core.Container]{ - dagql.Func("asService", s.containerAsService). + dagql.Func("asService", s.containerAsServiceLegacy). + View(BeforeVersion("v0.15.0")). Doc(`Turn the container into a Service.`, `Be sure to set any exposed ports before this conversion.`), + + dagql.Func("asService", s.containerAsService). + View(AfterVersion("v0.15.0")). + Doc(`Turn the container into a Service.`, + `Be sure to set any exposed ports before this conversion.`). + ArgDoc("args", + `Command to run instead of the container's default command (e.g., ["go", "run", "main.go"]).`, + `If empty, the container's default command is used.`). + ArgDoc("useEntrypoint", + `If the container has an entrypoint, prepend it to the args.`). + ArgDoc("experimentalPrivilegedNesting", + `Provides Dagger access to the executed command.`, + `Do not use this option unless you trust the command being executed; + the command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST + FILESYSTEM.`). + ArgDoc("insecureRootCapabilities", + `Execute the command with all root capabilities. This is similar to + running a command with "sudo" or executing "docker run" with the + "--privileged" flag. Containerization does not provide any security + guarantees when using this option. It should only be used when + absolutely necessary and only with trusted commands.`). + ArgDoc("expand", + `Replace "${VAR}" or "$VAR" in the args according to the current `+ + `environment variables defined in the container (e.g. "/$VAR/foo").`). + ArgDoc("noInit", + `If set, skip the automatic init process injected into containers by default.`, + `This should only be used if the user requires that their exec process be the + pid 1 process in the container. Otherwise it may result in unexpected behavior.`, + ), + dagql.NodeFunc("up", s.containerUp). Doc(`Starts a Service and creates a tunnel that forwards traffic from the caller's network to that service.`, `Be sure to set any exposed ports before calling this api.`). @@ -68,8 +99,23 @@ func (s *serviceSchema) Install() { }.Install(s.srv) } -func (s *serviceSchema) containerAsService(ctx context.Context, parent *core.Container, args struct{}) (*core.Service, error) { - return parent.AsService(ctx) +func (s *serviceSchema) containerAsServiceLegacy(ctx context.Context, parent *core.Container, args struct{}) (*core.Service, error) { + return parent.AsServiceLegacy(ctx) +} + +func (s *serviceSchema) containerAsService(ctx context.Context, parent *core.Container, args core.ContainerAsServiceArgs) (*core.Service, error) { + expandedArgs := make([]string, len(args.Args)) + for i, arg := range args.Args { + expandedArg, err := expandEnvVar(ctx, parent, arg, args.Expand) + if err != nil { + return nil, err + } + + expandedArgs[i] = expandedArg + } + args.Args = expandedArgs + + return parent.AsService(ctx, args) } func (s *serviceSchema) containerUp(ctx context.Context, ctr dagql.Instance[*core.Container], args upArgs) (dagql.Nullable[core.Void], error) { diff --git a/core/terminal.go b/core/terminal.go index e883684614..e1d13defe4 100644 --- a/core/terminal.go +++ b/core/terminal.go @@ -68,15 +68,12 @@ func (container *Container) Terminal( output.String("dagger").Foreground(termenv.ANSIYellow).String(), output.String(`$(pwd | sed "s|^$HOME|~|")`).Faint().String(), )) - container, err = container.WithExec(ctx, ContainerExecOpts{ + + svc, err := container.AsService(ctx, ContainerAsServiceArgs{ Args: args.Cmd, ExperimentalPrivilegedNesting: args.ExperimentalPrivilegedNesting.Value.Bool(), InsecureRootCapabilities: args.InsecureRootCapabilities.Value.Bool(), }) - if err != nil { - return fmt.Errorf("failed to create container for interactive terminal: %w", err) - } - svc, err := container.AsService(ctx) if err != nil { return fmt.Errorf("failed to create service for interactive terminal: %w", err) } diff --git a/dagger.json b/dagger.json index 3a1a024c87..eefce4657c 100644 --- a/dagger.json +++ b/dagger.json @@ -1,82 +1,68 @@ { "name": "dagger-dev", - "engineVersion": "v0.14.0", + "engineVersion": "v0.15.0", "sdk": "go", "dependencies": [ { "name": "alpine", - "source": "modules/alpine", - "pin": "" + "source": "modules/alpine" }, { "name": "dagger-cli", - "source": "cmd/dagger", - "pin": "" + "source": "cmd/dagger" }, { "name": "dirdiff", - "source": "modules/dirdiff", - "pin": "" + "source": "modules/dirdiff" }, { "name": "docusaurus", - "source": "github.com/levlaz/daggerverse/docusaurus@e494cec1aa8f9faab1e0f12b2e5eea4a2321f2de", - "pin": "e494cec1aa8f9faab1e0f12b2e5eea4a2321f2de" + "source": "github.com/levlaz/daggerverse/docusaurus@main", + "pin": "47f5206067011dad0f581d4e7db7afddda32acd0" }, { "name": "elixir-sdk-dev", - "source": "sdk/elixir/dev", - "pin": "" + "source": "sdk/elixir/dev" }, { "name": "go", - "source": "modules/go", - "pin": "" + "source": "modules/go" }, { "name": "graphql", - "source": "modules/graphql", - "pin": "" + "source": "modules/graphql" }, { "name": "helm", - "source": "helm", - "pin": "" + "source": "helm" }, { "name": "php-sdk-dev", - "source": "sdk/php/dev", - "pin": "" + "source": "sdk/php/dev" }, { "name": "ps-analyzer", - "source": "modules/ps-analyzer", - "pin": "" + "source": "modules/ps-analyzer" }, { "name": "python-sdk-dev", - "source": "sdk/python/dev", - "pin": "" + "source": "sdk/python/dev" }, { "name": "releaser", - "source": "releaser", - "pin": "" + "source": "releaser" }, { "name": "shellcheck", - "source": "modules/shellcheck", - "pin": "" + "source": "modules/shellcheck" }, { "name": "version", - "source": "version", - "pin": "" + "source": "version" }, { "name": "wolfi", - "source": "modules/wolfi", - "pin": "" + "source": "modules/wolfi" } ], "source": ".dagger" diff --git a/dagql/dagui/db.go b/dagql/dagui/db.go index 86ac94ea4c..7611f2673e 100644 --- a/dagql/dagui/db.go +++ b/dagql/dagui/db.go @@ -14,7 +14,6 @@ import ( "go.opentelemetry.io/otel/sdk/metric/metricdata" "go.opentelemetry.io/otel/sdk/resource" sdktrace "go.opentelemetry.io/otel/sdk/trace" - "go.opentelemetry.io/otel/trace" "dagger.io/dagger/telemetry" "github.com/dagger/dagger/dagql/call/callpbv1" @@ -43,6 +42,11 @@ type DB struct { CompletedEffects map[string]bool FailedEffects map[string]bool + // Map of call digest -> metric name -> data points + // NOTE: this is hard coded for Gauge int64 metricdata essentially right now, + // needs generalization as more metric types get added + MetricsByCall map[string]map[string][]metricdata.DataPoint[int64] + // updatedSpans is a set of spans that have been updated since the last // sync, which includes any parent spans whose overall active time intervals // or status were modified via a child or linked span. @@ -259,23 +263,20 @@ func (db DBMetricExporter) Export(ctx context.Context, resourceMetrics *metricda } for _, point := range metricData.DataPoints { - spanIDStr, ok := point.Attributes.Value(telemetry.MetricsSpanIDAttr) + callDigest, ok := point.Attributes.Value(telemetry.DagDigestAttr) if !ok { continue } - spanID, err := trace.SpanIDFromHex(spanIDStr.AsString()) - if err != nil { - continue + + if db.MetricsByCall == nil { + db.MetricsByCall = make(map[string]map[string][]metricdata.DataPoint[int64]) } - span, ok := db.Spans.Map[SpanID{spanID}] + metricsByName, ok := db.MetricsByCall[callDigest.AsString()] if !ok { - continue - } - - if span.MetricsByName == nil { - span.MetricsByName = make(map[string][]metricdata.DataPoint[int64]) + metricsByName = make(map[string][]metricdata.DataPoint[int64]) + db.MetricsByCall[callDigest.AsString()] = metricsByName } - span.MetricsByName[metric.Name] = append(span.MetricsByName[metric.Name], point) + metricsByName[metric.Name] = append(metricsByName[metric.Name], point) } } } diff --git a/dagql/dagui/opts.go b/dagql/dagui/opts.go index 8a4e956b20..9b3291aa61 100644 --- a/dagql/dagui/opts.go +++ b/dagql/dagui/opts.go @@ -54,6 +54,7 @@ const ( ShowEncapsulatedVerbosity = 3 ShowSpammyVerbosity = 4 ShowDigestsVerbosity = 4 + ShowMetricsVerbosity = 3 ) func (opts FrontendOpts) ShouldShow(span *Span) bool { diff --git a/dagql/dagui/spans.go b/dagql/dagui/spans.go index cbc8dcf033..088eac8372 100644 --- a/dagql/dagui/spans.go +++ b/dagql/dagui/spans.go @@ -7,7 +7,6 @@ import ( "dagger.io/dagger/telemetry" "go.opentelemetry.io/otel/codes" - "go.opentelemetry.io/otel/sdk/metric/metricdata" sdktrace "go.opentelemetry.io/otel/sdk/trace" "github.com/dagger/dagger/dagql/call/callpbv1" @@ -33,10 +32,6 @@ type Span struct { causesViaAttrs SpanSet `json:"-"` effectsViaAttrs map[string]SpanSet `json:"-"` - // NOTE: this is hard coded for Gauge int64 metricdata essentially right now, - // needs generalization as more metric types get added - MetricsByName map[string][]metricdata.DataPoint[int64] - // Indicates that this span was actually exported to the database, and not // just allocated due to a span parent or other relationship. Received bool diff --git a/dagql/idtui/frontend.go b/dagql/idtui/frontend.go index 289ac180f6..a3a93eb085 100644 --- a/dagql/idtui/frontend.go +++ b/dagql/idtui/frontend.go @@ -16,6 +16,7 @@ import ( "go.opentelemetry.io/otel/log" sdklog "go.opentelemetry.io/otel/sdk/log" sdkmetric "go.opentelemetry.io/otel/sdk/metric" + "go.opentelemetry.io/otel/sdk/metric/metricdata" sdktrace "go.opentelemetry.io/otel/sdk/trace" "golang.org/x/term" @@ -397,30 +398,43 @@ func (r *renderer) renderCached(out *termenv.Output, span *dagui.Span) { } func (r renderer) renderMetrics(out *termenv.Output, span *dagui.Span) { - if span.MetricsByName == nil { + if r.Verbosity < dagui.ShowMetricsVerbosity { + return + } + + if span.CallDigest == "" { + return + } + metricsByName := r.db.MetricsByCall[span.CallDigest] + if metricsByName == nil { return } // IO Stats - r.renderMetric(out, span, telemetry.IOStatDiskReadBytes, "Disk Read", humanizeBytes) - r.renderMetric(out, span, telemetry.IOStatDiskWriteBytes, "Disk Write", humanizeBytes) - r.renderMetricIfNonzero(out, span, telemetry.IOStatPressureSomeTotal, "IO Pressure", durationString) + r.renderMetric(out, metricsByName, telemetry.IOStatDiskReadBytes, "Disk Read", humanizeBytes) + r.renderMetric(out, metricsByName, telemetry.IOStatDiskWriteBytes, "Disk Write", humanizeBytes) + r.renderMetricIfNonzero(out, metricsByName, telemetry.IOStatPressureSomeTotal, "IO Pressure", durationString) // CPU Stats - r.renderMetricIfNonzero(out, span, telemetry.CPUStatPressureSomeTotal, "CPU Pressure (some)", durationString) - r.renderMetricIfNonzero(out, span, telemetry.CPUStatPressureFullTotal, "CPU Pressure (full)", durationString) + r.renderMetricIfNonzero(out, metricsByName, telemetry.CPUStatPressureSomeTotal, "CPU Pressure (some)", durationString) + r.renderMetricIfNonzero(out, metricsByName, telemetry.CPUStatPressureFullTotal, "CPU Pressure (full)", durationString) // Memory Stats - r.renderMetric(out, span, telemetry.MemoryCurrentBytes, "Memory Bytes (current)", humanizeBytes) - r.renderMetric(out, span, telemetry.MemoryPeakBytes, "Memory Bytes (peak)", humanizeBytes) + r.renderMetric(out, metricsByName, telemetry.MemoryCurrentBytes, "Memory Bytes (current)", humanizeBytes) + r.renderMetric(out, metricsByName, telemetry.MemoryPeakBytes, "Memory Bytes (peak)", humanizeBytes) // Network Stats - r.renderNetworkMetric(out, span, telemetry.NetstatRxBytes, telemetry.NetstatRxDropped, telemetry.NetstatRxPackets, "Network Rx") - r.renderNetworkMetric(out, span, telemetry.NetstatTxBytes, telemetry.NetstatTxDropped, telemetry.NetstatTxPackets, "Network Tx") + r.renderNetworkMetric(out, metricsByName, telemetry.NetstatRxBytes, telemetry.NetstatRxDropped, telemetry.NetstatRxPackets, "Network Rx") + r.renderNetworkMetric(out, metricsByName, telemetry.NetstatTxBytes, telemetry.NetstatTxDropped, telemetry.NetstatTxPackets, "Network Tx") } -func (r renderer) renderMetric(out *termenv.Output, span *dagui.Span, metricName string, label string, formatValue func(int64) string) { - if dataPoints := span.MetricsByName[metricName]; len(dataPoints) > 0 { +func (r renderer) renderMetric( + out *termenv.Output, + metricsByName map[string][]metricdata.DataPoint[int64], + metricName string, label string, + formatValue func(int64) string, +) { + if dataPoints := metricsByName[metricName]; len(dataPoints) > 0 { lastPoint := dataPoints[len(dataPoints)-1] fmt.Fprint(out, " | ") displayMetric := out.String(fmt.Sprintf("%s: %s", label, formatValue(lastPoint.Value))) @@ -429,26 +443,39 @@ func (r renderer) renderMetric(out *termenv.Output, span *dagui.Span, metricName } } -func (r renderer) renderMetricIfNonzero(out *termenv.Output, span *dagui.Span, metricName string, label string, formatValue func(int64) string) { - if dataPoints := span.MetricsByName[metricName]; len(dataPoints) > 0 { +func (r renderer) renderMetricIfNonzero( + out *termenv.Output, + metricsByName map[string][]metricdata.DataPoint[int64], + metricName string, label string, + formatValue func(int64) string, +) { + if dataPoints := metricsByName[metricName]; len(dataPoints) > 0 { lastPoint := dataPoints[len(dataPoints)-1] if lastPoint.Value == 0 { return } - r.renderMetric(out, span, metricName, label, formatValue) + r.renderMetric(out, metricsByName, metricName, label, formatValue) } } -func (r renderer) renderNetworkMetric(out *termenv.Output, span *dagui.Span, bytesMetric, droppedMetric, packetsMetric, label string) { - r.renderMetricIfNonzero(out, span, bytesMetric, label, humanizeBytes) - if dataPoints := span.MetricsByName[bytesMetric]; len(dataPoints) > 0 { - renderPacketLoss(out, span, droppedMetric, packetsMetric) +func (r renderer) renderNetworkMetric( + out *termenv.Output, + metricsByName map[string][]metricdata.DataPoint[int64], + bytesMetric, droppedMetric, packetsMetric, label string, +) { + r.renderMetricIfNonzero(out, metricsByName, bytesMetric, label, humanizeBytes) + if dataPoints := metricsByName[bytesMetric]; len(dataPoints) > 0 { + renderPacketLoss(out, metricsByName, droppedMetric, packetsMetric) } } -func renderPacketLoss(out *termenv.Output, span *dagui.Span, droppedMetric, packetsMetric string) { - if drops := span.MetricsByName[droppedMetric]; len(drops) > 0 { - if packets := span.MetricsByName[packetsMetric]; len(packets) > 0 { +func renderPacketLoss( + out *termenv.Output, + metricsByName map[string][]metricdata.DataPoint[int64], + droppedMetric, packetsMetric string, +) { + if drops := metricsByName[droppedMetric]; len(drops) > 0 { + if packets := metricsByName[packetsMetric]; len(packets) > 0 { lastDrops := drops[len(drops)-1] lastPackets := packets[len(packets)-1] if lastDrops.Value > 0 && lastPackets.Value > 0 { diff --git a/dagql/idtui/testdata/TestTelemetry/TestGolden/cached-execs b/dagql/idtui/testdata/TestTelemetry/TestGolden/cached-execs index 9a5032d9ce..68c4ae7639 100644 --- a/dagql/idtui/testdata/TestTelemetry/TestGolden/cached-execs +++ b/dagql/idtui/testdata/TestTelemetry/TestGolden/cached-execs @@ -5,10 +5,11 @@ Expected stderr: โ”‚ โœ” connecting to engine X.Xs โ”‚ โœ” starting session X.Xs -โœ” loading module X.Xs +โœ” load module X.Xs โ”‚ โœ” finding module configuration X.Xs -โ”‚ โœ” serving module X.Xs -โ”‚ โœ” inspecting module X.Xs +โ”‚ โœ” initializing module X.Xs +โ”‚ โœ” inspecting module metadata X.Xs +โ”‚ โœ” loading type definitions X.Xs โœ” parsing command line arguments X.Xs diff --git a/dagql/idtui/testdata/TestTelemetry/TestGolden/custom-span b/dagql/idtui/testdata/TestTelemetry/TestGolden/custom-span index 1bf1ca0ca2..7bc80f1de7 100644 --- a/dagql/idtui/testdata/TestTelemetry/TestGolden/custom-span +++ b/dagql/idtui/testdata/TestTelemetry/TestGolden/custom-span @@ -10,10 +10,11 @@ Expected stderr: โ”‚ โœ” connecting to engine X.Xs โ”‚ โœ” starting session X.Xs -โœ” loading module X.Xs +โœ” load module X.Xs โ”‚ โœ” finding module configuration X.Xs -โ”‚ โœ” serving module X.Xs -โ”‚ โœ” inspecting module X.Xs +โ”‚ โœ” initializing module X.Xs +โ”‚ โœ” inspecting module metadata X.Xs +โ”‚ โœ” loading type definitions X.Xs โœ” parsing command line arguments X.Xs diff --git a/dagql/idtui/testdata/TestTelemetry/TestGolden/docker-build b/dagql/idtui/testdata/TestTelemetry/TestGolden/docker-build index 21f99296de..d2ad6f1b9a 100644 --- a/dagql/idtui/testdata/TestTelemetry/TestGolden/docker-build +++ b/dagql/idtui/testdata/TestTelemetry/TestGolden/docker-build @@ -10,10 +10,11 @@ Expected stderr: โ”‚ โœ” connecting to engine X.Xs โ”‚ โœ” starting session X.Xs -โœ” loading module X.Xs +โœ” load module X.Xs โ”‚ โœ” finding module configuration X.Xs -โ”‚ โœ” serving module X.Xs -โ”‚ โœ” inspecting module X.Xs +โ”‚ โœ” initializing module X.Xs +โ”‚ โœ” inspecting module metadata X.Xs +โ”‚ โœ” loading type definitions X.Xs โœ” parsing command line arguments X.Xs diff --git a/dagql/idtui/testdata/TestTelemetry/TestGolden/docker-build-fail b/dagql/idtui/testdata/TestTelemetry/TestGolden/docker-build-fail index f51e4e2223..c4b3a9ed50 100644 --- a/dagql/idtui/testdata/TestTelemetry/TestGolden/docker-build-fail +++ b/dagql/idtui/testdata/TestTelemetry/TestGolden/docker-build-fail @@ -5,10 +5,11 @@ Expected stderr: โ”‚ โœ” connecting to engine X.Xs โ”‚ โœ” starting session X.Xs -โœ” loading module X.Xs +โœ” load module X.Xs โ”‚ โœ” finding module configuration X.Xs -โ”‚ โœ” serving module X.Xs -โ”‚ โœ” inspecting module X.Xs +โ”‚ โœ” initializing module X.Xs +โ”‚ โœ” inspecting module metadata X.Xs +โ”‚ โœ” loading type definitions X.Xs โœ” parsing command line arguments X.Xs diff --git a/dagql/idtui/testdata/TestTelemetry/TestGolden/encapsulate b/dagql/idtui/testdata/TestTelemetry/TestGolden/encapsulate index 8deaf8e9ea..b64d22e215 100644 --- a/dagql/idtui/testdata/TestTelemetry/TestGolden/encapsulate +++ b/dagql/idtui/testdata/TestTelemetry/TestGolden/encapsulate @@ -5,10 +5,11 @@ Expected stderr: โ”‚ โœ” connecting to engine X.Xs โ”‚ โœ” starting session X.Xs -โœ” loading module X.Xs +โœ” load module X.Xs โ”‚ โœ” finding module configuration X.Xs -โ”‚ โœ” serving module X.Xs -โ”‚ โœ” inspecting module X.Xs +โ”‚ โœ” initializing module X.Xs +โ”‚ โœ” inspecting module metadata X.Xs +โ”‚ โœ” loading type definitions X.Xs โœ” parsing command line arguments X.Xs diff --git a/dagql/idtui/testdata/TestTelemetry/TestGolden/fail-effect b/dagql/idtui/testdata/TestTelemetry/TestGolden/fail-effect index a4fa9a6dc1..795628f06d 100644 --- a/dagql/idtui/testdata/TestTelemetry/TestGolden/fail-effect +++ b/dagql/idtui/testdata/TestTelemetry/TestGolden/fail-effect @@ -5,10 +5,11 @@ Expected stderr: โ”‚ โœ” connecting to engine X.Xs โ”‚ โœ” starting session X.Xs -โœ” loading module X.Xs +โœ” load module X.Xs โ”‚ โœ” finding module configuration X.Xs -โ”‚ โœ” serving module X.Xs -โ”‚ โœ” inspecting module X.Xs +โ”‚ โœ” initializing module X.Xs +โ”‚ โœ” inspecting module metadata X.Xs +โ”‚ โœ” loading type definitions X.Xs โœ” parsing command line arguments X.Xs diff --git a/dagql/idtui/testdata/TestTelemetry/TestGolden/fail-log b/dagql/idtui/testdata/TestTelemetry/TestGolden/fail-log index 2c784dd1dd..b0e70613c5 100644 --- a/dagql/idtui/testdata/TestTelemetry/TestGolden/fail-log +++ b/dagql/idtui/testdata/TestTelemetry/TestGolden/fail-log @@ -5,10 +5,11 @@ Expected stderr: โ”‚ โœ” connecting to engine X.Xs โ”‚ โœ” starting session X.Xs -โœ” loading module X.Xs +โœ” load module X.Xs โ”‚ โœ” finding module configuration X.Xs -โ”‚ โœ” serving module X.Xs -โ”‚ โœ” inspecting module X.Xs +โ”‚ โœ” initializing module X.Xs +โ”‚ โœ” inspecting module metadata X.Xs +โ”‚ โœ” loading type definitions X.Xs โœ” parsing command line arguments X.Xs diff --git a/dagql/idtui/testdata/TestTelemetry/TestGolden/fail-log-native b/dagql/idtui/testdata/TestTelemetry/TestGolden/fail-log-native index 3d7cbe33da..384eeca2dd 100644 --- a/dagql/idtui/testdata/TestTelemetry/TestGolden/fail-log-native +++ b/dagql/idtui/testdata/TestTelemetry/TestGolden/fail-log-native @@ -5,10 +5,11 @@ Expected stderr: โ”‚ โœ” connecting to engine X.Xs โ”‚ โœ” starting session X.Xs -โœ” loading module X.Xs +โœ” load module X.Xs โ”‚ โœ” finding module configuration X.Xs -โ”‚ โœ” serving module X.Xs -โ”‚ โœ” inspecting module X.Xs +โ”‚ โœ” initializing module X.Xs +โ”‚ โœ” inspecting module metadata X.Xs +โ”‚ โœ” loading type definitions X.Xs โœ” parsing command line arguments X.Xs diff --git a/dagql/idtui/testdata/TestTelemetry/TestGolden/hello-world b/dagql/idtui/testdata/TestTelemetry/TestGolden/hello-world index 0914ac15bb..8d2416ad56 100644 --- a/dagql/idtui/testdata/TestTelemetry/TestGolden/hello-world +++ b/dagql/idtui/testdata/TestTelemetry/TestGolden/hello-world @@ -9,10 +9,11 @@ Expected stderr: โ”‚ โœ” connecting to engine X.Xs โ”‚ โœ” starting session X.Xs -โœ” loading module X.Xs +โœ” load module X.Xs โ”‚ โœ” finding module configuration X.Xs -โ”‚ โœ” serving module X.Xs -โ”‚ โœ” inspecting module X.Xs +โ”‚ โœ” initializing module X.Xs +โ”‚ โœ” inspecting module metadata X.Xs +โ”‚ โœ” loading type definitions X.Xs โœ” parsing command line arguments X.Xs diff --git a/dagql/idtui/testdata/TestTelemetry/TestGolden/pending b/dagql/idtui/testdata/TestTelemetry/TestGolden/pending index 92e611c4c4..53b9d1b949 100644 --- a/dagql/idtui/testdata/TestTelemetry/TestGolden/pending +++ b/dagql/idtui/testdata/TestTelemetry/TestGolden/pending @@ -5,10 +5,11 @@ Expected stderr: โ”‚ โœ” connecting to engine X.Xs โ”‚ โœ” starting session X.Xs -โœ” loading module X.Xs +โœ” load module X.Xs โ”‚ โœ” finding module configuration X.Xs -โ”‚ โœ” serving module X.Xs -โ”‚ โœ” inspecting module X.Xs +โ”‚ โœ” initializing module X.Xs +โ”‚ โœ” inspecting module metadata X.Xs +โ”‚ โœ” loading type definitions X.Xs โœ” parsing command line arguments X.Xs diff --git a/dagql/idtui/testdata/TestTelemetry/TestGolden/use-cached-exec-service b/dagql/idtui/testdata/TestTelemetry/TestGolden/use-cached-exec-service index 647a9bb63b..89887d223a 100644 --- a/dagql/idtui/testdata/TestTelemetry/TestGolden/use-cached-exec-service +++ b/dagql/idtui/testdata/TestTelemetry/TestGolden/use-cached-exec-service @@ -5,10 +5,11 @@ Expected stderr: โ”‚ โœ” connecting to engine X.Xs โ”‚ โœ” starting session X.Xs -โœ” loading module X.Xs +โœ” load module X.Xs โ”‚ โœ” finding module configuration X.Xs -โ”‚ โœ” serving module X.Xs -โ”‚ โœ” inspecting module X.Xs +โ”‚ โœ” initializing module X.Xs +โ”‚ โœ” inspecting module metadata X.Xs +โ”‚ โœ” loading type definitions X.Xs โœ” parsing command line arguments X.Xs diff --git a/dagql/idtui/testdata/TestTelemetry/TestGolden/use-exec-service b/dagql/idtui/testdata/TestTelemetry/TestGolden/use-exec-service index 037fd85ba0..2333d5462d 100644 --- a/dagql/idtui/testdata/TestTelemetry/TestGolden/use-exec-service +++ b/dagql/idtui/testdata/TestTelemetry/TestGolden/use-exec-service @@ -5,10 +5,11 @@ Expected stderr: โ”‚ โœ” connecting to engine X.Xs โ”‚ โœ” starting session X.Xs -โœ” loading module X.Xs +โœ” load module X.Xs โ”‚ โœ” finding module configuration X.Xs -โ”‚ โœ” serving module X.Xs -โ”‚ โœ” inspecting module X.Xs +โ”‚ โœ” initializing module X.Xs +โ”‚ โœ” inspecting module metadata X.Xs +โ”‚ โœ” loading type definitions X.Xs โœ” parsing command line arguments X.Xs diff --git a/dagql/idtui/testdata/TestTelemetry/TestGolden/use-no-exec-service b/dagql/idtui/testdata/TestTelemetry/TestGolden/use-no-exec-service index abde6a61fb..14f1b4af36 100644 --- a/dagql/idtui/testdata/TestTelemetry/TestGolden/use-no-exec-service +++ b/dagql/idtui/testdata/TestTelemetry/TestGolden/use-no-exec-service @@ -10,10 +10,11 @@ Expected stderr: โ”‚ โœ” connecting to engine X.Xs โ”‚ โœ” starting session X.Xs -โœ” loading module X.Xs +โœ” load module X.Xs โ”‚ โœ” finding module configuration X.Xs -โ”‚ โœ” serving module X.Xs -โ”‚ โœ” inspecting module X.Xs +โ”‚ โœ” initializing module X.Xs +โ”‚ โœ” inspecting module metadata X.Xs +โ”‚ โœ” loading type definitions X.Xs โœ” parsing command line arguments X.Xs diff --git a/dagql/idtui/testdata/TestTelemetry/TestGolden/viztest/broken/broken b/dagql/idtui/testdata/TestTelemetry/TestGolden/viztest/broken/broken index c15f35384a..b505a0bf30 100644 --- a/dagql/idtui/testdata/TestTelemetry/TestGolden/viztest/broken/broken +++ b/dagql/idtui/testdata/TestTelemetry/TestGolden/viztest/broken/broken @@ -5,10 +5,10 @@ Expected stderr: โ”‚ โœ” connecting to engine X.Xs โ”‚ โœ” starting session X.Xs -โœ˜ loading module X.Xs +โœ˜ load module X.Xs ! failed to serve module: input: module.withSource.initialize failed to initialize module: failed to call module "broken" to get functions: call constructor: process "go build -ldflags -s -w -o /runtime ." did not complete successfully: exit code: 1 โ”‚ โœ” finding module configuration X.Xs -โ”‚ โœ˜ serving module X.Xs +โ”‚ โœ˜ initializing module X.Xs โ”‚ ! input: module.withSource.initialize failed to initialize module: failed to call module "broken" to get functions: call constructor: process "go build -ldflags -s -w -o /runtime ." did not complete successfully: exit code: 1 โ”‚ โ”‚ $ ModuleSource.resolveFromCaller: ModuleSource! X.Xs CACHED โ”‚ โ”‚ โ”‚ โœ” upload /XXX/XXX/XXX from XXXXXXXXXXX (client id: XXXXXXXXXXX, session id: XXXXXXXXXXX) (include: XXXXXXXXXXX) (exclude: XXXXXXXXXXX) X.Xs diff --git a/dagql/idtui/testdata/TestTelemetry/TestGolden/viztest/python/custom-span b/dagql/idtui/testdata/TestTelemetry/TestGolden/viztest/python/custom-span index 6de2837d2a..1fb8ba0fb0 100644 --- a/dagql/idtui/testdata/TestTelemetry/TestGolden/viztest/python/custom-span +++ b/dagql/idtui/testdata/TestTelemetry/TestGolden/viztest/python/custom-span @@ -10,10 +10,11 @@ Expected stderr: โ”‚ โœ” connecting to engine X.Xs โ”‚ โœ” starting session X.Xs -โœ” loading module X.Xs +โœ” load module X.Xs โ”‚ โœ” finding module configuration X.Xs -โ”‚ โœ” serving module X.Xs -โ”‚ โœ” inspecting module X.Xs +โ”‚ โœ” initializing module X.Xs +โ”‚ โœ” inspecting module metadata X.Xs +โ”‚ โœ” loading type definitions X.Xs โœ” parsing command line arguments X.Xs diff --git a/dagql/idtui/testdata/TestTelemetry/TestGolden/viztest/python/pending b/dagql/idtui/testdata/TestTelemetry/TestGolden/viztest/python/pending index e2aebe91a4..49cc8787d0 100644 --- a/dagql/idtui/testdata/TestTelemetry/TestGolden/viztest/python/pending +++ b/dagql/idtui/testdata/TestTelemetry/TestGolden/viztest/python/pending @@ -5,10 +5,11 @@ Expected stderr: โ”‚ โœ” connecting to engine X.Xs โ”‚ โœ” starting session X.Xs -โœ” loading module X.Xs +โœ” load module X.Xs โ”‚ โœ” finding module configuration X.Xs -โ”‚ โœ” serving module X.Xs -โ”‚ โœ” inspecting module X.Xs +โ”‚ โœ” initializing module X.Xs +โ”‚ โœ” inspecting module metadata X.Xs +โ”‚ โœ” loading type definitions X.Xs โœ” parsing command line arguments X.Xs diff --git a/dagql/idtui/testdata/TestTelemetry/TestGolden/viztest/typescript/custom-span b/dagql/idtui/testdata/TestTelemetry/TestGolden/viztest/typescript/custom-span index f57912f896..358777d97f 100644 --- a/dagql/idtui/testdata/TestTelemetry/TestGolden/viztest/typescript/custom-span +++ b/dagql/idtui/testdata/TestTelemetry/TestGolden/viztest/typescript/custom-span @@ -10,10 +10,11 @@ Expected stderr: โ”‚ โœ” connecting to engine X.Xs โ”‚ โœ” starting session X.Xs -โœ” loading module X.Xs +โœ” load module X.Xs โ”‚ โœ” finding module configuration X.Xs -โ”‚ โœ” serving module X.Xs -โ”‚ โœ” inspecting module X.Xs +โ”‚ โœ” initializing module X.Xs +โ”‚ โœ” inspecting module metadata X.Xs +โ”‚ โœ” loading type definitions X.Xs โœ” parsing command line arguments X.Xs diff --git a/dagql/idtui/testdata/TestTelemetry/TestGolden/viztest/typescript/pending b/dagql/idtui/testdata/TestTelemetry/TestGolden/viztest/typescript/pending index 6640e9115f..0b7531a0b4 100644 --- a/dagql/idtui/testdata/TestTelemetry/TestGolden/viztest/typescript/pending +++ b/dagql/idtui/testdata/TestTelemetry/TestGolden/viztest/typescript/pending @@ -5,10 +5,11 @@ Expected stderr: โ”‚ โœ” connecting to engine X.Xs โ”‚ โœ” starting session X.Xs -โœ” loading module X.Xs +โœ” load module X.Xs โ”‚ โœ” finding module configuration X.Xs -โ”‚ โœ” serving module X.Xs -โ”‚ โœ” inspecting module X.Xs +โ”‚ โœ” initializing module X.Xs +โ”‚ โœ” inspecting module metadata X.Xs +โ”‚ โœ” loading type definitions X.Xs โœ” parsing command line arguments X.Xs diff --git a/dagql/idtui/viztest/broken/go.mod b/dagql/idtui/viztest/broken/go.mod index 60a2c1a6b5..52d6b0a5a7 100644 --- a/dagql/idtui/viztest/broken/go.mod +++ b/dagql/idtui/viztest/broken/go.mod @@ -3,9 +3,9 @@ module dagger/broken go 1.23.0 require ( - github.com/99designs/gqlgen v0.17.49 + github.com/99designs/gqlgen v0.17.55 github.com/Khan/genqlient v0.7.0 - github.com/vektah/gqlparser/v2 v2.5.16 + github.com/vektah/gqlparser/v2 v2.5.17 go.opentelemetry.io/otel v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 @@ -17,26 +17,29 @@ require ( go.opentelemetry.io/otel/trace v1.27.0 go.opentelemetry.io/proto/otlp v1.3.1 golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa - golang.org/x/sync v0.7.0 - google.golang.org/grpc v1.64.0 + golang.org/x/sync v0.10.0 + google.golang.org/grpc v1.65.0 ) require ( github.com/cenkalti/backoff/v4 v4.3.0 // indirect - github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect github.com/sosodev/duration v1.3.1 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect - go.opentelemetry.io/otel/metric v1.27.0 // indirect - golang.org/x/net v0.26.0 // indirect - golang.org/x/sys v0.21.0 // indirect - golang.org/x/text v0.16.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 // indirect - google.golang.org/protobuf v1.34.1 // indirect + go.opentelemetry.io/otel/metric v1.27.0 + go.opentelemetry.io/otel/sdk/metric v1.27.0 + golang.org/x/net v0.29.0 // indirect + golang.org/x/sys v0.28.0 // indirect + golang.org/x/text v0.21.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect + google.golang.org/protobuf v1.34.2 // indirect ) replace go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc => go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 diff --git a/dagql/idtui/viztest/broken/go.sum b/dagql/idtui/viztest/broken/go.sum index 6fea81b9cb..c146adf411 100644 --- a/dagql/idtui/viztest/broken/go.sum +++ b/dagql/idtui/viztest/broken/go.sum @@ -1,5 +1,5 @@ -github.com/99designs/gqlgen v0.17.49 h1:b3hNGexHd33fBSAd4NDT/c3NCcQzcAVkknhN9ym36YQ= -github.com/99designs/gqlgen v0.17.49/go.mod h1:tC8YFVZMed81x7UJ7ORUwXF4Kn6SXuucFqQBhN8+BU0= +github.com/99designs/gqlgen v0.17.55 h1:3vzrNWYyzSZjGDFo68e5j9sSauLxfKvLp+6ioRokVtM= +github.com/99designs/gqlgen v0.17.55/go.mod h1:3Bq768f8hgVPGZxL8aY9MaYmbxa6llPM/qu1IGH1EJo= github.com/Khan/genqlient v0.7.0 h1:GZ1meyRnzcDTK48EjqB8t3bcfYvHArCUUvgOwpz1D4w= github.com/Khan/genqlient v0.7.0/go.mod h1:HNyy3wZvuYwmW3Y7mkoQLZsa/R5n5yIRajS1kPBvSFM= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= @@ -10,16 +10,16 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 h1:asbCHRVmodnJTuQ3qamDwqVOIjwqUPTYmYuemVOx+Ys= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0/go.mod h1:ggCgvZ2r7uOoQjOyu2Y1NhHmEPPzzuhWgcza5M1Ji1I= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= @@ -33,14 +33,18 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/vektah/gqlparser/v2 v2.5.16 h1:1gcmLTvs3JLKXckwCwlUagVn/IlV2bwqle0vJ0vy5p8= -github.com/vektah/gqlparser/v2 v2.5.16/go.mod h1:1lz1OeCqgQbQepsGxPVywrjdBHW2T08PUS3pJqepRww= +github.com/vektah/gqlparser/v2 v2.5.17 h1:9At7WblLV7/36nulgekUgIaqHZWn5hxqluxrxGUhOmI= +github.com/vektah/gqlparser/v2 v2.5.17/go.mod h1:1lz1OeCqgQbQepsGxPVywrjdBHW2T08PUS3pJqepRww= go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 h1:oM0GTNKGlc5qHctWeIGTVyda4iFFalOzMZ3Ehj5rwB4= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88/go.mod h1:JGG8ebaMO5nXOPnvKEl+DiA4MGwFjCbjsxT1WHIEBPY= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 h1:ccBrA8nCY5mM0y5uO7FT0ze4S0TuFcWdDB2FxGMTjkI= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0/go.mod h1:/9pb6634zi2Lk8LYg9Q0X8Ar6jka4dkFOylBLbVQPCE= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 h1:bFgvUr3/O4PHj3VQcFEuYKvRZJX1SJDQ+11JXuSB3/w= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0/go.mod h1:xJntEd2KL6Qdg5lwp97HMLQDVeAhrYxmzFseAMDPQ8I= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 h1:CIHWikMsN3wO+wq1Tp5VGdVRTcON+DmOJSfDjXypKOc= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0/go.mod h1:TNupZ6cxqyFEpLXAZW7On+mLFL0/g0TE3unIYL91xWc= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 h1:R9DE4kQ4k+YtfLI2ULwX82VtNQ2J8yZmA7ZIF/D+7Mc= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0/go.mod h1:OQFyQVrDlbe+R7xrEyDr/2Wr67Ol0hRUgsfA+V5A95s= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= @@ -55,6 +59,8 @@ go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kT go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= go.opentelemetry.io/otel/sdk/log v0.3.0 h1:GEjJ8iftz2l+XO1GF2856r7yYVh74URiF9JMcAacr5U= go.opentelemetry.io/otel/sdk/log v0.3.0/go.mod h1:BwCxtmux6ACLuys1wlbc0+vGBd+xytjmjajwqqIul2g= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= @@ -63,22 +69,22 @@ go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= -golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= -google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 h1:P8OJ/WCl/Xo4E4zoe4/bifHpSmmKwARqyqE4nW6J2GQ= -google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:RGnPtTG7r4i8sPlNyDeikXF99hMM+hN6QMm4ooG9g2g= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 h1:AgADTJarZTBqgjiUzRgfaBchgYB3/WFTC80GPwsMcRI= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= -google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= -google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 h1:wKguEg1hsxI2/L3hUYrpo1RVi48K+uTyzKqprwLXsb8= +google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142/go.mod h1:d6be+8HhtEtucleCbxpPW9PA9XwISACu8nvpPqF0BVo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 h1:e7S5W7MGGLaSu8j3YjdezkZ+m1/Nm0uRVRMEMGk26Xs= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= +google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/dagql/idtui/viztest/go.mod b/dagql/idtui/viztest/go.mod index 99016f1947..297d82b8a3 100644 --- a/dagql/idtui/viztest/go.mod +++ b/dagql/idtui/viztest/go.mod @@ -1,11 +1,13 @@ module dagger/viztest -go 1.21.7 +go 1.22.5 + +toolchain go1.23.2 require ( - github.com/99designs/gqlgen v0.17.49 + github.com/99designs/gqlgen v0.17.55 github.com/Khan/genqlient v0.7.0 - github.com/vektah/gqlparser/v2 v2.5.16 + github.com/vektah/gqlparser/v2 v2.5.17 go.opentelemetry.io/otel v1.28.0 go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240816180739-2db4ef2c032c go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.4.0 @@ -13,7 +15,7 @@ require ( go.opentelemetry.io/otel/sdk/log v0.4.0 go.opentelemetry.io/otel/trace v1.28.0 golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa - golang.org/x/sync v0.8.0 + golang.org/x/sync v0.10.0 ) require ( @@ -24,15 +26,18 @@ require ( github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect github.com/sosodev/duration v1.3.1 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 - go.opentelemetry.io/otel/metric v1.28.0 // indirect + go.opentelemetry.io/otel/metric v1.28.0 go.opentelemetry.io/otel/sdk v1.28.0 + go.opentelemetry.io/otel/sdk/metric v1.27.0 go.opentelemetry.io/proto/otlp v1.3.1 golang.org/x/net v0.29.0 // indirect - golang.org/x/sys v0.25.0 // indirect - golang.org/x/text v0.18.0 // indirect + golang.org/x/sys v0.28.0 // indirect + golang.org/x/text v0.21.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect google.golang.org/grpc v1.65.0 diff --git a/dagql/idtui/viztest/go.sum b/dagql/idtui/viztest/go.sum index 33ddc85a84..cf2ff426de 100644 --- a/dagql/idtui/viztest/go.sum +++ b/dagql/idtui/viztest/go.sum @@ -1,5 +1,5 @@ -github.com/99designs/gqlgen v0.17.49 h1:b3hNGexHd33fBSAd4NDT/c3NCcQzcAVkknhN9ym36YQ= -github.com/99designs/gqlgen v0.17.49/go.mod h1:tC8YFVZMed81x7UJ7ORUwXF4Kn6SXuucFqQBhN8+BU0= +github.com/99designs/gqlgen v0.17.55 h1:3vzrNWYyzSZjGDFo68e5j9sSauLxfKvLp+6ioRokVtM= +github.com/99designs/gqlgen v0.17.55/go.mod h1:3Bq768f8hgVPGZxL8aY9MaYmbxa6llPM/qu1IGH1EJo= github.com/Khan/genqlient v0.7.0 h1:GZ1meyRnzcDTK48EjqB8t3bcfYvHArCUUvgOwpz1D4w= github.com/Khan/genqlient v0.7.0/go.mod h1:HNyy3wZvuYwmW3Y7mkoQLZsa/R5n5yIRajS1kPBvSFM= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= @@ -33,14 +33,18 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/vektah/gqlparser/v2 v2.5.16 h1:1gcmLTvs3JLKXckwCwlUagVn/IlV2bwqle0vJ0vy5p8= -github.com/vektah/gqlparser/v2 v2.5.16/go.mod h1:1lz1OeCqgQbQepsGxPVywrjdBHW2T08PUS3pJqepRww= +github.com/vektah/gqlparser/v2 v2.5.17 h1:9At7WblLV7/36nulgekUgIaqHZWn5hxqluxrxGUhOmI= +github.com/vektah/gqlparser/v2 v2.5.17/go.mod h1:1lz1OeCqgQbQepsGxPVywrjdBHW2T08PUS3pJqepRww= go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 h1:oM0GTNKGlc5qHctWeIGTVyda4iFFalOzMZ3Ehj5rwB4= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88/go.mod h1:JGG8ebaMO5nXOPnvKEl+DiA4MGwFjCbjsxT1WHIEBPY= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 h1:ccBrA8nCY5mM0y5uO7FT0ze4S0TuFcWdDB2FxGMTjkI= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0/go.mod h1:/9pb6634zi2Lk8LYg9Q0X8Ar6jka4dkFOylBLbVQPCE= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 h1:bFgvUr3/O4PHj3VQcFEuYKvRZJX1SJDQ+11JXuSB3/w= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0/go.mod h1:xJntEd2KL6Qdg5lwp97HMLQDVeAhrYxmzFseAMDPQ8I= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 h1:CIHWikMsN3wO+wq1Tp5VGdVRTcON+DmOJSfDjXypKOc= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0/go.mod h1:TNupZ6cxqyFEpLXAZW7On+mLFL0/g0TE3unIYL91xWc= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 h1:R9DE4kQ4k+YtfLI2ULwX82VtNQ2J8yZmA7ZIF/D+7Mc= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0/go.mod h1:OQFyQVrDlbe+R7xrEyDr/2Wr67Ol0hRUgsfA+V5A95s= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= @@ -55,6 +59,8 @@ go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBq go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= go.opentelemetry.io/otel/sdk/log v0.3.0 h1:GEjJ8iftz2l+XO1GF2856r7yYVh74URiF9JMcAacr5U= go.opentelemetry.io/otel/sdk/log v0.3.0/go.mod h1:BwCxtmux6ACLuys1wlbc0+vGBd+xytjmjajwqqIul2g= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= @@ -65,12 +71,12 @@ golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8 golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= -golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= -golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= -golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= -golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 h1:wKguEg1hsxI2/L3hUYrpo1RVi48K+uTyzKqprwLXsb8= google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142/go.mod h1:d6be+8HhtEtucleCbxpPW9PA9XwISACu8nvpPqF0BVo= google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 h1:e7S5W7MGGLaSu8j3YjdezkZ+m1/Nm0uRVRMEMGk26Xs= diff --git a/dagql/idtui/viztest/typescript/package.json b/dagql/idtui/viztest/typescript/package.json index 8ccebb27d4..bfbcfbe531 100644 --- a/dagql/idtui/viztest/typescript/package.json +++ b/dagql/idtui/viztest/typescript/package.json @@ -1,8 +1,8 @@ { "type": "module", "dependencies": { - "typescript": "^5.5.4", - "@dagger.io/dagger": "./sdk" + "@dagger.io/dagger": "./sdk", + "typescript": "^5.5.4" }, "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" } diff --git a/dagql/idtui/viztest/typescript/yarn.lock b/dagql/idtui/viztest/typescript/yarn.lock index f5bdadfdb1..9ecd1ee4d3 100644 --- a/dagql/idtui/viztest/typescript/yarn.lock +++ b/dagql/idtui/viztest/typescript/yarn.lock @@ -8,7 +8,7 @@ "@grpc/grpc-js" "^1.11.1" "@lifeomic/axios-fetch" "^3.1.0" "@opentelemetry/api" "^1.9.0" - "@opentelemetry/exporter-trace-otlp-grpc" "^0.52.1" + "@opentelemetry/exporter-trace-otlp-http" "^0.53.0" "@opentelemetry/sdk-metrics" "^1.25.1" "@opentelemetry/sdk-node" "^0.52.1" "@opentelemetry/semantic-conventions" "^1.25.1" @@ -109,6 +109,13 @@ dependencies: "@opentelemetry/api" "^1.0.0" +"@opentelemetry/api-logs@0.53.0": + version "0.53.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/api-logs/-/api-logs-0.53.0.tgz#c478cbd8120ec2547b64edfa03a552cfe42170be" + integrity sha512-8HArjKx+RaAI8uEIgcORbZIPklyh1YLjPSBus8hjRmvLi6DeFzgOcdZ7KwPabKj8mXF8dX0hyfAyGfycz0DbFw== + dependencies: + "@opentelemetry/api" "^1.0.0" + "@opentelemetry/api@^1.0.0", "@opentelemetry/api@^1.9.0": version "1.9.0" resolved "https://registry.yarnpkg.com/@opentelemetry/api/-/api-1.9.0.tgz#d03eba68273dc0f7509e2a3d5cba21eae10379fe" @@ -133,7 +140,7 @@ dependencies: "@opentelemetry/semantic-conventions" "1.27.0" -"@opentelemetry/exporter-trace-otlp-grpc@0.52.1", "@opentelemetry/exporter-trace-otlp-grpc@^0.52.1": +"@opentelemetry/exporter-trace-otlp-grpc@0.52.1": version "0.52.1" resolved "https://registry.yarnpkg.com/@opentelemetry/exporter-trace-otlp-grpc/-/exporter-trace-otlp-grpc-0.52.1.tgz#8b59c93a5833484ba19a7f424632c6ced5ea1d3b" integrity sha512-pVkSH20crBwMTqB3nIN4jpQKUEoB0Z94drIHpYyEqs7UBr+I0cpYyOR3bqjA/UasQUMROb3GX8ZX4/9cVRqGBQ== @@ -156,6 +163,17 @@ "@opentelemetry/resources" "1.25.1" "@opentelemetry/sdk-trace-base" "1.25.1" +"@opentelemetry/exporter-trace-otlp-http@^0.53.0": + version "0.53.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.53.0.tgz#48e46c4573a35d31c14e6bc44635923e32970b9a" + integrity sha512-m7F5ZTq+V9mKGWYpX8EnZ7NjoqAU7VemQ1E2HAG+W/u0wpY1x0OmbxAXfGKFHCspdJk8UKlwPGrpcB8nay3P8A== + dependencies: + "@opentelemetry/core" "1.26.0" + "@opentelemetry/otlp-exporter-base" "0.53.0" + "@opentelemetry/otlp-transformer" "0.53.0" + "@opentelemetry/resources" "1.26.0" + "@opentelemetry/sdk-trace-base" "1.26.0" + "@opentelemetry/exporter-trace-otlp-proto@0.52.1": version "0.52.1" resolved "https://registry.yarnpkg.com/@opentelemetry/exporter-trace-otlp-proto/-/exporter-trace-otlp-proto-0.52.1.tgz#7b68268cd4d46b7d89ee7c97720031ca80919fd6" @@ -197,6 +215,14 @@ "@opentelemetry/core" "1.25.1" "@opentelemetry/otlp-transformer" "0.52.1" +"@opentelemetry/otlp-exporter-base@0.53.0": + version "0.53.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.53.0.tgz#dfe51874b869c687c3cb463b70cddda7de282762" + integrity sha512-UCWPreGQEhD6FjBaeDuXhiMf6kkBODF0ZQzrk/tuQcaVDJ+dDQ/xhJp192H9yWnKxVpEjFrSSLnpqmX4VwX+eA== + dependencies: + "@opentelemetry/core" "1.26.0" + "@opentelemetry/otlp-transformer" "0.53.0" + "@opentelemetry/otlp-grpc-exporter-base@0.52.1": version "0.52.1" resolved "https://registry.yarnpkg.com/@opentelemetry/otlp-grpc-exporter-base/-/otlp-grpc-exporter-base-0.52.1.tgz#e1fdfd979289a87faec1c7cf303100c75e49a284" @@ -220,6 +246,19 @@ "@opentelemetry/sdk-trace-base" "1.25.1" protobufjs "^7.3.0" +"@opentelemetry/otlp-transformer@0.53.0": + version "0.53.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/otlp-transformer/-/otlp-transformer-0.53.0.tgz#55d435db5ed5cf56b99c010827294dd4921c45c2" + integrity sha512-rM0sDA9HD8dluwuBxLetUmoqGJKSAbWenwD65KY9iZhUxdBHRLrIdrABfNDP7aiTjcgK8XFyTn5fhDz7N+W6DA== + dependencies: + "@opentelemetry/api-logs" "0.53.0" + "@opentelemetry/core" "1.26.0" + "@opentelemetry/resources" "1.26.0" + "@opentelemetry/sdk-logs" "0.53.0" + "@opentelemetry/sdk-metrics" "1.26.0" + "@opentelemetry/sdk-trace-base" "1.26.0" + protobufjs "^7.3.0" + "@opentelemetry/propagator-b3@1.25.1": version "1.25.1" resolved "https://registry.yarnpkg.com/@opentelemetry/propagator-b3/-/propagator-b3-1.25.1.tgz#653ee5f3f0f223c000907c1559c89c0a208819f7" @@ -259,6 +298,15 @@ "@opentelemetry/core" "1.25.1" "@opentelemetry/resources" "1.25.1" +"@opentelemetry/sdk-logs@0.53.0": + version "0.53.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/sdk-logs/-/sdk-logs-0.53.0.tgz#ec8b69278c4e683c13c58ed4285a47c27f5799c6" + integrity sha512-dhSisnEgIj/vJZXZV6f6KcTnyLDx/VuQ6l3ejuZpMpPlh9S1qMHiZU9NMmOkVkwwHkMy3G6mEBwdP23vUZVr4g== + dependencies: + "@opentelemetry/api-logs" "0.53.0" + "@opentelemetry/core" "1.26.0" + "@opentelemetry/resources" "1.26.0" + "@opentelemetry/sdk-metrics@1.25.1": version "1.25.1" resolved "https://registry.yarnpkg.com/@opentelemetry/sdk-metrics/-/sdk-metrics-1.25.1.tgz#50c985ec15557a9654334e7fa1018dc47a8a56b7" @@ -268,7 +316,7 @@ "@opentelemetry/resources" "1.25.1" lodash.merge "^4.6.2" -"@opentelemetry/sdk-metrics@^1.25.1": +"@opentelemetry/sdk-metrics@1.26.0", "@opentelemetry/sdk-metrics@^1.25.1": version "1.26.0" resolved "https://registry.yarnpkg.com/@opentelemetry/sdk-metrics/-/sdk-metrics-1.26.0.tgz#37bb0afb1d4447f50aab9cdd05db6f2d8b86103e" integrity sha512-0SvDXmou/JjzSDOjUmetAAvcKQW6ZrvosU0rkbDGpXvvZN+pQF6JbK/Kd4hNdK4q/22yeruqvukXEJyySTzyTQ== @@ -304,6 +352,15 @@ "@opentelemetry/resources" "1.25.1" "@opentelemetry/semantic-conventions" "1.25.1" +"@opentelemetry/sdk-trace-base@1.26.0": + version "1.26.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.26.0.tgz#0c913bc6d2cfafd901de330e4540952269ae579c" + integrity sha512-olWQldtvbK4v22ymrKLbIcBi9L2SpMO84sCPY54IVsJhP9fRsxJT194C/AVaAuJzLE30EdhhM1VmvVYR7az+cw== + dependencies: + "@opentelemetry/core" "1.26.0" + "@opentelemetry/resources" "1.26.0" + "@opentelemetry/semantic-conventions" "1.27.0" + "@opentelemetry/sdk-trace-node@1.25.1": version "1.25.1" resolved "https://registry.yarnpkg.com/@opentelemetry/sdk-trace-node/-/sdk-trace-node-1.25.1.tgz#856063bef1167ae74139199338c24fb958838ff3" diff --git a/docs/current_docs/api/module-dependencies.mdx b/docs/current_docs/api/module-dependencies.mdx index 066e110d3d..637ec40f19 100644 --- a/docs/current_docs/api/module-dependencies.mdx +++ b/docs/current_docs/api/module-dependencies.mdx @@ -6,6 +6,8 @@ import TabItem from '@theme/TabItem'; # Module Dependencies +## Installation + You can call Dagger Functions from any other Dagger module in your own Dagger module simply by adding it as a module dependency with `dagger install`, as in the following example: ```sh @@ -107,3 +109,14 @@ dagger install ./path/to/module :::note Installing a module using a local path (relative or absolute) is only possible if your module is within the repository root (for Git repositories) or the directory containing the `dagger.json` file (for all other cases). ::: + +## Uninstallation + +To remove a dependency from your Dagger module, use the `dagger uninstall` command. The `dagger uninstall` command can be passed either a remote repository reference or a local module name. + +The commands below are equivalent: + +```sh +dagger uninstall hello +dagger uninstall github.com/shykes/daggerverse/hello +``` diff --git a/docs/current_docs/api/module-structure.mdx b/docs/current_docs/api/module-structure.mdx index 9c9bc54137..e5ff34c7a2 100644 --- a/docs/current_docs/api/module-structure.mdx +++ b/docs/current_docs/api/module-structure.mdx @@ -267,7 +267,7 @@ This can be useful to add a few requirements to the module's execution environme -The runtime container is currently hardcoded to run in Node.js 21.3 (although this may be configurable in future). +The runtime container is currently hardcoded to run in Node.js 22.11.0, but it can be overridden by [setting an alternative base image](../configuration/modules.mdx#alternative-base-images). [Bun](https://bun.sh/) is experimentally supported and [work is in progress](https://github.com/dagger/dagger/issues/4368) to support [Deno](https://deno.com/). diff --git a/docs/current_docs/api/snippets/services/bind-services/go/main.go b/docs/current_docs/api/snippets/services/bind-services/go/main.go index d3f50f020c..044fdfa770 100644 --- a/docs/current_docs/api/snippets/services/bind-services/go/main.go +++ b/docs/current_docs/api/snippets/services/bind-services/go/main.go @@ -2,7 +2,7 @@ package main import ( "context" - "main/internal/dagger" + "dagger/my-module/internal/dagger" ) type MyModule struct{} @@ -13,9 +13,8 @@ func (m *MyModule) HttpService() *dagger.Service { From("python"). WithWorkdir("/srv"). WithNewFile("index.html", "Hello, world!"). - WithExec([]string{"python", "-m", "http.server", "8080"}). WithExposedPort(8080). - AsService() + AsService(dagger.ContainerAsServiceOpts{Args: []string{"python", "-m", "http.server", "8080"}}) } // Send a request to an HTTP service and return the response diff --git a/docs/current_docs/api/snippets/services/bind-services/python/main.py b/docs/current_docs/api/snippets/services/bind-services/python/main.py index bd1f28e729..cc410f6b9d 100644 --- a/docs/current_docs/api/snippets/services/bind-services/python/main.py +++ b/docs/current_docs/api/snippets/services/bind-services/python/main.py @@ -12,9 +12,8 @@ def http_service(self) -> dagger.Service: .from_("python") .with_workdir("/srv") .with_new_file("index.html", "Hello, world!") - .with_exec(["python", "-m", "http.server", "8080"]) .with_exposed_port(8080) - .as_service() + .as_service(args=["python", "-m", "http.server", "8080"]) ) @function diff --git a/docs/current_docs/api/snippets/services/bind-services/typescript/index.ts b/docs/current_docs/api/snippets/services/bind-services/typescript/index.ts index 598ab62c3f..e9d1691ef0 100644 --- a/docs/current_docs/api/snippets/services/bind-services/typescript/index.ts +++ b/docs/current_docs/api/snippets/services/bind-services/typescript/index.ts @@ -12,9 +12,8 @@ class MyModule { .from("python") .withWorkdir("/srv") .withNewFile("index.html", "Hello, world!") - .withExec(["python", "-m", "http.server", "8080"]) .withExposedPort(8080) - .asService() + .asService({ args: ["python", "-m", "http.server", "8080"] }) } /** diff --git a/docs/current_docs/api/snippets/services/create-interdependent-services/go/main.go b/docs/current_docs/api/snippets/services/create-interdependent-services/go/main.go index 8baa6bee4f..1fd4b87318 100644 --- a/docs/current_docs/api/snippets/services/create-interdependent-services/go/main.go +++ b/docs/current_docs/api/snippets/services/create-interdependent-services/go/main.go @@ -2,7 +2,7 @@ package main import ( "context" - "main/internal/dagger" + "dagger/my-module/internal/dagger" ) type MyModule struct{} @@ -12,10 +12,8 @@ func (m *MyModule) Services(ctx context.Context) (*dagger.Service, error) { svcA := dag.Container().From("nginx"). WithExposedPort(80). - WithExec([]string{"sh", "-c", ` - nginx & while true; do curl svcb:80 && sleep 1; done - `}). - AsService().WithHostname("svca") + AsService(dagger.ContainerAsServiceOpts{Args: []string{"sh", "-c", `nginx & while true; do curl svcb:80 && sleep 1; done`}}). + WithHostname("svca") _, err := svcA.Start(ctx) if err != nil { @@ -24,10 +22,8 @@ func (m *MyModule) Services(ctx context.Context) (*dagger.Service, error) { svcB := dag.Container().From("nginx"). WithExposedPort(80). - WithExec([]string{"sh", "-c", ` -nginx & while true; do curl svca:80 && sleep 1; done - `}). - AsService().WithHostname("svcb") + AsService(dagger.ContainerAsServiceOpts{Args: []string{"sh", "-c", `nginx & while true; do curl svca:80 && sleep 1; done`}}). + WithHostname("svcb") svcB, err = svcB.Start(ctx) if err != nil { diff --git a/docs/current_docs/api/snippets/services/create-interdependent-services/python/main.py b/docs/current_docs/api/snippets/services/create-interdependent-services/python/main.py index bc110f5a4a..e07d8963e9 100644 --- a/docs/current_docs/api/snippets/services/create-interdependent-services/python/main.py +++ b/docs/current_docs/api/snippets/services/create-interdependent-services/python/main.py @@ -11,10 +11,13 @@ async def services(self) -> dagger.Service: dag.container() .from_("nginx") .with_exposed_port(80) - .with_exec( - ["sh", "-c", "nginx & while true; do curl svcb:80 && sleep 1; done"] + .as_service( + args=[ + "sh", + "-c", + "nginx & while true; do curl svcb:80 && sleep 1; done", + ] ) - .as_service() .with_hostname("svca") ) @@ -24,10 +27,13 @@ async def services(self) -> dagger.Service: dag.container() .from_("nginx") .with_exposed_port(80) - .with_exec( - ["sh", "-c", "nginx & while true; do curl svca:80 && sleep 1; done"] + .as_service( + args=[ + "sh", + "-c", + "nginx & while true; do curl svca:80 && sleep 1; done", + ] ) - .as_service() .with_hostname("svcb") ) diff --git a/docs/current_docs/api/snippets/services/create-interdependent-services/typescript/index.ts b/docs/current_docs/api/snippets/services/create-interdependent-services/typescript/index.ts index 1a94d1b719..6e75a69377 100644 --- a/docs/current_docs/api/snippets/services/create-interdependent-services/typescript/index.ts +++ b/docs/current_docs/api/snippets/services/create-interdependent-services/typescript/index.ts @@ -1,4 +1,4 @@ -import { object, func, Service } from "@dagger.io/dagger" +import { dag, object, func, Service } from "@dagger.io/dagger" @object() class MyModule { @@ -9,12 +9,13 @@ class MyModule { .container() .from("nginx") .withExposedPort(80) - .withExec([ - "sh", - "-c", - `nginx & while true; do curl svcb:80 && sleep 1; done`, - ]) - .asService() + .asService({ + args: [ + "sh", + "-c", + `nginx & while true; do curl svcb:80 && sleep 1; done`, + ], + }) .withHostname("svca") await svcA.start() @@ -23,12 +24,13 @@ class MyModule { .container() .from("nginx") .withExposedPort(80) - .withExec([ - "sh", - "-c", - `nginx & while true; do curl svca:80 && sleep 1; done`, - ]) - .asService() + .asService({ + args: [ + "sh", + "-c", + `nginx & while true; do curl svca:80 && sleep 1; done`, + ], + }) .withHostname("svcb") await svcB.start() diff --git a/docs/current_docs/api/snippets/services/expose-dagger-services-to-host/go/main.go b/docs/current_docs/api/snippets/services/expose-dagger-services-to-host/go/main.go index 0f68a95712..a36e57c06e 100644 --- a/docs/current_docs/api/snippets/services/expose-dagger-services-to-host/go/main.go +++ b/docs/current_docs/api/snippets/services/expose-dagger-services-to-host/go/main.go @@ -1,6 +1,8 @@ package main -import "main/internal/dagger" +import ( + "dagger/my-module/internal/dagger" +) type MyModule struct{} @@ -10,7 +12,6 @@ func (m *MyModule) HttpService() *dagger.Service { From("python"). WithWorkdir("/srv"). WithNewFile("index.html", "Hello, world!"). - WithExec([]string{"python", "-m", "http.server", "8080"}). WithExposedPort(8080). - AsService() + AsService(dagger.ContainerAsServiceOpts{Args: []string{"python", "-m", "http.server", "8080"}}) } diff --git a/docs/current_docs/api/snippets/services/expose-dagger-services-to-host/python/main.py b/docs/current_docs/api/snippets/services/expose-dagger-services-to-host/python/main.py index d645d8b435..5ad547d89d 100644 --- a/docs/current_docs/api/snippets/services/expose-dagger-services-to-host/python/main.py +++ b/docs/current_docs/api/snippets/services/expose-dagger-services-to-host/python/main.py @@ -12,7 +12,6 @@ def http_service(self) -> dagger.Service: .from_("python") .with_workdir("/srv") .with_new_file("index.html", "Hello, world!") - .with_exec(["python", "-m", "http.server", "8080"]) .with_exposed_port(8080) - .as_service() + .as_service(args=["python", "-m", "http.server", "8080"]) ) diff --git a/docs/current_docs/api/snippets/services/expose-dagger-services-to-host/typescript/index.ts b/docs/current_docs/api/snippets/services/expose-dagger-services-to-host/typescript/index.ts index b4d9b20ffb..4046b8f02b 100644 --- a/docs/current_docs/api/snippets/services/expose-dagger-services-to-host/typescript/index.ts +++ b/docs/current_docs/api/snippets/services/expose-dagger-services-to-host/typescript/index.ts @@ -12,8 +12,7 @@ class MyModule { .from("python") .withWorkdir("/srv") .withNewFile("index.html", "Hello, world!") - .withExec(["python", "-m", "http.server", "8080"]) .withExposedPort(8080) - .asService() + .asService({ args: ["python", "-m", "http.server", "8080"] }) } } diff --git a/docs/current_docs/api/snippets/services/expose-host-services-to-dagger/go/main.go b/docs/current_docs/api/snippets/services/expose-host-services-to-dagger/go/main.go index 43f3cfbdda..a5fded5a10 100644 --- a/docs/current_docs/api/snippets/services/expose-host-services-to-dagger/go/main.go +++ b/docs/current_docs/api/snippets/services/expose-host-services-to-dagger/go/main.go @@ -2,7 +2,7 @@ package main import ( "context" - "main/internal/dagger" + "dagger/my-module/internal/dagger" ) type MyModule struct{} diff --git a/docs/current_docs/api/snippets/services/persist-service-state/go/main.go b/docs/current_docs/api/snippets/services/persist-service-state/go/main.go index b3db98821a..63b6f6982a 100644 --- a/docs/current_docs/api/snippets/services/persist-service-state/go/main.go +++ b/docs/current_docs/api/snippets/services/persist-service-state/go/main.go @@ -3,7 +3,7 @@ package main import ( "context" - "main/internal/dagger" + "dagger/my-module/internal/dagger" ) type MyModule struct{} @@ -15,7 +15,7 @@ func (m *MyModule) Redis(ctx context.Context) *dagger.Container { WithExposedPort(6379). WithMountedCache("/data", dag.CacheVolume("my-redis")). WithWorkdir("/data"). - AsService() + AsService(dagger.ContainerAsServiceOpts{UseEntrypoint: true}) redisCLI := dag.Container(). From("redis"). diff --git a/docs/current_docs/api/snippets/services/persist-service-state/python/main.py b/docs/current_docs/api/snippets/services/persist-service-state/python/main.py index 08279ca88a..b392d0e23c 100644 --- a/docs/current_docs/api/snippets/services/persist-service-state/python/main.py +++ b/docs/current_docs/api/snippets/services/persist-service-state/python/main.py @@ -15,7 +15,7 @@ def redis(self) -> dagger.Container: .with_exposed_port(6379) .with_mounted_cache("/data", dag.cache_volume("my-redis")) .with_workdir("/data") - .as_service() + .as_service(use_entrypoint=True) ) # create Redis client container diff --git a/docs/current_docs/api/snippets/services/persist-service-state/typescript/index.ts b/docs/current_docs/api/snippets/services/persist-service-state/typescript/index.ts index 785e5bcd8f..a3804d3786 100644 --- a/docs/current_docs/api/snippets/services/persist-service-state/typescript/index.ts +++ b/docs/current_docs/api/snippets/services/persist-service-state/typescript/index.ts @@ -13,7 +13,7 @@ class MyModule { .withExposedPort(6379) .withMountedCache("/data", dag.cacheVolume("my-redis")) .withWorkdir("/data") - .asService() + .asService({ useEntrypoint: true }) const redisCLI = dag .container() diff --git a/docs/current_docs/api/snippets/services/service-lifecycle-1/go/main.go b/docs/current_docs/api/snippets/services/service-lifecycle-1/go/main.go index ecca184ba3..43eb86fdda 100644 --- a/docs/current_docs/api/snippets/services/service-lifecycle-1/go/main.go +++ b/docs/current_docs/api/snippets/services/service-lifecycle-1/go/main.go @@ -2,6 +2,8 @@ package main import ( "context" + + "dagger/my-module/internal/dagger" ) type MyModule struct{} @@ -11,7 +13,7 @@ func (m *MyModule) RedisService(ctx context.Context) (string, error) { redisSrv := dag.Container(). From("redis"). WithExposedPort(6379). - AsService() + AsService(dagger.ContainerAsServiceOpts{UseEntrypoint: true}) // create Redis client container redisCLI := dag.Container(). diff --git a/docs/current_docs/api/snippets/services/service-lifecycle-1/python/main.py b/docs/current_docs/api/snippets/services/service-lifecycle-1/python/main.py index 575760fac1..b653c38063 100644 --- a/docs/current_docs/api/snippets/services/service-lifecycle-1/python/main.py +++ b/docs/current_docs/api/snippets/services/service-lifecycle-1/python/main.py @@ -6,7 +6,12 @@ class MyModule: @function async def redis_service(self) -> str: """Creates Redis service and client.""" - redis_srv = dag.container().from_("redis").with_exposed_port(6379).as_service() + redis_srv = ( + dag.container() + .from_("redis") + .with_exposed_port(6379) + .as_service(use_entrypoint=True) + ) # create Redis client container redis_cli = ( diff --git a/docs/current_docs/api/snippets/services/service-lifecycle-1/typescript/index.ts b/docs/current_docs/api/snippets/services/service-lifecycle-1/typescript/index.ts index 840ff11992..e56986c3ce 100644 --- a/docs/current_docs/api/snippets/services/service-lifecycle-1/typescript/index.ts +++ b/docs/current_docs/api/snippets/services/service-lifecycle-1/typescript/index.ts @@ -11,7 +11,7 @@ class MyModule { .container() .from("redis") .withExposedPort(6379) - .asService() + .asService({ useEntrypoint: true }) // create Redis client container const redisCLI = dag diff --git a/docs/current_docs/api/snippets/services/service-lifecycle-2/go/main.go b/docs/current_docs/api/snippets/services/service-lifecycle-2/go/main.go index 12b9fb8c4c..ed25c0ef79 100644 --- a/docs/current_docs/api/snippets/services/service-lifecycle-2/go/main.go +++ b/docs/current_docs/api/snippets/services/service-lifecycle-2/go/main.go @@ -2,6 +2,8 @@ package main import ( "context" + + "dagger/my-module/internal/dagger" ) type MyModule struct{} @@ -11,7 +13,7 @@ func (m *MyModule) RedisService(ctx context.Context) (string, error) { redisSrv := dag.Container(). From("redis"). WithExposedPort(6379). - AsService() + AsService(dagger.ContainerAsServiceOpts{UseEntrypoint: true}) // create Redis client container redisCLI := dag.Container(). diff --git a/docs/current_docs/api/snippets/services/service-lifecycle-2/python/main.py b/docs/current_docs/api/snippets/services/service-lifecycle-2/python/main.py index 353e209ba9..8f9ac0fd58 100644 --- a/docs/current_docs/api/snippets/services/service-lifecycle-2/python/main.py +++ b/docs/current_docs/api/snippets/services/service-lifecycle-2/python/main.py @@ -6,7 +6,12 @@ class MyModule: @function async def redis_service(self) -> str: """Creates Redis service and client.""" - redis_srv = dag.container().from_("redis").with_exposed_port(6379).as_service() + redis_srv = ( + dag.container() + .from_("redis") + .with_exposed_port(6379) + .as_service(use_entrypoint=True) + ) # create Redis client container redis_cli = ( diff --git a/docs/current_docs/api/snippets/services/service-lifecycle-2/typescript/index.ts b/docs/current_docs/api/snippets/services/service-lifecycle-2/typescript/index.ts index 91a8b0a5b2..47b54a2eeb 100644 --- a/docs/current_docs/api/snippets/services/service-lifecycle-2/typescript/index.ts +++ b/docs/current_docs/api/snippets/services/service-lifecycle-2/typescript/index.ts @@ -11,7 +11,7 @@ class MyModule { .container() .from("redis") .withExposedPort(6379) - .asService() + .asService({ useEntrypoint: true }) // create Redis client container const redisCLI = dag diff --git a/docs/current_docs/api/snippets/services/service-lifecycle-3/go/main.go b/docs/current_docs/api/snippets/services/service-lifecycle-3/go/main.go index 16266c5e6c..30382dbdc6 100644 --- a/docs/current_docs/api/snippets/services/service-lifecycle-3/go/main.go +++ b/docs/current_docs/api/snippets/services/service-lifecycle-3/go/main.go @@ -2,6 +2,8 @@ package main import ( "context" + + "dagger/my-module/internal/dagger" ) type MyModule struct{} @@ -11,7 +13,7 @@ func (m *MyModule) RedisService(ctx context.Context) (string, error) { redisSrv := dag.Container(). From("redis"). WithExposedPort(6379). - AsService() + AsService(dagger.ContainerAsServiceOpts{UseEntrypoint: true}) // create Redis client container redisCLI := dag.Container(). diff --git a/docs/current_docs/api/snippets/services/service-lifecycle-3/python/main.py b/docs/current_docs/api/snippets/services/service-lifecycle-3/python/main.py index 7bee468bc5..caf0e14a61 100644 --- a/docs/current_docs/api/snippets/services/service-lifecycle-3/python/main.py +++ b/docs/current_docs/api/snippets/services/service-lifecycle-3/python/main.py @@ -6,7 +6,12 @@ class MyModule: @function async def redis_service(self) -> str: """Creates Redis service and client.""" - redis_srv = dag.container().from_("redis").with_exposed_port(6379).as_service() + redis_srv = ( + dag.container() + .from_("redis") + .with_exposed_port(6379) + .as_service(use_entrypoint=True) + ) # create Redis client container redis_cli = ( diff --git a/docs/current_docs/api/snippets/services/service-lifecycle-3/typescript/index.ts b/docs/current_docs/api/snippets/services/service-lifecycle-3/typescript/index.ts index 2c05e866b9..dd852b0797 100644 --- a/docs/current_docs/api/snippets/services/service-lifecycle-3/typescript/index.ts +++ b/docs/current_docs/api/snippets/services/service-lifecycle-3/typescript/index.ts @@ -11,7 +11,7 @@ class MyModule { .container() .from("redis") .withExposedPort(6379) - .asService() + .asService({ useEntrypoint: true }) // create Redis client container const redisCLI = dag diff --git a/docs/current_docs/api/snippets/services/start-stop-services/go/main.go b/docs/current_docs/api/snippets/services/start-stop-services/go/main.go index c123e3921e..b38c634e1c 100644 --- a/docs/current_docs/api/snippets/services/start-stop-services/go/main.go +++ b/docs/current_docs/api/snippets/services/start-stop-services/go/main.go @@ -2,6 +2,8 @@ package main import ( "context" + + "dagger/my-module/internal/dagger" ) type MyModule struct{} @@ -11,7 +13,7 @@ func (m *MyModule) RedisService(ctx context.Context) (string, error) { redisSrv := dag.Container(). From("redis"). WithExposedPort(6379). - AsService() + AsService(dagger.ContainerAsServiceOpts{UseEntrypoint: true}) // start Redis ahead of time so it stays up for the duration of the test redisSrv, err := redisSrv.Start(ctx) diff --git a/docs/current_docs/api/snippets/services/test-against-db-service/go/main.go b/docs/current_docs/api/snippets/services/test-against-db-service/go/main.go index b9038da4ef..49a6fb6a13 100644 --- a/docs/current_docs/api/snippets/services/test-against-db-service/go/main.go +++ b/docs/current_docs/api/snippets/services/test-against-db-service/go/main.go @@ -2,6 +2,8 @@ package main import ( "context" + + "dagger/my-module/internal/dagger" ) type MyModule struct{} @@ -15,7 +17,7 @@ func (m *MyModule) Test(ctx context.Context) (string, error) { WithEnvVariable("MARIADB_DATABASE", "drupal"). WithEnvVariable("MARIADB_ROOT_PASSWORD", "root"). WithExposedPort(3306). - AsService() + AsService(dagger.ContainerAsServiceOpts{UseEntrypoint: true}) // get Drupal base image // install additional dependencies diff --git a/docs/current_docs/api/snippets/services/test-against-db-service/python/main.py b/docs/current_docs/api/snippets/services/test-against-db-service/python/main.py index 71befb44ca..705f18e8f3 100644 --- a/docs/current_docs/api/snippets/services/test-against-db-service/python/main.py +++ b/docs/current_docs/api/snippets/services/test-against-db-service/python/main.py @@ -15,7 +15,7 @@ async def test(self) -> str: .with_env_variable("MARIADB_DATABASE", "drupal") .with_env_variable("MARIADB_ROOT_PASSWORD", "root") .with_exposed_port(3306) - .as_service() + .as_service(use_entrypoint=True) ) # get Drupal base image diff --git a/docs/current_docs/api/snippets/services/test-against-db-service/typescript/index.ts b/docs/current_docs/api/snippets/services/test-against-db-service/typescript/index.ts index e2211fd53d..4e3e6af276 100644 --- a/docs/current_docs/api/snippets/services/test-against-db-service/typescript/index.ts +++ b/docs/current_docs/api/snippets/services/test-against-db-service/typescript/index.ts @@ -15,7 +15,7 @@ class MyModule { .withEnvVariable("MARIADB_DATABASE", "drupal") .withEnvVariable("MARIADB_ROOT_PASSWORD", "root") .withExposedPort(3306) - .asService() + .asService({ useEntrypoint: true }) // get Drupal base image // install additional dependencies diff --git a/docs/current_docs/configuration/cache.mdx b/docs/current_docs/configuration/cache.mdx index ea95f1e6de..a1436a01b1 100644 --- a/docs/current_docs/configuration/cache.mdx +++ b/docs/current_docs/configuration/cache.mdx @@ -16,39 +16,15 @@ Dagger caches two types of data: - Show all the cache entry metadata: - ```shell - dagger query < dagger.Service: .from_("python") .with_workdir("/srv") .with_new_file("index.html", "Hello, world!") - .with_exec(["python", "-m", "http.server", "8080"]) .with_exposed_port(8080) - .as_service() + .as_service(args=["python", "-m", "http.server", "8080"]) ) diff --git a/docs/current_docs/features/snippets/services-1/typescript/index.ts b/docs/current_docs/features/snippets/services-1/typescript/index.ts index ba04f8a688..ea9a09aee3 100644 --- a/docs/current_docs/features/snippets/services-1/typescript/index.ts +++ b/docs/current_docs/features/snippets/services-1/typescript/index.ts @@ -9,8 +9,7 @@ class MyModule { .from("python") .withWorkdir("/srv") .withNewFile("index.html", "Hello, world!") - .withExec(["python", "-m", "http.server", "8080"]) .withExposedPort(8080) - .asService() + .asService({ args: ["python", "-m", "http.server", "8080"] }) } } diff --git a/docs/current_docs/features/snippets/services-2/go/main.go b/docs/current_docs/features/snippets/services-2/go/main.go index 49d1133e7b..045549a4a1 100644 --- a/docs/current_docs/features/snippets/services-2/go/main.go +++ b/docs/current_docs/features/snippets/services-2/go/main.go @@ -3,8 +3,6 @@ package main import ( "context" "dagger/my-module/internal/dagger" - - "dagger.io/dagger/dag" ) type MyModule struct{} diff --git a/docs/current_docs/features/visualization.mdx b/docs/current_docs/features/visualization.mdx index 2a8beaf80e..adbe1bcddd 100644 --- a/docs/current_docs/features/visualization.mdx +++ b/docs/current_docs/features/visualization.mdx @@ -17,12 +17,18 @@ The TUI is designed for rapid iteration, in the same way regular scripting works ![Dagger TUI](/img/current_docs/features/tui.gif) -The TUI is driven by [OpenTelemetry](https://opentelemetry.io/) and is essentially a live-streaming OpenTelemetry trace visualizer. It represents Dagger API calls as OpenTelemetry spans with special metadata. If user code integrates with OpenTelemetry, related spans will appear in the TUI as first-class citizens. - The TUI renders a tree of Dagger API calls, represented as GraphQL queries. A parent-child relationship means that the child call is being made by the parent call. - A red X or green check indicates whether the call succeeded or failed. - A call's duration is rendered after its name. +Error logs appear at the top, directly below the progress report. In most cases, this tells you exactly what went wrong and where without any extra sleuthing. + +The TUI also provides real-time telemetry to give you a complete view of your pipeline's performance. It allows you to monitor: +- State and duration: Get visual cues for cached and pending states, and see exactly how long each step of your pipeline takes (including accounting for lazy effects installed by a Dagger Function). +- CPU resource usage: Identify when CPU contention occurs, such as when all threads are blocked waiting for CPU access, and diagnose performance bottlenecks related to CPU resource constraints. +- Network activity: See how much data is sent and received and track packet drop rates to identify potential bottlenecks in your pipelines. +- Memory usage: Keep an eye on current and peak memory consumption, helping you optimize resource utilization. + The CLI has tiered verbosity: `-v`, `-vv`, `-vvv` (just like `curl`): - `-v` keeps spans visible after they complete, rather than disappearing after a brief pause; - `-vv` reveals internal and encapsulated spans; @@ -30,6 +36,12 @@ The CLI has tiered verbosity: `-v`, `-vv`, `-vvv` (just like `curl`): For additional debugging information, add the `--debug` flag to the `dagger call` command. +The TUI is driven by [OpenTelemetry](https://opentelemetry.io/) and is essentially a live-streaming OpenTelemetry trace visualizer. It represents Dagger API calls as OpenTelemetry spans with special metadata. If user code integrates with OpenTelemetry, related spans will appear in the TUI as first-class citizens. + +:::note +Dagger automatically detects OpenTelemetry resource attributes. By utilizing the standard [`OTEL_RESOURCE_ATTRIBUTES` environment variable](https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/), operators can now set custom resource attributes to annotate Traces, providing more detailed and contextual information for monitoring and debugging. +::: + ## Traces Dagger Cloud provides Traces, a browser-based interface focused on tracing and debugging Dagger Functions. A Trace represents one invocation of a Dagger Function, run locally or in CI. It contains detailed information about the operations performed by the Dagger Function. diff --git a/docs/current_docs/partials/version.js b/docs/current_docs/partials/version.js index ff496f5cdb..a5e4dbf275 100644 --- a/docs/current_docs/partials/version.js +++ b/docs/current_docs/partials/version.js @@ -1,3 +1,3 @@ // Code generated by dagger. DO NOT EDIT. -export const daggerVersion = "0.14.0"; +export const daggerVersion = "0.15.1"; diff --git a/docs/docs-graphql/schema.graphqls b/docs/docs-graphql/schema.graphqls index c1710a395d..baa44cd567 100644 --- a/docs/docs-graphql/schema.graphqls +++ b/docs/docs-graphql/schema.graphqls @@ -60,7 +60,48 @@ type Container { Be sure to set any exposed ports before this conversion. """ - asService: Service! + asService( + """ + Command to run instead of the container's default command (e.g., ["go", "run", "main.go"]). + + If empty, the container's default command is used. + """ + args: [String!] = [] + + """ + Replace "${VAR}" or "$VAR" in the args according to the current environment + variables defined in the container (e.g. "/$VAR/foo"). + """ + expand: Boolean = false + + """ + Provides Dagger access to the executed command. + + Do not use this option unless you trust the command being executed; the + command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM. + """ + experimentalPrivilegedNesting: Boolean = false + + """ + Execute the command with all root capabilities. This is similar to running a + command with "sudo" or executing "docker run" with the "--privileged" flag. + Containerization does not provide any security guarantees when using this + option. It should only be used when absolutely necessary and only with + trusted commands. + """ + insecureRootCapabilities: Boolean = false + + """ + If set, skip the automatic init process injected into containers by default. + + This should only be used if the user requires that their exec process be the + pid 1 process in the container. Otherwise it may result in unexpected behavior. + """ + noInit: Boolean = false + + """If the container has an entrypoint, prepend it to the args.""" + useEntrypoint: Boolean = false + ): Service! """Returns a File representing the container serialized to a tarball.""" asTarball( @@ -505,7 +546,7 @@ type Container { """ withExec( """ - Command to run instead of the container's default command (e.g., ["run", "main.go"]). + Command to run instead of the container's default command (e.g., ["go", "run", "main.go"]). If empty, the container's default command is used. """ @@ -2320,6 +2361,9 @@ type ModuleSource { """ moduleOriginalName: String! + """The pinned version of this module source.""" + pin: String! + """ The path to the module source's context directory on the caller's filesystem. Only valid for local sources. """ diff --git a/docs/docusaurus.config.ts b/docs/docusaurus.config.ts index 37edaec248..ed112c5d8b 100644 --- a/docs/docusaurus.config.ts +++ b/docs/docusaurus.config.ts @@ -82,9 +82,9 @@ const config: Config = { id: "current-generation", plugin: ["typedoc-plugin-markdown", "typedoc-plugin-frontmatter"], entryPoints: [ - "../sdk/typescript/connect.ts", - "../sdk/typescript/api/client.gen.ts", - "../sdk/typescript/common/errors/index.ts", + "../sdk/typescript/src/connect.ts", + "../sdk/typescript/src/api/client.gen.ts", + "../sdk/typescript/src/common/errors/index.ts", ], tsconfig: "../sdk/typescript/tsconfig.json", out: "current_docs/reference/typescript/", diff --git a/docs/package.json b/docs/package.json index 1b1671c45b..8ef3a3af14 100644 --- a/docs/package.json +++ b/docs/package.json @@ -22,17 +22,17 @@ "@mdx-js/react": "^3.1.0", "clsx": "^2.1.1", "docusaurus-plugin-image-zoom": "^2.0.0", - "docusaurus-plugin-sass": "^0.2.5", - "docusaurus-plugin-typedoc": "^1.0.5", + "docusaurus-plugin-sass": "^0.2.6", + "docusaurus-plugin-typedoc": "^1.1.1", "posthog-docusaurus": "^2.0.0", "prism-react-renderer": "^2.1.0", - "react": "^18.0.0", - "react-dom": "^18.0.0", + "react": "^19.0.0", + "react-dom": "^19.0.0", "remark-code-import": "^1.2.0", - "sass": "^1.81.0", - "typedoc": "^0.26.11", - "typedoc-plugin-frontmatter": "^1.0.0", - "typedoc-plugin-markdown": "^4.2.10", + "sass": "^1.82.0", + "typedoc": "^0.27.4", + "typedoc-plugin-frontmatter": "^1.1.0", + "typedoc-plugin-markdown": "^4.3.2", "typescript": "^5.6.3" }, "devDependencies": { diff --git a/docs/static/api/reference/index.html b/docs/static/api/reference/index.html index af5c168605..ef1861d46c 100644 --- a/docs/static/api/reference/index.html +++ b/docs/static/api/reference/index.html @@ -3806,13 +3806,49 @@
Fields
- + asService - Service!

Turn the container into a Service.

Be sure to set any exposed ports before this conversion.

+ + +
+
Arguments
+
+
+
args - [String!]
+

Command to run instead of the container's default command (e.g., ["go", "run", "main.go"]).

+

If empty, the container's default command is used.

+
+
+
expand - Boolean
+

Replace "${VAR}" or "$VAR" in the args according to the current environment variables defined in the container (e.g. "/$VAR/foo").

+
+
+
experimentalPrivilegedNesting - Boolean
+

Provides Dagger access to the executed command.

+

Do not use this option unless you trust the command being executed; the command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM.

+
+
+
insecureRootCapabilities - Boolean
+

Execute the command with all root capabilities. This is similar to running a command with "sudo" or executing "docker run" with the "--privileged" flag. Containerization does not provide any security guarantees when using this option. It should only be used when absolutely necessary and only with trusted commands.

+
+
+
noInit - Boolean
+

If set, skip the automatic init process injected into containers by default.

+

This should only be used if the user requires that their exec process be the pid 1 process in the container. Otherwise it may result in unexpected behavior.

+
+
+
useEntrypoint - Boolean
+

If the container has an entrypoint, prepend it to the args.

+
+
+
+ + asTarball - File! Returns a File representing the container serialized to a tarball. @@ -4389,7 +4425,7 @@
Arguments
args - [String!]!
-

Command to run instead of the container's default command (e.g., ["run", "main.go"]).

+

Command to run instead of the container's default command (e.g., ["go", "run", "main.go"]).

If empty, the container's default command is used.

@@ -8105,6 +8141,10 @@
pathmoduleOriginalName - String! The original name of the module this source references, as defined in the module configuration. + + pin - String! + The pinned version of this module source. + resolveContextPathFromCaller - String! The path to the module source's context directory on the caller's filesystem. Only valid for local sources. diff --git a/docs/static/img/current_docs/features/tui.gif b/docs/static/img/current_docs/features/tui.gif old mode 100644 new mode 100755 index de2474a37a..a3736891db Binary files a/docs/static/img/current_docs/features/tui.gif and b/docs/static/img/current_docs/features/tui.gif differ diff --git a/docs/static/reference/dagger.schema.json b/docs/static/reference/dagger.schema.json index 0ef9be39df..68bf1c5e6c 100644 --- a/docs/static/reference/dagger.schema.json +++ b/docs/static/reference/dagger.schema.json @@ -91,8 +91,7 @@ "type": "object", "required": [ "name", - "source", - "pin" + "source" ] }, "ModuleConfigView": { diff --git a/docs/yarn.lock b/docs/yarn.lock index 5996cb0cf7..804bbde8e9 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -2007,6 +2007,15 @@ utility-types "^3.10.0" webpack "^5.88.1" +"@gerrit0/mini-shiki@^1.24.0": + version "1.24.1" + resolved "https://registry.yarnpkg.com/@gerrit0/mini-shiki/-/mini-shiki-1.24.1.tgz#60ef10f4e2cfac7a9223e10b88c128438aa44fd8" + integrity sha512-PNP/Gjv3VqU7z7DjRgO3F9Ok5frTKqtpV+LJW1RzMcr2zpRk0ulhEWnbcNGXzPC7BZyWMIHrkfQX2GZRfxrn6Q== + dependencies: + "@shikijs/engine-oniguruma" "^1.24.0" + "@shikijs/types" "^1.24.0" + "@shikijs/vscode-textmate" "^9.3.0" + "@hapi/hoek@^9.0.0", "@hapi/hoek@^9.3.0": version "9.3.0" resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-9.3.0.tgz#8368869dcb735be2e7f5cb7647de78e167a251fb" @@ -2274,39 +2283,18 @@ resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.28.tgz#d45e01c4a56f143ee69c54dd6b12eade9e270a73" integrity sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw== -"@shikijs/core@1.22.0": - version "1.22.0" - resolved "https://registry.yarnpkg.com/@shikijs/core/-/core-1.22.0.tgz#74e5d4485e5f7afa85109e322b42e400686f92bb" - integrity sha512-S8sMe4q71TJAW+qG93s5VaiihujRK6rqDFqBnxqvga/3LvqHEnxqBIOPkt//IdXVtHkQWKu4nOQNk0uBGicU7Q== +"@shikijs/engine-oniguruma@^1.24.0": + version "1.24.1" + resolved "https://registry.yarnpkg.com/@shikijs/engine-oniguruma/-/engine-oniguruma-1.24.1.tgz#cf9f74867987a786057dbf599f571800f7ec5b30" + integrity sha512-KdrTIBIONWd+Xs61eh8HdIpfigtrseat9dpARvaOe2x0g/FNTbwbkGr3y92VSOVD1XotzEskh3v/nCzyWjkf7g== dependencies: - "@shikijs/engine-javascript" "1.22.0" - "@shikijs/engine-oniguruma" "1.22.0" - "@shikijs/types" "1.22.0" + "@shikijs/types" "1.24.1" "@shikijs/vscode-textmate" "^9.3.0" - "@types/hast" "^3.0.4" - hast-util-to-html "^9.0.3" -"@shikijs/engine-javascript@1.22.0": - version "1.22.0" - resolved "https://registry.yarnpkg.com/@shikijs/engine-javascript/-/engine-javascript-1.22.0.tgz#2e5db29f0421755492f5279f8224ef7a7f907a29" - integrity sha512-AeEtF4Gcck2dwBqCFUKYfsCq0s+eEbCEbkUuFou53NZ0sTGnJnJ/05KHQFZxpii5HMXbocV9URYVowOP2wH5kw== - dependencies: - "@shikijs/types" "1.22.0" - "@shikijs/vscode-textmate" "^9.3.0" - oniguruma-to-js "0.4.3" - -"@shikijs/engine-oniguruma@1.22.0": - version "1.22.0" - resolved "https://registry.yarnpkg.com/@shikijs/engine-oniguruma/-/engine-oniguruma-1.22.0.tgz#74c661fac4cd1f08f2c09b5d6e2fd2a6720d0401" - integrity sha512-5iBVjhu/DYs1HB0BKsRRFipRrD7rqjxlWTj4F2Pf+nQSPqc3kcyqFFeZXnBMzDf0HdqaFVvhDRAGiYNvyLP+Mw== - dependencies: - "@shikijs/types" "1.22.0" - "@shikijs/vscode-textmate" "^9.3.0" - -"@shikijs/types@1.22.0": - version "1.22.0" - resolved "https://registry.yarnpkg.com/@shikijs/types/-/types-1.22.0.tgz#d2a572381395c9308b472c8199b8e0289753b9ad" - integrity sha512-Fw/Nr7FGFhlQqHfxzZY8Cwtwk5E9nKDUgeLjZgt3UuhcM3yJR9xj3ZGNravZZok8XmEZMiYkSMTPlPkULB8nww== +"@shikijs/types@1.24.1", "@shikijs/types@^1.24.0": + version "1.24.1" + resolved "https://registry.yarnpkg.com/@shikijs/types/-/types-1.24.1.tgz#669c7165f9ee3caa475fadd61f7ed4ca0009e848" + integrity sha512-ZwZFbShFY/APfKNt3s9Gv8rhTm29GodSKsOW66X6N+HGsZuaHalE1VUEX4fv93UXHTZTLjb3uxn63F96RhGfXw== dependencies: "@shikijs/vscode-textmate" "^9.3.0" "@types/hast" "^3.0.4" @@ -4736,17 +4724,17 @@ docusaurus-plugin-image-zoom@^2.0.0: medium-zoom "^1.0.8" validate-peer-dependencies "^2.2.0" -docusaurus-plugin-sass@^0.2.5: - version "0.2.5" - resolved "https://registry.yarnpkg.com/docusaurus-plugin-sass/-/docusaurus-plugin-sass-0.2.5.tgz#6bfb8a227ac6265be685dcbc24ba1989e27b8005" - integrity sha512-Z+D0fLFUKcFpM+bqSUmqKIU+vO+YF1xoEQh5hoFreg2eMf722+siwXDD+sqtwU8E4MvVpuvsQfaHwODNlxJAEg== +docusaurus-plugin-sass@^0.2.6: + version "0.2.6" + resolved "https://registry.yarnpkg.com/docusaurus-plugin-sass/-/docusaurus-plugin-sass-0.2.6.tgz#b4930a1fe1cc7bcead639bb1bee38bce0ffd073d" + integrity sha512-2hKQQDkrufMong9upKoG/kSHJhuwd+FA3iAe/qzS/BmWpbIpe7XKmq5wlz4J5CJaOPu4x+iDJbgAxZqcoQf0kg== dependencies: - sass-loader "^10.1.1" + sass-loader "^16.0.2" -docusaurus-plugin-typedoc@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/docusaurus-plugin-typedoc/-/docusaurus-plugin-typedoc-1.0.5.tgz#cc04de58201ac327861c4c9fb0e2af58244373ea" - integrity sha512-mv8LBJYilGOOPLqaIM3vbYc34m4qwOCpb4WfP24DOPFNj2uiTerw8sg9MGvN6Jx2+J8rq9/WMnjcyz3UMqoIIQ== +docusaurus-plugin-typedoc@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/docusaurus-plugin-typedoc/-/docusaurus-plugin-typedoc-1.1.1.tgz#cac32cc4526da4a49e05a073b13e2b9f478c61cd" + integrity sha512-jaSHPA2iQVE60Mugr/pbHzIWVR/7tp77A+e9+oYvZylupdNCwZ/5BadqcqZHdLQCsUZSvu4SlE3ob/ynN6aUAw== dom-converter@^0.2.0: version "0.2.0" @@ -5635,23 +5623,6 @@ hast-util-to-estree@^3.0.0: unist-util-position "^5.0.0" zwitch "^2.0.0" -hast-util-to-html@^9.0.3: - version "9.0.3" - resolved "https://registry.yarnpkg.com/hast-util-to-html/-/hast-util-to-html-9.0.3.tgz#a9999a0ba6b4919576a9105129fead85d37f302b" - integrity sha512-M17uBDzMJ9RPCqLMO92gNNUDuBSq10a25SDBI08iCCxmorf4Yy6sYHK57n9WAbRAAaU+DuR4W6GN9K4DFZesYg== - dependencies: - "@types/hast" "^3.0.0" - "@types/unist" "^3.0.0" - ccount "^2.0.0" - comma-separated-tokens "^2.0.0" - hast-util-whitespace "^3.0.0" - html-void-elements "^3.0.0" - mdast-util-to-hast "^13.0.0" - property-information "^6.0.0" - space-separated-tokens "^2.0.0" - stringify-entities "^4.0.0" - zwitch "^2.0.4" - hast-util-to-jsx-runtime@^2.0.0: version "2.3.0" resolved "https://registry.yarnpkg.com/hast-util-to-jsx-runtime/-/hast-util-to-jsx-runtime-2.3.0.tgz#3ed27caf8dc175080117706bf7269404a0aa4f7c" @@ -6353,11 +6324,6 @@ kleur@^3.0.3: resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== -klona@^2.0.4: - version "2.0.6" - resolved "https://registry.yarnpkg.com/klona/-/klona-2.0.6.tgz#85bffbf819c03b2f53270412420a4555ef882e22" - integrity sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA== - kolorist@^1.8.0: version "1.8.0" resolved "https://registry.yarnpkg.com/kolorist/-/kolorist-1.8.0.tgz#edddbbbc7894bc13302cdf740af6374d4a04743c" @@ -6500,7 +6466,7 @@ longest-streak@^3.0.0: resolved "https://registry.yarnpkg.com/longest-streak/-/longest-streak-3.1.0.tgz#62fa67cd958742a1574af9f39866364102d90cd4" integrity sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g== -loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.2.0, loose-envify@^1.3.1, loose-envify@^1.4.0: +loose-envify@^1.0.0, loose-envify@^1.2.0, loose-envify@^1.3.1, loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== @@ -7551,13 +7517,6 @@ onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" -oniguruma-to-js@0.4.3: - version "0.4.3" - resolved "https://registry.yarnpkg.com/oniguruma-to-js/-/oniguruma-to-js-0.4.3.tgz#8d899714c21f5c7d59a3c0008ca50e848086d740" - integrity sha512-X0jWUcAlxORhOqqBREgPMgnshB7ZGYszBNspP+tS9hPD3l13CdaXcHbgImoHUHlrvGx/7AvFEkTRhAGYh+jzjQ== - dependencies: - regex "^4.3.2" - open@^8.0.9, open@^8.4.0: version "8.4.2" resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9" @@ -8595,13 +8554,12 @@ react-dev-utils@^12.0.1: strip-ansi "^6.0.1" text-table "^0.2.0" -react-dom@^18.0.0: - version "18.3.1" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.3.1.tgz#c2265d79511b57d479b3dd3fdfa51536494c5cb4" - integrity sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw== +react-dom@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-19.0.0.tgz#43446f1f01c65a4cd7f7588083e686a6726cfb57" + integrity sha512-4GV5sHFG0e/0AD4X+ySy6UJd3jVl1iNsNHdpad0qhABJ11twS3TTBnseqsKurKcsNqCEFeGL3uLpVChpIO3QfQ== dependencies: - loose-envify "^1.1.0" - scheduler "^0.23.2" + scheduler "^0.25.0" react-error-overlay@^6.0.11: version "6.0.11" @@ -8692,12 +8650,10 @@ react-router@5.3.4, react-router@^5.3.4: tiny-invariant "^1.0.2" tiny-warning "^1.0.0" -react@^18.0.0: - version "18.3.1" - resolved "https://registry.yarnpkg.com/react/-/react-18.3.1.tgz#49ab892009c53933625bd16b2533fc754cab2891" - integrity sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ== - dependencies: - loose-envify "^1.1.0" +react@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/react/-/react-19.0.0.tgz#6e1969251b9f108870aa4bff37a0ce9ddfaaabdd" + integrity sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ== readable-stream@^2.0.1: version "2.3.8" @@ -8776,11 +8732,6 @@ regenerator-transform@^0.15.2: dependencies: "@babel/runtime" "^7.8.4" -regex@^4.3.2: - version "4.3.3" - resolved "https://registry.yarnpkg.com/regex/-/regex-4.3.3.tgz#8cda73ccbdfa7c5691881d02f9bb142dba9daa6a" - integrity sha512-r/AadFO7owAq1QJVeZ/nq9jNS1vyZt+6t1p/E59B56Rn2GCya+gr1KSyOzNL/er+r+B7phv5jG2xU2Nz1YkmJg== - regexpu-core@^6.1.1: version "6.1.1" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-6.1.1.tgz#b469b245594cb2d088ceebc6369dceb8c00becac" @@ -9066,21 +9017,17 @@ safe-buffer@5.2.1, safe-buffer@>=5.1.0, safe-buffer@^5.1.0, safe-buffer@~5.2.0: resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -sass-loader@^10.1.1: - version "10.5.2" - resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-10.5.2.tgz#1ca30534fff296417b853c7597ca3b0bbe8c37d0" - integrity sha512-vMUoSNOUKJILHpcNCCyD23X34gve1TS7Rjd9uXHeKqhvBG39x6XbswFDtpbTElj6XdMFezoWhkh5vtKudf2cgQ== +sass-loader@^16.0.2: + version "16.0.4" + resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-16.0.4.tgz#5c2afb755fbc0a45a004369efa11579518a39a45" + integrity sha512-LavLbgbBGUt3wCiYzhuLLu65+fWXaXLmq7YxivLhEqmiupCFZ5sKUAipK3do6V80YSU0jvSxNhEdT13IXNr3rg== dependencies: - klona "^2.0.4" - loader-utils "^2.0.0" neo-async "^2.6.2" - schema-utils "^3.0.0" - semver "^7.3.2" -sass@^1.81.0: - version "1.81.0" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.81.0.tgz#a9010c0599867909dfdbad057e4a6fbdd5eec941" - integrity sha512-Q4fOxRfhmv3sqCLoGfvrC9pRV8btc0UtqL9mN6Yrv6Qi9ScL55CVH1vlPP863ISLEEMNLLuu9P+enCeGHlnzhA== +sass@^1.82.0: + version "1.82.0" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.82.0.tgz#30da277af3d0fa6042e9ceabd0d984ed6d07df70" + integrity sha512-j4GMCTa8elGyN9A7x7bEglx0VgSpNUG4W4wNedQ33wSMdnkqQCT8HTwOaVSV4e6yQovcu/3Oc4coJP/l0xhL2Q== dependencies: chokidar "^4.0.0" immutable "^5.0.2" @@ -9093,12 +9040,10 @@ sax@^1.2.4: resolved "https://registry.yarnpkg.com/sax/-/sax-1.4.1.tgz#44cc8988377f126304d3b3fc1010c733b929ef0f" integrity sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg== -scheduler@^0.23.2: - version "0.23.2" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.2.tgz#414ba64a3b282892e944cf2108ecc078d115cdc3" - integrity sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ== - dependencies: - loose-envify "^1.1.0" +scheduler@^0.25.0: + version "0.25.0" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.25.0.tgz#336cd9768e8cceebf52d3c80e3dcf5de23e7e015" + integrity sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA== schema-utils@2.7.0: version "2.7.0" @@ -9288,18 +9233,6 @@ shelljs@^0.8.5: interpret "^1.0.0" rechoir "^0.6.2" -shiki@^1.16.2: - version "1.22.0" - resolved "https://registry.yarnpkg.com/shiki/-/shiki-1.22.0.tgz#45d1dfff0e03a598af70e2ec8592f14ef07827b4" - integrity sha512-/t5LlhNs+UOKQCYBtl5ZsH/Vclz73GIqT2yQsCBygr8L/ppTdmpL4w3kPLoZJbMKVWtoG77Ue1feOjZfDxvMkw== - dependencies: - "@shikijs/core" "1.22.0" - "@shikijs/engine-javascript" "1.22.0" - "@shikijs/engine-oniguruma" "1.22.0" - "@shikijs/types" "1.22.0" - "@shikijs/vscode-textmate" "^9.3.0" - "@types/hast" "^3.0.4" - side-channel@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" @@ -9758,28 +9691,28 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" -typedoc-plugin-frontmatter@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/typedoc-plugin-frontmatter/-/typedoc-plugin-frontmatter-1.0.0.tgz#908ccbfb27587a64f259c0250c5992497cb59e48" - integrity sha512-Mqn96+RjUjPUz/42H8MOp/8eOKjE5MVIgZRFDGmSI2YuggnMZSfh5MMpvd6ykjNTpq7gV5D2iwjqLt8nYRg9rg== +typedoc-plugin-frontmatter@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/typedoc-plugin-frontmatter/-/typedoc-plugin-frontmatter-1.1.0.tgz#fe0a277261f491ac5af1ded6ac2242a720effda4" + integrity sha512-4PW4V2xDY2hw+fEWmg7g6FBCIWZdiEE+tzjJ5K4JhurvJ0t0Vp0IE/0nuHGGIZVtV5WxPIed+GpiH1uZrpDquQ== dependencies: yaml "^2.3.4" -typedoc-plugin-markdown@^4.2.10: - version "4.2.10" - resolved "https://registry.yarnpkg.com/typedoc-plugin-markdown/-/typedoc-plugin-markdown-4.2.10.tgz#cd386e9f2dec122cae79e487983811d92ac37161" - integrity sha512-PLX3pc1/7z13UJm4TDE9vo9jWGcClFUErXXtd5LdnoLjV6mynPpqZLU992DwMGFSRqJFZeKbVyqlNNeNHnk2tQ== +typedoc-plugin-markdown@^4.3.2: + version "4.3.2" + resolved "https://registry.yarnpkg.com/typedoc-plugin-markdown/-/typedoc-plugin-markdown-4.3.2.tgz#85d38bc0109a3fbf2e3fad2ea78e6dd8e812e5a2" + integrity sha512-hCF3V0axzbzGDYFW21XigWIJQBOJ2ZRVWWs7X+e62ew/pXnvz7iKF/zVdkBm3w8Mk4bmXWp/FT0IF4Zn9uBRww== -typedoc@^0.26.11: - version "0.26.11" - resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.26.11.tgz#124b43a5637b7f3237b8c721691b44738c5c9dc9" - integrity sha512-sFEgRRtrcDl2FxVP58Ze++ZK2UQAEvtvvH8rRlig1Ja3o7dDaMHmaBfvJmdGnNEFaLTpQsN8dpvZaTqJSu/Ugw== +typedoc@^0.27.4: + version "0.27.4" + resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.27.4.tgz#45be59ccf9383d3c52f4a96636d823345c6ff0e6" + integrity sha512-wXPQs1AYC2Crk+1XFpNuutLIkNWleokZf1UNf/X8w9KsMnirkvT+LzxTXDvfF6ug3TSLf3Xu5ZXRKGfoXPX7IA== dependencies: + "@gerrit0/mini-shiki" "^1.24.0" lunr "^2.3.9" markdown-it "^14.1.0" minimatch "^9.0.5" - shiki "^1.16.2" - yaml "^2.5.1" + yaml "^2.6.1" typescript@^5.6.3: version "5.7.2" @@ -10360,10 +10293,10 @@ yaml@^1.7.2: resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== -yaml@^2.3.4, yaml@^2.5.1: - version "2.5.1" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.5.1.tgz#c9772aacf62cb7494a95b0c4f1fb065b563db130" - integrity sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q== +yaml@^2.3.4, yaml@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.6.1.tgz#42f2b1ba89203f374609572d5349fb8686500773" + integrity sha512-7r0XPzioN/Q9kXBro/XPnA6kznR73DHq+GXh5ON7ZozRO6aMjbmiBuKste2wslTFkC5d1dw0GooOCepZXJ2SAg== yocto-queue@^0.1.0: version "0.1.0" @@ -10375,7 +10308,7 @@ yocto-queue@^1.0.0: resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-1.1.1.tgz#fef65ce3ac9f8a32ceac5a634f74e17e5b232110" integrity sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g== -zwitch@^2.0.0, zwitch@^2.0.4: +zwitch@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/zwitch/-/zwitch-2.0.4.tgz#c827d4b0acb76fc3e685a4c6ec2902d51070e9d7" integrity sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A== diff --git a/engine/cache/manager.go b/engine/cache/manager.go index b0242c1b0b..2b515018b8 100644 --- a/engine/cache/manager.go +++ b/engine/cache/manager.go @@ -5,11 +5,13 @@ import ( "errors" "fmt" "net/http" + "os" "strings" "sync" "time" "github.com/containerd/containerd/content" + "github.com/dagger/dagger/engine/distconsts" "github.com/moby/buildkit/cache" cacheconfig "github.com/moby/buildkit/cache/config" remotecache "github.com/moby/buildkit/cache/remotecache/v1" @@ -53,6 +55,16 @@ const ( backgroundImportTimeout = 10 * time.Minute ) +var contentStoreLayers = map[string]struct{}{} + +func init() { + layerInfo, _ := os.ReadDir(distconsts.EngineContainerBuiltinContentDir + "/blobs/sha256/") + + for _, li := range layerInfo { + contentStoreLayers[li.Name()] = struct{}{} + } +} + func NewManager(ctx context.Context, managerConfig ManagerConfig) (Manager, error) { localCache := solver.NewCacheManager(ctx, LocalCacheID, managerConfig.KeyStore, managerConfig.ResultStore) m := &manager{ @@ -298,6 +310,9 @@ func (m *manager) Export(ctx context.Context) error { if _, ok := pushedLayers[layer.Digest.String()]; ok { continue } + if _, ok := contentStoreLayers[layer.Digest.String()]; ok { + continue + } if err := m.pushLayer(ctx, layer, remote.Provider); err != nil { return err } diff --git a/engine/client/drivers/docker.go b/engine/client/drivers/docker.go index a996693bb5..00b654f220 100644 --- a/engine/client/drivers/docker.go +++ b/engine/client/drivers/docker.go @@ -10,6 +10,7 @@ import ( "os" "os/exec" "path/filepath" + "strconv" "strings" "dagger.io/dagger/telemetry" @@ -34,6 +35,13 @@ func init() { register("docker-image", &dockerDriver{}) } +// shouldCleanupEngines returns true if old engines should be cleaned up +func shouldCleanupEngines() bool { + val := os.Getenv("DAGGER_LEAVE_OLD_ENGINE") + b, _ := strconv.ParseBool(val) + return !b +} + // dockerDriver creates and manages a container, then connects to it type dockerDriver struct{} @@ -185,6 +193,9 @@ func resolveImageID(imageRef string) (string, error) { } func garbageCollectEngines(ctx context.Context, log *slog.Logger, engines []string) { + if !shouldCleanupEngines() { + return + } for _, engine := range engines { if engine == "" { continue diff --git a/go.mod b/go.mod index 615d8f60bf..9bf689b82f 100644 --- a/go.mod +++ b/go.mod @@ -93,15 +93,15 @@ require ( go.opentelemetry.io/otel/sdk/metric v1.27.0 go.opentelemetry.io/otel/trace v1.27.0 go.opentelemetry.io/proto/otlp v1.3.1 - golang.org/x/crypto v0.28.0 + golang.org/x/crypto v0.31.0 golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 golang.org/x/mod v0.21.0 golang.org/x/net v0.30.0 golang.org/x/oauth2 v0.23.0 - golang.org/x/sync v0.9.0 - golang.org/x/sys v0.26.0 - golang.org/x/term v0.25.0 - golang.org/x/text v0.19.0 + golang.org/x/sync v0.10.0 + golang.org/x/sys v0.28.0 + golang.org/x/term v0.27.0 + golang.org/x/text v0.21.0 golang.org/x/tools v0.26.0 google.golang.org/grpc v1.68.0 google.golang.org/protobuf v1.35.2 @@ -273,8 +273,8 @@ require ( ) require ( - dagger.io/dagger v0.14.0 - github.com/dagger/dagger/engine/distconsts v0.14.0 + dagger.io/dagger v0.15.0 + github.com/dagger/dagger/engine/distconsts v0.15.0 github.com/dustin/go-humanize v1.0.1 resenje.org/singleflight v0.4.3 ) diff --git a/go.sum b/go.sum index c0659dbcd2..15596af419 100644 --- a/go.sum +++ b/go.sum @@ -674,8 +674,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= -golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= +golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= +golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk= golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY= @@ -722,8 +722,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ= -golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -754,16 +754,16 @@ golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= -golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= -golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24= -golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M= +golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q= +golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -772,8 +772,8 @@ golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= -golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= diff --git a/helm/.dagger/go.mod b/helm/.dagger/go.mod index 149e66c50e..45c5b20e68 100644 --- a/helm/.dagger/go.mod +++ b/helm/.dagger/go.mod @@ -3,48 +3,51 @@ module dagger/helm go 1.23.0 require ( - github.com/99designs/gqlgen v0.17.55 - github.com/Khan/genqlient v0.7.0 github.com/moby/buildkit v0.16.0 - github.com/vektah/gqlparser/v2 v2.5.17 - go.opentelemetry.io/otel v1.28.0 - go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 - go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 - go.opentelemetry.io/otel/log v0.3.0 - go.opentelemetry.io/otel/sdk v1.27.0 - go.opentelemetry.io/otel/sdk/log v0.3.0 - go.opentelemetry.io/otel/trace v1.28.0 - go.opentelemetry.io/proto/otlp v1.3.1 - golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa golang.org/x/mod v0.20.0 - golang.org/x/sync v0.8.0 - google.golang.org/grpc v1.65.0 helm.sh/helm/v3 v3.16.0 sigs.k8s.io/yaml v1.4.0 ) require ( github.com/Masterminds/semver/v3 v3.3.0 // indirect + github.com/stretchr/testify v1.10.0 // indirect +) + +require ( + github.com/99designs/gqlgen v0.17.57 + github.com/Khan/genqlient v0.7.0 github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/google/uuid v1.6.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect - github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect github.com/sosodev/duration v1.3.1 // indirect + github.com/vektah/gqlparser/v2 v2.5.19 + go.opentelemetry.io/otel v1.28.0 + go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 + go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 + go.opentelemetry.io/otel/log v0.3.0 go.opentelemetry.io/otel/metric v1.28.0 + go.opentelemetry.io/otel/sdk v1.27.0 + go.opentelemetry.io/otel/sdk/log v0.3.0 go.opentelemetry.io/otel/sdk/metric v1.27.0 + go.opentelemetry.io/otel/trace v1.28.0 + go.opentelemetry.io/proto/otlp v1.3.1 + golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa golang.org/x/net v0.29.0 // indirect + golang.org/x/sync v0.9.0 golang.org/x/sys v0.26.0 // indirect - golang.org/x/text v0.18.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect - google.golang.org/protobuf v1.34.2 // indirect + golang.org/x/text v0.19.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect + google.golang.org/grpc v1.68.0 + google.golang.org/protobuf v1.35.2 // indirect ) replace go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc => go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 diff --git a/helm/.dagger/go.sum b/helm/.dagger/go.sum index 304a861c97..0dbd53264a 100644 --- a/helm/.dagger/go.sum +++ b/helm/.dagger/go.sum @@ -1,5 +1,5 @@ -github.com/99designs/gqlgen v0.17.55 h1:3vzrNWYyzSZjGDFo68e5j9sSauLxfKvLp+6ioRokVtM= -github.com/99designs/gqlgen v0.17.55/go.mod h1:3Bq768f8hgVPGZxL8aY9MaYmbxa6llPM/qu1IGH1EJo= +github.com/99designs/gqlgen v0.17.57 h1:Ak4p60BRq6QibxY0lEc0JnQhDurfhxA67sp02lMjmPc= +github.com/99designs/gqlgen v0.17.57/go.mod h1:Jx61hzOSTcR4VJy/HFIgXiQ5rJ0Ypw8DxWLjbYDAUw0= github.com/Khan/genqlient v0.7.0 h1:GZ1meyRnzcDTK48EjqB8t3bcfYvHArCUUvgOwpz1D4w= github.com/Khan/genqlient v0.7.0/go.mod h1:HNyy3wZvuYwmW3Y7mkoQLZsa/R5n5yIRajS1kPBvSFM= github.com/Masterminds/semver/v3 v3.3.0 h1:B8LGeaivUe71a5qox1ICM/JLl0NqZSW5CHyL+hmvYS0= @@ -8,8 +8,6 @@ github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNg github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -17,6 +15,8 @@ github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= @@ -24,30 +24,24 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 h1:asbCHRVmodnJTuQ3qamDwqVOIjwqUPTYmYuemVOx+Ys= github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0/go.mod h1:ggCgvZ2r7uOoQjOyu2Y1NhHmEPPzzuhWgcza5M1Ji1I= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/moby/buildkit v0.16.0 h1:wOVBj1o5YNVad/txPQNXUXdelm7Hs/i0PUFjzbK0VKE= github.com/moby/buildkit v0.16.0/go.mod h1:Xqx/5GlrqE1yIRORk0NSCVDFpQAU1WjlT6KHYZdisIQ= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= -github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8= -github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= +github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= +github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= github.com/sosodev/duration v1.3.1 h1:qtHBDMQ6lvMQsL15g4aopM4HEfOaYuhWBw3NPTtlqq4= github.com/sosodev/duration v1.3.1/go.mod h1:RQIBBX0+fMLc/D9+Jb/fwvVmo0eZvDDEERAikUR6SDg= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/vektah/gqlparser/v2 v2.5.17 h1:9At7WblLV7/36nulgekUgIaqHZWn5hxqluxrxGUhOmI= -github.com/vektah/gqlparser/v2 v2.5.17/go.mod h1:1lz1OeCqgQbQepsGxPVywrjdBHW2T08PUS3pJqepRww= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/vektah/gqlparser/v2 v2.5.19 h1:bhCPCX1D4WWzCDvkPl4+TP1N8/kLrWnp43egplt7iSg= +github.com/vektah/gqlparser/v2 v2.5.19/go.mod h1:y7kvl5bBlDeuWIvLtA9849ncyvx6/lj06RsMrEjVy3U= go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 h1:oM0GTNKGlc5qHctWeIGTVyda4iFFalOzMZ3Ehj5rwB4= @@ -86,26 +80,23 @@ golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= -golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= -golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ= +golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= -golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= -google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 h1:wKguEg1hsxI2/L3hUYrpo1RVi48K+uTyzKqprwLXsb8= -google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142/go.mod h1:d6be+8HhtEtucleCbxpPW9PA9XwISACu8nvpPqF0BVo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 h1:e7S5W7MGGLaSu8j3YjdezkZ+m1/Nm0uRVRMEMGk26Xs= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= -google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= -google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= -google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= -google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= +golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 h1:hjSy6tcFQZ171igDaN5QHOw2n6vx40juYbC/x67CEhc= +google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:qpvKtACPCQhAdu3PyQgV4l3LMXZEtft7y8QcarRsp9I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/grpc v1.68.0 h1:aHQeeJbo8zAkAa3pRzrVjZlbz6uSfeOXlJNQM0RAbz0= +google.golang.org/grpc v1.68.0/go.mod h1:fmSPC5AsjSBCK54MyHRx48kpOti1/jRfOlwEWywNjWA= +google.golang.org/protobuf v1.35.2 h1:8Ar7bF+apOIoThw1EdZl0p1oWvMqTHmpA2fRTyZO8io= +google.golang.org/protobuf v1.35.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= helm.sh/helm/v3 v3.16.0 h1:Si2uwaRq3nxT/EiR4U1sWJE2dysLKQgsrd0agL3dsH0= diff --git a/helm/.dagger/main.go b/helm/.dagger/main.go index 12773ec781..8dd7e2cfdf 100644 --- a/helm/.dagger/main.go +++ b/helm/.dagger/main.go @@ -149,8 +149,12 @@ func (h *Helm) Publish( // +optional // +default="https://github.com/dagger/dagger.git" gitRepoSource string, + // +optional githubToken *dagger.Secret, + // +optional + discordWebhook *dagger.Secret, + // Test as much as possible without actually publishing anything // +optional dryRun bool, @@ -189,6 +193,13 @@ func (h *Helm) Publish( }); err != nil { return err } + + if err := dag.Releaser().Notify(ctx, gitRepoSource, "helm/chart/"+version, "โ˜ธ๏ธ Helm Chart", dagger.ReleaserNotifyOpts{ + DiscordWebhook: discordWebhook, + DryRun: dryRun, + }); err != nil { + return err + } } return nil } diff --git a/helm/dagger.json b/helm/dagger.json index 5efe0781bd..ed7eb1a3d4 100644 --- a/helm/dagger.json +++ b/helm/dagger.json @@ -1,12 +1,11 @@ { "name": "helm", - "engineVersion": "v0.14.0", + "engineVersion": "v0.15.0", "sdk": "go", "dependencies": [ { "name": "dagger-cli", - "source": "../cmd/dagger", - "pin": "" + "source": "../cmd/dagger" }, { "name": "k3s", @@ -15,13 +14,11 @@ }, { "name": "releaser", - "source": "../releaser", - "pin": "" + "source": "../releaser" }, { "name": "wolfi", - "source": "../modules/wolfi", - "pin": "" + "source": "../modules/wolfi" } ], "source": ".dagger" diff --git a/helm/dagger/.changes/v0.15.0.md b/helm/dagger/.changes/v0.15.0.md new file mode 100644 index 0000000000..335312c2d0 --- /dev/null +++ b/helm/dagger/.changes/v0.15.0.md @@ -0,0 +1,9 @@ +## v0.15.0 - 2024-12-11 + +### Dependencies +- Bump Engine to v0.15.0 by @jedevc in https://github.com/dagger/dagger/pull/9158 + +### What to do next? +- Read the [documentation](https://docs.dagger.io) +- Join our [Discord server](https://discord.gg/dagger-io) +- Follow us on [Twitter](https://twitter.com/dagger_io) diff --git a/helm/dagger/.changes/v0.15.1.md b/helm/dagger/.changes/v0.15.1.md new file mode 100644 index 0000000000..176f7eaa95 --- /dev/null +++ b/helm/dagger/.changes/v0.15.1.md @@ -0,0 +1,9 @@ +## v0.15.1 - 2024-12-12 + +### Dependencies +- Bump Engine to v0.15.1 by @cwlbraa in https://github.com/dagger/dagger/pull/9183 + +### What to do next? +- Read the [documentation](https://docs.dagger.io) +- Join our [Discord server](https://discord.gg/dagger-io) +- Follow us on [Twitter](https://twitter.com/dagger_io) diff --git a/helm/dagger/CHANGELOG.md b/helm/dagger/CHANGELOG.md index 651e2ba044..8eba012310 100644 --- a/helm/dagger/CHANGELOG.md +++ b/helm/dagger/CHANGELOG.md @@ -6,6 +6,26 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), and is generated by [Changie](https://github.com/miniscruff/changie). +## v0.15.1 - 2024-12-12 + +### Dependencies +- Bump Engine to v0.15.1 by @cwlbraa in https://github.com/dagger/dagger/pull/9183 + +### What to do next? +- Read the [documentation](https://docs.dagger.io) +- Join our [Discord server](https://discord.gg/dagger-io) +- Follow us on [Twitter](https://twitter.com/dagger_io) + +## v0.15.0 - 2024-12-11 + +### Dependencies +- Bump Engine to v0.15.0 by @jedevc in https://github.com/dagger/dagger/pull/9158 + +### What to do next? +- Read the [documentation](https://docs.dagger.io) +- Join our [Discord server](https://discord.gg/dagger-io) +- Follow us on [Twitter](https://twitter.com/dagger_io) + ## v0.14.0 - 2024-11-08 diff --git a/helm/dagger/Chart.yaml b/helm/dagger/Chart.yaml index 29aee2f466..f994e31b53 100644 --- a/helm/dagger/Chart.yaml +++ b/helm/dagger/Chart.yaml @@ -2,4 +2,4 @@ apiVersion: v2 description: Dagger Helm chart name: dagger-helm type: application -version: 0.14.0 +version: 0.15.1 diff --git a/modules/alpine/go.mod b/modules/alpine/go.mod index ff8dc35445..5647e821a2 100644 --- a/modules/alpine/go.mod +++ b/modules/alpine/go.mod @@ -4,9 +4,9 @@ go 1.23.1 require ( chainguard.dev/apko v0.19.2 - github.com/99designs/gqlgen v0.17.49 + github.com/99designs/gqlgen v0.17.55 github.com/Khan/genqlient v0.7.0 - github.com/vektah/gqlparser/v2 v2.5.16 + github.com/vektah/gqlparser/v2 v2.5.17 go.opentelemetry.io/otel v1.30.0 go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 @@ -19,7 +19,7 @@ require ( go.opentelemetry.io/proto/otlp v1.3.1 golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa golang.org/x/mod v0.20.0 - golang.org/x/sync v0.8.0 + golang.org/x/sync v0.10.0 google.golang.org/grpc v1.66.2 ) @@ -71,14 +71,17 @@ require ( go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.29.0 // indirect - go.opentelemetry.io/otel/metric v1.30.0 // indirect + go.opentelemetry.io/otel/metric v1.30.0 + go.opentelemetry.io/otel/sdk/metric v1.27.0 go.step.sm/crypto v0.52.0 // indirect - golang.org/x/crypto v0.27.0 // indirect + golang.org/x/crypto v0.31.0 // indirect golang.org/x/net v0.29.0 // indirect golang.org/x/oauth2 v0.23.0 // indirect - golang.org/x/sys v0.25.0 // indirect - golang.org/x/text v0.18.0 // indirect + golang.org/x/sys v0.28.0 // indirect + golang.org/x/text v0.21.0 // indirect golang.org/x/time v0.6.0 // indirect google.golang.org/api v0.198.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240827150818-7e3bb234dfed // indirect diff --git a/modules/alpine/go.sum b/modules/alpine/go.sum index 61ebffc116..a66a423bda 100644 --- a/modules/alpine/go.sum +++ b/modules/alpine/go.sum @@ -13,8 +13,8 @@ cloud.google.com/go/compute/metadata v0.5.2 h1:UxK4uu/Tn+I3p2dYWTfiX4wva7aYlKixA cloud.google.com/go/compute/metadata v0.5.2/go.mod h1:C66sj2AluDcIqakBq/M8lw8/ybHgOZqin2obFxa/E5k= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= -github.com/99designs/gqlgen v0.17.49 h1:b3hNGexHd33fBSAd4NDT/c3NCcQzcAVkknhN9ym36YQ= -github.com/99designs/gqlgen v0.17.49/go.mod h1:tC8YFVZMed81x7UJ7ORUwXF4Kn6SXuucFqQBhN8+BU0= +github.com/99designs/gqlgen v0.17.55 h1:3vzrNWYyzSZjGDFo68e5j9sSauLxfKvLp+6ioRokVtM= +github.com/99designs/gqlgen v0.17.55/go.mod h1:3Bq768f8hgVPGZxL8aY9MaYmbxa6llPM/qu1IGH1EJo= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/Khan/genqlient v0.7.0 h1:GZ1meyRnzcDTK48EjqB8t3bcfYvHArCUUvgOwpz1D4w= github.com/Khan/genqlient v0.7.0/go.mod h1:HNyy3wZvuYwmW3Y7mkoQLZsa/R5n5yIRajS1kPBvSFM= @@ -187,8 +187,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/vektah/gqlparser/v2 v2.5.16 h1:1gcmLTvs3JLKXckwCwlUagVn/IlV2bwqle0vJ0vy5p8= -github.com/vektah/gqlparser/v2 v2.5.16/go.mod h1:1lz1OeCqgQbQepsGxPVywrjdBHW2T08PUS3pJqepRww= +github.com/vektah/gqlparser/v2 v2.5.17 h1:9At7WblLV7/36nulgekUgIaqHZWn5hxqluxrxGUhOmI= +github.com/vektah/gqlparser/v2 v2.5.17/go.mod h1:1lz1OeCqgQbQepsGxPVywrjdBHW2T08PUS3pJqepRww= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= @@ -206,6 +206,10 @@ go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-2024051809000 go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88/go.mod h1:JGG8ebaMO5nXOPnvKEl+DiA4MGwFjCbjsxT1WHIEBPY= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 h1:ccBrA8nCY5mM0y5uO7FT0ze4S0TuFcWdDB2FxGMTjkI= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0/go.mod h1:/9pb6634zi2Lk8LYg9Q0X8Ar6jka4dkFOylBLbVQPCE= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 h1:bFgvUr3/O4PHj3VQcFEuYKvRZJX1SJDQ+11JXuSB3/w= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0/go.mod h1:xJntEd2KL6Qdg5lwp97HMLQDVeAhrYxmzFseAMDPQ8I= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 h1:CIHWikMsN3wO+wq1Tp5VGdVRTcON+DmOJSfDjXypKOc= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0/go.mod h1:TNupZ6cxqyFEpLXAZW7On+mLFL0/g0TE3unIYL91xWc= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.29.0 h1:dIIDULZJpgdiHz5tXrTgKIMLkus6jEFa7x5SOKcyR7E= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.29.0/go.mod h1:jlRVBe7+Z1wyxFSUs48L6OBQZ5JwH2Hg/Vbl+t9rAgI= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.29.0 h1:nSiV3s7wiCam610XcLbYOmMfJxB9gO4uK3Xgv5gmTgg= @@ -220,6 +224,8 @@ go.opentelemetry.io/otel/sdk v1.29.0 h1:vkqKjk7gwhS8VaWb0POZKmIEDimRCMsopNYnriHy go.opentelemetry.io/otel/sdk v1.29.0/go.mod h1:pM8Dx5WKnvxLCb+8lG1PRNIDxu9g9b9g59Qr7hfAAok= go.opentelemetry.io/otel/sdk/log v0.3.0 h1:GEjJ8iftz2l+XO1GF2856r7yYVh74URiF9JMcAacr5U= go.opentelemetry.io/otel/sdk/log v0.3.0/go.mod h1:BwCxtmux6ACLuys1wlbc0+vGBd+xytjmjajwqqIul2g= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= go.opentelemetry.io/otel/trace v1.30.0 h1:7UBkkYzeg3C7kQX8VAidWh2biiQbtAKjyIML8dQ9wmc= go.opentelemetry.io/otel/trace v1.30.0/go.mod h1:5EyKqTzzmyqB9bwtCCq6pDLktPK6fmGf/Dph+8VI02o= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= @@ -237,8 +243,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= -golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A= -golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= +golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= +golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa h1:ELnwvuAXPNtPk1TJRuGkI9fDTwym6AYBu0qzT8AcHdI= golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa/go.mod h1:akd2r19cwCdwSwWeIdzYQGa/EZZyqcOdwWiwj5L5eKQ= @@ -278,8 +284,8 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= -golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -294,23 +300,23 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= -golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= -golang.org/x/term v0.24.0 h1:Mh5cbb+Zk2hqqXNO7S1iTjEphVL+jb8ZWaqh/g+JWkM= -golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8= +golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q= +golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= -golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= diff --git a/modules/compatcheck/go.mod b/modules/compatcheck/go.mod index cc022115a3..810a0df664 100644 --- a/modules/compatcheck/go.mod +++ b/modules/compatcheck/go.mod @@ -8,7 +8,7 @@ require ( github.com/stretchr/testify v1.9.0 github.com/tidwall/gjson v1.17.3 golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 - golang.org/x/mod v0.19.0 + golang.org/x/mod v0.20.0 ) require ( @@ -19,7 +19,7 @@ require ( ) require ( - github.com/99designs/gqlgen v0.17.49 + github.com/99designs/gqlgen v0.17.55 github.com/Khan/genqlient v0.7.0 github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/go-logr/logr v1.4.2 // indirect @@ -27,34 +27,44 @@ require ( github.com/go-openapi/jsonpointer v0.19.5 // indirect github.com/go-openapi/swag v0.21.1 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/sosodev/duration v1.3.1 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.1 // indirect - github.com/vektah/gqlparser/v2 v2.5.16 + github.com/vektah/gqlparser/v2 v2.5.17 github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect go.opentelemetry.io/otel v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240524160931-7c5e64cccc16 go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 go.opentelemetry.io/otel/log v0.3.0 - go.opentelemetry.io/otel/metric v1.27.0 // indirect + go.opentelemetry.io/otel/metric v1.27.0 go.opentelemetry.io/otel/sdk v1.27.0 go.opentelemetry.io/otel/sdk/log v0.3.0 + go.opentelemetry.io/otel/sdk/metric v1.27.0 go.opentelemetry.io/otel/trace v1.27.0 go.opentelemetry.io/proto/otlp v1.3.1 - golang.org/x/net v0.26.0 // indirect - golang.org/x/sync v0.7.0 - golang.org/x/sys v0.22.0 // indirect - golang.org/x/text v0.16.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240521202816-d264139d666e // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240521202816-d264139d666e // indirect - google.golang.org/grpc v1.64.0 + golang.org/x/net v0.29.0 // indirect + golang.org/x/sync v0.10.0 + golang.org/x/sys v0.28.0 // indirect + golang.org/x/text v0.21.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect + google.golang.org/grpc v1.65.0 google.golang.org/protobuf v1.34.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect ) +replace go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc => go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 + +replace go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp => go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 + +replace go.opentelemetry.io/otel/log => go.opentelemetry.io/otel/log v0.3.0 + +replace go.opentelemetry.io/otel/sdk/log => go.opentelemetry.io/otel/sdk/log v0.3.0 diff --git a/modules/compatcheck/go.sum b/modules/compatcheck/go.sum index 46476a5bd1..c1b6d4c4ec 100644 --- a/modules/compatcheck/go.sum +++ b/modules/compatcheck/go.sum @@ -1,5 +1,5 @@ -github.com/99designs/gqlgen v0.17.49 h1:b3hNGexHd33fBSAd4NDT/c3NCcQzcAVkknhN9ym36YQ= -github.com/99designs/gqlgen v0.17.49/go.mod h1:tC8YFVZMed81x7UJ7ORUwXF4Kn6SXuucFqQBhN8+BU0= +github.com/99designs/gqlgen v0.17.55 h1:3vzrNWYyzSZjGDFo68e5j9sSauLxfKvLp+6ioRokVtM= +github.com/99designs/gqlgen v0.17.55/go.mod h1:3Bq768f8hgVPGZxL8aY9MaYmbxa6llPM/qu1IGH1EJo= github.com/Khan/genqlient v0.7.0 h1:GZ1meyRnzcDTK48EjqB8t3bcfYvHArCUUvgOwpz1D4w= github.com/Khan/genqlient v0.7.0/go.mod h1:HNyy3wZvuYwmW3Y7mkoQLZsa/R5n5yIRajS1kPBvSFM= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= @@ -24,8 +24,8 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 h1:asbCHRVmodnJTuQ3qamDwqVOIjwqUPTYmYuemVOx+Ys= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0/go.mod h1:ggCgvZ2r7uOoQjOyu2Y1NhHmEPPzzuhWgcza5M1Ji1I= github.com/josephburnett/jd/v2 v2.0.0-20240818191833-6125a15c637a h1:ntNBg8gpF1HRYMOL+a0dZPiRDZqYbL3RcErlUe/A3AA= github.com/josephburnett/jd/v2 v2.0.0-20240818191833-6125a15c637a/go.mod h1:yo16rJLdw5ZSMCujd1aGu6HwfLifPrD/8fsqo3FO7ik= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= @@ -66,16 +66,20 @@ github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JT github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= -github.com/vektah/gqlparser/v2 v2.5.16 h1:1gcmLTvs3JLKXckwCwlUagVn/IlV2bwqle0vJ0vy5p8= -github.com/vektah/gqlparser/v2 v2.5.16/go.mod h1:1lz1OeCqgQbQepsGxPVywrjdBHW2T08PUS3pJqepRww= +github.com/vektah/gqlparser/v2 v2.5.17 h1:9At7WblLV7/36nulgekUgIaqHZWn5hxqluxrxGUhOmI= +github.com/vektah/gqlparser/v2 v2.5.17/go.mod h1:1lz1OeCqgQbQepsGxPVywrjdBHW2T08PUS3pJqepRww= github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 h1:BHyfKlQyqbsFN5p3IfnEUduWvb9is428/nNb5L3U01M= github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= -go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240524160931-7c5e64cccc16 h1:bX+M0VP/ZFleBatrJSIO8g4tvgnsBnC6c6VQt6TgGBU= -go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240524160931-7c5e64cccc16/go.mod h1:umsZbskVobsDEd6+KuZyvJNMYvb+lJCw8s6MZOS9JGc= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 h1:oM0GTNKGlc5qHctWeIGTVyda4iFFalOzMZ3Ehj5rwB4= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88/go.mod h1:JGG8ebaMO5nXOPnvKEl+DiA4MGwFjCbjsxT1WHIEBPY= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 h1:ccBrA8nCY5mM0y5uO7FT0ze4S0TuFcWdDB2FxGMTjkI= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0/go.mod h1:/9pb6634zi2Lk8LYg9Q0X8Ar6jka4dkFOylBLbVQPCE= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 h1:bFgvUr3/O4PHj3VQcFEuYKvRZJX1SJDQ+11JXuSB3/w= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0/go.mod h1:xJntEd2KL6Qdg5lwp97HMLQDVeAhrYxmzFseAMDPQ8I= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 h1:CIHWikMsN3wO+wq1Tp5VGdVRTcON+DmOJSfDjXypKOc= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0/go.mod h1:TNupZ6cxqyFEpLXAZW7On+mLFL0/g0TE3unIYL91xWc= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 h1:R9DE4kQ4k+YtfLI2ULwX82VtNQ2J8yZmA7ZIF/D+7Mc= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0/go.mod h1:OQFyQVrDlbe+R7xrEyDr/2Wr67Ol0hRUgsfA+V5A95s= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= @@ -90,6 +94,8 @@ go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kT go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= go.opentelemetry.io/otel/sdk/log v0.3.0 h1:GEjJ8iftz2l+XO1GF2856r7yYVh74URiF9JMcAacr5U= go.opentelemetry.io/otel/sdk/log v0.3.0/go.mod h1:BwCxtmux6ACLuys1wlbc0+vGBd+xytjmjajwqqIul2g= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= @@ -98,22 +104,22 @@ go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= -golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= -golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= -golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= -google.golang.org/genproto/googleapis/api v0.0.0-20240521202816-d264139d666e h1:SkdGTrROJl2jRGT/Fxv5QUf9jtdKCQh4KQJXbXVLAi0= -google.golang.org/genproto/googleapis/api v0.0.0-20240521202816-d264139d666e/go.mod h1:LweJcLbyVij6rCex8YunD8DYR5VDonap/jYl3ZRxcIU= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240521202816-d264139d666e h1:Elxv5MwEkCI9f5SkoL6afed6NTdxaGoAo39eANBwHL8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240521202816-d264139d666e/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= -google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= -google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= +golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 h1:wKguEg1hsxI2/L3hUYrpo1RVi48K+uTyzKqprwLXsb8= +google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142/go.mod h1:d6be+8HhtEtucleCbxpPW9PA9XwISACu8nvpPqF0BVo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 h1:e7S5W7MGGLaSu8j3YjdezkZ+m1/Nm0uRVRMEMGk26Xs= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= +google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/modules/daggerverse/dagger.json b/modules/daggerverse/dagger.json index 1e384de90d..bea131f35a 100644 --- a/modules/daggerverse/dagger.json +++ b/modules/daggerverse/dagger.json @@ -1,13 +1,17 @@ { "name": "daggerverse", + "engineVersion": "v0.15.0", "sdk": "go", "dependencies": [ { "name": "gh", - "source": "github.com/sagikazarmark/daggerverse/gh", - "pin": "68e9daa611183f5334b4059bac6f4aad62da7a37" + "source": "github.com/sagikazarmark/daggerverse/gh@pull/202/head", + "pin": "f47a52f2809f00b514e536ff7822b5cae8e542a9" + }, + { + "name": "go", + "source": "../go" } ], - "source": ".", - "engineVersion": "v0.13.6" + "source": "." } diff --git a/modules/daggerverse/go.mod b/modules/daggerverse/go.mod index 8151d07bd4..9c6ae2dde6 100644 --- a/modules/daggerverse/go.mod +++ b/modules/daggerverse/go.mod @@ -3,10 +3,10 @@ module dagger/daggerverse go 1.23.2 require ( - github.com/99designs/gqlgen v0.17.55 + github.com/99designs/gqlgen v0.17.57 github.com/Khan/genqlient v0.7.0 github.com/google/go-github/v66 v66.0.0 - github.com/vektah/gqlparser/v2 v2.5.17 + github.com/vektah/gqlparser/v2 v2.5.19 go.opentelemetry.io/otel v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 @@ -18,8 +18,8 @@ require ( go.opentelemetry.io/otel/trace v1.27.0 go.opentelemetry.io/proto/otlp v1.3.1 golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa - golang.org/x/sync v0.8.0 - google.golang.org/grpc v1.65.0 + golang.org/x/sync v0.10.0 + google.golang.org/grpc v1.68.0 ) require github.com/google/go-querystring v1.1.0 // indirect @@ -31,17 +31,18 @@ require ( github.com/google/uuid v1.6.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect github.com/sosodev/duration v1.3.1 // indirect + github.com/stretchr/testify v1.10.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect go.opentelemetry.io/otel/metric v1.27.0 go.opentelemetry.io/otel/sdk/metric v1.27.0 golang.org/x/net v0.29.0 // indirect - golang.org/x/sys v0.26.0 // indirect - golang.org/x/text v0.18.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect - google.golang.org/protobuf v1.34.2 // indirect + golang.org/x/sys v0.28.0 // indirect + golang.org/x/text v0.21.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect + google.golang.org/protobuf v1.35.2 // indirect ) replace go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc => go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 diff --git a/modules/daggerverse/go.sum b/modules/daggerverse/go.sum index 131bd78080..b1c63985c6 100644 --- a/modules/daggerverse/go.sum +++ b/modules/daggerverse/go.sum @@ -1,5 +1,5 @@ -github.com/99designs/gqlgen v0.17.55 h1:3vzrNWYyzSZjGDFo68e5j9sSauLxfKvLp+6ioRokVtM= -github.com/99designs/gqlgen v0.17.55/go.mod h1:3Bq768f8hgVPGZxL8aY9MaYmbxa6llPM/qu1IGH1EJo= +github.com/99designs/gqlgen v0.17.57 h1:Ak4p60BRq6QibxY0lEc0JnQhDurfhxA67sp02lMjmPc= +github.com/99designs/gqlgen v0.17.57/go.mod h1:Jx61hzOSTcR4VJy/HFIgXiQ5rJ0Ypw8DxWLjbYDAUw0= github.com/Khan/genqlient v0.7.0 h1:GZ1meyRnzcDTK48EjqB8t3bcfYvHArCUUvgOwpz1D4w= github.com/Khan/genqlient v0.7.0/go.mod h1:HNyy3wZvuYwmW3Y7mkoQLZsa/R5n5yIRajS1kPBvSFM= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= @@ -13,6 +13,8 @@ github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= @@ -30,10 +32,10 @@ github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= github.com/sosodev/duration v1.3.1 h1:qtHBDMQ6lvMQsL15g4aopM4HEfOaYuhWBw3NPTtlqq4= github.com/sosodev/duration v1.3.1/go.mod h1:RQIBBX0+fMLc/D9+Jb/fwvVmo0eZvDDEERAikUR6SDg= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/vektah/gqlparser/v2 v2.5.17 h1:9At7WblLV7/36nulgekUgIaqHZWn5hxqluxrxGUhOmI= -github.com/vektah/gqlparser/v2 v2.5.17/go.mod h1:1lz1OeCqgQbQepsGxPVywrjdBHW2T08PUS3pJqepRww= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/vektah/gqlparser/v2 v2.5.19 h1:bhCPCX1D4WWzCDvkPl4+TP1N8/kLrWnp43egplt7iSg= +github.com/vektah/gqlparser/v2 v2.5.19/go.mod h1:y7kvl5bBlDeuWIvLtA9849ncyvx6/lj06RsMrEjVy3U= go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 h1:oM0GTNKGlc5qHctWeIGTVyda4iFFalOzMZ3Ehj5rwB4= @@ -70,20 +72,20 @@ golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8 golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= -golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= -golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= -golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= -golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 h1:wKguEg1hsxI2/L3hUYrpo1RVi48K+uTyzKqprwLXsb8= -google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142/go.mod h1:d6be+8HhtEtucleCbxpPW9PA9XwISACu8nvpPqF0BVo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 h1:e7S5W7MGGLaSu8j3YjdezkZ+m1/Nm0uRVRMEMGk26Xs= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= -google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= -google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= -google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= -google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 h1:hjSy6tcFQZ171igDaN5QHOw2n6vx40juYbC/x67CEhc= +google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:qpvKtACPCQhAdu3PyQgV4l3LMXZEtft7y8QcarRsp9I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/grpc v1.68.0 h1:aHQeeJbo8zAkAa3pRzrVjZlbz6uSfeOXlJNQM0RAbz0= +google.golang.org/grpc v1.68.0/go.mod h1:fmSPC5AsjSBCK54MyHRx48kpOti1/jRfOlwEWywNjWA= +google.golang.org/protobuf v1.35.2 h1:8Ar7bF+apOIoThw1EdZl0p1oWvMqTHmpA2fRTyZO8io= +google.golang.org/protobuf v1.35.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/modules/daggerverse/main.go b/modules/daggerverse/main.go index 5b771c4cff..36bd55b0c1 100644 --- a/modules/daggerverse/main.go +++ b/modules/daggerverse/main.go @@ -2,73 +2,222 @@ package main import ( "context" - "dagger/daggerverse/internal/dagger" "fmt" + "strings" "time" "github.com/google/go-github/v66/github" + + "dagger/daggerverse/internal/dagger" ) -type Daggerverse struct{} +type Daggerverse struct { + // +private + Gh *dagger.Gh + // +private + GitHubUser string + // +private + GitHubUserEmail string + // +private + Repo string +} -// Deploy preview environment running Dagger main: dagger call deploy-preview-with-dagger-main --github-token=env:GITHUB_PAT -func (h *Daggerverse) DeployPreviewWithDaggerMain( +func New( ctx context.Context, + // GitHub Personal Access Token which access to dagger/dagger.io repo githubToken *dagger.Secret, -) error { +) (*Daggerverse, error) { token, err := githubToken.Plaintext(ctx) if err != nil { - return err + return nil, err } // get user config from githubToken ghc := github.NewClient(nil).WithAuthToken(token) user, _, err := ghc.Users.Get(ctx, "") if err != nil { - return err + return nil, err + } + repo := "github.com/dagger/dagger.io" + dgvs := &Daggerverse{ + GitHubUser: *user.Name, + Repo: repo, + Gh: dag.Gh(dagger.GhOpts{ + Token: githubToken, + Repo: repo, + }), } emails, _, err := ghc.Users.ListEmails(ctx, &github.ListOptions{}) if err != nil { - return err + return nil, err } + dgvs.GitHubUserEmail = *emails[0].Email - today := time.Now() - date := today.Format("2006-01-02") + return dgvs, nil +} - // clone dagger.io - private repository, requires a github token - repo := "github.com/dagger/dagger.io" - // clone dagger.io - private repository, requires a github token - gh := dag.Gh(dagger.GhOpts{ - Token: githubToken, - Repo: repo, - }) +// Deploy preview environment running Dagger main: dagger call --github-token=env:GITHUB_PAT deploy-preview-with-dagger-main +func (h *Daggerverse) DeployPreviewWithDaggerMain( + ctx context.Context, + target string, + // +optional + githubAssignee string, +) error { // make a change so that a new Daggerverse deployment will be created - daggerio := gh.Repo().Clone( - repo, - dagger.GhRepoCloneOpts{ - Args: []string{"--depth=1"}, - }). - WithNewFile("daggerverse/CREATE_PREVIEW_ENVIRONMENT", today.String()) + daggerio := h.clone(). + WithNewFile("daggerverse/CREATE_PREVIEW_ENVIRONMENT", time.Now().String()) - branch := fmt.Sprintf("dgvs-test-with-dagger-main-%s", date) + branch := fmt.Sprintf("dgvs-test-with-dagger-main-%s", target) commitMsg := fmt.Sprintf(`dgvs: Test Dagger Engine main @ %s -daggerverse-checks in GitHub Actions ensures that module crawling works as expected. Should complete within 5 mins.`, date) +daggerverse-checks in GitHub Actions ensures that module crawling works as expected. Should complete within 5 mins.`, h.date()) - // open a PR so that it creates a new Daggerverse preview environment running Dagger main - err = gh.WithSource(daggerio). + // push the preview environment trigger branch + gh := h.Gh.WithSource(daggerio). WithGitExec([]string{"checkout", "-b", branch}). WithGitExec([]string{"add", "daggerverse/CREATE_PREVIEW_ENVIRONMENT"}). - WithGitExec([]string{"config", "user.email", *emails[0].Email}). - WithGitExec([]string{"config", "user.name", *user.Name}). + WithGitExec([]string{"config", "user.email", h.GitHubUserEmail}). + WithGitExec([]string{"config", "user.name", h.GitHubUser}). + WithGitExec([]string{"commit", "-am", commitMsg}). + WithGitExec([]string{"push", "-f", "origin", branch}) + if _, err := gh.Source().Sync(ctx); err != nil { + return err + } + + // open a PR on the trigger branch that it creates a new Daggerverse + // preview environment running Dagger main + exists, err := gh.PullRequest().Exists(ctx, branch) + if err != nil { + return err + } + if !exists { + var assignees []string + if githubAssignee != "" { + assignees = append(assignees, githubAssignee) + } + err := gh. + PullRequest().Create( + ctx, + dagger.GhPullRequestCreateOpts{ + Assignees: assignees, + Fill: true, + Labels: []string{"preview", "area/daggerverse"}, + Head: branch, + }) + if err != nil { + return err + } + } + + return nil +} + +// Bump Dagger version: dagger call --github-token=env:GITHUB_PAT bump-dagger-version --from=0.13.7 --to=0.14.0 +func (h *Daggerverse) BumpDaggerVersion( + ctx context.Context, + // +defaultPath="../../.changes" + releases *dagger.Directory, + // Which version of Dagger are we bumping from - defaults to version n-1 + // +optional + from string, + // Which version of Dagger are we bumping to + to string, + + // +optional + githubAssignee string, +) (err error) { + if from == "" { + from, err = dag.Container().From("alpine"). + WithDirectory("/releases", releases). + WithWorkdir("/releases"). + WithExec([]string{"sh", "-c", "ls v* | awk -F'[v.]' '{ print $2\".\"$3.\".\"$4 }' | sort -V | tail -n 2 | head -n 1"}). + Stdout(ctx) + if err != nil { + return err + } + from = strings.TrimSpace(from) + } + + // get just the version, without the v semver prefix + from = strings.TrimPrefix(from, "v") + to = strings.TrimPrefix(to, "v") + + fromDashed := strings.ReplaceAll(from, ".", "-") + toDashed := strings.ReplaceAll(to, ".", "-") + engineImage := fmt.Sprintf("registry.dagger.io/engine:v%s", to) + + engine := dag.Container().From(engineImage). + WithExposedPort(1234). + WithExec([]string{ + "--addr", "tcp://0.0.0.0:1234", + "--addr", "unix:///var/run/buildkit/buildkitd.sock", + "--network-cidr", "10.12.34.0/24", + }, dagger.ContainerWithExecOpts{ + UseEntrypoint: true, + InsecureRootCapabilities: true, + }).AsService() + + daggerio, err := dag.Container().From(engineImage). + WithDirectory("/dagger.io", h.clone()). + WithWorkdir("/dagger.io"). + WithExec([]string{"sh", "-c", + fmt.Sprintf("find .github/workflows -name '*daggerverse*' -exec sed -i 's/%s/%s/g' {} +", fromDashed, toDashed), + }). + WithExec([]string{"sh", "-c", + fmt.Sprintf("sed -i 's/\\(DaggerVersion\\s*=\\s*\"\\)%s\"/\\1%s\"/' daggerverse/dag/main.go", from, to), + }). + WithServiceBinding("daggerverse-engine", engine). + WithEnvVariable("_EXPERIMENTAL_DAGGER_RUNNER_HOST", "tcp://daggerverse-engine:1234"). + WithExec([]string{"nc", "-vzw", "1", "daggerverse-engine", "1234"}). + WithExec([]string{"dagger", "version"}). + WithExec([]string{"dagger", "core", "version"}). + WithExec([]string{"dagger", "--mod=daggerverse/dag", "develop"}). + WithExec([]string{"dagger", "--mod=daggerverse", "develop"}). + WithExec([]string{"sh", "-c", + fmt.Sprintf("sed -i 's/v[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*/v%s/' infra/ci/*/argocd/daggerverse-preview/appset.yaml", to), + }). + WithExec([]string{"sh", "-c", + fmt.Sprintf("sed -i 's/registry\\.dagger\\.io\\/engine:v[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*/registry\\.dagger\\.io\\/engine:v%s/' infra/ci/*/argocd/daggerverse-preview/manifests/deployment.base.yaml", to), + }). + WithExec([]string{"sh", "-c", + fmt.Sprintf("sed -i 's/registry\\.dagger\\.io\\/engine:v[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*/registry\\.dagger\\.io\\/engine:v%s/' infra/prod/*/argocd/daggerverse/deployment.yaml", to), + }). + Sync(ctx) + if err != nil { + return err + } + + daggerverse, err := dag.Go(daggerio.Directory("daggerverse")).Env(). + WithExec([]string{"go", "get", fmt.Sprintf("dagger.io/dagger@v%s", to)}). + Sync(ctx) + if err != nil { + return err + } + + updated := daggerio. + WithDirectory("/dagger.io/daggerverse", daggerverse.Directory(".")). + Directory("/dagger.io") + + branch := fmt.Sprintf("dgvs-bump-dagger-from-%s-to-%s-with-dagger-main", from, to) + commitMsg := fmt.Sprintf("dgvs: Bump Dagger from %s to %s", from, to) + + var assignees []string + if githubAssignee != "" { + assignees = append(assignees, githubAssignee) + } + err = h.Gh.WithSource(updated). + WithGitExec([]string{"checkout", "-b", branch}). + WithGitExec([]string{"add", ".github", "daggerverse", "infra"}). + WithGitExec([]string{"config", "user.email", h.GitHubUserEmail}). + WithGitExec([]string{"config", "user.name", h.GitHubUser}). WithGitExec([]string{"commit", "-am", commitMsg}). - WithGitExec([]string{"push", "--force", "origin", branch}). + WithGitExec([]string{"push", "-f", "origin", branch}). PullRequest().Create( ctx, dagger.GhPullRequestCreateOpts{ - Assignees: []string{*user.Login}, + Assignees: assignees, Fill: true, Labels: []string{"preview", "area/daggerverse"}, Head: branch, @@ -77,3 +226,15 @@ daggerverse-checks in GitHub Actions ensures that module crawling works as expec return err } + +func (h *Daggerverse) date() string { + return time.Now().Format("2006-01-02") +} + +func (h *Daggerverse) clone() *dagger.Directory { + return h.Gh.Repo().Clone( + h.Repo, + dagger.GhRepoCloneOpts{ + Args: []string{"--depth=1"}, + }) +} diff --git a/modules/dirdiff/go.mod b/modules/dirdiff/go.mod index be98e91c47..1c1a6f9ad2 100644 --- a/modules/dirdiff/go.mod +++ b/modules/dirdiff/go.mod @@ -1,11 +1,13 @@ module github.com/dagger/dagger/modules/dirdiff -go 1.22.3 +go 1.22.5 + +toolchain go1.23.2 require ( - github.com/99designs/gqlgen v0.17.49 + github.com/99designs/gqlgen v0.17.55 github.com/Khan/genqlient v0.7.0 - github.com/vektah/gqlparser/v2 v2.5.16 + github.com/vektah/gqlparser/v2 v2.5.17 go.opentelemetry.io/otel v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 @@ -17,24 +19,35 @@ require ( go.opentelemetry.io/otel/trace v1.27.0 go.opentelemetry.io/proto/otlp v1.3.1 golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa - golang.org/x/sync v0.7.0 - google.golang.org/grpc v1.64.0 + golang.org/x/sync v0.10.0 + google.golang.org/grpc v1.65.0 ) require ( github.com/cenkalti/backoff/v4 v4.3.0 // indirect - github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect github.com/sosodev/duration v1.3.1 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect - go.opentelemetry.io/otel/metric v1.27.0 // indirect - golang.org/x/net v0.26.0 // indirect - golang.org/x/sys v0.21.0 // indirect - golang.org/x/text v0.16.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 // indirect - google.golang.org/protobuf v1.34.1 // indirect + go.opentelemetry.io/otel/metric v1.27.0 + go.opentelemetry.io/otel/sdk/metric v1.27.0 + golang.org/x/net v0.29.0 // indirect + golang.org/x/sys v0.28.0 // indirect + golang.org/x/text v0.21.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect + google.golang.org/protobuf v1.34.2 // indirect ) + +replace go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc => go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 + +replace go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp => go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 + +replace go.opentelemetry.io/otel/log => go.opentelemetry.io/otel/log v0.3.0 + +replace go.opentelemetry.io/otel/sdk/log => go.opentelemetry.io/otel/sdk/log v0.3.0 diff --git a/modules/dirdiff/go.sum b/modules/dirdiff/go.sum index 6fea81b9cb..c146adf411 100644 --- a/modules/dirdiff/go.sum +++ b/modules/dirdiff/go.sum @@ -1,5 +1,5 @@ -github.com/99designs/gqlgen v0.17.49 h1:b3hNGexHd33fBSAd4NDT/c3NCcQzcAVkknhN9ym36YQ= -github.com/99designs/gqlgen v0.17.49/go.mod h1:tC8YFVZMed81x7UJ7ORUwXF4Kn6SXuucFqQBhN8+BU0= +github.com/99designs/gqlgen v0.17.55 h1:3vzrNWYyzSZjGDFo68e5j9sSauLxfKvLp+6ioRokVtM= +github.com/99designs/gqlgen v0.17.55/go.mod h1:3Bq768f8hgVPGZxL8aY9MaYmbxa6llPM/qu1IGH1EJo= github.com/Khan/genqlient v0.7.0 h1:GZ1meyRnzcDTK48EjqB8t3bcfYvHArCUUvgOwpz1D4w= github.com/Khan/genqlient v0.7.0/go.mod h1:HNyy3wZvuYwmW3Y7mkoQLZsa/R5n5yIRajS1kPBvSFM= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= @@ -10,16 +10,16 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 h1:asbCHRVmodnJTuQ3qamDwqVOIjwqUPTYmYuemVOx+Ys= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0/go.mod h1:ggCgvZ2r7uOoQjOyu2Y1NhHmEPPzzuhWgcza5M1Ji1I= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= @@ -33,14 +33,18 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/vektah/gqlparser/v2 v2.5.16 h1:1gcmLTvs3JLKXckwCwlUagVn/IlV2bwqle0vJ0vy5p8= -github.com/vektah/gqlparser/v2 v2.5.16/go.mod h1:1lz1OeCqgQbQepsGxPVywrjdBHW2T08PUS3pJqepRww= +github.com/vektah/gqlparser/v2 v2.5.17 h1:9At7WblLV7/36nulgekUgIaqHZWn5hxqluxrxGUhOmI= +github.com/vektah/gqlparser/v2 v2.5.17/go.mod h1:1lz1OeCqgQbQepsGxPVywrjdBHW2T08PUS3pJqepRww= go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 h1:oM0GTNKGlc5qHctWeIGTVyda4iFFalOzMZ3Ehj5rwB4= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88/go.mod h1:JGG8ebaMO5nXOPnvKEl+DiA4MGwFjCbjsxT1WHIEBPY= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 h1:ccBrA8nCY5mM0y5uO7FT0ze4S0TuFcWdDB2FxGMTjkI= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0/go.mod h1:/9pb6634zi2Lk8LYg9Q0X8Ar6jka4dkFOylBLbVQPCE= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 h1:bFgvUr3/O4PHj3VQcFEuYKvRZJX1SJDQ+11JXuSB3/w= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0/go.mod h1:xJntEd2KL6Qdg5lwp97HMLQDVeAhrYxmzFseAMDPQ8I= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 h1:CIHWikMsN3wO+wq1Tp5VGdVRTcON+DmOJSfDjXypKOc= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0/go.mod h1:TNupZ6cxqyFEpLXAZW7On+mLFL0/g0TE3unIYL91xWc= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 h1:R9DE4kQ4k+YtfLI2ULwX82VtNQ2J8yZmA7ZIF/D+7Mc= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0/go.mod h1:OQFyQVrDlbe+R7xrEyDr/2Wr67Ol0hRUgsfA+V5A95s= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= @@ -55,6 +59,8 @@ go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kT go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= go.opentelemetry.io/otel/sdk/log v0.3.0 h1:GEjJ8iftz2l+XO1GF2856r7yYVh74URiF9JMcAacr5U= go.opentelemetry.io/otel/sdk/log v0.3.0/go.mod h1:BwCxtmux6ACLuys1wlbc0+vGBd+xytjmjajwqqIul2g= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= @@ -63,22 +69,22 @@ go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= -golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= -google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 h1:P8OJ/WCl/Xo4E4zoe4/bifHpSmmKwARqyqE4nW6J2GQ= -google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:RGnPtTG7r4i8sPlNyDeikXF99hMM+hN6QMm4ooG9g2g= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 h1:AgADTJarZTBqgjiUzRgfaBchgYB3/WFTC80GPwsMcRI= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= -google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= -google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 h1:wKguEg1hsxI2/L3hUYrpo1RVi48K+uTyzKqprwLXsb8= +google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142/go.mod h1:d6be+8HhtEtucleCbxpPW9PA9XwISACu8nvpPqF0BVo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 h1:e7S5W7MGGLaSu8j3YjdezkZ+m1/Nm0uRVRMEMGk26Xs= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= +google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/modules/gha/examples/go/go.mod b/modules/gha/examples/go/go.mod index 7160063a0b..e31e9ebc03 100644 --- a/modules/gha/examples/go/go.mod +++ b/modules/gha/examples/go/go.mod @@ -17,7 +17,7 @@ require ( go.opentelemetry.io/otel/trace v1.27.0 go.opentelemetry.io/proto/otlp v1.3.1 golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa - golang.org/x/sync v0.8.0 + golang.org/x/sync v0.10.0 google.golang.org/grpc v1.65.0 ) @@ -35,8 +35,8 @@ require ( go.opentelemetry.io/otel/metric v1.27.0 go.opentelemetry.io/otel/sdk/metric v1.27.0 golang.org/x/net v0.29.0 // indirect - golang.org/x/sys v0.26.0 // indirect - golang.org/x/text v0.18.0 // indirect + golang.org/x/sys v0.28.0 // indirect + golang.org/x/text v0.21.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect google.golang.org/protobuf v1.34.2 // indirect diff --git a/modules/gha/examples/go/go.sum b/modules/gha/examples/go/go.sum index cb0bbbff0b..c146adf411 100644 --- a/modules/gha/examples/go/go.sum +++ b/modules/gha/examples/go/go.sum @@ -71,12 +71,12 @@ golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8 golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= -golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= -golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= -golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= -golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 h1:wKguEg1hsxI2/L3hUYrpo1RVi48K+uTyzKqprwLXsb8= google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142/go.mod h1:d6be+8HhtEtucleCbxpPW9PA9XwISACu8nvpPqF0BVo= google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 h1:e7S5W7MGGLaSu8j3YjdezkZ+m1/Nm0uRVRMEMGk26Xs= diff --git a/modules/gha/examples/go/main.go b/modules/gha/examples/go/main.go index 0e704cb5b3..407699b887 100644 --- a/modules/gha/examples/go/main.go +++ b/modules/gha/examples/go/main.go @@ -44,7 +44,7 @@ func (m *Examples) GhaGithubContext() *dagger.Directory { dag.Gha().Workflow("lint all branches", dagger.GhaWorkflowOpts{ OnPush: true, }). - WithJob(dag.Gha().Job("lin", "lint --source=${GITHUB_REPOSITORY_URL}#${GITHUB_REF}")), + WithJob(dag.Gha().Job("lint", "lint --source=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}#${GITHUB_REF}")), ). Generate() } diff --git a/modules/gha/go.mod b/modules/gha/go.mod index 68e3661d90..eeb0837d5a 100644 --- a/modules/gha/go.mod +++ b/modules/gha/go.mod @@ -20,9 +20,8 @@ require ( go.opentelemetry.io/proto/otlp v1.3.1 golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa golang.org/x/mod v0.20.0 - golang.org/x/sync v0.8.0 + golang.org/x/sync v0.10.0 google.golang.org/grpc v1.65.0 - mvdan.cc/sh v2.6.4+incompatible ) require ( @@ -38,11 +37,9 @@ require ( go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect go.opentelemetry.io/otel/metric v1.27.0 go.opentelemetry.io/otel/sdk/metric v1.27.0 - golang.org/x/crypto v0.27.0 // indirect golang.org/x/net v0.29.0 // indirect - golang.org/x/sys v0.26.0 // indirect - golang.org/x/term v0.24.0 // indirect - golang.org/x/text v0.18.0 // indirect + golang.org/x/sys v0.28.0 // indirect + golang.org/x/text v0.21.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect google.golang.org/protobuf v1.34.2 // indirect diff --git a/modules/gha/go.sum b/modules/gha/go.sum index da202f4c2a..d644f7d403 100644 --- a/modules/gha/go.sum +++ b/modules/gha/go.sum @@ -77,22 +77,18 @@ go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeX go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= -golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A= -golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= -golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= -golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= -golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.24.0 h1:Mh5cbb+Zk2hqqXNO7S1iTjEphVL+jb8ZWaqh/g+JWkM= -golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8= -golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= -golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 h1:wKguEg1hsxI2/L3hUYrpo1RVi48K+uTyzKqprwLXsb8= google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142/go.mod h1:d6be+8HhtEtucleCbxpPW9PA9XwISACu8nvpPqF0BVo= google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 h1:e7S5W7MGGLaSu8j3YjdezkZ+m1/Nm0uRVRMEMGk26Xs= @@ -109,5 +105,3 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -mvdan.cc/sh v2.6.4+incompatible h1:eD6tDeh0pw+/TOTI1BBEryZ02rD2nMcFsgcvde7jffM= -mvdan.cc/sh v2.6.4+incompatible/go.mod h1:IeeQbZq+x2SUGBensq/jge5lLQbS3XT2ktyp3wrt4x8= diff --git a/modules/gha/steps.go b/modules/gha/steps.go index f0e7fc0271..a83d8677ca 100644 --- a/modules/gha/steps.go +++ b/modules/gha/steps.go @@ -3,12 +3,10 @@ package main import ( "context" "fmt" - "sort" "strings" "github.com/dagger/dagger/modules/gha/api" "golang.org/x/mod/semver" - "mvdan.cc/sh/shell" ) func (j *Job) checkoutStep() api.JobStep { @@ -65,29 +63,6 @@ func (j *Job) installDaggerSteps() []api.JobStep { } } -// Analyze the pipeline command, and return a list of env variables it references -func (j *Job) envLookups() []string { - var lookups = make(map[string]struct{}) - _, err := shell.Expand(j.Command, func(name string) string { - lookups[name] = struct{}{} - return name - }) - if err != nil { - // An error might mean an invalid command OR a bug or incomatibility in our parser, - // let's not surface it for now. - return nil - } - result := make([]string, 0, len(lookups)) - for name := range lookups { - if name == "IFS" { - continue - } - result = append(result, name) - } - sort.Strings(result) - return result -} - func (j *Job) callDaggerStep() api.JobStep { env := map[string]string{} // Debug mode @@ -111,17 +86,6 @@ func (j *Job) callDaggerStep() api.JobStep { // For backwards compatibility with older engines env["_EXPERIMENTAL_DAGGER_CLOUD_TOKEN"] = j.PublicToken } - for _, key := range j.envLookups() { - if strings.HasPrefix(key, "GITHUB_") { - // Inject Github context keys - // github.ref becomes $GITHUB_REF, etc. - env[key] = fmt.Sprintf("${{ github.%s }}", strings.ToLower(key)) - } else if strings.HasPrefix(key, "RUNNER_") { - // Inject Runner context keys - // runner.ref becomes $RUNNER_REF, etc. - env[key] = fmt.Sprintf("${{ runner.%s }}", strings.ToLower(key)) - } - } return j.bashStep("exec", env) } diff --git a/modules/gha/workflow.go b/modules/gha/workflow.go index 60dabf0b59..468e55e85d 100644 --- a/modules/gha/workflow.go +++ b/modules/gha/workflow.go @@ -180,7 +180,7 @@ func (gha *Gha) Workflow( w = w.onPullRequest(nil, onPullRequestBranches, nil) } if onPullRequestPaths != nil { - w = w.onPullRequest([]string{"paths"}, nil, onPullRequestPaths) + w = w.onPullRequest(nil, nil, onPullRequestPaths) } if onPullRequestAssigned { w = w.onPullRequest([]string{"assigned"}, nil, nil) diff --git a/modules/go/go.mod b/modules/go/go.mod index b295210956..5281d04c0a 100644 --- a/modules/go/go.mod +++ b/modules/go/go.mod @@ -15,7 +15,7 @@ require ( go.opentelemetry.io/otel/sdk v1.27.0 go.opentelemetry.io/otel/trace v1.27.0 golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa - golang.org/x/sync v0.8.0 + golang.org/x/sync v0.10.0 google.golang.org/grpc v1.65.0 ) @@ -45,8 +45,8 @@ require ( go.opentelemetry.io/otel/sdk/metric v1.27.0 go.opentelemetry.io/proto/otlp v1.3.1 golang.org/x/net v0.29.0 // indirect - golang.org/x/sys v0.26.0 // indirect - golang.org/x/text v0.18.0 // indirect + golang.org/x/sys v0.28.0 // indirect + golang.org/x/text v0.21.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect google.golang.org/protobuf v1.34.2 // indirect diff --git a/modules/go/go.sum b/modules/go/go.sum index c6134aec70..fafeb418ff 100644 --- a/modules/go/go.sum +++ b/modules/go/go.sum @@ -82,13 +82,13 @@ golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8 golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= -golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= -golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= -golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= -golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 h1:wKguEg1hsxI2/L3hUYrpo1RVi48K+uTyzKqprwLXsb8= google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142/go.mod h1:d6be+8HhtEtucleCbxpPW9PA9XwISACu8nvpPqF0BVo= google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 h1:e7S5W7MGGLaSu8j3YjdezkZ+m1/Nm0uRVRMEMGk26Xs= diff --git a/modules/golangci/go.mod b/modules/golangci/go.mod index 253e386328..96e024a8fe 100644 --- a/modules/golangci/go.mod +++ b/modules/golangci/go.mod @@ -1,11 +1,13 @@ module github.com/dagger/dagger/modules/golangci -go 1.22.4 +go 1.22.5 + +toolchain go1.23.2 require ( - github.com/99designs/gqlgen v0.17.49 + github.com/99designs/gqlgen v0.17.55 github.com/Khan/genqlient v0.7.0 - github.com/vektah/gqlparser/v2 v2.5.16 + github.com/vektah/gqlparser/v2 v2.5.17 go.opentelemetry.io/otel v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 @@ -17,24 +19,35 @@ require ( go.opentelemetry.io/otel/trace v1.27.0 go.opentelemetry.io/proto/otlp v1.3.1 golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa - golang.org/x/sync v0.7.0 - google.golang.org/grpc v1.64.0 + golang.org/x/sync v0.10.0 + google.golang.org/grpc v1.65.0 ) require ( github.com/cenkalti/backoff/v4 v4.3.0 // indirect - github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect github.com/sosodev/duration v1.3.1 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect - go.opentelemetry.io/otel/metric v1.27.0 // indirect - golang.org/x/net v0.26.0 // indirect - golang.org/x/sys v0.21.0 // indirect - golang.org/x/text v0.16.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 // indirect - google.golang.org/protobuf v1.34.1 // indirect + go.opentelemetry.io/otel/metric v1.27.0 + go.opentelemetry.io/otel/sdk/metric v1.27.0 + golang.org/x/net v0.29.0 // indirect + golang.org/x/sys v0.28.0 // indirect + golang.org/x/text v0.21.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect + google.golang.org/protobuf v1.34.2 // indirect ) + +replace go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc => go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 + +replace go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp => go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 + +replace go.opentelemetry.io/otel/log => go.opentelemetry.io/otel/log v0.3.0 + +replace go.opentelemetry.io/otel/sdk/log => go.opentelemetry.io/otel/sdk/log v0.3.0 diff --git a/modules/golangci/go.sum b/modules/golangci/go.sum index 6fea81b9cb..c146adf411 100644 --- a/modules/golangci/go.sum +++ b/modules/golangci/go.sum @@ -1,5 +1,5 @@ -github.com/99designs/gqlgen v0.17.49 h1:b3hNGexHd33fBSAd4NDT/c3NCcQzcAVkknhN9ym36YQ= -github.com/99designs/gqlgen v0.17.49/go.mod h1:tC8YFVZMed81x7UJ7ORUwXF4Kn6SXuucFqQBhN8+BU0= +github.com/99designs/gqlgen v0.17.55 h1:3vzrNWYyzSZjGDFo68e5j9sSauLxfKvLp+6ioRokVtM= +github.com/99designs/gqlgen v0.17.55/go.mod h1:3Bq768f8hgVPGZxL8aY9MaYmbxa6llPM/qu1IGH1EJo= github.com/Khan/genqlient v0.7.0 h1:GZ1meyRnzcDTK48EjqB8t3bcfYvHArCUUvgOwpz1D4w= github.com/Khan/genqlient v0.7.0/go.mod h1:HNyy3wZvuYwmW3Y7mkoQLZsa/R5n5yIRajS1kPBvSFM= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= @@ -10,16 +10,16 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 h1:asbCHRVmodnJTuQ3qamDwqVOIjwqUPTYmYuemVOx+Ys= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0/go.mod h1:ggCgvZ2r7uOoQjOyu2Y1NhHmEPPzzuhWgcza5M1Ji1I= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= @@ -33,14 +33,18 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/vektah/gqlparser/v2 v2.5.16 h1:1gcmLTvs3JLKXckwCwlUagVn/IlV2bwqle0vJ0vy5p8= -github.com/vektah/gqlparser/v2 v2.5.16/go.mod h1:1lz1OeCqgQbQepsGxPVywrjdBHW2T08PUS3pJqepRww= +github.com/vektah/gqlparser/v2 v2.5.17 h1:9At7WblLV7/36nulgekUgIaqHZWn5hxqluxrxGUhOmI= +github.com/vektah/gqlparser/v2 v2.5.17/go.mod h1:1lz1OeCqgQbQepsGxPVywrjdBHW2T08PUS3pJqepRww= go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 h1:oM0GTNKGlc5qHctWeIGTVyda4iFFalOzMZ3Ehj5rwB4= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88/go.mod h1:JGG8ebaMO5nXOPnvKEl+DiA4MGwFjCbjsxT1WHIEBPY= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 h1:ccBrA8nCY5mM0y5uO7FT0ze4S0TuFcWdDB2FxGMTjkI= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0/go.mod h1:/9pb6634zi2Lk8LYg9Q0X8Ar6jka4dkFOylBLbVQPCE= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 h1:bFgvUr3/O4PHj3VQcFEuYKvRZJX1SJDQ+11JXuSB3/w= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0/go.mod h1:xJntEd2KL6Qdg5lwp97HMLQDVeAhrYxmzFseAMDPQ8I= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 h1:CIHWikMsN3wO+wq1Tp5VGdVRTcON+DmOJSfDjXypKOc= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0/go.mod h1:TNupZ6cxqyFEpLXAZW7On+mLFL0/g0TE3unIYL91xWc= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 h1:R9DE4kQ4k+YtfLI2ULwX82VtNQ2J8yZmA7ZIF/D+7Mc= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0/go.mod h1:OQFyQVrDlbe+R7xrEyDr/2Wr67Ol0hRUgsfA+V5A95s= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= @@ -55,6 +59,8 @@ go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kT go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= go.opentelemetry.io/otel/sdk/log v0.3.0 h1:GEjJ8iftz2l+XO1GF2856r7yYVh74URiF9JMcAacr5U= go.opentelemetry.io/otel/sdk/log v0.3.0/go.mod h1:BwCxtmux6ACLuys1wlbc0+vGBd+xytjmjajwqqIul2g= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= @@ -63,22 +69,22 @@ go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= -golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= -google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 h1:P8OJ/WCl/Xo4E4zoe4/bifHpSmmKwARqyqE4nW6J2GQ= -google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:RGnPtTG7r4i8sPlNyDeikXF99hMM+hN6QMm4ooG9g2g= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 h1:AgADTJarZTBqgjiUzRgfaBchgYB3/WFTC80GPwsMcRI= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= -google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= -google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 h1:wKguEg1hsxI2/L3hUYrpo1RVi48K+uTyzKqprwLXsb8= +google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142/go.mod h1:d6be+8HhtEtucleCbxpPW9PA9XwISACu8nvpPqF0BVo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 h1:e7S5W7MGGLaSu8j3YjdezkZ+m1/Nm0uRVRMEMGk26Xs= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= +google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/modules/graphql/go.mod b/modules/graphql/go.mod index af1e873a08..465dfd8158 100644 --- a/modules/graphql/go.mod +++ b/modules/graphql/go.mod @@ -1,40 +1,53 @@ module github.com/dagger/dagger/modules/graphql -go 1.22 +go 1.22.5 + +toolchain go1.23.2 require ( - github.com/99designs/gqlgen v0.17.49 + github.com/99designs/gqlgen v0.17.55 github.com/Khan/genqlient v0.7.0 - github.com/vektah/gqlparser/v2 v2.5.16 + github.com/vektah/gqlparser/v2 v2.5.17 go.opentelemetry.io/otel v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 go.opentelemetry.io/otel/sdk v1.27.0 go.opentelemetry.io/otel/trace v1.27.0 golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa - golang.org/x/sync v0.7.0 - google.golang.org/grpc v1.64.0 + golang.org/x/sync v0.10.0 + google.golang.org/grpc v1.65.0 ) require ( github.com/cenkalti/backoff/v4 v4.3.0 // indirect - github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect github.com/sosodev/duration v1.3.1 // indirect go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect go.opentelemetry.io/otel/log v0.3.0 - go.opentelemetry.io/otel/metric v1.27.0 // indirect + go.opentelemetry.io/otel/metric v1.27.0 go.opentelemetry.io/otel/sdk/log v0.3.0 + go.opentelemetry.io/otel/sdk/metric v1.27.0 go.opentelemetry.io/proto/otlp v1.3.1 - golang.org/x/net v0.26.0 // indirect - golang.org/x/sys v0.21.0 // indirect - golang.org/x/text v0.16.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 // indirect - google.golang.org/protobuf v1.34.1 // indirect + golang.org/x/net v0.29.0 // indirect + golang.org/x/sys v0.28.0 // indirect + golang.org/x/text v0.21.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect + google.golang.org/protobuf v1.34.2 // indirect ) + +replace go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc => go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 + +replace go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp => go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 + +replace go.opentelemetry.io/otel/log => go.opentelemetry.io/otel/log v0.3.0 + +replace go.opentelemetry.io/otel/sdk/log => go.opentelemetry.io/otel/sdk/log v0.3.0 diff --git a/modules/graphql/go.sum b/modules/graphql/go.sum index 6fea81b9cb..c146adf411 100644 --- a/modules/graphql/go.sum +++ b/modules/graphql/go.sum @@ -1,5 +1,5 @@ -github.com/99designs/gqlgen v0.17.49 h1:b3hNGexHd33fBSAd4NDT/c3NCcQzcAVkknhN9ym36YQ= -github.com/99designs/gqlgen v0.17.49/go.mod h1:tC8YFVZMed81x7UJ7ORUwXF4Kn6SXuucFqQBhN8+BU0= +github.com/99designs/gqlgen v0.17.55 h1:3vzrNWYyzSZjGDFo68e5j9sSauLxfKvLp+6ioRokVtM= +github.com/99designs/gqlgen v0.17.55/go.mod h1:3Bq768f8hgVPGZxL8aY9MaYmbxa6llPM/qu1IGH1EJo= github.com/Khan/genqlient v0.7.0 h1:GZ1meyRnzcDTK48EjqB8t3bcfYvHArCUUvgOwpz1D4w= github.com/Khan/genqlient v0.7.0/go.mod h1:HNyy3wZvuYwmW3Y7mkoQLZsa/R5n5yIRajS1kPBvSFM= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= @@ -10,16 +10,16 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 h1:asbCHRVmodnJTuQ3qamDwqVOIjwqUPTYmYuemVOx+Ys= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0/go.mod h1:ggCgvZ2r7uOoQjOyu2Y1NhHmEPPzzuhWgcza5M1Ji1I= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= @@ -33,14 +33,18 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/vektah/gqlparser/v2 v2.5.16 h1:1gcmLTvs3JLKXckwCwlUagVn/IlV2bwqle0vJ0vy5p8= -github.com/vektah/gqlparser/v2 v2.5.16/go.mod h1:1lz1OeCqgQbQepsGxPVywrjdBHW2T08PUS3pJqepRww= +github.com/vektah/gqlparser/v2 v2.5.17 h1:9At7WblLV7/36nulgekUgIaqHZWn5hxqluxrxGUhOmI= +github.com/vektah/gqlparser/v2 v2.5.17/go.mod h1:1lz1OeCqgQbQepsGxPVywrjdBHW2T08PUS3pJqepRww= go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 h1:oM0GTNKGlc5qHctWeIGTVyda4iFFalOzMZ3Ehj5rwB4= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88/go.mod h1:JGG8ebaMO5nXOPnvKEl+DiA4MGwFjCbjsxT1WHIEBPY= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 h1:ccBrA8nCY5mM0y5uO7FT0ze4S0TuFcWdDB2FxGMTjkI= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0/go.mod h1:/9pb6634zi2Lk8LYg9Q0X8Ar6jka4dkFOylBLbVQPCE= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 h1:bFgvUr3/O4PHj3VQcFEuYKvRZJX1SJDQ+11JXuSB3/w= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0/go.mod h1:xJntEd2KL6Qdg5lwp97HMLQDVeAhrYxmzFseAMDPQ8I= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 h1:CIHWikMsN3wO+wq1Tp5VGdVRTcON+DmOJSfDjXypKOc= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0/go.mod h1:TNupZ6cxqyFEpLXAZW7On+mLFL0/g0TE3unIYL91xWc= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 h1:R9DE4kQ4k+YtfLI2ULwX82VtNQ2J8yZmA7ZIF/D+7Mc= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0/go.mod h1:OQFyQVrDlbe+R7xrEyDr/2Wr67Ol0hRUgsfA+V5A95s= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= @@ -55,6 +59,8 @@ go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kT go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= go.opentelemetry.io/otel/sdk/log v0.3.0 h1:GEjJ8iftz2l+XO1GF2856r7yYVh74URiF9JMcAacr5U= go.opentelemetry.io/otel/sdk/log v0.3.0/go.mod h1:BwCxtmux6ACLuys1wlbc0+vGBd+xytjmjajwqqIul2g= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= @@ -63,22 +69,22 @@ go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= -golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= -google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 h1:P8OJ/WCl/Xo4E4zoe4/bifHpSmmKwARqyqE4nW6J2GQ= -google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:RGnPtTG7r4i8sPlNyDeikXF99hMM+hN6QMm4ooG9g2g= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 h1:AgADTJarZTBqgjiUzRgfaBchgYB3/WFTC80GPwsMcRI= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= -google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= -google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 h1:wKguEg1hsxI2/L3hUYrpo1RVi48K+uTyzKqprwLXsb8= +google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142/go.mod h1:d6be+8HhtEtucleCbxpPW9PA9XwISACu8nvpPqF0BVo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 h1:e7S5W7MGGLaSu8j3YjdezkZ+m1/Nm0uRVRMEMGk26Xs= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= +google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/modules/markdown/go.mod b/modules/markdown/go.mod index f47466cf79..9e17cd2cb6 100644 --- a/modules/markdown/go.mod +++ b/modules/markdown/go.mod @@ -1,40 +1,53 @@ module github.com/dagger/dagger/modules/markdown -go 1.22 +go 1.22.5 + +toolchain go1.23.2 require ( - github.com/99designs/gqlgen v0.17.49 + github.com/99designs/gqlgen v0.17.55 github.com/Khan/genqlient v0.7.0 - github.com/vektah/gqlparser/v2 v2.5.16 + github.com/vektah/gqlparser/v2 v2.5.17 golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa - golang.org/x/sync v0.7.0 + golang.org/x/sync v0.10.0 ) require ( github.com/cenkalti/backoff/v4 v4.3.0 // indirect - github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect github.com/sosodev/duration v1.3.1 // indirect go.opentelemetry.io/otel v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 go.opentelemetry.io/otel/log v0.3.0 - go.opentelemetry.io/otel/metric v1.27.0 // indirect + go.opentelemetry.io/otel/metric v1.27.0 go.opentelemetry.io/otel/sdk v1.27.0 go.opentelemetry.io/otel/sdk/log v0.3.0 + go.opentelemetry.io/otel/sdk/metric v1.27.0 go.opentelemetry.io/otel/trace v1.27.0 go.opentelemetry.io/proto/otlp v1.3.1 - golang.org/x/net v0.26.0 // indirect - golang.org/x/sys v0.21.0 // indirect - golang.org/x/text v0.16.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 // indirect - google.golang.org/grpc v1.64.0 - google.golang.org/protobuf v1.34.1 // indirect + golang.org/x/net v0.29.0 // indirect + golang.org/x/sys v0.28.0 // indirect + golang.org/x/text v0.21.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect + google.golang.org/grpc v1.65.0 + google.golang.org/protobuf v1.34.2 // indirect ) + +replace go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc => go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 + +replace go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp => go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 + +replace go.opentelemetry.io/otel/log => go.opentelemetry.io/otel/log v0.3.0 + +replace go.opentelemetry.io/otel/sdk/log => go.opentelemetry.io/otel/sdk/log v0.3.0 diff --git a/modules/markdown/go.sum b/modules/markdown/go.sum index 6fea81b9cb..c146adf411 100644 --- a/modules/markdown/go.sum +++ b/modules/markdown/go.sum @@ -1,5 +1,5 @@ -github.com/99designs/gqlgen v0.17.49 h1:b3hNGexHd33fBSAd4NDT/c3NCcQzcAVkknhN9ym36YQ= -github.com/99designs/gqlgen v0.17.49/go.mod h1:tC8YFVZMed81x7UJ7ORUwXF4Kn6SXuucFqQBhN8+BU0= +github.com/99designs/gqlgen v0.17.55 h1:3vzrNWYyzSZjGDFo68e5j9sSauLxfKvLp+6ioRokVtM= +github.com/99designs/gqlgen v0.17.55/go.mod h1:3Bq768f8hgVPGZxL8aY9MaYmbxa6llPM/qu1IGH1EJo= github.com/Khan/genqlient v0.7.0 h1:GZ1meyRnzcDTK48EjqB8t3bcfYvHArCUUvgOwpz1D4w= github.com/Khan/genqlient v0.7.0/go.mod h1:HNyy3wZvuYwmW3Y7mkoQLZsa/R5n5yIRajS1kPBvSFM= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= @@ -10,16 +10,16 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 h1:asbCHRVmodnJTuQ3qamDwqVOIjwqUPTYmYuemVOx+Ys= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0/go.mod h1:ggCgvZ2r7uOoQjOyu2Y1NhHmEPPzzuhWgcza5M1Ji1I= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= @@ -33,14 +33,18 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/vektah/gqlparser/v2 v2.5.16 h1:1gcmLTvs3JLKXckwCwlUagVn/IlV2bwqle0vJ0vy5p8= -github.com/vektah/gqlparser/v2 v2.5.16/go.mod h1:1lz1OeCqgQbQepsGxPVywrjdBHW2T08PUS3pJqepRww= +github.com/vektah/gqlparser/v2 v2.5.17 h1:9At7WblLV7/36nulgekUgIaqHZWn5hxqluxrxGUhOmI= +github.com/vektah/gqlparser/v2 v2.5.17/go.mod h1:1lz1OeCqgQbQepsGxPVywrjdBHW2T08PUS3pJqepRww= go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 h1:oM0GTNKGlc5qHctWeIGTVyda4iFFalOzMZ3Ehj5rwB4= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88/go.mod h1:JGG8ebaMO5nXOPnvKEl+DiA4MGwFjCbjsxT1WHIEBPY= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 h1:ccBrA8nCY5mM0y5uO7FT0ze4S0TuFcWdDB2FxGMTjkI= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0/go.mod h1:/9pb6634zi2Lk8LYg9Q0X8Ar6jka4dkFOylBLbVQPCE= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 h1:bFgvUr3/O4PHj3VQcFEuYKvRZJX1SJDQ+11JXuSB3/w= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0/go.mod h1:xJntEd2KL6Qdg5lwp97HMLQDVeAhrYxmzFseAMDPQ8I= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 h1:CIHWikMsN3wO+wq1Tp5VGdVRTcON+DmOJSfDjXypKOc= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0/go.mod h1:TNupZ6cxqyFEpLXAZW7On+mLFL0/g0TE3unIYL91xWc= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 h1:R9DE4kQ4k+YtfLI2ULwX82VtNQ2J8yZmA7ZIF/D+7Mc= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0/go.mod h1:OQFyQVrDlbe+R7xrEyDr/2Wr67Ol0hRUgsfA+V5A95s= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= @@ -55,6 +59,8 @@ go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kT go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= go.opentelemetry.io/otel/sdk/log v0.3.0 h1:GEjJ8iftz2l+XO1GF2856r7yYVh74URiF9JMcAacr5U= go.opentelemetry.io/otel/sdk/log v0.3.0/go.mod h1:BwCxtmux6ACLuys1wlbc0+vGBd+xytjmjajwqqIul2g= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= @@ -63,22 +69,22 @@ go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= -golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= -google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 h1:P8OJ/WCl/Xo4E4zoe4/bifHpSmmKwARqyqE4nW6J2GQ= -google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:RGnPtTG7r4i8sPlNyDeikXF99hMM+hN6QMm4ooG9g2g= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 h1:AgADTJarZTBqgjiUzRgfaBchgYB3/WFTC80GPwsMcRI= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= -google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= -google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 h1:wKguEg1hsxI2/L3hUYrpo1RVi48K+uTyzKqprwLXsb8= +google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142/go.mod h1:d6be+8HhtEtucleCbxpPW9PA9XwISACu8nvpPqF0BVo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 h1:e7S5W7MGGLaSu8j3YjdezkZ+m1/Nm0uRVRMEMGk26Xs= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= +google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/modules/ps-analyzer/go.mod b/modules/ps-analyzer/go.mod index e83b784fd9..887e565d7f 100644 --- a/modules/ps-analyzer/go.mod +++ b/modules/ps-analyzer/go.mod @@ -3,9 +3,9 @@ module github.com/dagger/dagger/modules/ps-analyzer go 1.22.5 require ( - github.com/99designs/gqlgen v0.17.49 + github.com/99designs/gqlgen v0.17.55 github.com/Khan/genqlient v0.7.0 - github.com/vektah/gqlparser/v2 v2.5.16 + github.com/vektah/gqlparser/v2 v2.5.17 go.opentelemetry.io/otel v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 @@ -17,24 +17,35 @@ require ( go.opentelemetry.io/otel/trace v1.27.0 go.opentelemetry.io/proto/otlp v1.3.1 golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa - golang.org/x/sync v0.7.0 - google.golang.org/grpc v1.64.0 + golang.org/x/sync v0.10.0 + google.golang.org/grpc v1.65.0 ) require ( github.com/cenkalti/backoff/v4 v4.3.0 // indirect - github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect github.com/sosodev/duration v1.3.1 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect - go.opentelemetry.io/otel/metric v1.27.0 // indirect - golang.org/x/net v0.26.0 // indirect - golang.org/x/sys v0.21.0 // indirect - golang.org/x/text v0.16.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 // indirect - google.golang.org/protobuf v1.34.1 // indirect + go.opentelemetry.io/otel/metric v1.27.0 + go.opentelemetry.io/otel/sdk/metric v1.27.0 + golang.org/x/net v0.29.0 // indirect + golang.org/x/sys v0.28.0 // indirect + golang.org/x/text v0.21.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect + google.golang.org/protobuf v1.34.2 // indirect ) + +replace go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc => go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 + +replace go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp => go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 + +replace go.opentelemetry.io/otel/log => go.opentelemetry.io/otel/log v0.3.0 + +replace go.opentelemetry.io/otel/sdk/log => go.opentelemetry.io/otel/sdk/log v0.3.0 diff --git a/modules/ps-analyzer/go.sum b/modules/ps-analyzer/go.sum index 6fea81b9cb..c146adf411 100644 --- a/modules/ps-analyzer/go.sum +++ b/modules/ps-analyzer/go.sum @@ -1,5 +1,5 @@ -github.com/99designs/gqlgen v0.17.49 h1:b3hNGexHd33fBSAd4NDT/c3NCcQzcAVkknhN9ym36YQ= -github.com/99designs/gqlgen v0.17.49/go.mod h1:tC8YFVZMed81x7UJ7ORUwXF4Kn6SXuucFqQBhN8+BU0= +github.com/99designs/gqlgen v0.17.55 h1:3vzrNWYyzSZjGDFo68e5j9sSauLxfKvLp+6ioRokVtM= +github.com/99designs/gqlgen v0.17.55/go.mod h1:3Bq768f8hgVPGZxL8aY9MaYmbxa6llPM/qu1IGH1EJo= github.com/Khan/genqlient v0.7.0 h1:GZ1meyRnzcDTK48EjqB8t3bcfYvHArCUUvgOwpz1D4w= github.com/Khan/genqlient v0.7.0/go.mod h1:HNyy3wZvuYwmW3Y7mkoQLZsa/R5n5yIRajS1kPBvSFM= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= @@ -10,16 +10,16 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 h1:asbCHRVmodnJTuQ3qamDwqVOIjwqUPTYmYuemVOx+Ys= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0/go.mod h1:ggCgvZ2r7uOoQjOyu2Y1NhHmEPPzzuhWgcza5M1Ji1I= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= @@ -33,14 +33,18 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/vektah/gqlparser/v2 v2.5.16 h1:1gcmLTvs3JLKXckwCwlUagVn/IlV2bwqle0vJ0vy5p8= -github.com/vektah/gqlparser/v2 v2.5.16/go.mod h1:1lz1OeCqgQbQepsGxPVywrjdBHW2T08PUS3pJqepRww= +github.com/vektah/gqlparser/v2 v2.5.17 h1:9At7WblLV7/36nulgekUgIaqHZWn5hxqluxrxGUhOmI= +github.com/vektah/gqlparser/v2 v2.5.17/go.mod h1:1lz1OeCqgQbQepsGxPVywrjdBHW2T08PUS3pJqepRww= go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 h1:oM0GTNKGlc5qHctWeIGTVyda4iFFalOzMZ3Ehj5rwB4= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88/go.mod h1:JGG8ebaMO5nXOPnvKEl+DiA4MGwFjCbjsxT1WHIEBPY= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 h1:ccBrA8nCY5mM0y5uO7FT0ze4S0TuFcWdDB2FxGMTjkI= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0/go.mod h1:/9pb6634zi2Lk8LYg9Q0X8Ar6jka4dkFOylBLbVQPCE= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 h1:bFgvUr3/O4PHj3VQcFEuYKvRZJX1SJDQ+11JXuSB3/w= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0/go.mod h1:xJntEd2KL6Qdg5lwp97HMLQDVeAhrYxmzFseAMDPQ8I= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 h1:CIHWikMsN3wO+wq1Tp5VGdVRTcON+DmOJSfDjXypKOc= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0/go.mod h1:TNupZ6cxqyFEpLXAZW7On+mLFL0/g0TE3unIYL91xWc= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 h1:R9DE4kQ4k+YtfLI2ULwX82VtNQ2J8yZmA7ZIF/D+7Mc= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0/go.mod h1:OQFyQVrDlbe+R7xrEyDr/2Wr67Ol0hRUgsfA+V5A95s= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= @@ -55,6 +59,8 @@ go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kT go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= go.opentelemetry.io/otel/sdk/log v0.3.0 h1:GEjJ8iftz2l+XO1GF2856r7yYVh74URiF9JMcAacr5U= go.opentelemetry.io/otel/sdk/log v0.3.0/go.mod h1:BwCxtmux6ACLuys1wlbc0+vGBd+xytjmjajwqqIul2g= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= @@ -63,22 +69,22 @@ go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= -golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= -google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 h1:P8OJ/WCl/Xo4E4zoe4/bifHpSmmKwARqyqE4nW6J2GQ= -google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:RGnPtTG7r4i8sPlNyDeikXF99hMM+hN6QMm4ooG9g2g= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 h1:AgADTJarZTBqgjiUzRgfaBchgYB3/WFTC80GPwsMcRI= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= -google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= -google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 h1:wKguEg1hsxI2/L3hUYrpo1RVi48K+uTyzKqprwLXsb8= +google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142/go.mod h1:d6be+8HhtEtucleCbxpPW9PA9XwISACu8nvpPqF0BVo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 h1:e7S5W7MGGLaSu8j3YjdezkZ+m1/Nm0uRVRMEMGk26Xs= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= +google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/modules/ruff/build/Dockerfile b/modules/ruff/build/Dockerfile index c6b12f2d11..e9bd89b6d8 100644 --- a/modules/ruff/build/Dockerfile +++ b/modules/ruff/build/Dockerfile @@ -1,2 +1,2 @@ # For dependabot -FROM ghcr.io/astral-sh/ruff:0.8.1@sha256:5bfb117d8d794578171cf6a6f076145cd0233d1fe79f661ac12d10113309a259 +FROM ghcr.io/astral-sh/ruff:0.8.2@sha256:84b0ad0023906db70b759b3b29e455dad0638159bf2de2b95086db1ab175917b diff --git a/modules/ruff/go.mod b/modules/ruff/go.mod index 5224c69fb3..4ed7b9f578 100644 --- a/modules/ruff/go.mod +++ b/modules/ruff/go.mod @@ -1,11 +1,13 @@ module github.com/dagger/dagger/modules/ruff -go 1.22.4 +go 1.22.5 + +toolchain go1.23.2 require ( - github.com/99designs/gqlgen v0.17.49 + github.com/99designs/gqlgen v0.17.55 github.com/Khan/genqlient v0.7.0 - github.com/vektah/gqlparser/v2 v2.5.16 + github.com/vektah/gqlparser/v2 v2.5.17 go.opentelemetry.io/otel v1.28.0 go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240710190201-e8c22e6e7180 go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.4.0 @@ -17,7 +19,7 @@ require ( go.opentelemetry.io/otel/trace v1.28.0 go.opentelemetry.io/proto/otlp v1.3.1 golang.org/x/exp v0.0.0-20240707233637-46b078467d37 - golang.org/x/sync v0.7.0 + golang.org/x/sync v0.10.0 google.golang.org/grpc v1.65.0 ) @@ -26,15 +28,26 @@ require ( github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect github.com/sosodev/duration v1.3.1 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 // indirect - go.opentelemetry.io/otel/metric v1.28.0 // indirect - golang.org/x/net v0.27.0 // indirect - golang.org/x/sys v0.22.0 // indirect - golang.org/x/text v0.16.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240709173604-40e1e62336c5 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240709173604-40e1e62336c5 // indirect + go.opentelemetry.io/otel/metric v1.28.0 + go.opentelemetry.io/otel/sdk/metric v1.27.0 + golang.org/x/net v0.29.0 // indirect + golang.org/x/sys v0.28.0 // indirect + golang.org/x/text v0.21.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect google.golang.org/protobuf v1.34.2 // indirect ) + +replace go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc => go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 + +replace go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp => go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 + +replace go.opentelemetry.io/otel/log => go.opentelemetry.io/otel/log v0.3.0 + +replace go.opentelemetry.io/otel/sdk/log => go.opentelemetry.io/otel/sdk/log v0.3.0 diff --git a/modules/ruff/go.sum b/modules/ruff/go.sum index e37bf9ef1d..bb43c01bdc 100644 --- a/modules/ruff/go.sum +++ b/modules/ruff/go.sum @@ -1,5 +1,5 @@ -github.com/99designs/gqlgen v0.17.49 h1:b3hNGexHd33fBSAd4NDT/c3NCcQzcAVkknhN9ym36YQ= -github.com/99designs/gqlgen v0.17.49/go.mod h1:tC8YFVZMed81x7UJ7ORUwXF4Kn6SXuucFqQBhN8+BU0= +github.com/99designs/gqlgen v0.17.55 h1:3vzrNWYyzSZjGDFo68e5j9sSauLxfKvLp+6ioRokVtM= +github.com/99designs/gqlgen v0.17.55/go.mod h1:3Bq768f8hgVPGZxL8aY9MaYmbxa6llPM/qu1IGH1EJo= github.com/Khan/genqlient v0.7.0 h1:GZ1meyRnzcDTK48EjqB8t3bcfYvHArCUUvgOwpz1D4w= github.com/Khan/genqlient v0.7.0/go.mod h1:HNyy3wZvuYwmW3Y7mkoQLZsa/R5n5yIRajS1kPBvSFM= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= @@ -18,8 +18,8 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 h1:asbCHRVmodnJTuQ3qamDwqVOIjwqUPTYmYuemVOx+Ys= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0/go.mod h1:ggCgvZ2r7uOoQjOyu2Y1NhHmEPPzzuhWgcza5M1Ji1I= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= @@ -33,28 +33,34 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/vektah/gqlparser/v2 v2.5.16 h1:1gcmLTvs3JLKXckwCwlUagVn/IlV2bwqle0vJ0vy5p8= -github.com/vektah/gqlparser/v2 v2.5.16/go.mod h1:1lz1OeCqgQbQepsGxPVywrjdBHW2T08PUS3pJqepRww= +github.com/vektah/gqlparser/v2 v2.5.17 h1:9At7WblLV7/36nulgekUgIaqHZWn5hxqluxrxGUhOmI= +github.com/vektah/gqlparser/v2 v2.5.17/go.mod h1:1lz1OeCqgQbQepsGxPVywrjdBHW2T08PUS3pJqepRww= go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= -go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240710190201-e8c22e6e7180 h1:kohQ8+q76VDzU6Q2D8jTqaWs8n3fhCKhIkTfA/cT8Vg= -go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240710190201-e8c22e6e7180/go.mod h1:2meBkGt4DIO3b5AyN1N4umHmWcamfMpN0KI8Ofr5+m0= -go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.4.0 h1:zBPZAISA9NOc5cE8zydqDiS0itvg/P/0Hn9m72a5gvM= -go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.4.0/go.mod h1:gcj2fFjEsqpV3fXuzAA+0Ze1p2/4MJ4T7d77AmkvueQ= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 h1:oM0GTNKGlc5qHctWeIGTVyda4iFFalOzMZ3Ehj5rwB4= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88/go.mod h1:JGG8ebaMO5nXOPnvKEl+DiA4MGwFjCbjsxT1WHIEBPY= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 h1:ccBrA8nCY5mM0y5uO7FT0ze4S0TuFcWdDB2FxGMTjkI= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0/go.mod h1:/9pb6634zi2Lk8LYg9Q0X8Ar6jka4dkFOylBLbVQPCE= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 h1:bFgvUr3/O4PHj3VQcFEuYKvRZJX1SJDQ+11JXuSB3/w= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0/go.mod h1:xJntEd2KL6Qdg5lwp97HMLQDVeAhrYxmzFseAMDPQ8I= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 h1:CIHWikMsN3wO+wq1Tp5VGdVRTcON+DmOJSfDjXypKOc= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0/go.mod h1:TNupZ6cxqyFEpLXAZW7On+mLFL0/g0TE3unIYL91xWc= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 h1:3Q/xZUyC1BBkualc9ROb4G8qkH90LXEIICcs5zv1OYY= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0/go.mod h1:s75jGIWA9OfCMzF0xr+ZgfrB5FEbbV7UuYo32ahUiFI= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0 h1:R3X6ZXmNPRR8ul6i3WgFURCHzaXjHdm0karRG/+dj3s= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0/go.mod h1:QWFXnDavXWwMx2EEcZsf3yxgEKAqsxQ+Syjp+seyInw= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 h1:j9+03ymgYhPKmeXGk5Zu+cIZOlVzd9Zv7QIiyItjFBU= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0/go.mod h1:Y5+XiUG4Emn1hTfciPzGPJaSI+RpDts6BnCIir0SLqk= -go.opentelemetry.io/otel/log v0.4.0 h1:/vZ+3Utqh18e8TPjuc3ecg284078KWrR8BRz+PQAj3o= -go.opentelemetry.io/otel/log v0.4.0/go.mod h1:DhGnQvky7pHy82MIRV43iXh3FlKN8UUKftn0KbLOq6I= +go.opentelemetry.io/otel/log v0.3.0 h1:kJRFkpUFYtny37NQzL386WbznUByZx186DpEMKhEGZs= +go.opentelemetry.io/otel/log v0.3.0/go.mod h1:ziCwqZr9soYDwGNbIL+6kAvQC+ANvjgG367HVcyR/ys= go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= -go.opentelemetry.io/otel/sdk/log v0.4.0 h1:1mMI22L82zLqf6KtkjrRy5BbagOTWdJsqMY/HSqILAA= -go.opentelemetry.io/otel/sdk/log v0.4.0/go.mod h1:AYJ9FVF0hNOgAVzUG/ybg/QttnXhUePWAupmCqtdESo= +go.opentelemetry.io/otel/sdk/log v0.3.0 h1:GEjJ8iftz2l+XO1GF2856r7yYVh74URiF9JMcAacr5U= +go.opentelemetry.io/otel/sdk/log v0.3.0/go.mod h1:BwCxtmux6ACLuys1wlbc0+vGBd+xytjmjajwqqIul2g= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= @@ -63,18 +69,18 @@ go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= golang.org/x/exp v0.0.0-20240707233637-46b078467d37 h1:uLDX+AfeFCct3a2C7uIWBKMJIR3CJMhcgfrUAqjRK6w= golang.org/x/exp v0.0.0-20240707233637-46b078467d37/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= -golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= -golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= -golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= -google.golang.org/genproto/googleapis/api v0.0.0-20240709173604-40e1e62336c5 h1:a/Z0jgw03aJ2rQnp5PlPpznJqJft0HyvyrcUcxgzPwY= -google.golang.org/genproto/googleapis/api v0.0.0-20240709173604-40e1e62336c5/go.mod h1:mw8MG/Qz5wfgYr6VqVCiZcHe/GJEfI+oGGDCohaVgB0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240709173604-40e1e62336c5 h1:SbSDUWW1PAO24TNpLdeheoYPd7kllICcLU52x6eD4kQ= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240709173604-40e1e62336c5/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= +golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 h1:wKguEg1hsxI2/L3hUYrpo1RVi48K+uTyzKqprwLXsb8= +google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142/go.mod h1:d6be+8HhtEtucleCbxpPW9PA9XwISACu8nvpPqF0BVo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 h1:e7S5W7MGGLaSu8j3YjdezkZ+m1/Nm0uRVRMEMGk26Xs= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= diff --git a/modules/shellcheck/go.mod b/modules/shellcheck/go.mod index 0f98e6c2a3..8f951a389c 100644 --- a/modules/shellcheck/go.mod +++ b/modules/shellcheck/go.mod @@ -1,11 +1,13 @@ module github.com/dagger/dagger/modules/shellcheck -go 1.22 +go 1.22.5 + +toolchain go1.23.2 require ( - github.com/99designs/gqlgen v0.17.49 + github.com/99designs/gqlgen v0.17.55 github.com/Khan/genqlient v0.7.0 - github.com/vektah/gqlparser/v2 v2.5.16 + github.com/vektah/gqlparser/v2 v2.5.17 go.opentelemetry.io/otel v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 @@ -13,8 +15,8 @@ require ( go.opentelemetry.io/otel/trace v1.27.0 go.opentelemetry.io/proto/otlp v1.3.1 golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8 - golang.org/x/sync v0.7.0 - google.golang.org/grpc v1.64.0 + golang.org/x/sync v0.10.0 + google.golang.org/grpc v1.65.0 ) require github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect @@ -24,18 +26,29 @@ require ( github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect github.com/sosodev/duration v1.3.1 // indirect go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect go.opentelemetry.io/otel/log v0.3.0 - go.opentelemetry.io/otel/metric v1.27.0 // indirect + go.opentelemetry.io/otel/metric v1.27.0 go.opentelemetry.io/otel/sdk/log v0.3.0 - golang.org/x/net v0.26.0 // indirect - golang.org/x/sys v0.21.0 // indirect - golang.org/x/text v0.16.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 // indirect - google.golang.org/protobuf v1.34.1 // indirect + go.opentelemetry.io/otel/sdk/metric v1.27.0 + golang.org/x/net v0.29.0 // indirect + golang.org/x/sys v0.28.0 // indirect + golang.org/x/text v0.21.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect + google.golang.org/protobuf v1.34.2 // indirect ) + +replace go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc => go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 + +replace go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp => go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 + +replace go.opentelemetry.io/otel/log => go.opentelemetry.io/otel/log v0.3.0 + +replace go.opentelemetry.io/otel/sdk/log => go.opentelemetry.io/otel/sdk/log v0.3.0 diff --git a/modules/shellcheck/go.sum b/modules/shellcheck/go.sum index 3e77d8bf59..1f49d52630 100644 --- a/modules/shellcheck/go.sum +++ b/modules/shellcheck/go.sum @@ -1,5 +1,5 @@ -github.com/99designs/gqlgen v0.17.49 h1:b3hNGexHd33fBSAd4NDT/c3NCcQzcAVkknhN9ym36YQ= -github.com/99designs/gqlgen v0.17.49/go.mod h1:tC8YFVZMed81x7UJ7ORUwXF4Kn6SXuucFqQBhN8+BU0= +github.com/99designs/gqlgen v0.17.55 h1:3vzrNWYyzSZjGDFo68e5j9sSauLxfKvLp+6ioRokVtM= +github.com/99designs/gqlgen v0.17.55/go.mod h1:3Bq768f8hgVPGZxL8aY9MaYmbxa6llPM/qu1IGH1EJo= github.com/Khan/genqlient v0.7.0 h1:GZ1meyRnzcDTK48EjqB8t3bcfYvHArCUUvgOwpz1D4w= github.com/Khan/genqlient v0.7.0/go.mod h1:HNyy3wZvuYwmW3Y7mkoQLZsa/R5n5yIRajS1kPBvSFM= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= @@ -18,8 +18,8 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 h1:asbCHRVmodnJTuQ3qamDwqVOIjwqUPTYmYuemVOx+Ys= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0/go.mod h1:ggCgvZ2r7uOoQjOyu2Y1NhHmEPPzzuhWgcza5M1Ji1I= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= @@ -33,14 +33,18 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/vektah/gqlparser/v2 v2.5.16 h1:1gcmLTvs3JLKXckwCwlUagVn/IlV2bwqle0vJ0vy5p8= -github.com/vektah/gqlparser/v2 v2.5.16/go.mod h1:1lz1OeCqgQbQepsGxPVywrjdBHW2T08PUS3pJqepRww= +github.com/vektah/gqlparser/v2 v2.5.17 h1:9At7WblLV7/36nulgekUgIaqHZWn5hxqluxrxGUhOmI= +github.com/vektah/gqlparser/v2 v2.5.17/go.mod h1:1lz1OeCqgQbQepsGxPVywrjdBHW2T08PUS3pJqepRww= go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 h1:oM0GTNKGlc5qHctWeIGTVyda4iFFalOzMZ3Ehj5rwB4= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88/go.mod h1:JGG8ebaMO5nXOPnvKEl+DiA4MGwFjCbjsxT1WHIEBPY= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 h1:ccBrA8nCY5mM0y5uO7FT0ze4S0TuFcWdDB2FxGMTjkI= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0/go.mod h1:/9pb6634zi2Lk8LYg9Q0X8Ar6jka4dkFOylBLbVQPCE= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 h1:bFgvUr3/O4PHj3VQcFEuYKvRZJX1SJDQ+11JXuSB3/w= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0/go.mod h1:xJntEd2KL6Qdg5lwp97HMLQDVeAhrYxmzFseAMDPQ8I= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 h1:CIHWikMsN3wO+wq1Tp5VGdVRTcON+DmOJSfDjXypKOc= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0/go.mod h1:TNupZ6cxqyFEpLXAZW7On+mLFL0/g0TE3unIYL91xWc= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 h1:R9DE4kQ4k+YtfLI2ULwX82VtNQ2J8yZmA7ZIF/D+7Mc= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0/go.mod h1:OQFyQVrDlbe+R7xrEyDr/2Wr67Ol0hRUgsfA+V5A95s= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= @@ -55,6 +59,8 @@ go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kT go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= go.opentelemetry.io/otel/sdk/log v0.3.0 h1:GEjJ8iftz2l+XO1GF2856r7yYVh74URiF9JMcAacr5U= go.opentelemetry.io/otel/sdk/log v0.3.0/go.mod h1:BwCxtmux6ACLuys1wlbc0+vGBd+xytjmjajwqqIul2g= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= @@ -63,22 +69,22 @@ go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8 h1:LoYXNGAShUG3m/ehNk4iFctuhGX/+R1ZpfJ4/ia80JM= golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8/go.mod h1:jj3sYF3dwk5D+ghuXyeI3r5MFf+NT2An6/9dOA95KSI= -golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= -google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 h1:P8OJ/WCl/Xo4E4zoe4/bifHpSmmKwARqyqE4nW6J2GQ= -google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:RGnPtTG7r4i8sPlNyDeikXF99hMM+hN6QMm4ooG9g2g= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 h1:1GBuWVLM/KMVUv1t1En5Gs+gFZCNd360GGb4sSxtrhU= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= -google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= -google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 h1:wKguEg1hsxI2/L3hUYrpo1RVi48K+uTyzKqprwLXsb8= +google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142/go.mod h1:d6be+8HhtEtucleCbxpPW9PA9XwISACu8nvpPqF0BVo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 h1:e7S5W7MGGLaSu8j3YjdezkZ+m1/Nm0uRVRMEMGk26Xs= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= +google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/modules/wolfi/go.mod b/modules/wolfi/go.mod index 0d295107a6..b7d02cc029 100644 --- a/modules/wolfi/go.mod +++ b/modules/wolfi/go.mod @@ -1,18 +1,20 @@ module github.com/dagger/dagger/modules/wolfi -go 1.22 +go 1.22.5 + +toolchain go1.23.2 require ( - github.com/99designs/gqlgen v0.17.49 + github.com/99designs/gqlgen v0.17.55 github.com/Khan/genqlient v0.7.0 - github.com/vektah/gqlparser/v2 v2.5.16 + github.com/vektah/gqlparser/v2 v2.5.17 go.opentelemetry.io/otel v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 go.opentelemetry.io/otel/sdk v1.27.0 go.opentelemetry.io/otel/trace v1.27.0 golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa - golang.org/x/sync v0.8.0 + golang.org/x/sync v0.10.0 google.golang.org/grpc v1.65.0 ) @@ -26,14 +28,17 @@ require ( github.com/sosodev/duration v1.3.1 // indirect go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect go.opentelemetry.io/otel/log v0.3.0 - go.opentelemetry.io/otel/metric v1.27.0 // indirect + go.opentelemetry.io/otel/metric v1.27.0 go.opentelemetry.io/otel/sdk/log v0.3.0 + go.opentelemetry.io/otel/sdk/metric v1.27.0 go.opentelemetry.io/proto/otlp v1.3.1 golang.org/x/net v0.29.0 // indirect - golang.org/x/sys v0.25.0 // indirect - golang.org/x/text v0.18.0 // indirect + golang.org/x/sys v0.28.0 // indirect + golang.org/x/text v0.21.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect google.golang.org/protobuf v1.34.2 // indirect diff --git a/modules/wolfi/go.sum b/modules/wolfi/go.sum index cd12295fa0..c146adf411 100644 --- a/modules/wolfi/go.sum +++ b/modules/wolfi/go.sum @@ -1,5 +1,5 @@ -github.com/99designs/gqlgen v0.17.49 h1:b3hNGexHd33fBSAd4NDT/c3NCcQzcAVkknhN9ym36YQ= -github.com/99designs/gqlgen v0.17.49/go.mod h1:tC8YFVZMed81x7UJ7ORUwXF4Kn6SXuucFqQBhN8+BU0= +github.com/99designs/gqlgen v0.17.55 h1:3vzrNWYyzSZjGDFo68e5j9sSauLxfKvLp+6ioRokVtM= +github.com/99designs/gqlgen v0.17.55/go.mod h1:3Bq768f8hgVPGZxL8aY9MaYmbxa6llPM/qu1IGH1EJo= github.com/Khan/genqlient v0.7.0 h1:GZ1meyRnzcDTK48EjqB8t3bcfYvHArCUUvgOwpz1D4w= github.com/Khan/genqlient v0.7.0/go.mod h1:HNyy3wZvuYwmW3Y7mkoQLZsa/R5n5yIRajS1kPBvSFM= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= @@ -33,14 +33,18 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/vektah/gqlparser/v2 v2.5.16 h1:1gcmLTvs3JLKXckwCwlUagVn/IlV2bwqle0vJ0vy5p8= -github.com/vektah/gqlparser/v2 v2.5.16/go.mod h1:1lz1OeCqgQbQepsGxPVywrjdBHW2T08PUS3pJqepRww= +github.com/vektah/gqlparser/v2 v2.5.17 h1:9At7WblLV7/36nulgekUgIaqHZWn5hxqluxrxGUhOmI= +github.com/vektah/gqlparser/v2 v2.5.17/go.mod h1:1lz1OeCqgQbQepsGxPVywrjdBHW2T08PUS3pJqepRww= go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 h1:oM0GTNKGlc5qHctWeIGTVyda4iFFalOzMZ3Ehj5rwB4= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88/go.mod h1:JGG8ebaMO5nXOPnvKEl+DiA4MGwFjCbjsxT1WHIEBPY= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 h1:ccBrA8nCY5mM0y5uO7FT0ze4S0TuFcWdDB2FxGMTjkI= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0/go.mod h1:/9pb6634zi2Lk8LYg9Q0X8Ar6jka4dkFOylBLbVQPCE= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 h1:bFgvUr3/O4PHj3VQcFEuYKvRZJX1SJDQ+11JXuSB3/w= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0/go.mod h1:xJntEd2KL6Qdg5lwp97HMLQDVeAhrYxmzFseAMDPQ8I= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 h1:CIHWikMsN3wO+wq1Tp5VGdVRTcON+DmOJSfDjXypKOc= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0/go.mod h1:TNupZ6cxqyFEpLXAZW7On+mLFL0/g0TE3unIYL91xWc= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 h1:R9DE4kQ4k+YtfLI2ULwX82VtNQ2J8yZmA7ZIF/D+7Mc= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0/go.mod h1:OQFyQVrDlbe+R7xrEyDr/2Wr67Ol0hRUgsfA+V5A95s= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= @@ -55,6 +59,8 @@ go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kT go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= go.opentelemetry.io/otel/sdk/log v0.3.0 h1:GEjJ8iftz2l+XO1GF2856r7yYVh74URiF9JMcAacr5U= go.opentelemetry.io/otel/sdk/log v0.3.0/go.mod h1:BwCxtmux6ACLuys1wlbc0+vGBd+xytjmjajwqqIul2g= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= @@ -65,12 +71,12 @@ golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8 golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= -golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= -golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= -golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= -golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 h1:wKguEg1hsxI2/L3hUYrpo1RVi48K+uTyzKqprwLXsb8= google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142/go.mod h1:d6be+8HhtEtucleCbxpPW9PA9XwISACu8nvpPqF0BVo= google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 h1:e7S5W7MGGLaSu8j3YjdezkZ+m1/Nm0uRVRMEMGk26Xs= diff --git a/releaser/.dagger/go.mod b/releaser/.dagger/go.mod index 0510d7da83..7c7cb0845e 100644 --- a/releaser/.dagger/go.mod +++ b/releaser/.dagger/go.mod @@ -3,23 +3,26 @@ module dagger/releaser go 1.23.1 require ( - github.com/99designs/gqlgen v0.17.55 + github.com/99designs/gqlgen v0.17.57 github.com/Khan/genqlient v0.7.0 - github.com/moby/buildkit v0.16.0 - github.com/vektah/gqlparser/v2 v2.5.17 + github.com/vektah/gqlparser/v2 v2.5.19 go.opentelemetry.io/otel v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 go.opentelemetry.io/otel/log v0.3.0 + go.opentelemetry.io/otel/metric v1.27.0 go.opentelemetry.io/otel/sdk v1.27.0 go.opentelemetry.io/otel/sdk/log v0.3.0 + go.opentelemetry.io/otel/sdk/metric v1.27.0 go.opentelemetry.io/otel/trace v1.27.0 go.opentelemetry.io/proto/otlp v1.3.1 golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa - golang.org/x/sync v0.8.0 - google.golang.org/grpc v1.66.1 + golang.org/x/sync v0.9.0 + google.golang.org/grpc v1.68.0 ) require ( @@ -28,19 +31,15 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/google/uuid v1.6.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect - github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect github.com/sosodev/duration v1.3.1 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 + github.com/stretchr/testify v1.10.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect - go.opentelemetry.io/otel/metric v1.27.0 - go.opentelemetry.io/otel/sdk/metric v1.27.0 golang.org/x/net v0.29.0 // indirect golang.org/x/sys v0.26.0 // indirect - golang.org/x/text v0.18.0 // indirect + golang.org/x/text v0.19.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect - google.golang.org/protobuf v1.34.2 // indirect + google.golang.org/protobuf v1.35.2 // indirect ) replace go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc => go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 diff --git a/releaser/.dagger/go.sum b/releaser/.dagger/go.sum index cc9a58478f..1a42fe2331 100644 --- a/releaser/.dagger/go.sum +++ b/releaser/.dagger/go.sum @@ -1,12 +1,11 @@ -github.com/99designs/gqlgen v0.17.55 h1:3vzrNWYyzSZjGDFo68e5j9sSauLxfKvLp+6ioRokVtM= -github.com/99designs/gqlgen v0.17.55/go.mod h1:3Bq768f8hgVPGZxL8aY9MaYmbxa6llPM/qu1IGH1EJo= +github.com/99designs/gqlgen v0.17.57 h1:Ak4p60BRq6QibxY0lEc0JnQhDurfhxA67sp02lMjmPc= +github.com/99designs/gqlgen v0.17.57/go.mod h1:Jx61hzOSTcR4VJy/HFIgXiQ5rJ0Ypw8DxWLjbYDAUw0= github.com/Khan/genqlient v0.7.0 h1:GZ1meyRnzcDTK48EjqB8t3bcfYvHArCUUvgOwpz1D4w= github.com/Khan/genqlient v0.7.0/go.mod h1:HNyy3wZvuYwmW3Y7mkoQLZsa/R5n5yIRajS1kPBvSFM= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -14,29 +13,24 @@ github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 h1:asbCHRVmodnJTuQ3qamDwqVOIjwqUPTYmYuemVOx+Ys= github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0/go.mod h1:ggCgvZ2r7uOoQjOyu2Y1NhHmEPPzzuhWgcza5M1Ji1I= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/moby/buildkit v0.16.0 h1:wOVBj1o5YNVad/txPQNXUXdelm7Hs/i0PUFjzbK0VKE= -github.com/moby/buildkit v0.16.0/go.mod h1:Xqx/5GlrqE1yIRORk0NSCVDFpQAU1WjlT6KHYZdisIQ= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8= -github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= +github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= +github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= github.com/sosodev/duration v1.3.1 h1:qtHBDMQ6lvMQsL15g4aopM4HEfOaYuhWBw3NPTtlqq4= github.com/sosodev/duration v1.3.1/go.mod h1:RQIBBX0+fMLc/D9+Jb/fwvVmo0eZvDDEERAikUR6SDg= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/vektah/gqlparser/v2 v2.5.17 h1:9At7WblLV7/36nulgekUgIaqHZWn5hxqluxrxGUhOmI= -github.com/vektah/gqlparser/v2 v2.5.17/go.mod h1:1lz1OeCqgQbQepsGxPVywrjdBHW2T08PUS3pJqepRww= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/vektah/gqlparser/v2 v2.5.19 h1:bhCPCX1D4WWzCDvkPl4+TP1N8/kLrWnp43egplt7iSg= +github.com/vektah/gqlparser/v2 v2.5.19/go.mod h1:y7kvl5bBlDeuWIvLtA9849ncyvx6/lj06RsMrEjVy3U= go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 h1:oM0GTNKGlc5qHctWeIGTVyda4iFFalOzMZ3Ehj5rwB4= @@ -73,23 +67,19 @@ golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8 golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= -golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= -golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ= +golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= -golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= +golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 h1:hjSy6tcFQZ171igDaN5QHOw2n6vx40juYbC/x67CEhc= google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:qpvKtACPCQhAdu3PyQgV4l3LMXZEtft7y8QcarRsp9I= google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= -google.golang.org/grpc v1.66.1 h1:hO5qAXR19+/Z44hmvIM4dQFMSYX9XcWsByfoxutBpAM= -google.golang.org/grpc v1.66.1/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= -google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= -google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +google.golang.org/grpc v1.68.0 h1:aHQeeJbo8zAkAa3pRzrVjZlbz6uSfeOXlJNQM0RAbz0= +google.golang.org/grpc v1.68.0/go.mod h1:fmSPC5AsjSBCK54MyHRx48kpOti1/jRfOlwEWywNjWA= +google.golang.org/protobuf v1.35.2 h1:8Ar7bF+apOIoThw1EdZl0p1oWvMqTHmpA2fRTyZO8io= +google.golang.org/protobuf v1.35.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/releaser/.dagger/main.go b/releaser/.dagger/main.go index 322b86bc71..533cd5f860 100644 --- a/releaser/.dagger/main.go +++ b/releaser/.dagger/main.go @@ -49,11 +49,10 @@ func (r Releaser) GithubRelease( // GitHub repository URL repository string, // Tag for the GitHub release - // eg. sdk/typescript/v0.14.0 + // eg. v0.14.0 tag string, - // The target for the release - // eg. ๐Ÿคทโ€โ™‚๏ธ - // FIXME: what's the difference with 'tag'? Who knows, it wasn't documented - SH Nov 2024 + // The target tag for the release + // e.g. sdk/typescript/v0.14.0 target string, // File containing release notes // +optional @@ -65,14 +64,10 @@ func (r Releaser) GithubRelease( // +optional dryRun bool, ) error { - u, err := url.Parse(repository) + githubRepo, err := githubRepo(repository) if err != nil { return err } - if (u.Host != "") && (u.Host != "github.com") { - return fmt.Errorf("git repo must be on github.com") - } - githubRepo := strings.TrimPrefix(strings.TrimSuffix(u.Path, ".git"), "/") commit, err := dag.Version().Git().Commit(target).Commit(ctx) if err != nil { @@ -115,3 +110,50 @@ func (r Releaser) GithubRelease( }, ) } + +func (r Releaser) Notify( + ctx context.Context, + // GitHub repository URL + repository string, + // The target tag for the release + // e.g. sdk/typescript/v0.14.0 + target string, + // Name of the component to release + name string, + // Discord webhook + // +optional + discordWebhook *dagger.Secret, + + // Whether to perform a dry run without creating the release + // +optional + dryRun bool, +) error { + githubRepo, err := githubRepo(repository) + if err != nil { + return err + } + if dryRun { + return nil + } + + if discordWebhook == nil { + message := fmt.Sprintf("%s: https://github.com/%s/releases/tag/%s", name, githubRepo, target) + _, err = dag.Notify().Discord(ctx, discordWebhook, message) + if err != nil { + return err + } + } + + return nil +} + +func githubRepo(repo string) (string, error) { + u, err := url.Parse(repo) + if err != nil { + return "", err + } + if (u.Host != "") && (u.Host != "github.com") { + return "", fmt.Errorf("git repo must be on github.com") + } + return strings.TrimPrefix(strings.TrimSuffix(u.Path, ".git"), "/"), nil +} diff --git a/releaser/dagger.json b/releaser/dagger.json index c746dd3bd2..498c247e42 100644 --- a/releaser/dagger.json +++ b/releaser/dagger.json @@ -1,6 +1,6 @@ { "name": "releaser", - "engineVersion": "v0.14.0", + "engineVersion": "v0.15.0", "sdk": "go", "dependencies": [ { @@ -8,10 +8,14 @@ "source": "github.com/sagikazarmark/daggerverse/gh@main", "pin": "5a5ab8cce801ad62f2618f50a4e859e2f7fcacb9" }, + { + "name": "notify", + "source": "github.com/gerhard/daggerverse/notify@2024-02-13", + "pin": "d83fad32dc187838c849d4ea8152cc97a46de00a" + }, { "name": "version", - "source": "../version", - "pin": "" + "source": "../version" } ], "source": ".dagger" diff --git a/sdk/elixir/.changes/unreleased/Added-20241109-103555.yaml b/sdk/elixir/.changes/unreleased/Added-20241109-103555.yaml deleted file mode 100644 index 10832847ff..0000000000 --- a/sdk/elixir/.changes/unreleased/Added-20241109-103555.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: Added -body: Add support for TRACEPARENT. The user will see what's function doing in the TUI. -time: 2024-11-09T10:35:55.353113+07:00 -custom: - Author: wingyplus - PR: "8859" diff --git a/sdk/elixir/.changes/unreleased/Breaking-20241122-121153.yaml b/sdk/elixir/.changes/unreleased/Breaking-20241122-121153.yaml deleted file mode 100644 index 2166a5343a..0000000000 --- a/sdk/elixir/.changes/unreleased/Breaking-20241122-121153.yaml +++ /dev/null @@ -1,9 +0,0 @@ -kind: Breaking -body: |- - `ExecErr.message` no longer contains the values of `stdout` or `stderr`. - - When comparing error values for expected output, use the more specific values. -time: 2024-11-22T12:11:53.934008034Z -custom: - Author: vito - PR: "9033" diff --git a/sdk/elixir/.changes/v0.15.0.md b/sdk/elixir/.changes/v0.15.0.md new file mode 100644 index 0000000000..b670f87462 --- /dev/null +++ b/sdk/elixir/.changes/v0.15.0.md @@ -0,0 +1,20 @@ +## sdk/elixir/v0.15.0 - 2024-12-10 + +This SDK uses ๐Ÿš™ Engine + ๐Ÿš— CLI version `v0.15.0`. [See what changed in that release](https://github.com/dagger/dagger/releases/tag/v0.15.0). + +๐Ÿงช https://hex.pm/packages/dagger +๐Ÿ“– https://hexdocs.pm/dagger/Dagger.html + +### ๐Ÿ”ฅ Breaking Changes +- `ExecErr.message` no longer contains the values of `stdout` or `stderr` by @vito in https://github.com/dagger/dagger/pull/9033 \ + When comparing error values for expected output, use the more specific values. + +### Added +- Add support for `TRACEPARENT`. The user will see what's function doing in the TUI by @wingyplus in https://github.com/dagger/dagger/pull/8859 + +### Dependencies +- Bump Engine to v0.15.0 by @jedevc in https://github.com/dagger/dagger/pull/9158 + +### What to do next +- Join our [Discord server](https://discord.gg/dagger-io) +- Follow us on [Twitter](https://twitter.com/dagger_io) diff --git a/sdk/elixir/.changes/v0.15.1.md b/sdk/elixir/.changes/v0.15.1.md new file mode 100644 index 0000000000..dd5d71edc9 --- /dev/null +++ b/sdk/elixir/.changes/v0.15.1.md @@ -0,0 +1,13 @@ +## sdk/elixir/v0.15.1 - 2024-12-12 + +This SDK uses ๐Ÿš™ Engine + ๐Ÿš— CLI version `v0.15.1`. [See what changed in that release](https://github.com/dagger/dagger/releases/tag/v0.15.1). + +๐Ÿงช https://hex.pm/packages/dagger +๐Ÿ“– https://hexdocs.pm/dagger/Dagger.html + +### Dependencies +- Bump Engine to v0.15.1 by @cwlbraa in https://github.com/dagger/dagger/pull/9183 + +### What to do next +- Join our [Discord server](https://discord.gg/dagger-io) +- Follow us on [Twitter](https://twitter.com/dagger_io) diff --git a/sdk/elixir/CHANGELOG.md b/sdk/elixir/CHANGELOG.md index 658df70735..ef48cbbf09 100644 --- a/sdk/elixir/CHANGELOG.md +++ b/sdk/elixir/CHANGELOG.md @@ -6,6 +6,41 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), and is generated by [Changie](https://github.com/miniscruff/changie). +## sdk/elixir/v0.15.1 - 2024-12-12 + +This SDK uses ๐Ÿš™ Engine + ๐Ÿš— CLI version `v0.15.1`. [See what changed in that release](https://github.com/dagger/dagger/releases/tag/v0.15.1). + +๐Ÿงช https://hex.pm/packages/dagger +๐Ÿ“– https://hexdocs.pm/dagger/Dagger.html + +### Dependencies +- Bump Engine to v0.15.1 by @cwlbraa in https://github.com/dagger/dagger/pull/9183 + +### What to do next +- Join our [Discord server](https://discord.gg/dagger-io) +- Follow us on [Twitter](https://twitter.com/dagger_io) + +## sdk/elixir/v0.15.0 - 2024-12-10 + +This SDK uses ๐Ÿš™ Engine + ๐Ÿš— CLI version `v0.15.0`. [See what changed in that release](https://github.com/dagger/dagger/releases/tag/v0.15.0). + +๐Ÿงช https://hex.pm/packages/dagger +๐Ÿ“– https://hexdocs.pm/dagger/Dagger.html + +### ๐Ÿ”ฅ Breaking Changes +- `ExecErr.message` no longer contains the values of `stdout` or `stderr` by @vito in https://github.com/dagger/dagger/pull/9033 \ + When comparing error values for expected output, use the more specific values. + +### Added +- Add support for `TRACEPARENT`. The user will see what's function doing in the TUI by @wingyplus in https://github.com/dagger/dagger/pull/8859 + +### Dependencies +- Bump Engine to v0.15.0 by @jedevc in https://github.com/dagger/dagger/pull/9158 + +### What to do next +- Join our [Discord server](https://discord.gg/dagger-io) +- Follow us on [Twitter](https://twitter.com/dagger_io) + ## sdk/elixir/v0.14.0 - 2024-11-08 This SDK uses ๐Ÿš™ Engine + ๐Ÿš— CLI version `v0.14.0`. [See what changed in that release](https://github.com/dagger/dagger/releases/tag/v0.14.0). diff --git a/sdk/elixir/lib/dagger/core/version.ex b/sdk/elixir/lib/dagger/core/version.ex index b561f815b5..d50046fb35 100644 --- a/sdk/elixir/lib/dagger/core/version.ex +++ b/sdk/elixir/lib/dagger/core/version.ex @@ -1,7 +1,7 @@ defmodule Dagger.Core.Version do @moduledoc false - @dagger_cli_version "0.14.0" + @dagger_cli_version "0.15.1" def engine_version(), do: @dagger_cli_version end diff --git a/sdk/elixir/lib/dagger/gen/container.ex b/sdk/elixir/lib/dagger/gen/container.ex index 84896a3632..13916e305d 100644 --- a/sdk/elixir/lib/dagger/gen/container.ex +++ b/sdk/elixir/lib/dagger/gen/container.ex @@ -16,10 +16,27 @@ defmodule Dagger.Container do Be sure to set any exposed ports before this conversion. """ - @spec as_service(t()) :: Dagger.Service.t() - def as_service(%__MODULE__{} = container) do + @spec as_service(t(), [ + {:args, [String.t()]}, + {:use_entrypoint, boolean() | nil}, + {:experimental_privileged_nesting, boolean() | nil}, + {:insecure_root_capabilities, boolean() | nil}, + {:expand, boolean() | nil}, + {:no_init, boolean() | nil} + ]) :: Dagger.Service.t() + def as_service(%__MODULE__{} = container, optional_args \\ []) do query_builder = - container.query_builder |> QB.select("asService") + container.query_builder + |> QB.select("asService") + |> QB.maybe_put_arg("args", optional_args[:args]) + |> QB.maybe_put_arg("useEntrypoint", optional_args[:use_entrypoint]) + |> QB.maybe_put_arg( + "experimentalPrivilegedNesting", + optional_args[:experimental_privileged_nesting] + ) + |> QB.maybe_put_arg("insecureRootCapabilities", optional_args[:insecure_root_capabilities]) + |> QB.maybe_put_arg("expand", optional_args[:expand]) + |> QB.maybe_put_arg("noInit", optional_args[:no_init]) %Dagger.Service{ query_builder: query_builder, diff --git a/sdk/elixir/lib/dagger/gen/module_source.ex b/sdk/elixir/lib/dagger/gen/module_source.ex index 032e7b63f3..d833727f47 100644 --- a/sdk/elixir/lib/dagger/gen/module_source.ex +++ b/sdk/elixir/lib/dagger/gen/module_source.ex @@ -159,6 +159,15 @@ defmodule Dagger.ModuleSource do Client.execute(module_source.client, query_builder) end + @doc "The pinned version of this module source." + @spec pin(t()) :: {:ok, String.t()} | {:error, term()} + def pin(%__MODULE__{} = module_source) do + query_builder = + module_source.query_builder |> QB.select("pin") + + Client.execute(module_source.client, query_builder) + end + @doc "The path to the module source's context directory on the caller's filesystem. Only valid for local sources." @spec resolve_context_path_from_caller(t()) :: {:ok, String.t()} | {:error, term()} def resolve_context_path_from_caller(%__MODULE__{} = module_source) do diff --git a/sdk/elixir/runtime/go.mod b/sdk/elixir/runtime/go.mod index eda0c6b21d..edc6669140 100644 --- a/sdk/elixir/runtime/go.mod +++ b/sdk/elixir/runtime/go.mod @@ -1,43 +1,48 @@ module elixir-sdk -go 1.22 +go 1.22.7 -require ( - github.com/99designs/gqlgen v0.17.49 - github.com/Khan/genqlient v0.7.0 - github.com/vektah/gqlparser/v2 v2.5.16 - golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa - golang.org/x/sync v0.7.0 -) +toolchain go1.23.2 require ( - github.com/cenkalti/backoff/v4 v4.3.0 // indirect - github.com/go-logr/logr v1.4.1 // indirect - github.com/go-logr/stdr v1.2.2 // indirect - github.com/google/uuid v1.6.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect + github.com/99designs/gqlgen v0.17.57 + github.com/Khan/genqlient v0.7.0 github.com/iancoleman/strcase v0.3.0 - github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect - github.com/sosodev/duration v1.3.1 // indirect + github.com/vektah/gqlparser/v2 v2.5.19 go.opentelemetry.io/otel v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 go.opentelemetry.io/otel/log v0.3.0 - go.opentelemetry.io/otel/metric v1.27.0 // indirect + go.opentelemetry.io/otel/metric v1.27.0 go.opentelemetry.io/otel/sdk v1.27.0 go.opentelemetry.io/otel/sdk/log v0.3.0 + go.opentelemetry.io/otel/sdk/metric v1.27.0 go.opentelemetry.io/otel/trace v1.27.0 go.opentelemetry.io/proto/otlp v1.3.1 - golang.org/x/net v0.26.0 // indirect - golang.org/x/sys v0.21.0 // indirect - golang.org/x/text v0.16.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 // indirect - google.golang.org/grpc v1.64.0 - google.golang.org/protobuf v1.34.1 // indirect + golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa + golang.org/x/sync v0.9.0 + google.golang.org/grpc v1.68.0 +) + +require ( + github.com/cenkalti/backoff/v4 v4.3.0 // indirect + github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect + github.com/sosodev/duration v1.3.1 // indirect + github.com/stretchr/testify v1.10.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect + golang.org/x/net v0.29.0 // indirect + golang.org/x/sys v0.26.0 // indirect + golang.org/x/text v0.19.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect + google.golang.org/protobuf v1.35.2 // indirect ) replace go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc => go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 diff --git a/sdk/elixir/runtime/go.sum b/sdk/elixir/runtime/go.sum index 07ad1cc884..c773637ad6 100644 --- a/sdk/elixir/runtime/go.sum +++ b/sdk/elixir/runtime/go.sum @@ -1,48 +1,48 @@ -github.com/99designs/gqlgen v0.17.49 h1:b3hNGexHd33fBSAd4NDT/c3NCcQzcAVkknhN9ym36YQ= -github.com/99designs/gqlgen v0.17.49/go.mod h1:tC8YFVZMed81x7UJ7ORUwXF4Kn6SXuucFqQBhN8+BU0= +github.com/99designs/gqlgen v0.17.57 h1:Ak4p60BRq6QibxY0lEc0JnQhDurfhxA67sp02lMjmPc= +github.com/99designs/gqlgen v0.17.57/go.mod h1:Jx61hzOSTcR4VJy/HFIgXiQ5rJ0Ypw8DxWLjbYDAUw0= github.com/Khan/genqlient v0.7.0 h1:GZ1meyRnzcDTK48EjqB8t3bcfYvHArCUUvgOwpz1D4w= github.com/Khan/genqlient v0.7.0/go.mod h1:HNyy3wZvuYwmW3Y7mkoQLZsa/R5n5yIRajS1kPBvSFM= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 h1:asbCHRVmodnJTuQ3qamDwqVOIjwqUPTYmYuemVOx+Ys= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0/go.mod h1:ggCgvZ2r7uOoQjOyu2Y1NhHmEPPzzuhWgcza5M1Ji1I= github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8= -github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= +github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= +github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= github.com/sosodev/duration v1.3.1 h1:qtHBDMQ6lvMQsL15g4aopM4HEfOaYuhWBw3NPTtlqq4= github.com/sosodev/duration v1.3.1/go.mod h1:RQIBBX0+fMLc/D9+Jb/fwvVmo0eZvDDEERAikUR6SDg= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/vektah/gqlparser/v2 v2.5.16 h1:1gcmLTvs3JLKXckwCwlUagVn/IlV2bwqle0vJ0vy5p8= -github.com/vektah/gqlparser/v2 v2.5.16/go.mod h1:1lz1OeCqgQbQepsGxPVywrjdBHW2T08PUS3pJqepRww= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/vektah/gqlparser/v2 v2.5.19 h1:bhCPCX1D4WWzCDvkPl4+TP1N8/kLrWnp43egplt7iSg= +github.com/vektah/gqlparser/v2 v2.5.19/go.mod h1:y7kvl5bBlDeuWIvLtA9849ncyvx6/lj06RsMrEjVy3U= go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 h1:oM0GTNKGlc5qHctWeIGTVyda4iFFalOzMZ3Ehj5rwB4= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88/go.mod h1:JGG8ebaMO5nXOPnvKEl+DiA4MGwFjCbjsxT1WHIEBPY= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 h1:ccBrA8nCY5mM0y5uO7FT0ze4S0TuFcWdDB2FxGMTjkI= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0/go.mod h1:/9pb6634zi2Lk8LYg9Q0X8Ar6jka4dkFOylBLbVQPCE= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 h1:bFgvUr3/O4PHj3VQcFEuYKvRZJX1SJDQ+11JXuSB3/w= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0/go.mod h1:xJntEd2KL6Qdg5lwp97HMLQDVeAhrYxmzFseAMDPQ8I= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 h1:CIHWikMsN3wO+wq1Tp5VGdVRTcON+DmOJSfDjXypKOc= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0/go.mod h1:TNupZ6cxqyFEpLXAZW7On+mLFL0/g0TE3unIYL91xWc= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 h1:R9DE4kQ4k+YtfLI2ULwX82VtNQ2J8yZmA7ZIF/D+7Mc= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0/go.mod h1:OQFyQVrDlbe+R7xrEyDr/2Wr67Ol0hRUgsfA+V5A95s= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= @@ -57,6 +57,8 @@ go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kT go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= go.opentelemetry.io/otel/sdk/log v0.3.0 h1:GEjJ8iftz2l+XO1GF2856r7yYVh74URiF9JMcAacr5U= go.opentelemetry.io/otel/sdk/log v0.3.0/go.mod h1:BwCxtmux6ACLuys1wlbc0+vGBd+xytjmjajwqqIul2g= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= @@ -65,25 +67,21 @@ go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= -golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= -google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 h1:P8OJ/WCl/Xo4E4zoe4/bifHpSmmKwARqyqE4nW6J2GQ= -google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:RGnPtTG7r4i8sPlNyDeikXF99hMM+hN6QMm4ooG9g2g= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 h1:AgADTJarZTBqgjiUzRgfaBchgYB3/WFTC80GPwsMcRI= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= -google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= -google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= +golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ= +golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= +golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= +golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 h1:hjSy6tcFQZ171igDaN5QHOw2n6vx40juYbC/x67CEhc= +google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:qpvKtACPCQhAdu3PyQgV4l3LMXZEtft7y8QcarRsp9I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/grpc v1.68.0 h1:aHQeeJbo8zAkAa3pRzrVjZlbz6uSfeOXlJNQM0RAbz0= +google.golang.org/grpc v1.68.0/go.mod h1:fmSPC5AsjSBCK54MyHRx48kpOti1/jRfOlwEWywNjWA= +google.golang.org/protobuf v1.35.2 h1:8Ar7bF+apOIoThw1EdZl0p1oWvMqTHmpA2fRTyZO8io= +google.golang.org/protobuf v1.35.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/sdk/go/.changes/unreleased/Breaking-20241122-121153.yaml b/sdk/go/.changes/unreleased/Breaking-20241122-121153.yaml deleted file mode 100644 index 214e50147a..0000000000 --- a/sdk/go/.changes/unreleased/Breaking-20241122-121153.yaml +++ /dev/null @@ -1,9 +0,0 @@ -kind: Breaking -body: |- - `ExecErr.Error` no longer contains the values of `Stdout` or `Stderr`. - - When comparing error values for expected output, use the more specific values. -time: 2024-11-22T12:11:53.934008034Z -custom: - Author: vito - PR: "9033" diff --git a/sdk/go/.changes/v0.15.0.md b/sdk/go/.changes/v0.15.0.md new file mode 100644 index 0000000000..5d24a64eac --- /dev/null +++ b/sdk/go/.changes/v0.15.0.md @@ -0,0 +1,20 @@ +## sdk/go/v0.15.0 - 2024-12-11 + +This SDK uses ๐Ÿš™ Engine + ๐Ÿš— CLI version `v0.15.0`. [See what changed in that release](https://github.com/dagger/dagger/releases/tag/v0.15.0). + +๐Ÿน https://pkg.go.dev/dagger.io/dagger@v0.15.0 + +### ๐Ÿ”ฅ Breaking Changes +- Removed deprecated unscoped enum values by @jedevc in https://github.com/dagger/dagger/pull/8669 \ + Enum values must now be accessed with the name prefixed by the name of the + enum type - for example, `dagger.Shared` becomes `dagger.CacheSharingModeLocked`. +- `ExecErr.Error` no longer contains the values of `Stdout` or `Stderr` by @vito in https://github.com/dagger/dagger/pull/9033 \ + When comparing error values for expected output, use the more specific values. + +### Dependencies +- Bump Engine to v0.15.0 by @jedevc in https://github.com/dagger/dagger/pull/9158 + +### What to do next +- Read the [documentation](https://docs.dagger.io/sdk/go) +- Join our [Discord server](https://discord.gg/dagger-io) +- Follow us on [Twitter](https://twitter.com/dagger_io) diff --git a/sdk/go/.changes/v0.15.1.md b/sdk/go/.changes/v0.15.1.md new file mode 100644 index 0000000000..18bfcadacc --- /dev/null +++ b/sdk/go/.changes/v0.15.1.md @@ -0,0 +1,13 @@ +## sdk/go/v0.15.1 - 2024-12-12 + +This SDK uses ๐Ÿš™ Engine + ๐Ÿš— CLI version `v0.15.1`. [See what changed in that release](https://github.com/dagger/dagger/releases/tag/v0.15.1). + +๐Ÿน https://pkg.go.dev/dagger.io/dagger@v0.15.1 + +### Dependencies +- Bump Engine to v0.15.1 by @cwlbraa in https://github.com/dagger/dagger/pull/9183 + +### What to do next +- Read the [documentation](https://docs.dagger.io/sdk/go) +- Join our [Discord server](https://discord.gg/dagger-io) +- Follow us on [Twitter](https://twitter.com/dagger_io) diff --git a/sdk/go/CHANGELOG.md b/sdk/go/CHANGELOG.md index 20fa459174..56eb572148 100644 --- a/sdk/go/CHANGELOG.md +++ b/sdk/go/CHANGELOG.md @@ -6,6 +6,41 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), and is generated by [Changie](https://github.com/miniscruff/changie). +## sdk/go/v0.15.1 - 2024-12-12 + +This SDK uses ๐Ÿš™ Engine + ๐Ÿš— CLI version `v0.15.1`. [See what changed in that release](https://github.com/dagger/dagger/releases/tag/v0.15.1). + +๐Ÿน https://pkg.go.dev/dagger.io/dagger@v0.15.1 + +### Dependencies +- Bump Engine to v0.15.1 by @cwlbraa in https://github.com/dagger/dagger/pull/9183 + +### What to do next +- Read the [documentation](https://docs.dagger.io/sdk/go) +- Join our [Discord server](https://discord.gg/dagger-io) +- Follow us on [Twitter](https://twitter.com/dagger_io) + +## sdk/go/v0.15.0 - 2024-12-11 + +This SDK uses ๐Ÿš™ Engine + ๐Ÿš— CLI version `v0.15.0`. [See what changed in that release](https://github.com/dagger/dagger/releases/tag/v0.15.0). + +๐Ÿน https://pkg.go.dev/dagger.io/dagger@v0.15.0 + +### ๐Ÿ”ฅ Breaking Changes +- Removed deprecated unscoped enum values by @jedevc in https://github.com/dagger/dagger/pull/8669 \ + Enum values must now be accessed with the name prefixed by the name of the + enum type - for example, `dagger.Shared` becomes `dagger.CacheSharingModeLocked`. +- `ExecErr.Error` no longer contains the values of `Stdout` or `Stderr` by @vito in https://github.com/dagger/dagger/pull/9033 \ + When comparing error values for expected output, use the more specific values. + +### Dependencies +- Bump Engine to v0.15.0 by @jedevc in https://github.com/dagger/dagger/pull/9158 + +### What to do next +- Read the [documentation](https://docs.dagger.io/sdk/go) +- Join our [Discord server](https://discord.gg/dagger-io) +- Follow us on [Twitter](https://twitter.com/dagger_io) + ## sdk/go/v0.14.0 - 2024-11-08 This SDK uses ๐Ÿš™ Engine + ๐Ÿš— CLI version `v0.14.0`. [See what changed in that release](https://github.com/dagger/dagger/releases/tag/v0.14.0). diff --git a/sdk/go/dagger.gen.go b/sdk/go/dagger.gen.go index 8100ee1d90..4780bfc09e 100644 --- a/sdk/go/dagger.gen.go +++ b/sdk/go/dagger.gen.go @@ -352,11 +352,59 @@ func (r *Container) WithGraphQLQuery(q *querybuilder.Selection) *Container { } } +// ContainerAsServiceOpts contains options for Container.AsService +type ContainerAsServiceOpts struct { + // Command to run instead of the container's default command (e.g., ["go", "run", "main.go"]). + // + // If empty, the container's default command is used. + Args []string + // If the container has an entrypoint, prepend it to the args. + UseEntrypoint bool + // Provides Dagger access to the executed command. + // + // Do not use this option unless you trust the command being executed; the command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM. + ExperimentalPrivilegedNesting bool + // Execute the command with all root capabilities. This is similar to running a command with "sudo" or executing "docker run" with the "--privileged" flag. Containerization does not provide any security guarantees when using this option. It should only be used when absolutely necessary and only with trusted commands. + InsecureRootCapabilities bool + // Replace "${VAR}" or "$VAR" in the args according to the current environment variables defined in the container (e.g. "/$VAR/foo"). + Expand bool + // If set, skip the automatic init process injected into containers by default. + // + // This should only be used if the user requires that their exec process be the pid 1 process in the container. Otherwise it may result in unexpected behavior. + NoInit bool +} + // Turn the container into a Service. // // Be sure to set any exposed ports before this conversion. -func (r *Container) AsService() *Service { +func (r *Container) AsService(opts ...ContainerAsServiceOpts) *Service { q := r.query.Select("asService") + for i := len(opts) - 1; i >= 0; i-- { + // `args` optional argument + if !querybuilder.IsZeroValue(opts[i].Args) { + q = q.Arg("args", opts[i].Args) + } + // `useEntrypoint` optional argument + if !querybuilder.IsZeroValue(opts[i].UseEntrypoint) { + q = q.Arg("useEntrypoint", opts[i].UseEntrypoint) + } + // `experimentalPrivilegedNesting` optional argument + if !querybuilder.IsZeroValue(opts[i].ExperimentalPrivilegedNesting) { + q = q.Arg("experimentalPrivilegedNesting", opts[i].ExperimentalPrivilegedNesting) + } + // `insecureRootCapabilities` optional argument + if !querybuilder.IsZeroValue(opts[i].InsecureRootCapabilities) { + q = q.Arg("insecureRootCapabilities", opts[i].InsecureRootCapabilities) + } + // `expand` optional argument + if !querybuilder.IsZeroValue(opts[i].Expand) { + q = q.Arg("expand", opts[i].Expand) + } + // `noInit` optional argument + if !querybuilder.IsZeroValue(opts[i].NoInit) { + q = q.Arg("noInit", opts[i].NoInit) + } + } return &Service{ query: q, @@ -5868,6 +5916,7 @@ type ModuleSource struct { kind *ModuleSourceKind moduleName *string moduleOriginalName *string + pin *string resolveContextPathFromCaller *string sourceRootSubpath *string sourceSubpath *string @@ -6096,6 +6145,19 @@ func (r *ModuleSource) ModuleOriginalName(ctx context.Context) (string, error) { return response, q.Execute(ctx) } +// The pinned version of this module source. +func (r *ModuleSource) Pin(ctx context.Context) (string, error) { + if r.pin != nil { + return *r.pin, nil + } + q := r.query.Select("pin") + + var response string + + q = q.Bind(&response) + return response, q.Execute(ctx) +} + // The path to the module source's context directory on the caller's filesystem. Only valid for local sources. func (r *ModuleSource) ResolveContextPathFromCaller(ctx context.Context) (string, error) { if r.resolveContextPathFromCaller != nil { diff --git a/sdk/go/go.mod b/sdk/go/go.mod index 0b5cd4ae03..dd9e7f3a29 100644 --- a/sdk/go/go.mod +++ b/sdk/go/go.mod @@ -33,7 +33,7 @@ require ( go.opentelemetry.io/otel/trace v1.27.0 go.opentelemetry.io/proto/otlp v1.3.1 golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa - golang.org/x/sync v0.9.0 + golang.org/x/sync v0.10.0 google.golang.org/grpc v1.68.0 ) @@ -48,8 +48,8 @@ require ( github.com/sosodev/duration v1.3.1 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect golang.org/x/net v0.29.0 // indirect - golang.org/x/sys v0.26.0 // indirect - golang.org/x/text v0.19.0 // indirect + golang.org/x/sys v0.28.0 // indirect + golang.org/x/text v0.21.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect google.golang.org/protobuf v1.35.2 // indirect diff --git a/sdk/go/go.sum b/sdk/go/go.sum index 491b1176ac..a9cc754275 100644 --- a/sdk/go/go.sum +++ b/sdk/go/go.sum @@ -77,12 +77,12 @@ golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8 golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= -golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ= -golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= -golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= -golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 h1:hjSy6tcFQZ171igDaN5QHOw2n6vx40juYbC/x67CEhc= google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:qpvKtACPCQhAdu3PyQgV4l3LMXZEtft7y8QcarRsp9I= google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= diff --git a/sdk/go/internal/engineconn/version.gen.go b/sdk/go/internal/engineconn/version.gen.go index 832292d4cd..a21eca19e3 100644 --- a/sdk/go/internal/engineconn/version.gen.go +++ b/sdk/go/internal/engineconn/version.gen.go @@ -2,4 +2,4 @@ package engineconn -const CLIVersion = "0.14.0" +const CLIVersion = "0.15.1" diff --git a/sdk/php/.changes/unreleased/Added-20241109-103911.yaml b/sdk/php/.changes/unreleased/Added-20241109-103911.yaml deleted file mode 100644 index 1be028d437..0000000000 --- a/sdk/php/.changes/unreleased/Added-20241109-103911.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: Added -body: Add support for TRACEPARENT. The user will see what's function doing in the TUI. -time: 2024-11-09T10:39:11.945216+07:00 -custom: - Author: wingyplus - PR: "8896" diff --git a/sdk/php/.changes/v0.15.0.md b/sdk/php/.changes/v0.15.0.md new file mode 100644 index 0000000000..65d5dbfaaf --- /dev/null +++ b/sdk/php/.changes/v0.15.0.md @@ -0,0 +1,15 @@ +## sdk/php/v0.15.0 - 2024-12-10 + +This SDK uses ๐Ÿš™ Engine + ๐Ÿš— CLI version `v0.15.0`. [See what changed in that release](https://github.com/dagger/dagger/releases/tag/v0.15.0). + +๐Ÿ˜ https://packagist.org/packages/dagger/dagger#v0.15.0 + +### Added +- Add support for `TRACEPARENT`. The user will see what's function doing in the TUI by @wingyplus in https://github.com/dagger/dagger/pull/8896 + +### Dependencies +- Bump Engine to v0.15.0 by @jedevc in https://github.com/dagger/dagger/pull/9158 + +### What to do next +- Join our [Discord server](https://discord.gg/dagger-io) +- Follow us on [Twitter](https://twitter.com/dagger_io) diff --git a/sdk/php/.changes/v0.15.1.md b/sdk/php/.changes/v0.15.1.md new file mode 100644 index 0000000000..b63788e76a --- /dev/null +++ b/sdk/php/.changes/v0.15.1.md @@ -0,0 +1,12 @@ +## sdk/php/v0.15.1 - 2024-12-12 + +This SDK uses ๐Ÿš™ Engine + ๐Ÿš— CLI version `v0.15.1`. [See what changed in that release](https://github.com/dagger/dagger/releases/tag/v0.15.1). + +๐Ÿ˜ https://packagist.org/packages/dagger/dagger#v0.15.1 + +### Dependencies +- Bump Engine to v0.15.1 by @cwlbraa in https://github.com/dagger/dagger/pull/9183 + +### What to do next +- Join our [Discord server](https://discord.gg/dagger-io) +- Follow us on [Twitter](https://twitter.com/dagger_io) diff --git a/sdk/php/CHANGELOG.md b/sdk/php/CHANGELOG.md index 476c3a8442..1e47e65d22 100644 --- a/sdk/php/CHANGELOG.md +++ b/sdk/php/CHANGELOG.md @@ -6,6 +6,35 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), and is generated by [Changie](https://github.com/miniscruff/changie). +## sdk/php/v0.15.1 - 2024-12-12 + +This SDK uses ๐Ÿš™ Engine + ๐Ÿš— CLI version `v0.15.1`. [See what changed in that release](https://github.com/dagger/dagger/releases/tag/v0.15.1). + +๐Ÿ˜ https://packagist.org/packages/dagger/dagger#v0.15.1 + +### Dependencies +- Bump Engine to v0.15.1 by @cwlbraa in https://github.com/dagger/dagger/pull/9183 + +### What to do next +- Join our [Discord server](https://discord.gg/dagger-io) +- Follow us on [Twitter](https://twitter.com/dagger_io) + +## sdk/php/v0.15.0 - 2024-12-10 + +This SDK uses ๐Ÿš™ Engine + ๐Ÿš— CLI version `v0.15.0`. [See what changed in that release](https://github.com/dagger/dagger/releases/tag/v0.15.0). + +๐Ÿ˜ https://packagist.org/packages/dagger/dagger#v0.15.0 + +### Added +- Add support for `TRACEPARENT`. The user will see what's function doing in the TUI by @wingyplus in https://github.com/dagger/dagger/pull/8896 + +### Dependencies +- Bump Engine to v0.15.0 by @jedevc in https://github.com/dagger/dagger/pull/9158 + +### What to do next +- Join our [Discord server](https://discord.gg/dagger-io) +- Follow us on [Twitter](https://twitter.com/dagger_io) + ## sdk/php/v0.14.0 - 2024-11-08 This SDK uses ๐Ÿš™ Engine + ๐Ÿš— CLI version `v0.14.0`. [See what changed in that release](https://github.com/dagger/dagger/releases/tag/v0.14.0). diff --git a/sdk/php/generated/Container.php b/sdk/php/generated/Container.php index 7f00b18d4a..fd61412f86 100644 --- a/sdk/php/generated/Container.php +++ b/sdk/php/generated/Container.php @@ -18,9 +18,33 @@ class Container extends Client\AbstractObject implements Client\IdAble * * Be sure to set any exposed ports before this conversion. */ - public function asService(): Service - { + public function asService( + ?array $args = null, + ?bool $useEntrypoint = false, + ?bool $experimentalPrivilegedNesting = false, + ?bool $insecureRootCapabilities = false, + ?bool $expand = false, + ?bool $noInit = false, + ): Service { $innerQueryBuilder = new \Dagger\Client\QueryBuilder('asService'); + if (null !== $args) { + $innerQueryBuilder->setArgument('args', $args); + } + if (null !== $useEntrypoint) { + $innerQueryBuilder->setArgument('useEntrypoint', $useEntrypoint); + } + if (null !== $experimentalPrivilegedNesting) { + $innerQueryBuilder->setArgument('experimentalPrivilegedNesting', $experimentalPrivilegedNesting); + } + if (null !== $insecureRootCapabilities) { + $innerQueryBuilder->setArgument('insecureRootCapabilities', $insecureRootCapabilities); + } + if (null !== $expand) { + $innerQueryBuilder->setArgument('expand', $expand); + } + if (null !== $noInit) { + $innerQueryBuilder->setArgument('noInit', $noInit); + } return new \Dagger\Service($this->client, $this->queryBuilderChain->chain($innerQueryBuilder)); } diff --git a/sdk/php/generated/ModuleSource.php b/sdk/php/generated/ModuleSource.php index fe5d73aeb8..521f2809c6 100644 --- a/sdk/php/generated/ModuleSource.php +++ b/sdk/php/generated/ModuleSource.php @@ -134,6 +134,15 @@ public function moduleOriginalName(): string return (string)$this->queryLeaf($leafQueryBuilder, 'moduleOriginalName'); } + /** + * The pinned version of this module source. + */ + public function pin(): string + { + $leafQueryBuilder = new \Dagger\Client\QueryBuilder('pin'); + return (string)$this->queryLeaf($leafQueryBuilder, 'pin'); + } + /** * The path to the module source's context directory on the caller's filesystem. Only valid for local sources. */ diff --git a/sdk/php/runtime/go.mod b/sdk/php/runtime/go.mod index 2cd188b771..ddc6ddfe32 100644 --- a/sdk/php/runtime/go.mod +++ b/sdk/php/runtime/go.mod @@ -3,22 +3,26 @@ module php-sdk go 1.23.1 require ( - github.com/99designs/gqlgen v0.17.49 + github.com/99designs/gqlgen v0.17.57 github.com/Khan/genqlient v0.7.0 - github.com/vektah/gqlparser/v2 v2.5.16 + github.com/vektah/gqlparser/v2 v2.5.19 go.opentelemetry.io/otel v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 go.opentelemetry.io/otel/log v0.3.0 + go.opentelemetry.io/otel/metric v1.27.0 go.opentelemetry.io/otel/sdk v1.27.0 go.opentelemetry.io/otel/sdk/log v0.3.0 + go.opentelemetry.io/otel/sdk/metric v1.27.0 go.opentelemetry.io/otel/trace v1.27.0 go.opentelemetry.io/proto/otlp v1.3.1 golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa - golang.org/x/sync v0.8.0 - google.golang.org/grpc v1.65.0 + golang.org/x/sync v0.9.0 + google.golang.org/grpc v1.68.0 ) require ( @@ -27,16 +31,15 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/google/uuid v1.6.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect - github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect github.com/sosodev/duration v1.3.1 // indirect + github.com/stretchr/testify v1.10.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect - go.opentelemetry.io/otel/metric v1.27.0 // indirect golang.org/x/net v0.29.0 // indirect - golang.org/x/sys v0.25.0 // indirect - golang.org/x/text v0.18.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect - google.golang.org/protobuf v1.34.2 // indirect + golang.org/x/sys v0.26.0 // indirect + golang.org/x/text v0.19.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect + google.golang.org/protobuf v1.35.2 // indirect ) replace go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc => go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 diff --git a/sdk/php/runtime/go.sum b/sdk/php/runtime/go.sum index cd12295fa0..1a42fe2331 100644 --- a/sdk/php/runtime/go.sum +++ b/sdk/php/runtime/go.sum @@ -1,12 +1,11 @@ -github.com/99designs/gqlgen v0.17.49 h1:b3hNGexHd33fBSAd4NDT/c3NCcQzcAVkknhN9ym36YQ= -github.com/99designs/gqlgen v0.17.49/go.mod h1:tC8YFVZMed81x7UJ7ORUwXF4Kn6SXuucFqQBhN8+BU0= +github.com/99designs/gqlgen v0.17.57 h1:Ak4p60BRq6QibxY0lEc0JnQhDurfhxA67sp02lMjmPc= +github.com/99designs/gqlgen v0.17.57/go.mod h1:Jx61hzOSTcR4VJy/HFIgXiQ5rJ0Ypw8DxWLjbYDAUw0= github.com/Khan/genqlient v0.7.0 h1:GZ1meyRnzcDTK48EjqB8t3bcfYvHArCUUvgOwpz1D4w= github.com/Khan/genqlient v0.7.0/go.mod h1:HNyy3wZvuYwmW3Y7mkoQLZsa/R5n5yIRajS1kPBvSFM= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -14,33 +13,34 @@ github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 h1:asbCHRVmodnJTuQ3qamDwqVOIjwqUPTYmYuemVOx+Ys= github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0/go.mod h1:ggCgvZ2r7uOoQjOyu2Y1NhHmEPPzzuhWgcza5M1Ji1I= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8= -github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= +github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= +github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= github.com/sosodev/duration v1.3.1 h1:qtHBDMQ6lvMQsL15g4aopM4HEfOaYuhWBw3NPTtlqq4= github.com/sosodev/duration v1.3.1/go.mod h1:RQIBBX0+fMLc/D9+Jb/fwvVmo0eZvDDEERAikUR6SDg= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/vektah/gqlparser/v2 v2.5.16 h1:1gcmLTvs3JLKXckwCwlUagVn/IlV2bwqle0vJ0vy5p8= -github.com/vektah/gqlparser/v2 v2.5.16/go.mod h1:1lz1OeCqgQbQepsGxPVywrjdBHW2T08PUS3pJqepRww= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/vektah/gqlparser/v2 v2.5.19 h1:bhCPCX1D4WWzCDvkPl4+TP1N8/kLrWnp43egplt7iSg= +github.com/vektah/gqlparser/v2 v2.5.19/go.mod h1:y7kvl5bBlDeuWIvLtA9849ncyvx6/lj06RsMrEjVy3U= go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 h1:oM0GTNKGlc5qHctWeIGTVyda4iFFalOzMZ3Ehj5rwB4= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88/go.mod h1:JGG8ebaMO5nXOPnvKEl+DiA4MGwFjCbjsxT1WHIEBPY= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 h1:ccBrA8nCY5mM0y5uO7FT0ze4S0TuFcWdDB2FxGMTjkI= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0/go.mod h1:/9pb6634zi2Lk8LYg9Q0X8Ar6jka4dkFOylBLbVQPCE= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 h1:bFgvUr3/O4PHj3VQcFEuYKvRZJX1SJDQ+11JXuSB3/w= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0/go.mod h1:xJntEd2KL6Qdg5lwp97HMLQDVeAhrYxmzFseAMDPQ8I= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 h1:CIHWikMsN3wO+wq1Tp5VGdVRTcON+DmOJSfDjXypKOc= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0/go.mod h1:TNupZ6cxqyFEpLXAZW7On+mLFL0/g0TE3unIYL91xWc= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 h1:R9DE4kQ4k+YtfLI2ULwX82VtNQ2J8yZmA7ZIF/D+7Mc= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0/go.mod h1:OQFyQVrDlbe+R7xrEyDr/2Wr67Ol0hRUgsfA+V5A95s= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= @@ -55,6 +55,8 @@ go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kT go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= go.opentelemetry.io/otel/sdk/log v0.3.0 h1:GEjJ8iftz2l+XO1GF2856r7yYVh74URiF9JMcAacr5U= go.opentelemetry.io/otel/sdk/log v0.3.0/go.mod h1:BwCxtmux6ACLuys1wlbc0+vGBd+xytjmjajwqqIul2g= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= @@ -65,23 +67,19 @@ golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8 golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= -golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= -golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= -golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= -golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= -google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 h1:wKguEg1hsxI2/L3hUYrpo1RVi48K+uTyzKqprwLXsb8= -google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142/go.mod h1:d6be+8HhtEtucleCbxpPW9PA9XwISACu8nvpPqF0BVo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 h1:e7S5W7MGGLaSu8j3YjdezkZ+m1/Nm0uRVRMEMGk26Xs= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= -google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= -google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= -google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= -google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ= +golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= +golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= +golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 h1:hjSy6tcFQZ171igDaN5QHOw2n6vx40juYbC/x67CEhc= +google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:qpvKtACPCQhAdu3PyQgV4l3LMXZEtft7y8QcarRsp9I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/grpc v1.68.0 h1:aHQeeJbo8zAkAa3pRzrVjZlbz6uSfeOXlJNQM0RAbz0= +google.golang.org/grpc v1.68.0/go.mod h1:fmSPC5AsjSBCK54MyHRx48kpOti1/jRfOlwEWywNjWA= +google.golang.org/protobuf v1.35.2 h1:8Ar7bF+apOIoThw1EdZl0p1oWvMqTHmpA2fRTyZO8io= +google.golang.org/protobuf v1.35.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/sdk/php/src/Connection/version.php b/sdk/php/src/Connection/version.php index 925e75a285..9abc4e5ceb 100644 --- a/sdk/php/src/Connection/version.php +++ b/sdk/php/src/Connection/version.php @@ -1,4 +1,4 @@ =3.12" [[package]] name = "anyio" -version = "4.6.2.post1" +version = "4.7.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "idna" }, { name = "sniffio" }, + { name = "typing-extensions", marker = "python_full_version < '3.13'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/9f/09/45b9b7a6d4e45c6bcb5bf61d19e3ab87df68e0601fa8c5293de3542546cc/anyio-4.6.2.post1.tar.gz", hash = "sha256:4c8bc31ccdb51c7f7bd251f51c609e038d63e34219b44aa86e47576389880b4c", size = 173422 } +sdist = { url = "https://files.pythonhosted.org/packages/f6/40/318e58f669b1a9e00f5c4453910682e2d9dd594334539c7b7817dabb765f/anyio-4.7.0.tar.gz", hash = "sha256:2f834749c602966b7d456a7567cafcb309f96482b5081d14ac93ccd457f9dd48", size = 177076 } wheels = [ - { url = "https://files.pythonhosted.org/packages/e4/f5/f2b75d2fc6f1a260f340f0e7c6a060f4dd2961cc16884ed851b0d18da06a/anyio-4.6.2.post1-py3-none-any.whl", hash = "sha256:6d170c36fba3bdd840c73d3868c1e777e33676a69c3a72cf0a0d5d6d8009b61d", size = 90377 }, + { url = "https://files.pythonhosted.org/packages/a0/7a/4daaf3b6c08ad7ceffea4634ec206faeff697526421c20f07628c7372156/anyio-4.7.0-py3-none-any.whl", hash = "sha256:ea60c3723ab42ba6fff7e8ccb0488c898ec538ff4df1f1d5e642c3601d07e352", size = 93052 }, ] [[package]] @@ -221,18 +222,17 @@ wheels = [ [[package]] name = "httpx" -version = "0.27.2" +version = "0.28.1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "anyio" }, { name = "certifi" }, { name = "httpcore" }, { name = "idna" }, - { name = "sniffio" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/78/82/08f8c936781f67d9e6b9eeb8a0c8b4e406136ea4c3d1f89a5db71d42e0e6/httpx-0.27.2.tar.gz", hash = "sha256:f7c2be1d2f3c3c3160d441802406b206c2b76f5947b11115e6df10c6c65e66c2", size = 144189 } +sdist = { url = "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz", hash = "sha256:75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc", size = 141406 } wheels = [ - { url = "https://files.pythonhosted.org/packages/56/95/9377bcb415797e44274b51d46e3249eba641711cf3348050f76ee7b15ffc/httpx-0.27.2-py3-none-any.whl", hash = "sha256:7bb2708e112d8fdd7829cd4243970f0c223274051cb35ee80c03301ee29a3df0", size = 76395 }, + { url = "https://files.pythonhosted.org/packages/2a/39/e50c7c3a983047577ee07d2a9e53faf5a69493943ec3f6a384bdc792deb2/httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad", size = 73517 }, ] [[package]] @@ -420,57 +420,57 @@ wheels = [ [[package]] name = "propcache" -version = "0.2.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/a9/4d/5e5a60b78dbc1d464f8a7bbaeb30957257afdc8512cbb9dfd5659304f5cd/propcache-0.2.0.tar.gz", hash = "sha256:df81779732feb9d01e5d513fad0122efb3d53bbc75f61b2a4f29a020bc985e70", size = 40951 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/7c/46/a41ca1097769fc548fc9216ec4c1471b772cc39720eb47ed7e38ef0006a9/propcache-0.2.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:2ee7606193fb267be4b2e3b32714f2d58cad27217638db98a60f9efb5efeccc2", size = 80800 }, - { url = "https://files.pythonhosted.org/packages/75/4f/93df46aab9cc473498ff56be39b5f6ee1e33529223d7a4d8c0a6101a9ba2/propcache-0.2.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:91ee8fc02ca52e24bcb77b234f22afc03288e1dafbb1f88fe24db308910c4ac7", size = 46443 }, - { url = "https://files.pythonhosted.org/packages/0b/17/308acc6aee65d0f9a8375e36c4807ac6605d1f38074b1581bd4042b9fb37/propcache-0.2.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2e900bad2a8456d00a113cad8c13343f3b1f327534e3589acc2219729237a2e8", size = 45676 }, - { url = "https://files.pythonhosted.org/packages/65/44/626599d2854d6c1d4530b9a05e7ff2ee22b790358334b475ed7c89f7d625/propcache-0.2.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f52a68c21363c45297aca15561812d542f8fc683c85201df0bebe209e349f793", size = 246191 }, - { url = "https://files.pythonhosted.org/packages/f2/df/5d996d7cb18df076debae7d76ac3da085c0575a9f2be6b1f707fe227b54c/propcache-0.2.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1e41d67757ff4fbc8ef2af99b338bfb955010444b92929e9e55a6d4dcc3c4f09", size = 251791 }, - { url = "https://files.pythonhosted.org/packages/2e/6d/9f91e5dde8b1f662f6dd4dff36098ed22a1ef4e08e1316f05f4758f1576c/propcache-0.2.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a64e32f8bd94c105cc27f42d3b658902b5bcc947ece3c8fe7bc1b05982f60e89", size = 253434 }, - { url = "https://files.pythonhosted.org/packages/3c/e9/1b54b7e26f50b3e0497cd13d3483d781d284452c2c50dd2a615a92a087a3/propcache-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:55346705687dbd7ef0d77883ab4f6fabc48232f587925bdaf95219bae072491e", size = 248150 }, - { url = "https://files.pythonhosted.org/packages/a7/ef/a35bf191c8038fe3ce9a414b907371c81d102384eda5dbafe6f4dce0cf9b/propcache-0.2.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:00181262b17e517df2cd85656fcd6b4e70946fe62cd625b9d74ac9977b64d8d9", size = 233568 }, - { url = "https://files.pythonhosted.org/packages/97/d9/d00bb9277a9165a5e6d60f2142cd1a38a750045c9c12e47ae087f686d781/propcache-0.2.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6994984550eaf25dd7fc7bd1b700ff45c894149341725bb4edc67f0ffa94efa4", size = 229874 }, - { url = "https://files.pythonhosted.org/packages/8e/78/c123cf22469bdc4b18efb78893e69c70a8b16de88e6160b69ca6bdd88b5d/propcache-0.2.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:56295eb1e5f3aecd516d91b00cfd8bf3a13991de5a479df9e27dd569ea23959c", size = 225857 }, - { url = "https://files.pythonhosted.org/packages/31/1b/fd6b2f1f36d028820d35475be78859d8c89c8f091ad30e377ac49fd66359/propcache-0.2.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:439e76255daa0f8151d3cb325f6dd4a3e93043e6403e6491813bcaaaa8733887", size = 227604 }, - { url = "https://files.pythonhosted.org/packages/99/36/b07be976edf77a07233ba712e53262937625af02154353171716894a86a6/propcache-0.2.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:f6475a1b2ecb310c98c28d271a30df74f9dd436ee46d09236a6b750a7599ce57", size = 238430 }, - { url = "https://files.pythonhosted.org/packages/0d/64/5822f496c9010e3966e934a011ac08cac8734561842bc7c1f65586e0683c/propcache-0.2.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:3444cdba6628accf384e349014084b1cacd866fbb88433cd9d279d90a54e0b23", size = 244814 }, - { url = "https://files.pythonhosted.org/packages/fd/bd/8657918a35d50b18a9e4d78a5df7b6c82a637a311ab20851eef4326305c1/propcache-0.2.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:4a9d9b4d0a9b38d1c391bb4ad24aa65f306c6f01b512e10a8a34a2dc5675d348", size = 235922 }, - { url = "https://files.pythonhosted.org/packages/a8/6f/ec0095e1647b4727db945213a9f395b1103c442ef65e54c62e92a72a3f75/propcache-0.2.0-cp312-cp312-win32.whl", hash = "sha256:69d3a98eebae99a420d4b28756c8ce6ea5a29291baf2dc9ff9414b42676f61d5", size = 40177 }, - { url = "https://files.pythonhosted.org/packages/20/a2/bd0896fdc4f4c1db46d9bc361c8c79a9bf08ccc08ba054a98e38e7ba1557/propcache-0.2.0-cp312-cp312-win_amd64.whl", hash = "sha256:ad9c9b99b05f163109466638bd30ada1722abb01bbb85c739c50b6dc11f92dc3", size = 44446 }, - { url = "https://files.pythonhosted.org/packages/a8/a7/5f37b69197d4f558bfef5b4bceaff7c43cc9b51adf5bd75e9081d7ea80e4/propcache-0.2.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ecddc221a077a8132cf7c747d5352a15ed763b674c0448d811f408bf803d9ad7", size = 78120 }, - { url = "https://files.pythonhosted.org/packages/c8/cd/48ab2b30a6b353ecb95a244915f85756d74f815862eb2ecc7a518d565b48/propcache-0.2.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:0e53cb83fdd61cbd67202735e6a6687a7b491c8742dfc39c9e01e80354956763", size = 45127 }, - { url = "https://files.pythonhosted.org/packages/a5/ba/0a1ef94a3412aab057bd996ed5f0ac7458be5bf469e85c70fa9ceb43290b/propcache-0.2.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:92fe151145a990c22cbccf9ae15cae8ae9eddabfc949a219c9f667877e40853d", size = 44419 }, - { url = "https://files.pythonhosted.org/packages/b4/6c/ca70bee4f22fa99eacd04f4d2f1699be9d13538ccf22b3169a61c60a27fa/propcache-0.2.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d6a21ef516d36909931a2967621eecb256018aeb11fc48656e3257e73e2e247a", size = 229611 }, - { url = "https://files.pythonhosted.org/packages/19/70/47b872a263e8511ca33718d96a10c17d3c853aefadeb86dc26e8421184b9/propcache-0.2.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3f88a4095e913f98988f5b338c1d4d5d07dbb0b6bad19892fd447484e483ba6b", size = 234005 }, - { url = "https://files.pythonhosted.org/packages/4f/be/3b0ab8c84a22e4a3224719099c1229ddfdd8a6a1558cf75cb55ee1e35c25/propcache-0.2.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5a5b3bb545ead161be780ee85a2b54fdf7092815995661947812dde94a40f6fb", size = 237270 }, - { url = "https://files.pythonhosted.org/packages/04/d8/f071bb000d4b8f851d312c3c75701e586b3f643fe14a2e3409b1b9ab3936/propcache-0.2.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:67aeb72e0f482709991aa91345a831d0b707d16b0257e8ef88a2ad246a7280bf", size = 231877 }, - { url = "https://files.pythonhosted.org/packages/93/e7/57a035a1359e542bbb0a7df95aad6b9871ebee6dce2840cb157a415bd1f3/propcache-0.2.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3c997f8c44ec9b9b0bcbf2d422cc00a1d9b9c681f56efa6ca149a941e5560da2", size = 217848 }, - { url = "https://files.pythonhosted.org/packages/f0/93/d1dea40f112ec183398fb6c42fde340edd7bab202411c4aa1a8289f461b6/propcache-0.2.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:2a66df3d4992bc1d725b9aa803e8c5a66c010c65c741ad901e260ece77f58d2f", size = 216987 }, - { url = "https://files.pythonhosted.org/packages/62/4c/877340871251145d3522c2b5d25c16a1690ad655fbab7bb9ece6b117e39f/propcache-0.2.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:3ebbcf2a07621f29638799828b8d8668c421bfb94c6cb04269130d8de4fb7136", size = 212451 }, - { url = "https://files.pythonhosted.org/packages/7c/bb/a91b72efeeb42906ef58ccf0cdb87947b54d7475fee3c93425d732f16a61/propcache-0.2.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:1235c01ddaa80da8235741e80815ce381c5267f96cc49b1477fdcf8c047ef325", size = 212879 }, - { url = "https://files.pythonhosted.org/packages/9b/7f/ee7fea8faac57b3ec5d91ff47470c6c5d40d7f15d0b1fccac806348fa59e/propcache-0.2.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:3947483a381259c06921612550867b37d22e1df6d6d7e8361264b6d037595f44", size = 222288 }, - { url = "https://files.pythonhosted.org/packages/ff/d7/acd67901c43d2e6b20a7a973d9d5fd543c6e277af29b1eb0e1f7bd7ca7d2/propcache-0.2.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:d5bed7f9805cc29c780f3aee05de3262ee7ce1f47083cfe9f77471e9d6777e83", size = 228257 }, - { url = "https://files.pythonhosted.org/packages/8d/6f/6272ecc7a8daad1d0754cfc6c8846076a8cb13f810005c79b15ce0ef0cf2/propcache-0.2.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e4a91d44379f45f5e540971d41e4626dacd7f01004826a18cb048e7da7e96544", size = 221075 }, - { url = "https://files.pythonhosted.org/packages/7c/bd/c7a6a719a6b3dd8b3aeadb3675b5783983529e4a3185946aa444d3e078f6/propcache-0.2.0-cp313-cp313-win32.whl", hash = "sha256:f902804113e032e2cdf8c71015651c97af6418363bea8d78dc0911d56c335032", size = 39654 }, - { url = "https://files.pythonhosted.org/packages/88/e7/0eef39eff84fa3e001b44de0bd41c7c0e3432e7648ffd3d64955910f002d/propcache-0.2.0-cp313-cp313-win_amd64.whl", hash = "sha256:8f188cfcc64fb1266f4684206c9de0e80f54622c3f22a910cbd200478aeae61e", size = 43705 }, - { url = "https://files.pythonhosted.org/packages/3d/b6/e6d98278f2d49b22b4d033c9f792eda783b9ab2094b041f013fc69bcde87/propcache-0.2.0-py3-none-any.whl", hash = "sha256:2ccc28197af5313706511fab3a8b66dcd6da067a1331372c82ea1cb74285e036", size = 11603 }, +version = "0.2.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/20/c8/2a13f78d82211490855b2fb303b6721348d0787fdd9a12ac46d99d3acde1/propcache-0.2.1.tar.gz", hash = "sha256:3f77ce728b19cb537714499928fe800c3dda29e8d9428778fc7c186da4c09a64", size = 41735 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/4c/28/1d205fe49be8b1b4df4c50024e62480a442b1a7b818e734308bb0d17e7fb/propcache-0.2.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:081a430aa8d5e8876c6909b67bd2d937bfd531b0382d3fdedb82612c618bc41a", size = 79588 }, + { url = "https://files.pythonhosted.org/packages/21/ee/fc4d893f8d81cd4971affef2a6cb542b36617cd1d8ce56b406112cb80bf7/propcache-0.2.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d2ccec9ac47cf4e04897619c0e0c1a48c54a71bdf045117d3a26f80d38ab1fb0", size = 45825 }, + { url = "https://files.pythonhosted.org/packages/4a/de/bbe712f94d088da1d237c35d735f675e494a816fd6f54e9db2f61ef4d03f/propcache-0.2.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:14d86fe14b7e04fa306e0c43cdbeebe6b2c2156a0c9ce56b815faacc193e320d", size = 45357 }, + { url = "https://files.pythonhosted.org/packages/7f/14/7ae06a6cf2a2f1cb382586d5a99efe66b0b3d0c6f9ac2f759e6f7af9d7cf/propcache-0.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:049324ee97bb67285b49632132db351b41e77833678432be52bdd0289c0e05e4", size = 241869 }, + { url = "https://files.pythonhosted.org/packages/cc/59/227a78be960b54a41124e639e2c39e8807ac0c751c735a900e21315f8c2b/propcache-0.2.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1cd9a1d071158de1cc1c71a26014dcdfa7dd3d5f4f88c298c7f90ad6f27bb46d", size = 247884 }, + { url = "https://files.pythonhosted.org/packages/84/58/f62b4ffaedf88dc1b17f04d57d8536601e4e030feb26617228ef930c3279/propcache-0.2.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:98110aa363f1bb4c073e8dcfaefd3a5cea0f0834c2aab23dda657e4dab2f53b5", size = 248486 }, + { url = "https://files.pythonhosted.org/packages/1c/07/ebe102777a830bca91bbb93e3479cd34c2ca5d0361b83be9dbd93104865e/propcache-0.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:647894f5ae99c4cf6bb82a1bb3a796f6e06af3caa3d32e26d2350d0e3e3faf24", size = 243649 }, + { url = "https://files.pythonhosted.org/packages/ed/bc/4f7aba7f08f520376c4bb6a20b9a981a581b7f2e385fa0ec9f789bb2d362/propcache-0.2.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bfd3223c15bebe26518d58ccf9a39b93948d3dcb3e57a20480dfdd315356baff", size = 229103 }, + { url = "https://files.pythonhosted.org/packages/fe/d5/04ac9cd4e51a57a96f78795e03c5a0ddb8f23ec098b86f92de028d7f2a6b/propcache-0.2.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:d71264a80f3fcf512eb4f18f59423fe82d6e346ee97b90625f283df56aee103f", size = 226607 }, + { url = "https://files.pythonhosted.org/packages/e3/f0/24060d959ea41d7a7cc7fdbf68b31852331aabda914a0c63bdb0e22e96d6/propcache-0.2.1-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:e73091191e4280403bde6c9a52a6999d69cdfde498f1fdf629105247599b57ec", size = 221153 }, + { url = "https://files.pythonhosted.org/packages/77/a7/3ac76045a077b3e4de4859a0753010765e45749bdf53bd02bc4d372da1a0/propcache-0.2.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:3935bfa5fede35fb202c4b569bb9c042f337ca4ff7bd540a0aa5e37131659348", size = 222151 }, + { url = "https://files.pythonhosted.org/packages/e7/af/5e29da6f80cebab3f5a4dcd2a3240e7f56f2c4abf51cbfcc99be34e17f0b/propcache-0.2.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:f508b0491767bb1f2b87fdfacaba5f7eddc2f867740ec69ece6d1946d29029a6", size = 233812 }, + { url = "https://files.pythonhosted.org/packages/8c/89/ebe3ad52642cc5509eaa453e9f4b94b374d81bae3265c59d5c2d98efa1b4/propcache-0.2.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:1672137af7c46662a1c2be1e8dc78cb6d224319aaa40271c9257d886be4363a6", size = 238829 }, + { url = "https://files.pythonhosted.org/packages/e9/2f/6b32f273fa02e978b7577159eae7471b3cfb88b48563b1c2578b2d7ca0bb/propcache-0.2.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b74c261802d3d2b85c9df2dfb2fa81b6f90deeef63c2db9f0e029a3cac50b518", size = 230704 }, + { url = "https://files.pythonhosted.org/packages/5c/2e/f40ae6ff5624a5f77edd7b8359b208b5455ea113f68309e2b00a2e1426b6/propcache-0.2.1-cp312-cp312-win32.whl", hash = "sha256:d09c333d36c1409d56a9d29b3a1b800a42c76a57a5a8907eacdbce3f18768246", size = 40050 }, + { url = "https://files.pythonhosted.org/packages/3b/77/a92c3ef994e47180862b9d7d11e37624fb1c00a16d61faf55115d970628b/propcache-0.2.1-cp312-cp312-win_amd64.whl", hash = "sha256:c214999039d4f2a5b2073ac506bba279945233da8c786e490d411dfc30f855c1", size = 44117 }, + { url = "https://files.pythonhosted.org/packages/0f/2a/329e0547cf2def8857157f9477669043e75524cc3e6251cef332b3ff256f/propcache-0.2.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:aca405706e0b0a44cc6bfd41fbe89919a6a56999157f6de7e182a990c36e37bc", size = 77002 }, + { url = "https://files.pythonhosted.org/packages/12/2d/c4df5415e2382f840dc2ecbca0eeb2293024bc28e57a80392f2012b4708c/propcache-0.2.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:12d1083f001ace206fe34b6bdc2cb94be66d57a850866f0b908972f90996b3e9", size = 44639 }, + { url = "https://files.pythonhosted.org/packages/d0/5a/21aaa4ea2f326edaa4e240959ac8b8386ea31dedfdaa636a3544d9e7a408/propcache-0.2.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:d93f3307ad32a27bda2e88ec81134b823c240aa3abb55821a8da553eed8d9439", size = 44049 }, + { url = "https://files.pythonhosted.org/packages/4e/3e/021b6cd86c0acc90d74784ccbb66808b0bd36067a1bf3e2deb0f3845f618/propcache-0.2.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ba278acf14471d36316159c94a802933d10b6a1e117b8554fe0d0d9b75c9d536", size = 224819 }, + { url = "https://files.pythonhosted.org/packages/3c/57/c2fdeed1b3b8918b1770a133ba5c43ad3d78e18285b0c06364861ef5cc38/propcache-0.2.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4e6281aedfca15301c41f74d7005e6e3f4ca143584ba696ac69df4f02f40d629", size = 229625 }, + { url = "https://files.pythonhosted.org/packages/9d/81/70d4ff57bf2877b5780b466471bebf5892f851a7e2ca0ae7ffd728220281/propcache-0.2.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5b750a8e5a1262434fb1517ddf64b5de58327f1adc3524a5e44c2ca43305eb0b", size = 232934 }, + { url = "https://files.pythonhosted.org/packages/3c/b9/bb51ea95d73b3fb4100cb95adbd4e1acaf2cbb1fd1083f5468eeb4a099a8/propcache-0.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bf72af5e0fb40e9babf594308911436c8efde3cb5e75b6f206c34ad18be5c052", size = 227361 }, + { url = "https://files.pythonhosted.org/packages/f1/20/3c6d696cd6fd70b29445960cc803b1851a1131e7a2e4ee261ee48e002bcd/propcache-0.2.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b2d0a12018b04f4cb820781ec0dffb5f7c7c1d2a5cd22bff7fb055a2cb19ebce", size = 213904 }, + { url = "https://files.pythonhosted.org/packages/a1/cb/1593bfc5ac6d40c010fa823f128056d6bc25b667f5393781e37d62f12005/propcache-0.2.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:e800776a79a5aabdb17dcc2346a7d66d0777e942e4cd251defeb084762ecd17d", size = 212632 }, + { url = "https://files.pythonhosted.org/packages/6d/5c/e95617e222be14a34c709442a0ec179f3207f8a2b900273720501a70ec5e/propcache-0.2.1-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:4160d9283bd382fa6c0c2b5e017acc95bc183570cd70968b9202ad6d8fc48dce", size = 207897 }, + { url = "https://files.pythonhosted.org/packages/8e/3b/56c5ab3dc00f6375fbcdeefdede5adf9bee94f1fab04adc8db118f0f9e25/propcache-0.2.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:30b43e74f1359353341a7adb783c8f1b1c676367b011709f466f42fda2045e95", size = 208118 }, + { url = "https://files.pythonhosted.org/packages/86/25/d7ef738323fbc6ebcbce33eb2a19c5e07a89a3df2fded206065bd5e868a9/propcache-0.2.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:58791550b27d5488b1bb52bc96328456095d96206a250d28d874fafe11b3dfaf", size = 217851 }, + { url = "https://files.pythonhosted.org/packages/b3/77/763e6cef1852cf1ba740590364ec50309b89d1c818e3256d3929eb92fabf/propcache-0.2.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:0f022d381747f0dfe27e99d928e31bc51a18b65bb9e481ae0af1380a6725dd1f", size = 222630 }, + { url = "https://files.pythonhosted.org/packages/4f/e9/0f86be33602089c701696fbed8d8c4c07b6ee9605c5b7536fd27ed540c5b/propcache-0.2.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:297878dc9d0a334358f9b608b56d02e72899f3b8499fc6044133f0d319e2ec30", size = 216269 }, + { url = "https://files.pythonhosted.org/packages/cc/02/5ac83217d522394b6a2e81a2e888167e7ca629ef6569a3f09852d6dcb01a/propcache-0.2.1-cp313-cp313-win32.whl", hash = "sha256:ddfab44e4489bd79bda09d84c430677fc7f0a4939a73d2bba3073036f487a0a6", size = 39472 }, + { url = "https://files.pythonhosted.org/packages/f4/33/d6f5420252a36034bc8a3a01171bc55b4bff5df50d1c63d9caa50693662f/propcache-0.2.1-cp313-cp313-win_amd64.whl", hash = "sha256:556fc6c10989f19a179e4321e5d678db8eb2924131e64652a51fe83e4c3db0e1", size = 43363 }, + { url = "https://files.pythonhosted.org/packages/41/b6/c5319caea262f4821995dca2107483b94a3345d4607ad797c76cb9c36bcc/propcache-0.2.1-py3-none-any.whl", hash = "sha256:52277518d6aae65536e9cea52d4e7fd2f7a66f4aa2d30ed3f2fcea620ace3c54", size = 11818 }, ] [[package]] name = "protobuf" -version = "5.28.3" +version = "5.29.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/74/6e/e69eb906fddcb38f8530a12f4b410699972ab7ced4e21524ece9d546ac27/protobuf-5.28.3.tar.gz", hash = "sha256:64badbc49180a5e401f373f9ce7ab1d18b63f7dd4a9cdc43c92b9f0b481cef7b", size = 422479 } +sdist = { url = "https://files.pythonhosted.org/packages/d2/4f/1639b7b1633d8fd55f216ba01e21bf2c43384ab25ef3ddb35d85a52033e8/protobuf-5.29.1.tar.gz", hash = "sha256:683be02ca21a6ffe80db6dd02c0b5b2892322c59ca57fd6c872d652cb80549cb", size = 424965 } wheels = [ - { url = "https://files.pythonhosted.org/packages/d1/c5/05163fad52d7c43e124a545f1372d18266db36036377ad29de4271134a6a/protobuf-5.28.3-cp310-abi3-win32.whl", hash = "sha256:0c4eec6f987338617072592b97943fdbe30d019c56126493111cf24344c1cc24", size = 419624 }, - { url = "https://files.pythonhosted.org/packages/9c/4c/4563ebe001ff30dca9d7ed12e471fa098d9759712980cde1fd03a3a44fb7/protobuf-5.28.3-cp310-abi3-win_amd64.whl", hash = "sha256:91fba8f445723fcf400fdbe9ca796b19d3b1242cd873907979b9ed71e4afe868", size = 431464 }, - { url = "https://files.pythonhosted.org/packages/1c/f2/baf397f3dd1d3e4af7e3f5a0382b868d25ac068eefe1ebde05132333436c/protobuf-5.28.3-cp38-abi3-macosx_10_9_universal2.whl", hash = "sha256:a3f6857551e53ce35e60b403b8a27b0295f7d6eb63d10484f12bc6879c715687", size = 414743 }, - { url = "https://files.pythonhosted.org/packages/85/50/cd61a358ba1601f40e7d38bcfba22e053f40ef2c50d55b55926aecc8fec7/protobuf-5.28.3-cp38-abi3-manylinux2014_aarch64.whl", hash = "sha256:3fa2de6b8b29d12c61911505d893afe7320ce7ccba4df913e2971461fa36d584", size = 316511 }, - { url = "https://files.pythonhosted.org/packages/5d/ae/3257b09328c0b4e59535e497b0c7537d4954038bdd53a2f0d2f49d15a7c4/protobuf-5.28.3-cp38-abi3-manylinux2014_x86_64.whl", hash = "sha256:712319fbdddb46f21abb66cd33cb9e491a5763b2febd8f228251add221981135", size = 316624 }, - { url = "https://files.pythonhosted.org/packages/ad/c3/2377c159e28ea89a91cf1ca223f827ae8deccb2c9c401e5ca233cd73002f/protobuf-5.28.3-py3-none-any.whl", hash = "sha256:cee1757663fa32a1ee673434fcf3bf24dd54763c79690201208bafec62f19eed", size = 169511 }, + { url = "https://files.pythonhosted.org/packages/50/c7/28669b04691a376cf7d0617d612f126aa0fff763d57df0142f9bf474c5b8/protobuf-5.29.1-cp310-abi3-win32.whl", hash = "sha256:22c1f539024241ee545cbcb00ee160ad1877975690b16656ff87dde107b5f110", size = 422706 }, + { url = "https://files.pythonhosted.org/packages/e3/33/dc7a7712f457456b7e0b16420ab8ba1cc8686751d3f28392eb43d0029ab9/protobuf-5.29.1-cp310-abi3-win_amd64.whl", hash = "sha256:1fc55267f086dd4050d18ef839d7bd69300d0d08c2a53ca7df3920cc271a3c34", size = 434505 }, + { url = "https://files.pythonhosted.org/packages/e5/39/44239fb1c6ec557e1731d996a5de89a9eb1ada7a92491fcf9c5d714052ed/protobuf-5.29.1-cp38-abi3-macosx_10_9_universal2.whl", hash = "sha256:d473655e29c0c4bbf8b69e9a8fb54645bc289dead6d753b952e7aa660254ae18", size = 417822 }, + { url = "https://files.pythonhosted.org/packages/fb/4a/ec56f101d38d4bef2959a9750209809242d86cf8b897db00f2f98bfa360e/protobuf-5.29.1-cp38-abi3-manylinux2014_aarch64.whl", hash = "sha256:b5ba1d0e4c8a40ae0496d0e2ecfdbb82e1776928a205106d14ad6985a09ec155", size = 319572 }, + { url = "https://files.pythonhosted.org/packages/04/52/c97c58a33b3d6c89a8138788576d372a90a6556f354799971c6b4d16d871/protobuf-5.29.1-cp38-abi3-manylinux2014_x86_64.whl", hash = "sha256:8ee1461b3af56145aca2800e6a3e2f928108c749ba8feccc6f5dd0062c410c0d", size = 319671 }, + { url = "https://files.pythonhosted.org/packages/3b/24/c8c49df8f6587719e1d400109b16c10c6902d0c9adddc8fff82840146f99/protobuf-5.29.1-py3-none-any.whl", hash = "sha256:32600ddb9c2a53dedc25b8581ea0f1fd8ea04956373c0c07577ce58d312522e0", size = 172547 }, ] [[package]] @@ -575,48 +575,48 @@ wheels = [ [[package]] name = "yarl" -version = "1.18.0" +version = "1.18.3" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "idna" }, { name = "multidict" }, { name = "propcache" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/5e/4b/53db4ecad4d54535aff3dfda1f00d6363d79455f62b11b8ca97b82746bd2/yarl-1.18.0.tar.gz", hash = "sha256:20d95535e7d833889982bfe7cc321b7f63bf8879788fee982c76ae2b24cfb715", size = 180098 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/23/36/c579b80a5c76c0d41c8e08baddb3e6940dfc20569db579a5691392c52afa/yarl-1.18.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:1ece25e2251c28bab737bdf0519c88189b3dd9492dc086a1d77336d940c28ced", size = 142376 }, - { url = "https://files.pythonhosted.org/packages/0c/5f/e247dc7c0607a0c505fea6c839721844bee55686dfb183c7d7b8ef8a9cb1/yarl-1.18.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:454902dc1830d935c90b5b53c863ba2a98dcde0fbaa31ca2ed1ad33b2a7171c6", size = 94692 }, - { url = "https://files.pythonhosted.org/packages/eb/e1/3081b578a6f21961711b9a1c49c2947abb3b0d0dd9537378fb06777ce8ee/yarl-1.18.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:01be8688fc211dc237e628fcc209dda412d35de7642453059a0553747018d075", size = 92527 }, - { url = "https://files.pythonhosted.org/packages/2f/fa/d9e1b9fbafa4cc82cd3980b5314741b33c2fe16308d725449a23aed32021/yarl-1.18.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4d26f1fa9fa2167bb238f6f4b20218eb4e88dd3ef21bb8f97439fa6b5313e30d", size = 332096 }, - { url = "https://files.pythonhosted.org/packages/93/b6/dd27165114317875838e216214fb86338dc63d2e50855a8f2a12de2a7fe5/yarl-1.18.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b234a4a9248a9f000b7a5dfe84b8cb6210ee5120ae70eb72a4dcbdb4c528f72f", size = 342047 }, - { url = "https://files.pythonhosted.org/packages/fc/9f/bad434b5279ae7a356844e14dc771c3d29eb928140bbc01621af811c8a27/yarl-1.18.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fe94d1de77c4cd8caff1bd5480e22342dbd54c93929f5943495d9c1e8abe9f42", size = 341712 }, - { url = "https://files.pythonhosted.org/packages/9a/9f/63864f43d131ba8c8cdf1bde5dd3f02f0eff8a7c883a5d7fad32f204fda5/yarl-1.18.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9b4c90c5363c6b0a54188122b61edb919c2cd1119684999d08cd5e538813a28e", size = 336654 }, - { url = "https://files.pythonhosted.org/packages/20/30/b4542bbd9be73de155213207eec019f6fe6495885f7dd59aa1ff705a041b/yarl-1.18.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:49a98ecadc5a241c9ba06de08127ee4796e1009555efd791bac514207862b43d", size = 325484 }, - { url = "https://files.pythonhosted.org/packages/69/bc/e2a9808ec26989cf0d1b98fe7b3cc45c1c6506b5ea4fe43ece5991f28f34/yarl-1.18.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:9106025c7f261f9f5144f9aa7681d43867eed06349a7cfb297a1bc804de2f0d1", size = 344213 }, - { url = "https://files.pythonhosted.org/packages/e2/17/0ee5a68886aca1a8071b0d24a1e1c0fd9970dead2ef2d5e26e027fb7ce88/yarl-1.18.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:f275ede6199d0f1ed4ea5d55a7b7573ccd40d97aee7808559e1298fe6efc8dbd", size = 340517 }, - { url = "https://files.pythonhosted.org/packages/fd/db/1fe4ef38ee852bff5ec8f5367d718b3a7dac7520f344b8e50306f68a2940/yarl-1.18.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:f7edeb1dcc7f50a2c8e08b9dc13a413903b7817e72273f00878cb70e766bdb3b", size = 346234 }, - { url = "https://files.pythonhosted.org/packages/b4/ee/5e5bccdb821eb9949ba66abb4d19e3299eee00282e37b42f65236120e892/yarl-1.18.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:c083f6dd6951b86e484ebfc9c3524b49bcaa9c420cb4b2a78ef9f7a512bfcc85", size = 359625 }, - { url = "https://files.pythonhosted.org/packages/3f/43/95a64d9e7ab4aa1c34fc5ea0edb35b581bc6ad33fd960a8ae34c2040b319/yarl-1.18.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:80741ec5b471fbdfb997821b2842c59660a1c930ceb42f8a84ba8ca0f25a66aa", size = 364239 }, - { url = "https://files.pythonhosted.org/packages/40/19/09ce976c624c9d3cc898f0be5035ddef0c0759d85b2313321cfe77b69915/yarl-1.18.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b1a3297b9cad594e1ff0c040d2881d7d3a74124a3c73e00c3c71526a1234a9f7", size = 357599 }, - { url = "https://files.pythonhosted.org/packages/7d/35/6f33fd29791af2ec161aebe8abe63e788c2b74a6c7e8f29c92e5f5e96849/yarl-1.18.0-cp312-cp312-win32.whl", hash = "sha256:cd6ab7d6776c186f544f893b45ee0c883542b35e8a493db74665d2e594d3ca75", size = 83832 }, - { url = "https://files.pythonhosted.org/packages/4e/8e/cdb40ef98597be107de67b11e2f1f23f911e0f1416b938885d17a338e304/yarl-1.18.0-cp312-cp312-win_amd64.whl", hash = "sha256:039c299a0864d1f43c3e31570045635034ea7021db41bf4842693a72aca8df3a", size = 90132 }, - { url = "https://files.pythonhosted.org/packages/2b/77/2196b657c66f97adaef0244e9e015f30eac0df59c31ad540f79ce328feed/yarl-1.18.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:6fb64dd45453225f57d82c4764818d7a205ee31ce193e9f0086e493916bd4f72", size = 140512 }, - { url = "https://files.pythonhosted.org/packages/0e/d8/2bb6e26fddba5c01bad284e4571178c651b97e8e06318efcaa16e07eb9fd/yarl-1.18.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:3adaaf9c6b1b4fc258584f4443f24d775a2086aee82d1387e48a8b4f3d6aecf6", size = 93875 }, - { url = "https://files.pythonhosted.org/packages/54/e4/99fbb884dd9f814fb0037dc1783766bb9edcd57b32a76f3ec5ac5c5772d7/yarl-1.18.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:da206d1ec78438a563c5429ab808a2b23ad7bc025c8adbf08540dde202be37d5", size = 91705 }, - { url = "https://files.pythonhosted.org/packages/3b/a2/5bd86eca9449e6b15d3b08005cf4e58e3da972240c2bee427b358c311549/yarl-1.18.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:576d258b21c1db4c6449b1c572c75d03f16a482eb380be8003682bdbe7db2f28", size = 333325 }, - { url = "https://files.pythonhosted.org/packages/94/50/a218da5f159cd985685bc72c500bb1a7fd2d60035d2339b8a9d9e1f99194/yarl-1.18.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c60e547c0a375c4bfcdd60eef82e7e0e8698bf84c239d715f5c1278a73050393", size = 344121 }, - { url = "https://files.pythonhosted.org/packages/a4/e3/830ae465811198b4b5ebecd674b5b3dca4d222af2155eb2144bfe190bbb8/yarl-1.18.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e3818eabaefb90adeb5e0f62f047310079d426387991106d4fbf3519eec7d90a", size = 345163 }, - { url = "https://files.pythonhosted.org/packages/7a/74/05c4326877ca541eee77b1ef74b7ac8081343d3957af8f9291ca6eca6fec/yarl-1.18.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a5f72421246c21af6a92fbc8c13b6d4c5427dfd949049b937c3b731f2f9076bd", size = 339130 }, - { url = "https://files.pythonhosted.org/packages/29/42/842f35aa1dae25d132119ee92185e8c75d8b9b7c83346506bd31e9fa217f/yarl-1.18.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7fa7d37f2ada0f42e0723632993ed422f2a679af0e200874d9d861720a54f53e", size = 326418 }, - { url = "https://files.pythonhosted.org/packages/f9/ed/65c0514f2d1e8b92a61f564c914381d078766cab38b5fbde355b3b3af1fb/yarl-1.18.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:42ba84e2ac26a3f252715f8ec17e6fdc0cbf95b9617c5367579fafcd7fba50eb", size = 345204 }, - { url = "https://files.pythonhosted.org/packages/23/31/351f64f0530c372fa01160f38330f44478e7bf3092f5ce2bfcb91605561d/yarl-1.18.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:6a49ad0102c0f0ba839628d0bf45973c86ce7b590cdedf7540d5b1833ddc6f00", size = 341652 }, - { url = "https://files.pythonhosted.org/packages/49/aa/0c6e666c218d567727c1d040d01575685e7f9b18052fd68a59c9f61fe5d9/yarl-1.18.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:96404e8d5e1bbe36bdaa84ef89dc36f0e75939e060ca5cd45451aba01db02902", size = 347257 }, - { url = "https://files.pythonhosted.org/packages/36/0b/33a093b0e13bb8cd0f27301779661ff325270b6644929001f8f33307357d/yarl-1.18.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:a0509475d714df8f6d498935b3f307cd122c4ca76f7d426c7e1bb791bcd87eda", size = 359735 }, - { url = "https://files.pythonhosted.org/packages/a8/92/dcc0b37c48632e71ffc2b5f8b0509347a0bde55ab5862ff755dce9dd56c4/yarl-1.18.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:1ff116f0285b5c8b3b9a2680aeca29a858b3b9e0402fc79fd850b32c2bcb9f8b", size = 365982 }, - { url = "https://files.pythonhosted.org/packages/0e/39/30e2a24a7a6c628dccb13eb6c4a03db5f6cd1eb2c6cda56a61ddef764c11/yarl-1.18.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e2580c1d7e66e6d29d6e11855e3b1c6381971e0edd9a5066e6c14d79bc8967af", size = 360128 }, - { url = "https://files.pythonhosted.org/packages/76/13/12b65dca23b1fb8ae44269a4d24048fd32ac90b445c985b0a46fdfa30cfe/yarl-1.18.0-cp313-cp313-win32.whl", hash = "sha256:14408cc4d34e202caba7b5ac9cc84700e3421a9e2d1b157d744d101b061a4a88", size = 309888 }, - { url = "https://files.pythonhosted.org/packages/f6/60/478d3d41a4bf0b9e7dca74d870d114e775d1ff7156b7d1e0e9972e8f97fd/yarl-1.18.0-cp313-cp313-win_amd64.whl", hash = "sha256:1db1537e9cb846eb0ff206eac667f627794be8b71368c1ab3207ec7b6f8c5afc", size = 315459 }, - { url = "https://files.pythonhosted.org/packages/30/9c/3f7ab894a37b1520291247cbc9ea6756228d098dae5b37eec848d404a204/yarl-1.18.0-py3-none-any.whl", hash = "sha256:dbf53db46f7cf176ee01d8d98c39381440776fcda13779d269a8ba664f69bec0", size = 44840 }, +sdist = { url = "https://files.pythonhosted.org/packages/b7/9d/4b94a8e6d2b51b599516a5cb88e5bc99b4d8d4583e468057eaa29d5f0918/yarl-1.18.3.tar.gz", hash = "sha256:ac1801c45cbf77b6c99242eeff4fffb5e4e73a800b5c4ad4fc0be5def634d2e1", size = 181062 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/33/85/bd2e2729752ff4c77338e0102914897512e92496375e079ce0150a6dc306/yarl-1.18.3-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:1dd4bdd05407ced96fed3d7f25dbbf88d2ffb045a0db60dbc247f5b3c5c25d50", size = 142644 }, + { url = "https://files.pythonhosted.org/packages/ff/74/1178322cc0f10288d7eefa6e4a85d8d2e28187ccab13d5b844e8b5d7c88d/yarl-1.18.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7c33dd1931a95e5d9a772d0ac5e44cac8957eaf58e3c8da8c1414de7dd27c576", size = 94962 }, + { url = "https://files.pythonhosted.org/packages/be/75/79c6acc0261e2c2ae8a1c41cf12265e91628c8c58ae91f5ff59e29c0787f/yarl-1.18.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:25b411eddcfd56a2f0cd6a384e9f4f7aa3efee14b188de13048c25b5e91f1640", size = 92795 }, + { url = "https://files.pythonhosted.org/packages/6b/32/927b2d67a412c31199e83fefdce6e645247b4fb164aa1ecb35a0f9eb2058/yarl-1.18.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:436c4fc0a4d66b2badc6c5fc5ef4e47bb10e4fd9bf0c79524ac719a01f3607c2", size = 332368 }, + { url = "https://files.pythonhosted.org/packages/19/e5/859fca07169d6eceeaa4fde1997c91d8abde4e9a7c018e371640c2da2b71/yarl-1.18.3-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e35ef8683211db69ffe129a25d5634319a677570ab6b2eba4afa860f54eeaf75", size = 342314 }, + { url = "https://files.pythonhosted.org/packages/08/75/76b63ccd91c9e03ab213ef27ae6add2e3400e77e5cdddf8ed2dbc36e3f21/yarl-1.18.3-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:84b2deecba4a3f1a398df819151eb72d29bfeb3b69abb145a00ddc8d30094512", size = 341987 }, + { url = "https://files.pythonhosted.org/packages/1a/e1/a097d5755d3ea8479a42856f51d97eeff7a3a7160593332d98f2709b3580/yarl-1.18.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:00e5a1fea0fd4f5bfa7440a47eff01d9822a65b4488f7cff83155a0f31a2ecba", size = 336914 }, + { url = "https://files.pythonhosted.org/packages/0b/42/e1b4d0e396b7987feceebe565286c27bc085bf07d61a59508cdaf2d45e63/yarl-1.18.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d0e883008013c0e4aef84dcfe2a0b172c4d23c2669412cf5b3371003941f72bb", size = 325765 }, + { url = "https://files.pythonhosted.org/packages/7e/18/03a5834ccc9177f97ca1bbb245b93c13e58e8225276f01eedc4cc98ab820/yarl-1.18.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:5a3f356548e34a70b0172d8890006c37be92995f62d95a07b4a42e90fba54272", size = 344444 }, + { url = "https://files.pythonhosted.org/packages/c8/03/a713633bdde0640b0472aa197b5b86e90fbc4c5bc05b727b714cd8a40e6d/yarl-1.18.3-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:ccd17349166b1bee6e529b4add61727d3f55edb7babbe4069b5764c9587a8cc6", size = 340760 }, + { url = "https://files.pythonhosted.org/packages/eb/99/f6567e3f3bbad8fd101886ea0276c68ecb86a2b58be0f64077396cd4b95e/yarl-1.18.3-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:b958ddd075ddba5b09bb0be8a6d9906d2ce933aee81100db289badbeb966f54e", size = 346484 }, + { url = "https://files.pythonhosted.org/packages/8e/a9/84717c896b2fc6cb15bd4eecd64e34a2f0a9fd6669e69170c73a8b46795a/yarl-1.18.3-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:c7d79f7d9aabd6011004e33b22bc13056a3e3fb54794d138af57f5ee9d9032cb", size = 359864 }, + { url = "https://files.pythonhosted.org/packages/1e/2e/d0f5f1bef7ee93ed17e739ec8dbcb47794af891f7d165fa6014517b48169/yarl-1.18.3-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:4891ed92157e5430874dad17b15eb1fda57627710756c27422200c52d8a4e393", size = 364537 }, + { url = "https://files.pythonhosted.org/packages/97/8a/568d07c5d4964da5b02621a517532adb8ec5ba181ad1687191fffeda0ab6/yarl-1.18.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ce1af883b94304f493698b00d0f006d56aea98aeb49d75ec7d98cd4a777e9285", size = 357861 }, + { url = "https://files.pythonhosted.org/packages/7d/e3/924c3f64b6b3077889df9a1ece1ed8947e7b61b0a933f2ec93041990a677/yarl-1.18.3-cp312-cp312-win32.whl", hash = "sha256:f91c4803173928a25e1a55b943c81f55b8872f0018be83e3ad4938adffb77dd2", size = 84097 }, + { url = "https://files.pythonhosted.org/packages/34/45/0e055320daaabfc169b21ff6174567b2c910c45617b0d79c68d7ab349b02/yarl-1.18.3-cp312-cp312-win_amd64.whl", hash = "sha256:7e2ee16578af3b52ac2f334c3b1f92262f47e02cc6193c598502bd46f5cd1477", size = 90399 }, + { url = "https://files.pythonhosted.org/packages/30/c7/c790513d5328a8390be8f47be5d52e141f78b66c6c48f48d241ca6bd5265/yarl-1.18.3-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:90adb47ad432332d4f0bc28f83a5963f426ce9a1a8809f5e584e704b82685dcb", size = 140789 }, + { url = "https://files.pythonhosted.org/packages/30/aa/a2f84e93554a578463e2edaaf2300faa61c8701f0898725842c704ba5444/yarl-1.18.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:913829534200eb0f789d45349e55203a091f45c37a2674678744ae52fae23efa", size = 94144 }, + { url = "https://files.pythonhosted.org/packages/c6/fc/d68d8f83714b221a85ce7866832cba36d7c04a68fa6a960b908c2c84f325/yarl-1.18.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:ef9f7768395923c3039055c14334ba4d926f3baf7b776c923c93d80195624782", size = 91974 }, + { url = "https://files.pythonhosted.org/packages/56/4e/d2563d8323a7e9a414b5b25341b3942af5902a2263d36d20fb17c40411e2/yarl-1.18.3-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:88a19f62ff30117e706ebc9090b8ecc79aeb77d0b1f5ec10d2d27a12bc9f66d0", size = 333587 }, + { url = "https://files.pythonhosted.org/packages/25/c9/cfec0bc0cac8d054be223e9f2c7909d3e8442a856af9dbce7e3442a8ec8d/yarl-1.18.3-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e17c9361d46a4d5addf777c6dd5eab0715a7684c2f11b88c67ac37edfba6c482", size = 344386 }, + { url = "https://files.pythonhosted.org/packages/ab/5d/4c532190113b25f1364d25f4c319322e86232d69175b91f27e3ebc2caf9a/yarl-1.18.3-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1a74a13a4c857a84a845505fd2d68e54826a2cd01935a96efb1e9d86c728e186", size = 345421 }, + { url = "https://files.pythonhosted.org/packages/23/d1/6cdd1632da013aa6ba18cee4d750d953104a5e7aac44e249d9410a972bf5/yarl-1.18.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:41f7ce59d6ee7741af71d82020346af364949314ed3d87553763a2df1829cc58", size = 339384 }, + { url = "https://files.pythonhosted.org/packages/9a/c4/6b3c39bec352e441bd30f432cda6ba51681ab19bb8abe023f0d19777aad1/yarl-1.18.3-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f52a265001d830bc425f82ca9eabda94a64a4d753b07d623a9f2863fde532b53", size = 326689 }, + { url = "https://files.pythonhosted.org/packages/23/30/07fb088f2eefdc0aa4fc1af4e3ca4eb1a3aadd1ce7d866d74c0f124e6a85/yarl-1.18.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:82123d0c954dc58db301f5021a01854a85bf1f3bb7d12ae0c01afc414a882ca2", size = 345453 }, + { url = "https://files.pythonhosted.org/packages/63/09/d54befb48f9cd8eec43797f624ec37783a0266855f4930a91e3d5c7717f8/yarl-1.18.3-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:2ec9bbba33b2d00999af4631a3397d1fd78290c48e2a3e52d8dd72db3a067ac8", size = 341872 }, + { url = "https://files.pythonhosted.org/packages/91/26/fd0ef9bf29dd906a84b59f0cd1281e65b0c3e08c6aa94b57f7d11f593518/yarl-1.18.3-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:fbd6748e8ab9b41171bb95c6142faf068f5ef1511935a0aa07025438dd9a9bc1", size = 347497 }, + { url = "https://files.pythonhosted.org/packages/d9/b5/14ac7a256d0511b2ac168d50d4b7d744aea1c1aa20c79f620d1059aab8b2/yarl-1.18.3-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:877d209b6aebeb5b16c42cbb377f5f94d9e556626b1bfff66d7b0d115be88d0a", size = 359981 }, + { url = "https://files.pythonhosted.org/packages/ca/b3/d493221ad5cbd18bc07e642894030437e405e1413c4236dd5db6e46bcec9/yarl-1.18.3-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:b464c4ab4bfcb41e3bfd3f1c26600d038376c2de3297760dfe064d2cb7ea8e10", size = 366229 }, + { url = "https://files.pythonhosted.org/packages/04/56/6a3e2a5d9152c56c346df9b8fb8edd2c8888b1e03f96324d457e5cf06d34/yarl-1.18.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:8d39d351e7faf01483cc7ff7c0213c412e38e5a340238826be7e0e4da450fdc8", size = 360383 }, + { url = "https://files.pythonhosted.org/packages/fd/b7/4b3c7c7913a278d445cc6284e59b2e62fa25e72758f888b7a7a39eb8423f/yarl-1.18.3-cp313-cp313-win32.whl", hash = "sha256:61ee62ead9b68b9123ec24bc866cbef297dd266175d53296e2db5e7f797f902d", size = 310152 }, + { url = "https://files.pythonhosted.org/packages/f5/d5/688db678e987c3e0fb17867970700b92603cadf36c56e5fb08f23e822a0c/yarl-1.18.3-cp313-cp313-win_amd64.whl", hash = "sha256:578e281c393af575879990861823ef19d66e2b1d0098414855dd367e234f5b3c", size = 315723 }, + { url = "https://files.pythonhosted.org/packages/f5/4b/a06e0ec3d155924f77835ed2d167ebd3b211a7b0853da1cf8d8414d784ef/yarl-1.18.3-py3-none-any.whl", hash = "sha256:b57f4f58099328dfb26c6a771d09fb20dbbae81d20cfb66141251ea063bd101b", size = 45109 }, ] [[package]] diff --git a/sdk/python/runtime/Dockerfile b/sdk/python/runtime/Dockerfile index c8ce0de02c..49380d15d5 100644 --- a/sdk/python/runtime/Dockerfile +++ b/sdk/python/runtime/Dockerfile @@ -1,3 +1,3 @@ # Images defined here for Dependabot. -FROM python:3.12-slim@sha256:2a6386ad2db20e7f55073f69a98d6da2cf9f168e05e7487d2670baeb9b7601c5 AS base -FROM ghcr.io/astral-sh/uv:0.5.4@sha256:5436c72d52c9c0d011010ce68f4c399702b3b0764adcf282fe0e546f20ebaef6 AS uv +FROM python:3.12-slim@sha256:2b0079146a74e23bf4ae8f6a28e1b484c6292f6fb904cbb51825b4a19812fcd8 AS base +FROM ghcr.io/astral-sh/uv:0.5.7@sha256:23272999edd22e78195509ea3fe380e7632ab39a4c69a340bedaba7555abe20a AS uv diff --git a/sdk/python/runtime/discovery.go b/sdk/python/runtime/discovery.go index 72171ca6ff..fd7a640448 100644 --- a/sdk/python/runtime/discovery.go +++ b/sdk/python/runtime/discovery.go @@ -29,12 +29,6 @@ type UvConfig struct { // Index is a list of uv index configurations. // Ssee [uv v0.4.23](https://github.com/astral-sh/uv/releases/tag/0.4.23) Index []UvIndexConfig `toml:"index"` - - // Deprecated: use "Index" instead - IndexURL string `toml:"index-url"` - // - // Deprecated: use "Index" instead - ExtraIndexURL string `toml:"extra-index-url"` } type UvIndexConfig struct { diff --git a/sdk/python/runtime/extension.go b/sdk/python/runtime/extension.go index eca6ad22bc..1c94e07c8a 100644 --- a/sdk/python/runtime/extension.go +++ b/sdk/python/runtime/extension.go @@ -92,10 +92,6 @@ func (m *PythonSdk) IndexURL() string { return cfg.URL } } - // deprecated - if len(m.Discovery.UvConfig().Index) == 0 { - return m.Discovery.UvConfig().IndexURL - } return "" } @@ -109,9 +105,6 @@ func (m *PythonSdk) ExtraIndexURL() string { return cfg.URL } } - if len(m.Discovery.UvConfig().Index) == 0 { - return m.Discovery.UvConfig().ExtraIndexURL - } return "" } diff --git a/sdk/python/runtime/go.mod b/sdk/python/runtime/go.mod index 4f69809764..894bdab5e2 100644 --- a/sdk/python/runtime/go.mod +++ b/sdk/python/runtime/go.mod @@ -33,16 +33,13 @@ require ( go.opentelemetry.io/otel v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 go.opentelemetry.io/otel/log v0.3.0 - go.opentelemetry.io/otel/metric v1.27.0 + go.opentelemetry.io/otel/metric v1.27.0 // indirect go.opentelemetry.io/otel/sdk v1.27.0 go.opentelemetry.io/otel/sdk/log v0.3.0 - go.opentelemetry.io/otel/sdk/metric v1.27.0 go.opentelemetry.io/otel/trace v1.27.0 go.opentelemetry.io/proto/otlp v1.3.1 golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa diff --git a/sdk/python/runtime/go.sum b/sdk/python/runtime/go.sum index 492161766c..58a68996e3 100644 --- a/sdk/python/runtime/go.sum +++ b/sdk/python/runtime/go.sum @@ -60,10 +60,6 @@ go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-2024051809000 go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88/go.mod h1:JGG8ebaMO5nXOPnvKEl+DiA4MGwFjCbjsxT1WHIEBPY= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 h1:ccBrA8nCY5mM0y5uO7FT0ze4S0TuFcWdDB2FxGMTjkI= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0/go.mod h1:/9pb6634zi2Lk8LYg9Q0X8Ar6jka4dkFOylBLbVQPCE= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 h1:bFgvUr3/O4PHj3VQcFEuYKvRZJX1SJDQ+11JXuSB3/w= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0/go.mod h1:xJntEd2KL6Qdg5lwp97HMLQDVeAhrYxmzFseAMDPQ8I= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 h1:CIHWikMsN3wO+wq1Tp5VGdVRTcON+DmOJSfDjXypKOc= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0/go.mod h1:TNupZ6cxqyFEpLXAZW7On+mLFL0/g0TE3unIYL91xWc= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 h1:R9DE4kQ4k+YtfLI2ULwX82VtNQ2J8yZmA7ZIF/D+7Mc= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0/go.mod h1:OQFyQVrDlbe+R7xrEyDr/2Wr67Ol0hRUgsfA+V5A95s= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= @@ -78,8 +74,6 @@ go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kT go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= go.opentelemetry.io/otel/sdk/log v0.3.0 h1:GEjJ8iftz2l+XO1GF2856r7yYVh74URiF9JMcAacr5U= go.opentelemetry.io/otel/sdk/log v0.3.0/go.mod h1:BwCxtmux6ACLuys1wlbc0+vGBd+xytjmjajwqqIul2g= -go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= -go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= diff --git a/sdk/python/src/dagger/_engine/_version.py b/sdk/python/src/dagger/_engine/_version.py index 299f118291..fccaffedc8 100644 --- a/sdk/python/src/dagger/_engine/_version.py +++ b/sdk/python/src/dagger/_engine/_version.py @@ -1,3 +1,3 @@ # Code generated by dagger. DO NOT EDIT. -CLI_VERSION = "0.14.0" +CLI_VERSION = "0.15.1" diff --git a/sdk/python/src/dagger/client/gen.py b/sdk/python/src/dagger/client/gen.py index dd0eda0dcf..edc90d67a4 100644 --- a/sdk/python/src/dagger/client/gen.py +++ b/sdk/python/src/dagger/client/gen.py @@ -414,12 +414,59 @@ async def id(self) -> CacheVolumeID: class Container(Type): """An OCI-compatible container, also known as a Docker container.""" - def as_service(self) -> "Service": + def as_service( + self, + *, + args: list[str] | None = None, + use_entrypoint: bool | None = False, + experimental_privileged_nesting: bool | None = False, + insecure_root_capabilities: bool | None = False, + expand: bool | None = False, + no_init: bool | None = False, + ) -> "Service": """Turn the container into a Service. Be sure to set any exposed ports before this conversion. + + Parameters + ---------- + args: + Command to run instead of the container's default command (e.g., + ["go", "run", "main.go"]). + If empty, the container's default command is used. + use_entrypoint: + If the container has an entrypoint, prepend it to the args. + experimental_privileged_nesting: + Provides Dagger access to the executed command. + Do not use this option unless you trust the command being + executed; the command being executed WILL BE GRANTED FULL ACCESS + TO YOUR HOST FILESYSTEM. + insecure_root_capabilities: + Execute the command with all root capabilities. This is similar to + running a command with "sudo" or executing "docker run" with the " + --privileged" flag. Containerization does not provide any security + guarantees when using this option. It should only be used when + absolutely necessary and only with trusted commands. + expand: + Replace "${VAR}" or "$VAR" in the args according to the current + environment variables defined in the container (e.g. "/$VAR/foo"). + no_init: + If set, skip the automatic init process injected into containers + by default. + This should only be used if the user requires that their exec + process be the pid 1 process in the container. Otherwise it may + result in unexpected behavior. """ - _args: list[Arg] = [] + _args = [ + Arg("args", () if args is None else args, ()), + Arg("useEntrypoint", use_entrypoint, False), + Arg( + "experimentalPrivilegedNesting", experimental_privileged_nesting, False + ), + Arg("insecureRootCapabilities", insecure_root_capabilities, False), + Arg("expand", expand, False), + Arg("noInit", no_init, False), + ] _ctx = self._select("asService", _args) return Service(_ctx) @@ -1392,7 +1439,7 @@ def with_exec( ---------- args: Command to run instead of the container's default command (e.g., - ["run", "main.go"]). + ["go", "run", "main.go"]). If empty, the container's default command is used. use_entrypoint: If the container has an entrypoint, prepend it to the args. @@ -6163,6 +6210,27 @@ async def module_original_name(self) -> str: _ctx = self._select("moduleOriginalName", _args) return await _ctx.execute(str) + async def pin(self) -> str: + """The pinned version of this module source. + + Returns + ------- + str + The `String` scalar type represents textual data, represented as + UTF-8 character sequences. The String type is most often used by + GraphQL to represent free-form human-readable text. + + Raises + ------ + ExecuteTimeoutError + If the time to execute the query exceeds the configured timeout. + QueryError + If the API returns an error. + """ + _args: list[Arg] = [] + _ctx = self._select("pin", _args) + return await _ctx.execute(str) + async def resolve_context_path_from_caller(self) -> str: """The path to the module source's context directory on the caller's filesystem. Only valid for local sources. diff --git a/sdk/python/uv.lock b/sdk/python/uv.lock index 117883b39c..99e8d0dca4 100644 --- a/sdk/python/uv.lock +++ b/sdk/python/uv.lock @@ -9,16 +9,16 @@ members = [ [[package]] name = "aiohappyeyeballs" -version = "2.4.3" +version = "2.4.4" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/bc/69/2f6d5a019bd02e920a3417689a89887b39ad1e350b562f9955693d900c40/aiohappyeyeballs-2.4.3.tar.gz", hash = "sha256:75cf88a15106a5002a8eb1dab212525c00d1f4c0fa96e551c9fbe6f09a621586", size = 21809 } +sdist = { url = "https://files.pythonhosted.org/packages/7f/55/e4373e888fdacb15563ef6fa9fa8c8252476ea071e96fb46defac9f18bf2/aiohappyeyeballs-2.4.4.tar.gz", hash = "sha256:5fdd7d87889c63183afc18ce9271f9b0a7d32c2303e394468dd45d514a757745", size = 21977 } wheels = [ - { url = "https://files.pythonhosted.org/packages/f7/d8/120cd0fe3e8530df0539e71ba9683eade12cae103dd7543e50d15f737917/aiohappyeyeballs-2.4.3-py3-none-any.whl", hash = "sha256:8a7a83727b2756f394ab2895ea0765a0a8c475e3c71e98d43d76f22b4b435572", size = 14742 }, + { url = "https://files.pythonhosted.org/packages/b9/74/fbb6559de3607b3300b9be3cc64e97548d55678e44623db17820dbd20002/aiohappyeyeballs-2.4.4-py3-none-any.whl", hash = "sha256:a980909d50efcd44795c4afeca523296716d50cd756ddca6af8c65b996e27de8", size = 14756 }, ] [[package]] name = "aiohttp" -version = "3.11.7" +version = "3.11.10" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "aiohappyeyeballs" }, @@ -30,68 +30,68 @@ dependencies = [ { name = "propcache" }, { name = "yarl" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/4b/cb/f9bb10e0cf6f01730b27d370b10cc15822bea4395acd687abc8cc5fed3ed/aiohttp-3.11.7.tar.gz", hash = "sha256:01a8aca4af3da85cea5c90141d23f4b0eee3cbecfd33b029a45a80f28c66c668", size = 7666482 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/83/7e/fb4723d280b4de2642c57593cb94f942bfdc15def510d12b5d22a1b955a6/aiohttp-3.11.7-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:8bedb1f6cb919af3b6353921c71281b1491f948ca64408871465d889b4ee1b66", size = 706857 }, - { url = "https://files.pythonhosted.org/packages/57/f1/4eb447ad029801b1007ff23025c2bcb2519af2e03085717efa333f1803a5/aiohttp-3.11.7-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f5022504adab881e2d801a88b748ea63f2a9d130e0b2c430824682a96f6534be", size = 466733 }, - { url = "https://files.pythonhosted.org/packages/ed/7e/e385e54fa3d9360f9d1ea502a5627f2f4bdd141dd227a1f8785335c4fca9/aiohttp-3.11.7-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e22d1721c978a6494adc824e0916f9d187fa57baeda34b55140315fa2f740184", size = 453993 }, - { url = "https://files.pythonhosted.org/packages/ee/41/660cba8b4b10a9072ae77ce81558cca94d98aaec649a3085e50b8226fc17/aiohttp-3.11.7-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e993676c71288618eb07e20622572b1250d8713e7e00ab3aabae28cb70f3640d", size = 1576329 }, - { url = "https://files.pythonhosted.org/packages/e1/51/4c59724afde127001b22cf09b28171829329cf2c838cb05f6de521f125cf/aiohttp-3.11.7-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e13a05db87d3b241c186d0936808d0e4e12decc267c617d54e9c643807e968b6", size = 1630344 }, - { url = "https://files.pythonhosted.org/packages/c7/66/513f15cec950410dbc4439926ea4d9361136df7a97ddffab0deea1b68131/aiohttp-3.11.7-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4ba8d043fed7ffa117024d7ba66fdea011c0e7602327c6d73cacaea38abe4491", size = 1666837 }, - { url = "https://files.pythonhosted.org/packages/7a/c0/3e59d4cd8fd4c0e365d0ec962e0679dfc7629bdf0e67be398ca842ad4661/aiohttp-3.11.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dda3ed0a7869d2fa16aa41f9961ade73aa2c2e3b2fcb0a352524e7b744881889", size = 1580628 }, - { url = "https://files.pythonhosted.org/packages/22/a6/c4aea2cf583821e02f7a92c43f5f554d2334e22b741e21e8f31da2b2386b/aiohttp-3.11.7-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:43bfd25113c1e98aec6c70e26d5f4331efbf4aa9037ba9ad88f090853bf64d7f", size = 1539922 }, - { url = "https://files.pythonhosted.org/packages/7b/54/52f33fc9cecaf28f8400e92d9c22e37939c856c4a8af26a71023ec1de689/aiohttp-3.11.7-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:3dd3e7e7c9ef3e7214f014f1ae260892286647b3cf7c7f1b644a568fd410f8ca", size = 1527342 }, - { url = "https://files.pythonhosted.org/packages/d4/e0/fc91528bfb0283691b0448e93fe64d2416254a9ca34c58c666240440db89/aiohttp-3.11.7-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:78c657ece7a73b976905ab9ec8be9ef2df12ed8984c24598a1791c58ce3b4ce4", size = 1534194 }, - { url = "https://files.pythonhosted.org/packages/34/be/c6d571f46e9ef1720a850dce4c04dbfe38627a64bfdabdefb448c547e267/aiohttp-3.11.7-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:db70a47987e34494b451a334605bee57a126fe8d290511349e86810b4be53b01", size = 1609532 }, - { url = "https://files.pythonhosted.org/packages/3d/af/1da6918c83fb427e0f23401dca03b8d6ec776fb61ad25d2f5a8d564418e6/aiohttp-3.11.7-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:9e67531370a3b07e49b280c1f8c2df67985c790ad2834d1b288a2f13cd341c5f", size = 1630627 }, - { url = "https://files.pythonhosted.org/packages/32/20/fd3f4d8bc60227f1eb2fc20e75679e270ef05f81ae618cd869a68f19a32c/aiohttp-3.11.7-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:9202f184cc0582b1db15056f2225ab4c1e3dac4d9ade50dd0613ac3c46352ac2", size = 1565670 }, - { url = "https://files.pythonhosted.org/packages/b0/9f/db692e10567acb0970618557be3bfe47fe92eac69fa7d3e81315d39b4a8b/aiohttp-3.11.7-cp310-cp310-win32.whl", hash = "sha256:2257bdd5cf54a4039a4337162cd8048f05a724380a2283df34620f55d4e29341", size = 415107 }, - { url = "https://files.pythonhosted.org/packages/0b/8c/9fb539a8a773356df3dbddd77d4a3aff3eda448a602a90e5582d8b1903a4/aiohttp-3.11.7-cp310-cp310-win_amd64.whl", hash = "sha256:b7215bf2b53bc6cb35808149980c2ae80a4ae4e273890ac85459c014d5aa60ac", size = 440569 }, - { url = "https://files.pythonhosted.org/packages/13/7f/272fa1adf68fe2fbebfe686a67b50cfb40d86dfe47d0441aff6f0b7c4c0e/aiohttp-3.11.7-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:cea52d11e02123f125f9055dfe0ccf1c3857225fb879e4a944fae12989e2aef2", size = 706820 }, - { url = "https://files.pythonhosted.org/packages/79/3c/6d612ef77cdba75364393f04c5c577481e3b5123a774eea447ada1ddd14f/aiohttp-3.11.7-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3ce18f703b7298e7f7633efd6a90138d99a3f9a656cb52c1201e76cb5d79cf08", size = 466654 }, - { url = "https://files.pythonhosted.org/packages/4f/b8/1052667d4800cd49bb4f869f1ed42f5e9d5acd4676275e64ccc244c9c040/aiohttp-3.11.7-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:670847ee6aeb3a569cd7cdfbe0c3bec1d44828bbfbe78c5d305f7f804870ef9e", size = 454041 }, - { url = "https://files.pythonhosted.org/packages/9f/07/80fa7302314a6ee1c9278550e9d95b77a4c895999bfbc5364ed0ee28dc7c/aiohttp-3.11.7-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4dda726f89bfa5c465ba45b76515135a3ece0088dfa2da49b8bb278f3bdeea12", size = 1684778 }, - { url = "https://files.pythonhosted.org/packages/2e/30/a71eb45197ad6bb6af87dfb39be8b56417d24d916047d35ef3f164af87f4/aiohttp-3.11.7-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c25b74a811dba37c7ea6a14d99eb9402d89c8d739d50748a75f3cf994cf19c43", size = 1740992 }, - { url = "https://files.pythonhosted.org/packages/22/74/0f9394429f3c4197129333a150a85cb2a642df30097a39dd41257f0b3bdc/aiohttp-3.11.7-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e5522ee72f95661e79db691310290c4618b86dff2d9b90baedf343fd7a08bf79", size = 1781816 }, - { url = "https://files.pythonhosted.org/packages/7f/1a/1e256b39179c98d16d53ac62f64bfcfe7c5b2c1e68b83cddd4165854524f/aiohttp-3.11.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1fbf41a6bbc319a7816ae0f0177c265b62f2a59ad301a0e49b395746eb2a9884", size = 1676692 }, - { url = "https://files.pythonhosted.org/packages/9b/37/f19d2e00efcabb9183b16bd91244de1d9c4ff7bf0fb5b8302e29a78f3286/aiohttp-3.11.7-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:59ee1925b5a5efdf6c4e7be51deee93984d0ac14a6897bd521b498b9916f1544", size = 1619523 }, - { url = "https://files.pythonhosted.org/packages/ae/3c/af50cf5e06b98783fd776f17077f7b7e755d461114af5d6744dc037fc3b0/aiohttp-3.11.7-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:24054fce8c6d6f33a3e35d1c603ef1b91bbcba73e3f04a22b4f2f27dac59b347", size = 1644084 }, - { url = "https://files.pythonhosted.org/packages/c0/a6/4e0233b085cbf2b6de573515c1eddde82f1c1f17e69347e32a5a5f2617ff/aiohttp-3.11.7-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:351849aca2c6f814575c1a485c01c17a4240413f960df1bf9f5deb0003c61a53", size = 1648332 }, - { url = "https://files.pythonhosted.org/packages/06/20/7062e76e7817318c421c0f9d7b650fb81aaecf6d2f3a9833805b45ec2ea8/aiohttp-3.11.7-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:12724f3a211fa243570e601f65a8831372caf1a149d2f1859f68479f07efec3d", size = 1730912 }, - { url = "https://files.pythonhosted.org/packages/6c/1c/ff6ae4b1789894e6faf8a4e260cd3861cad618dc80ad15326789a7765750/aiohttp-3.11.7-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:7ea4490360b605804bea8173d2d086b6c379d6bb22ac434de605a9cbce006e7d", size = 1752619 }, - { url = "https://files.pythonhosted.org/packages/33/58/ddd5cba5ca245c00b04e9d28a7988b0f0eda02de494f8e62ecd2780655c2/aiohttp-3.11.7-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:e0bf378db07df0a713a1e32381a1b277e62ad106d0dbe17b5479e76ec706d720", size = 1692801 }, - { url = "https://files.pythonhosted.org/packages/b2/fc/32d5e2070b43d3722b7ea65ddc6b03ffa39bcc4b5ab6395a825cde0872ad/aiohttp-3.11.7-cp311-cp311-win32.whl", hash = "sha256:cd8d62cab363dfe713067027a5adb4907515861f1e4ce63e7be810b83668b847", size = 414899 }, - { url = "https://files.pythonhosted.org/packages/ec/7e/50324c6d3df4540f5963def810b9927f220c99864065849a1dfcae77a6ce/aiohttp-3.11.7-cp311-cp311-win_amd64.whl", hash = "sha256:bf0e6cce113596377cadda4e3ac5fb89f095bd492226e46d91b4baef1dd16f60", size = 440938 }, - { url = "https://files.pythonhosted.org/packages/bf/1e/2e96b2526c590dcb99db0b94ac4f9b927ecc07f94735a8a941dee143d48b/aiohttp-3.11.7-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:4bb7493c3e3a36d3012b8564bd0e2783259ddd7ef3a81a74f0dbfa000fce48b7", size = 702326 }, - { url = "https://files.pythonhosted.org/packages/b5/ce/b5d7f3e68849f1f5e0b85af4ac9080b9d3c0a600857140024603653c2209/aiohttp-3.11.7-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:e143b0ef9cb1a2b4f74f56d4fbe50caa7c2bb93390aff52f9398d21d89bc73ea", size = 461944 }, - { url = "https://files.pythonhosted.org/packages/28/fa/f4d98db1b7f8f0c3f74bdbd6d0d98cfc89984205cd33f1b8ee3f588ee5ad/aiohttp-3.11.7-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f7c58a240260822dc07f6ae32a0293dd5bccd618bb2d0f36d51c5dbd526f89c0", size = 454348 }, - { url = "https://files.pythonhosted.org/packages/04/f0/c238dda5dc9a3d12b76636e2cf0ea475890ac3a1c7e4ff0fd6c3cea2fc2d/aiohttp-3.11.7-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8d20cfe63a1c135d26bde8c1d0ea46fd1200884afbc523466d2f1cf517d1fe33", size = 1678795 }, - { url = "https://files.pythonhosted.org/packages/79/ee/3a18f792247e6d95dba13aaedc9dc317c3c6e75f4b88c2dd4b960d20ad2f/aiohttp-3.11.7-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:12e4d45847a174f77b2b9919719203769f220058f642b08504cf8b1cf185dacf", size = 1734411 }, - { url = "https://files.pythonhosted.org/packages/f5/79/3eb84243087a9a32cae821622c935107b4b55a5b21b76772e8e6c41092e9/aiohttp-3.11.7-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cf4efa2d01f697a7dbd0509891a286a4af0d86902fc594e20e3b1712c28c0106", size = 1788959 }, - { url = "https://files.pythonhosted.org/packages/91/93/ad77782c5edfa17aafc070bef978fbfb8459b2f150595ffb01b559c136f9/aiohttp-3.11.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9ee6a4cdcbf54b8083dc9723cdf5f41f722c00db40ccf9ec2616e27869151129", size = 1687463 }, - { url = "https://files.pythonhosted.org/packages/ba/48/db35bd21b7877efa0be5f28385d8978c55323c5ce7685712e53f3f6c0bd9/aiohttp-3.11.7-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c6095aaf852c34f42e1bd0cf0dc32d1e4b48a90bfb5054abdbb9d64b36acadcb", size = 1618374 }, - { url = "https://files.pythonhosted.org/packages/ba/77/30f87db55c79fd145ed5fd15b92f2e820ce81065d41ae437797aaa550e3b/aiohttp-3.11.7-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:1cf03d27885f8c5ebf3993a220cc84fc66375e1e6e812731f51aab2b2748f4a6", size = 1637021 }, - { url = "https://files.pythonhosted.org/packages/af/76/10b188b78ee18d0595af156d6a238bc60f9d8571f0f546027eb7eaf65b25/aiohttp-3.11.7-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:1a17f6a230f81eb53282503823f59d61dff14fb2a93847bf0399dc8e87817307", size = 1650792 }, - { url = "https://files.pythonhosted.org/packages/fa/33/4411bbb8ad04c47d0f4c7bd53332aaf350e49469cf6b65b132d4becafe27/aiohttp-3.11.7-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:481f10a1a45c5f4c4a578bbd74cff22eb64460a6549819242a87a80788461fba", size = 1696248 }, - { url = "https://files.pythonhosted.org/packages/fe/2d/6135d0dc1851a33d3faa937b20fef81340bc95e8310536d4c7f1f8ecc026/aiohttp-3.11.7-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:db37248535d1ae40735d15bdf26ad43be19e3d93ab3f3dad8507eb0f85bb8124", size = 1729188 }, - { url = "https://files.pythonhosted.org/packages/f5/76/a57ceff577ae26fe9a6f31ac799bc638ecf26e4acdf04295290b9929b349/aiohttp-3.11.7-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:9d18a8b44ec8502a7fde91446cd9c9b95ce7c49f1eacc1fb2358b8907d4369fd", size = 1690038 }, - { url = "https://files.pythonhosted.org/packages/4b/81/b20e09003b6989a7f23a721692137a6143420a151063c750ab2a04878e3c/aiohttp-3.11.7-cp312-cp312-win32.whl", hash = "sha256:3d1c9c15d3999107cbb9b2d76ca6172e6710a12fda22434ee8bd3f432b7b17e8", size = 409887 }, - { url = "https://files.pythonhosted.org/packages/b7/0b/607c98bff1d07bb21e0c39e7711108ef9ff4f2a361a3ec1ce8dce93623a5/aiohttp-3.11.7-cp312-cp312-win_amd64.whl", hash = "sha256:018f1b04883a12e77e7fc161934c0f298865d3a484aea536a6a2ca8d909f0ba0", size = 436462 }, - { url = "https://files.pythonhosted.org/packages/7a/53/8d77186c6a33bd087714df18274cdcf6e36fd69a9e841c85b7e81a20b18e/aiohttp-3.11.7-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:241a6ca732d2766836d62c58c49ca7a93d08251daef0c1e3c850df1d1ca0cbc4", size = 695811 }, - { url = "https://files.pythonhosted.org/packages/62/b6/4c3d107a5406aa6f99f618afea82783f54ce2d9644020f50b9c88f6e823d/aiohttp-3.11.7-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:aa3705a8d14de39898da0fbad920b2a37b7547c3afd2a18b9b81f0223b7d0f68", size = 458530 }, - { url = "https://files.pythonhosted.org/packages/d9/05/dbf0bd3966be8ebed3beb4007a2d1356d79af4fe7c93e54f984df6385193/aiohttp-3.11.7-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:9acfc7f652b31853eed3b92095b0acf06fd5597eeea42e939bd23a17137679d5", size = 451371 }, - { url = "https://files.pythonhosted.org/packages/19/6a/2198580314617b6cf9c4b813b84df5832b5f8efedcb8a7e8b321a187233c/aiohttp-3.11.7-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dcefcf2915a2dbdbce37e2fc1622129a1918abfe3d06721ce9f6cdac9b6d2eaa", size = 1662905 }, - { url = "https://files.pythonhosted.org/packages/2b/65/08696fd7503f6a6f9f782bd012bf47f36d4ed179a7d8c95dba4726d5cc67/aiohttp-3.11.7-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c1f6490dd1862af5aae6cfcf2a274bffa9a5b32a8f5acb519a7ecf5a99a88866", size = 1713794 }, - { url = "https://files.pythonhosted.org/packages/c8/a3/b9a72dce6f15e2efbc09fa67c1067c4f3a3bb05661c0ae7b40799cde02b7/aiohttp-3.11.7-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f1ac5462582d6561c1c1708853a9faf612ff4e5ea5e679e99be36143d6eabd8e", size = 1770757 }, - { url = "https://files.pythonhosted.org/packages/78/7e/8fb371b5f8c4c1eaa0d0a50750c0dd68059f86794aeb36919644815486f5/aiohttp-3.11.7-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4c1a6309005acc4b2bcc577ba3b9169fea52638709ffacbd071f3503264620da", size = 1673136 }, - { url = "https://files.pythonhosted.org/packages/2f/0f/09685d13d2c7634cb808868ea29c170d4dcde4215a4a90fb86491cd3ae25/aiohttp-3.11.7-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f5b973cce96793725ef63eb449adfb74f99c043c718acb76e0d2a447ae369962", size = 1600370 }, - { url = "https://files.pythonhosted.org/packages/00/2e/18fd38b117f9b3a375166ccb70ed43cf7e3dfe2cc947139acc15feefc5a2/aiohttp-3.11.7-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ce91a24aac80de6be8512fb1c4838a9881aa713f44f4e91dd7bb3b34061b497d", size = 1613459 }, - { url = "https://files.pythonhosted.org/packages/2c/94/10a82abc680d753be33506be699aaa330152ecc4f316eaf081f996ee56c2/aiohttp-3.11.7-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:875f7100ce0e74af51d4139495eec4025affa1a605280f23990b6434b81df1bd", size = 1613924 }, - { url = "https://files.pythonhosted.org/packages/e9/58/897c0561f5c522dda6e173192f1e4f10144e1a7126096f17a3f12b7aa168/aiohttp-3.11.7-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:c171fc35d3174bbf4787381716564042a4cbc008824d8195eede3d9b938e29a8", size = 1681164 }, - { url = "https://files.pythonhosted.org/packages/8b/8b/3a48b1cdafa612679d976274355f6a822de90b85d7dba55654ecfb01c979/aiohttp-3.11.7-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:ee9afa1b0d2293c46954f47f33e150798ad68b78925e3710044e0d67a9487791", size = 1712139 }, - { url = "https://files.pythonhosted.org/packages/aa/9d/70ab5b4dd7900db04af72840e033aee06e472b1343e372ea256ed675511c/aiohttp-3.11.7-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:8360c7cc620abb320e1b8d603c39095101391a82b1d0be05fb2225471c9c5c52", size = 1667446 }, - { url = "https://files.pythonhosted.org/packages/cb/98/b5fbcc8f6056f0c56001c75227e6b7ca9ee4f2e5572feca82ff3d65d485d/aiohttp-3.11.7-cp313-cp313-win32.whl", hash = "sha256:7a9318da4b4ada9a67c1dd84d1c0834123081e746bee311a16bb449f363d965e", size = 408689 }, - { url = "https://files.pythonhosted.org/packages/ef/07/4d1504577fa6349dd2e3839e89fb56e5dee38d64efe3d4366e9fcfda0cdb/aiohttp-3.11.7-cp313-cp313-win_amd64.whl", hash = "sha256:fc6da202068e0a268e298d7cd09b6e9f3997736cd9b060e2750963754552a0a9", size = 434809 }, +sdist = { url = "https://files.pythonhosted.org/packages/94/c4/3b5a937b16f6c2a0ada842a9066aad0b7a5708427d4a202a07bf09c67cbb/aiohttp-3.11.10.tar.gz", hash = "sha256:b1fc6b45010a8d0ff9e88f9f2418c6fd408c99c211257334aff41597ebece42e", size = 7668832 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/47/f2/ba44492f257a296c4bb910bf47acf41672421fd455540911b3f13d10d6cd/aiohttp-3.11.10-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:cbad88a61fa743c5d283ad501b01c153820734118b65aee2bd7dbb735475ce0d", size = 708322 }, + { url = "https://files.pythonhosted.org/packages/2b/c7/22b0ed548c8660e978e736671f166907fb272d0a4281b2b6833310bce529/aiohttp-3.11.10-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:80886dac673ceaef499de2f393fc80bb4481a129e6cb29e624a12e3296cc088f", size = 468211 }, + { url = "https://files.pythonhosted.org/packages/c9/0b/d326251888bb86ff7cb00b171e1cf3b0f0ed695622857f84a98bbc5f254b/aiohttp-3.11.10-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:61b9bae80ed1f338c42f57c16918853dc51775fb5cb61da70d590de14d8b5fb4", size = 455370 }, + { url = "https://files.pythonhosted.org/packages/4e/83/28feef5a0bda728adf76e0d076566c26c6da3d29f0ccd998d07c260cae9d/aiohttp-3.11.10-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9e2e576caec5c6a6b93f41626c9c02fc87cd91538b81a3670b2e04452a63def6", size = 1584399 }, + { url = "https://files.pythonhosted.org/packages/dc/97/6bdd39c4134ef243ffa9fd19a072ac9a0758d64b6d51eaaaaa34e67b8bcb/aiohttp-3.11.10-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:02c13415b5732fb6ee7ff64583a5e6ed1c57aa68f17d2bda79c04888dfdc2769", size = 1632131 }, + { url = "https://files.pythonhosted.org/packages/1b/f1/8c3a1623b9d526986f03d8158c9c856e00531217998275cc6b4a14b2fb85/aiohttp-3.11.10-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4cfce37f31f20800a6a6620ce2cdd6737b82e42e06e6e9bd1b36f546feb3c44f", size = 1668081 }, + { url = "https://files.pythonhosted.org/packages/9c/3e/a2f4cee0dca934b1d2c4b6a7821040ce4452b9b2e4347c9be6cb10eaa835/aiohttp-3.11.10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3bbbfff4c679c64e6e23cb213f57cc2c9165c9a65d63717108a644eb5a7398df", size = 1589313 }, + { url = "https://files.pythonhosted.org/packages/fd/9c/93e9a8f39c78f0c6d938721101e28c57597046f78057ffced8a3fd571839/aiohttp-3.11.10-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:49c7dbbc1a559ae14fc48387a115b7d4bbc84b4a2c3b9299c31696953c2a5219", size = 1544349 }, + { url = "https://files.pythonhosted.org/packages/68/d2/2054efe02be87a1af92cfcaf6875d7b2c34906c3ee2b90ce82afbc8927a5/aiohttp-3.11.10-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:68386d78743e6570f054fe7949d6cb37ef2b672b4d3405ce91fafa996f7d9b4d", size = 1529018 }, + { url = "https://files.pythonhosted.org/packages/10/b0/a258bfd5ddd3d9c871a8d24e96531cb6e6f0cd98dc3028f0b98302454b23/aiohttp-3.11.10-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:9ef405356ba989fb57f84cac66f7b0260772836191ccefbb987f414bcd2979d9", size = 1536357 }, + { url = "https://files.pythonhosted.org/packages/76/7f/8b60b93e7dc58d371813a9b8d451b7c9c9c4350f9c505edf6fae80e0812b/aiohttp-3.11.10-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:5d6958671b296febe7f5f859bea581a21c1d05430d1bbdcf2b393599b1cdce77", size = 1607214 }, + { url = "https://files.pythonhosted.org/packages/2a/10/97a11dba0f6d16878164b92ce75e2e0196a2fd25560cae8283388a24289b/aiohttp-3.11.10-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:99b7920e7165be5a9e9a3a7f1b680f06f68ff0d0328ff4079e5163990d046767", size = 1628573 }, + { url = "https://files.pythonhosted.org/packages/45/66/70419d6cb9495ddcebfa54d3db07e6a9716049ef341ded1edd8982f9b7f9/aiohttp-3.11.10-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:0dc49f42422163efb7e6f1df2636fe3db72713f6cd94688e339dbe33fe06d61d", size = 1564058 }, + { url = "https://files.pythonhosted.org/packages/2d/d6/d94506afaea3aca15ab3f4732d666ad80acd5a035a7478aa6377c9816cf3/aiohttp-3.11.10-cp310-cp310-win32.whl", hash = "sha256:40d1c7a7f750b5648642586ba7206999650208dbe5afbcc5284bcec6579c9b91", size = 416360 }, + { url = "https://files.pythonhosted.org/packages/55/03/731d1116d09ea7a3c6be731ab0eb1faa37b844d3e54fed28e3a6785ba5ab/aiohttp-3.11.10-cp310-cp310-win_amd64.whl", hash = "sha256:68ff6f48b51bd78ea92b31079817aff539f6c8fc80b6b8d6ca347d7c02384e33", size = 441763 }, + { url = "https://files.pythonhosted.org/packages/db/7c/584d5ca19343c9462d054337828f72628e6dc204424f525df59ebfe75d1e/aiohttp-3.11.10-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:77c4aa15a89847b9891abf97f3d4048f3c2d667e00f8a623c89ad2dccee6771b", size = 708395 }, + { url = "https://files.pythonhosted.org/packages/cd/2d/61c33e01baeb23aebd07620ee4d780ff40f4c17c42289bf02a405f2ac312/aiohttp-3.11.10-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:909af95a72cedbefe5596f0bdf3055740f96c1a4baa0dd11fd74ca4de0b4e3f1", size = 468281 }, + { url = "https://files.pythonhosted.org/packages/ab/70/0ddb3a61b835068eb0badbe8016b4b65b966bad5f8af0f2d63998ff4cfa4/aiohttp-3.11.10-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:386fbe79863eb564e9f3615b959e28b222259da0c48fd1be5929ac838bc65683", size = 455345 }, + { url = "https://files.pythonhosted.org/packages/44/8c/4e14e9c1767d9a6ab1af1fbad9df9c77e050b39b6afe9e8343ec1ba96508/aiohttp-3.11.10-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3de34936eb1a647aa919655ff8d38b618e9f6b7f250cc19a57a4bf7fd2062b6d", size = 1685464 }, + { url = "https://files.pythonhosted.org/packages/ef/6e/1bab78ebb4f5a1c54f0fc10f8d52abc06816a9cb1db52b9c908e3d69f9a8/aiohttp-3.11.10-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0c9527819b29cd2b9f52033e7fb9ff08073df49b4799c89cb5754624ecd98299", size = 1743427 }, + { url = "https://files.pythonhosted.org/packages/5d/5e/c1b03bef621a8cc51ff551ef223c6ac606fabe0e35c950f56d01423ec2aa/aiohttp-3.11.10-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:65a96e3e03300b41f261bbfd40dfdbf1c301e87eab7cd61c054b1f2e7c89b9e8", size = 1785188 }, + { url = "https://files.pythonhosted.org/packages/7c/b8/df6d76a149cbd969a58da478baec0be617287c496c842ddf21fe6bce07b3/aiohttp-3.11.10-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:98f5635f7b74bcd4f6f72fcd85bea2154b323a9f05226a80bc7398d0c90763b0", size = 1674911 }, + { url = "https://files.pythonhosted.org/packages/ee/8e/e460e7bb820a08cec399971fc3176afc8090dc32fb941f386e0c68bc4ecc/aiohttp-3.11.10-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:03b6002e20938fc6ee0918c81d9e776bebccc84690e2b03ed132331cca065ee5", size = 1619570 }, + { url = "https://files.pythonhosted.org/packages/c2/ae/3b597e09eae4e75b77ee6c65443593d245bfa067ae6a5d895abaf27cce6c/aiohttp-3.11.10-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:6362cc6c23c08d18ddbf0e8c4d5159b5df74fea1a5278ff4f2c79aed3f4e9f46", size = 1653772 }, + { url = "https://files.pythonhosted.org/packages/b8/d1/99852f2925992c4d7004e590344e5398eb163750de2a7c1fbe07f182d3c8/aiohttp-3.11.10-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:3691ed7726fef54e928fe26344d930c0c8575bc968c3e239c2e1a04bd8cf7838", size = 1649787 }, + { url = "https://files.pythonhosted.org/packages/39/c0/ea24627e08d722d5a6a00b3f6c9763fe3ad4650b8485f7a7a56ff932e3af/aiohttp-3.11.10-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:31d5093d3acd02b31c649d3a69bb072d539d4c7659b87caa4f6d2bcf57c2fa2b", size = 1732666 }, + { url = "https://files.pythonhosted.org/packages/f1/27/ab52dee4443ef8bdb26473b53c841caafd2bb637a8d85751694e089913bb/aiohttp-3.11.10-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:8b3cf2dc0f0690a33f2d2b2cb15db87a65f1c609f53c37e226f84edb08d10f52", size = 1754910 }, + { url = "https://files.pythonhosted.org/packages/cd/08/57c919d6b1f3b70bc14433c080a6152bf99454b636eb8a88552de8baaca9/aiohttp-3.11.10-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:fbbaea811a2bba171197b08eea288b9402faa2bab2ba0858eecdd0a4105753a3", size = 1692502 }, + { url = "https://files.pythonhosted.org/packages/ae/37/015006f669275735049e0549c37cb79c7a4a9350cbee070bbccb5a5b4b8a/aiohttp-3.11.10-cp311-cp311-win32.whl", hash = "sha256:4b2c7ac59c5698a7a8207ba72d9e9c15b0fc484a560be0788b31312c2c5504e4", size = 416178 }, + { url = "https://files.pythonhosted.org/packages/cf/8d/7bb48ae503989b15114baf9f9b19398c86ae93d30959065bc061b31331ee/aiohttp-3.11.10-cp311-cp311-win_amd64.whl", hash = "sha256:974d3a2cce5fcfa32f06b13ccc8f20c6ad9c51802bb7f829eae8a1845c4019ec", size = 442269 }, + { url = "https://files.pythonhosted.org/packages/25/17/1dbe2f619f77795409c1a13ab395b98ed1b215d3e938cacde9b8ffdac53d/aiohttp-3.11.10-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:b78f053a7ecfc35f0451d961dacdc671f4bcbc2f58241a7c820e9d82559844cf", size = 704448 }, + { url = "https://files.pythonhosted.org/packages/e3/9b/112247ad47e9d7f6640889c6e42cc0ded8c8345dd0033c66bcede799b051/aiohttp-3.11.10-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:ab7485222db0959a87fbe8125e233b5a6f01f4400785b36e8a7878170d8c3138", size = 463829 }, + { url = "https://files.pythonhosted.org/packages/8a/36/a64b583771fc673062a7a1374728a6241d49e2eda5a9041fbf248e18c804/aiohttp-3.11.10-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:cf14627232dfa8730453752e9cdc210966490992234d77ff90bc8dc0dce361d5", size = 455774 }, + { url = "https://files.pythonhosted.org/packages/e5/75/ee1b8f510978b3de5f185c62535b135e4fc3f5a247ca0c2245137a02d800/aiohttp-3.11.10-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:076bc454a7e6fd646bc82ea7f98296be0b1219b5e3ef8a488afbdd8e81fbac50", size = 1682134 }, + { url = "https://files.pythonhosted.org/packages/87/46/65e8259432d5f73ca9ebf5edb645ef90e5303724e4e52477516cb4042240/aiohttp-3.11.10-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:482cafb7dc886bebeb6c9ba7925e03591a62ab34298ee70d3dd47ba966370d2c", size = 1736757 }, + { url = "https://files.pythonhosted.org/packages/03/f6/a6d1e791b7153fb2d101278f7146c0771b0e1569c547f8a8bc3035651984/aiohttp-3.11.10-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bf3d1a519a324af764a46da4115bdbd566b3c73fb793ffb97f9111dbc684fc4d", size = 1793033 }, + { url = "https://files.pythonhosted.org/packages/a8/e9/1ac90733e36e7848693aece522936a13bf17eeb617da662f94adfafc1c25/aiohttp-3.11.10-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:24213ba85a419103e641e55c27dc7ff03536c4873470c2478cce3311ba1eee7b", size = 1691609 }, + { url = "https://files.pythonhosted.org/packages/6d/a6/77b33da5a0bc04566c7ddcca94500f2c2a2334eecab4885387fffd1fc600/aiohttp-3.11.10-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b99acd4730ad1b196bfb03ee0803e4adac371ae8efa7e1cbc820200fc5ded109", size = 1619082 }, + { url = "https://files.pythonhosted.org/packages/48/94/5bf5f927d9a2fedd2c978adfb70a3680e16f46d178361685b56244eb52ed/aiohttp-3.11.10-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:14cdb5a9570be5a04eec2ace174a48ae85833c2aadc86de68f55541f66ce42ab", size = 1641186 }, + { url = "https://files.pythonhosted.org/packages/99/2d/e85103aa01d1064e51bc50cb51e7b40150a8ff5d34e5a3173a46b241860b/aiohttp-3.11.10-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:7e97d622cb083e86f18317282084bc9fbf261801b0192c34fe4b1febd9f7ae69", size = 1646280 }, + { url = "https://files.pythonhosted.org/packages/7b/e0/44651fda8c1d865a51b3a81f1956ea55ce16fc568fe7a3e05db7fc22f139/aiohttp-3.11.10-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:012f176945af138abc10c4a48743327a92b4ca9adc7a0e078077cdb5dbab7be0", size = 1701862 }, + { url = "https://files.pythonhosted.org/packages/4e/1e/0804459ae325a5b95f6f349778fb465f29d2b863e522b6a349db0aaad54c/aiohttp-3.11.10-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:44224d815853962f48fe124748227773acd9686eba6dc102578defd6fc99e8d9", size = 1734373 }, + { url = "https://files.pythonhosted.org/packages/07/87/b8f6721668cad74bcc9c7cfe6d0230b304d1250196b221e54294a0d78dbe/aiohttp-3.11.10-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:c87bf31b7fdab94ae3adbe4a48e711bfc5f89d21cf4c197e75561def39e223bc", size = 1694343 }, + { url = "https://files.pythonhosted.org/packages/4b/20/42813fc60d9178ba9b1b86c58a5441ddb6cf8ffdfe66387345bff173bcff/aiohttp-3.11.10-cp312-cp312-win32.whl", hash = "sha256:06a8e2ee1cbac16fe61e51e0b0c269400e781b13bcfc33f5425912391a542985", size = 411118 }, + { url = "https://files.pythonhosted.org/packages/3a/51/df9c263c861ce93998b5ad2ba3212caab2112d5b66dbe91ddbe90c41ded4/aiohttp-3.11.10-cp312-cp312-win_amd64.whl", hash = "sha256:be2b516f56ea883a3e14dda17059716593526e10fb6303189aaf5503937db408", size = 437424 }, + { url = "https://files.pythonhosted.org/packages/8c/1d/88bfdbe28a3d1ba5b94a235f188f27726caf8ade9a0e13574848f44fe0fe/aiohttp-3.11.10-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:8cc5203b817b748adccb07f36390feb730b1bc5f56683445bfe924fc270b8816", size = 697755 }, + { url = "https://files.pythonhosted.org/packages/86/00/4c4619d6fe5c5be32f74d1422fc719b3e6cd7097af0c9e03877ca9bd4ebc/aiohttp-3.11.10-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:5ef359ebc6949e3a34c65ce20230fae70920714367c63afd80ea0c2702902ccf", size = 460440 }, + { url = "https://files.pythonhosted.org/packages/aa/1c/2f927408f50593a29465d198ec3c57c835c8602330233163e8d89c1093db/aiohttp-3.11.10-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:9bca390cb247dbfaec3c664326e034ef23882c3f3bfa5fbf0b56cad0320aaca5", size = 452726 }, + { url = "https://files.pythonhosted.org/packages/06/6a/ff00ed0a2ba45c34b3c366aa5b0004b1a4adcec5a9b5f67dd0648ee1c88a/aiohttp-3.11.10-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:811f23b3351ca532af598405db1093f018edf81368e689d1b508c57dcc6b6a32", size = 1664944 }, + { url = "https://files.pythonhosted.org/packages/02/c2/61923f2a7c2e14d7424b3a526e054f0358f57ccdf5573d4d3d033b01921a/aiohttp-3.11.10-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ddf5f7d877615f6a1e75971bfa5ac88609af3b74796ff3e06879e8422729fd01", size = 1717707 }, + { url = "https://files.pythonhosted.org/packages/8a/08/0d3d074b24d377569ec89d476a95ca918443099c0401bb31b331104e35d1/aiohttp-3.11.10-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6ab29b8a0beb6f8eaf1e5049252cfe74adbaafd39ba91e10f18caeb0e99ffb34", size = 1774890 }, + { url = "https://files.pythonhosted.org/packages/e8/49/052ada2b6e90ed65f0e6a7e548614621b5f8dcd193cb9415d2e6bcecc94a/aiohttp-3.11.10-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c49a76c1038c2dd116fa443eba26bbb8e6c37e924e2513574856de3b6516be99", size = 1676945 }, + { url = "https://files.pythonhosted.org/packages/7c/9e/0c48e1a48e072a869b8b5e3920c9f6a8092861524a4a6f159cd7e6fda939/aiohttp-3.11.10-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7f3dc0e330575f5b134918976a645e79adf333c0a1439dcf6899a80776c9ab39", size = 1602959 }, + { url = "https://files.pythonhosted.org/packages/ab/98/791f979093ff7f67f80344c182cb0ca4c2c60daed397ecaf454cc8d7a5cd/aiohttp-3.11.10-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:efb15a17a12497685304b2d976cb4939e55137df7b09fa53f1b6a023f01fcb4e", size = 1618058 }, + { url = "https://files.pythonhosted.org/packages/7b/5d/2d4b05feb3fd68eb7c8335f73c81079b56e582633b91002da695ccb439ef/aiohttp-3.11.10-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:db1d0b28fcb7f1d35600150c3e4b490775251dea70f894bf15c678fdd84eda6a", size = 1616289 }, + { url = "https://files.pythonhosted.org/packages/50/83/68cc28c00fe681dce6150614f105efe98282da19252cd6e32dfa893bb328/aiohttp-3.11.10-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:15fccaf62a4889527539ecb86834084ecf6e9ea70588efde86e8bc775e0e7542", size = 1685239 }, + { url = "https://files.pythonhosted.org/packages/16/f9/68fc5c8928f63238ce9314f04f3f59d9190a4db924998bb9be99c7aacce8/aiohttp-3.11.10-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:593c114a2221444f30749cc5e5f4012488f56bd14de2af44fe23e1e9894a9c60", size = 1715078 }, + { url = "https://files.pythonhosted.org/packages/3f/e0/3dd3f0451c532c77e35780bafb2b6469a046bc15a6ec2e039475a1d2f161/aiohttp-3.11.10-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:7852bbcb4d0d2f0c4d583f40c3bc750ee033265d80598d0f9cb6f372baa6b836", size = 1672544 }, + { url = "https://files.pythonhosted.org/packages/a5/b1/3530ab040dd5d7fb016b47115016f9b3a07ea29593b0e07e53dbe06a380c/aiohttp-3.11.10-cp313-cp313-win32.whl", hash = "sha256:65e55ca7debae8faaffee0ebb4b47a51b4075f01e9b641c31e554fd376595c6c", size = 409984 }, + { url = "https://files.pythonhosted.org/packages/49/1f/deed34e9fca639a7f873d01150d46925d3e1312051eaa591c1aa1f2e6ddc/aiohttp-3.11.10-cp313-cp313-win_amd64.whl", hash = "sha256:beb39a6d60a709ae3fb3516a1581777e7e8b76933bb88c8f4420d875bb0267c6", size = 435837 }, ] [[package]] @@ -117,17 +117,17 @@ wheels = [ [[package]] name = "anyio" -version = "4.6.2.post1" +version = "4.7.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "exceptiongroup", marker = "python_full_version < '3.11'" }, { name = "idna" }, { name = "sniffio" }, - { name = "typing-extensions", marker = "python_full_version < '3.11'" }, + { name = "typing-extensions", marker = "python_full_version < '3.13'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/9f/09/45b9b7a6d4e45c6bcb5bf61d19e3ab87df68e0601fa8c5293de3542546cc/anyio-4.6.2.post1.tar.gz", hash = "sha256:4c8bc31ccdb51c7f7bd251f51c609e038d63e34219b44aa86e47576389880b4c", size = 173422 } +sdist = { url = "https://files.pythonhosted.org/packages/f6/40/318e58f669b1a9e00f5c4453910682e2d9dd594334539c7b7817dabb765f/anyio-4.7.0.tar.gz", hash = "sha256:2f834749c602966b7d456a7567cafcb309f96482b5081d14ac93ccd457f9dd48", size = 177076 } wheels = [ - { url = "https://files.pythonhosted.org/packages/e4/f5/f2b75d2fc6f1a260f340f0e7c6a060f4dd2961cc16884ed851b0d18da06a/anyio-4.6.2.post1-py3-none-any.whl", hash = "sha256:6d170c36fba3bdd840c73d3868c1e777e33676a69c3a72cf0a0d5d6d8009b61d", size = 90377 }, + { url = "https://files.pythonhosted.org/packages/a0/7a/4daaf3b6c08ad7ceffea4634ec206faeff697526421c20f07628c7372156/anyio-4.7.0-py3-none-any.whl", hash = "sha256:ea60c3723ab42ba6fff7e8ccb0488c898ec538ff4df1f1d5e642c3601d07e352", size = 93052 }, ] [[package]] @@ -508,18 +508,17 @@ wheels = [ [[package]] name = "httpx" -version = "0.27.2" +version = "0.28.1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "anyio" }, { name = "certifi" }, { name = "httpcore" }, { name = "idna" }, - { name = "sniffio" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/78/82/08f8c936781f67d9e6b9eeb8a0c8b4e406136ea4c3d1f89a5db71d42e0e6/httpx-0.27.2.tar.gz", hash = "sha256:f7c2be1d2f3c3c3160d441802406b206c2b76f5947b11115e6df10c6c65e66c2", size = 144189 } +sdist = { url = "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz", hash = "sha256:75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc", size = 141406 } wheels = [ - { url = "https://files.pythonhosted.org/packages/56/95/9377bcb415797e44274b51d46e3249eba641711cf3348050f76ee7b15ffc/httpx-0.27.2-py3-none-any.whl", hash = "sha256:7bb2708e112d8fdd7829cd4243970f0c223274051cb35ee80c03301ee29a3df0", size = 76395 }, + { url = "https://files.pythonhosted.org/packages/2a/39/e50c7c3a983047577ee07d2a9e53faf5a69493943ec3f6a384bdc792deb2/httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad", size = 73517 }, ] [[package]] @@ -878,89 +877,89 @@ wheels = [ [[package]] name = "propcache" -version = "0.2.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/a9/4d/5e5a60b78dbc1d464f8a7bbaeb30957257afdc8512cbb9dfd5659304f5cd/propcache-0.2.0.tar.gz", hash = "sha256:df81779732feb9d01e5d513fad0122efb3d53bbc75f61b2a4f29a020bc985e70", size = 40951 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/3a/08/1963dfb932b8d74d5b09098507b37e9b96c835ba89ab8aad35aa330f4ff3/propcache-0.2.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:c5869b8fd70b81835a6f187c5fdbe67917a04d7e52b6e7cc4e5fe39d55c39d58", size = 80712 }, - { url = "https://files.pythonhosted.org/packages/e6/59/49072aba9bf8a8ed958e576182d46f038e595b17ff7408bc7e8807e721e1/propcache-0.2.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:952e0d9d07609d9c5be361f33b0d6d650cd2bae393aabb11d9b719364521984b", size = 46301 }, - { url = "https://files.pythonhosted.org/packages/33/a2/6b1978c2e0d80a678e2c483f45e5443c15fe5d32c483902e92a073314ef1/propcache-0.2.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:33ac8f098df0585c0b53009f039dfd913b38c1d2edafed0cedcc0c32a05aa110", size = 45581 }, - { url = "https://files.pythonhosted.org/packages/43/95/55acc9adff8f997c7572f23d41993042290dfb29e404cdadb07039a4386f/propcache-0.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:97e48e8875e6c13909c800fa344cd54cc4b2b0db1d5f911f840458a500fde2c2", size = 208659 }, - { url = "https://files.pythonhosted.org/packages/bd/2c/ef7371ff715e6cd19ea03fdd5637ecefbaa0752fee5b0f2fe8ea8407ee01/propcache-0.2.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:388f3217649d6d59292b722d940d4d2e1e6a7003259eb835724092a1cca0203a", size = 222613 }, - { url = "https://files.pythonhosted.org/packages/5e/1c/fef251f79fd4971a413fa4b1ae369ee07727b4cc2c71e2d90dfcde664fbb/propcache-0.2.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f571aea50ba5623c308aa146eb650eebf7dbe0fd8c5d946e28343cb3b5aad577", size = 221067 }, - { url = "https://files.pythonhosted.org/packages/8d/e7/22e76ae6fc5a1708bdce92bdb49de5ebe89a173db87e4ef597d6bbe9145a/propcache-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3dfafb44f7bb35c0c06eda6b2ab4bfd58f02729e7c4045e179f9a861b07c9850", size = 208920 }, - { url = "https://files.pythonhosted.org/packages/04/3e/f10aa562781bcd8a1e0b37683a23bef32bdbe501d9cc7e76969becaac30d/propcache-0.2.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a3ebe9a75be7ab0b7da2464a77bb27febcb4fab46a34f9288f39d74833db7f61", size = 200050 }, - { url = "https://files.pythonhosted.org/packages/d0/98/8ac69f638358c5f2a0043809c917802f96f86026e86726b65006830f3dc6/propcache-0.2.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:d2f0d0f976985f85dfb5f3d685697ef769faa6b71993b46b295cdbbd6be8cc37", size = 202346 }, - { url = "https://files.pythonhosted.org/packages/ee/78/4acfc5544a5075d8e660af4d4e468d60c418bba93203d1363848444511ad/propcache-0.2.0-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:a3dc1a4b165283bd865e8f8cb5f0c64c05001e0718ed06250d8cac9bec115b48", size = 199750 }, - { url = "https://files.pythonhosted.org/packages/a2/8f/90ada38448ca2e9cf25adc2fe05d08358bda1b9446f54a606ea38f41798b/propcache-0.2.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:9e0f07b42d2a50c7dd2d8675d50f7343d998c64008f1da5fef888396b7f84630", size = 201279 }, - { url = "https://files.pythonhosted.org/packages/08/31/0e299f650f73903da851f50f576ef09bfffc8e1519e6a2f1e5ed2d19c591/propcache-0.2.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:e63e3e1e0271f374ed489ff5ee73d4b6e7c60710e1f76af5f0e1a6117cd26394", size = 211035 }, - { url = "https://files.pythonhosted.org/packages/85/3e/e356cc6b09064bff1c06d0b2413593e7c925726f0139bc7acef8a21e87a8/propcache-0.2.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:56bb5c98f058a41bb58eead194b4db8c05b088c93d94d5161728515bd52b052b", size = 215565 }, - { url = "https://files.pythonhosted.org/packages/8b/54/4ef7236cd657e53098bd05aa59cbc3cbf7018fba37b40eaed112c3921e51/propcache-0.2.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:7665f04d0c7f26ff8bb534e1c65068409bf4687aa2534faf7104d7182debb336", size = 207604 }, - { url = "https://files.pythonhosted.org/packages/1f/27/d01d7799c068443ee64002f0655d82fb067496897bf74b632e28ee6a32cf/propcache-0.2.0-cp310-cp310-win32.whl", hash = "sha256:7cf18abf9764746b9c8704774d8b06714bcb0a63641518a3a89c7f85cc02c2ad", size = 40526 }, - { url = "https://files.pythonhosted.org/packages/bb/44/6c2add5eeafb7f31ff0d25fbc005d930bea040a1364cf0f5768750ddf4d1/propcache-0.2.0-cp310-cp310-win_amd64.whl", hash = "sha256:cfac69017ef97db2438efb854edf24f5a29fd09a536ff3a992b75990720cdc99", size = 44958 }, - { url = "https://files.pythonhosted.org/packages/e0/1c/71eec730e12aec6511e702ad0cd73c2872eccb7cad39de8ba3ba9de693ef/propcache-0.2.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:63f13bf09cc3336eb04a837490b8f332e0db41da66995c9fd1ba04552e516354", size = 80811 }, - { url = "https://files.pythonhosted.org/packages/89/c3/7e94009f9a4934c48a371632197406a8860b9f08e3f7f7d922ab69e57a41/propcache-0.2.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:608cce1da6f2672a56b24a015b42db4ac612ee709f3d29f27a00c943d9e851de", size = 46365 }, - { url = "https://files.pythonhosted.org/packages/c0/1d/c700d16d1d6903aeab28372fe9999762f074b80b96a0ccc953175b858743/propcache-0.2.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:466c219deee4536fbc83c08d09115249db301550625c7fef1c5563a584c9bc87", size = 45602 }, - { url = "https://files.pythonhosted.org/packages/2e/5e/4a3e96380805bf742712e39a4534689f4cddf5fa2d3a93f22e9fd8001b23/propcache-0.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fc2db02409338bf36590aa985a461b2c96fce91f8e7e0f14c50c5fcc4f229016", size = 236161 }, - { url = "https://files.pythonhosted.org/packages/a5/85/90132481183d1436dff6e29f4fa81b891afb6cb89a7306f32ac500a25932/propcache-0.2.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a6ed8db0a556343d566a5c124ee483ae113acc9a557a807d439bcecc44e7dfbb", size = 244938 }, - { url = "https://files.pythonhosted.org/packages/4a/89/c893533cb45c79c970834274e2d0f6d64383ec740be631b6a0a1d2b4ddc0/propcache-0.2.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:91997d9cb4a325b60d4e3f20967f8eb08dfcb32b22554d5ef78e6fd1dda743a2", size = 243576 }, - { url = "https://files.pythonhosted.org/packages/8c/56/98c2054c8526331a05f205bf45cbb2cda4e58e56df70e76d6a509e5d6ec6/propcache-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4c7dde9e533c0a49d802b4f3f218fa9ad0a1ce21f2c2eb80d5216565202acab4", size = 236011 }, - { url = "https://files.pythonhosted.org/packages/2d/0c/8b8b9f8a6e1abd869c0fa79b907228e7abb966919047d294ef5df0d136cf/propcache-0.2.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ffcad6c564fe6b9b8916c1aefbb37a362deebf9394bd2974e9d84232e3e08504", size = 224834 }, - { url = "https://files.pythonhosted.org/packages/18/bb/397d05a7298b7711b90e13108db697732325cafdcd8484c894885c1bf109/propcache-0.2.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:97a58a28bcf63284e8b4d7b460cbee1edaab24634e82059c7b8c09e65284f178", size = 224946 }, - { url = "https://files.pythonhosted.org/packages/25/19/4fc08dac19297ac58135c03770b42377be211622fd0147f015f78d47cd31/propcache-0.2.0-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:945db8ee295d3af9dbdbb698cce9bbc5c59b5c3fe328bbc4387f59a8a35f998d", size = 217280 }, - { url = "https://files.pythonhosted.org/packages/7e/76/c79276a43df2096ce2aba07ce47576832b1174c0c480fe6b04bd70120e59/propcache-0.2.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:39e104da444a34830751715f45ef9fc537475ba21b7f1f5b0f4d71a3b60d7fe2", size = 220088 }, - { url = "https://files.pythonhosted.org/packages/c3/9a/8a8cf428a91b1336b883f09c8b884e1734c87f724d74b917129a24fe2093/propcache-0.2.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:c5ecca8f9bab618340c8e848d340baf68bcd8ad90a8ecd7a4524a81c1764b3db", size = 233008 }, - { url = "https://files.pythonhosted.org/packages/25/7b/768a8969abd447d5f0f3333df85c6a5d94982a1bc9a89c53c154bf7a8b11/propcache-0.2.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:c436130cc779806bdf5d5fae0d848713105472b8566b75ff70048c47d3961c5b", size = 237719 }, - { url = "https://files.pythonhosted.org/packages/ed/0d/e5d68ccc7976ef8b57d80613ac07bbaf0614d43f4750cf953f0168ef114f/propcache-0.2.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:191db28dc6dcd29d1a3e063c3be0b40688ed76434622c53a284e5427565bbd9b", size = 227729 }, - { url = "https://files.pythonhosted.org/packages/05/64/17eb2796e2d1c3d0c431dc5f40078d7282f4645af0bb4da9097fbb628c6c/propcache-0.2.0-cp311-cp311-win32.whl", hash = "sha256:5f2564ec89058ee7c7989a7b719115bdfe2a2fb8e7a4543b8d1c0cc4cf6478c1", size = 40473 }, - { url = "https://files.pythonhosted.org/packages/83/c5/e89fc428ccdc897ade08cd7605f174c69390147526627a7650fb883e0cd0/propcache-0.2.0-cp311-cp311-win_amd64.whl", hash = "sha256:6e2e54267980349b723cff366d1e29b138b9a60fa376664a157a342689553f71", size = 44921 }, - { url = "https://files.pythonhosted.org/packages/7c/46/a41ca1097769fc548fc9216ec4c1471b772cc39720eb47ed7e38ef0006a9/propcache-0.2.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:2ee7606193fb267be4b2e3b32714f2d58cad27217638db98a60f9efb5efeccc2", size = 80800 }, - { url = "https://files.pythonhosted.org/packages/75/4f/93df46aab9cc473498ff56be39b5f6ee1e33529223d7a4d8c0a6101a9ba2/propcache-0.2.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:91ee8fc02ca52e24bcb77b234f22afc03288e1dafbb1f88fe24db308910c4ac7", size = 46443 }, - { url = "https://files.pythonhosted.org/packages/0b/17/308acc6aee65d0f9a8375e36c4807ac6605d1f38074b1581bd4042b9fb37/propcache-0.2.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2e900bad2a8456d00a113cad8c13343f3b1f327534e3589acc2219729237a2e8", size = 45676 }, - { url = "https://files.pythonhosted.org/packages/65/44/626599d2854d6c1d4530b9a05e7ff2ee22b790358334b475ed7c89f7d625/propcache-0.2.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f52a68c21363c45297aca15561812d542f8fc683c85201df0bebe209e349f793", size = 246191 }, - { url = "https://files.pythonhosted.org/packages/f2/df/5d996d7cb18df076debae7d76ac3da085c0575a9f2be6b1f707fe227b54c/propcache-0.2.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1e41d67757ff4fbc8ef2af99b338bfb955010444b92929e9e55a6d4dcc3c4f09", size = 251791 }, - { url = "https://files.pythonhosted.org/packages/2e/6d/9f91e5dde8b1f662f6dd4dff36098ed22a1ef4e08e1316f05f4758f1576c/propcache-0.2.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a64e32f8bd94c105cc27f42d3b658902b5bcc947ece3c8fe7bc1b05982f60e89", size = 253434 }, - { url = "https://files.pythonhosted.org/packages/3c/e9/1b54b7e26f50b3e0497cd13d3483d781d284452c2c50dd2a615a92a087a3/propcache-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:55346705687dbd7ef0d77883ab4f6fabc48232f587925bdaf95219bae072491e", size = 248150 }, - { url = "https://files.pythonhosted.org/packages/a7/ef/a35bf191c8038fe3ce9a414b907371c81d102384eda5dbafe6f4dce0cf9b/propcache-0.2.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:00181262b17e517df2cd85656fcd6b4e70946fe62cd625b9d74ac9977b64d8d9", size = 233568 }, - { url = "https://files.pythonhosted.org/packages/97/d9/d00bb9277a9165a5e6d60f2142cd1a38a750045c9c12e47ae087f686d781/propcache-0.2.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6994984550eaf25dd7fc7bd1b700ff45c894149341725bb4edc67f0ffa94efa4", size = 229874 }, - { url = "https://files.pythonhosted.org/packages/8e/78/c123cf22469bdc4b18efb78893e69c70a8b16de88e6160b69ca6bdd88b5d/propcache-0.2.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:56295eb1e5f3aecd516d91b00cfd8bf3a13991de5a479df9e27dd569ea23959c", size = 225857 }, - { url = "https://files.pythonhosted.org/packages/31/1b/fd6b2f1f36d028820d35475be78859d8c89c8f091ad30e377ac49fd66359/propcache-0.2.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:439e76255daa0f8151d3cb325f6dd4a3e93043e6403e6491813bcaaaa8733887", size = 227604 }, - { url = "https://files.pythonhosted.org/packages/99/36/b07be976edf77a07233ba712e53262937625af02154353171716894a86a6/propcache-0.2.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:f6475a1b2ecb310c98c28d271a30df74f9dd436ee46d09236a6b750a7599ce57", size = 238430 }, - { url = "https://files.pythonhosted.org/packages/0d/64/5822f496c9010e3966e934a011ac08cac8734561842bc7c1f65586e0683c/propcache-0.2.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:3444cdba6628accf384e349014084b1cacd866fbb88433cd9d279d90a54e0b23", size = 244814 }, - { url = "https://files.pythonhosted.org/packages/fd/bd/8657918a35d50b18a9e4d78a5df7b6c82a637a311ab20851eef4326305c1/propcache-0.2.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:4a9d9b4d0a9b38d1c391bb4ad24aa65f306c6f01b512e10a8a34a2dc5675d348", size = 235922 }, - { url = "https://files.pythonhosted.org/packages/a8/6f/ec0095e1647b4727db945213a9f395b1103c442ef65e54c62e92a72a3f75/propcache-0.2.0-cp312-cp312-win32.whl", hash = "sha256:69d3a98eebae99a420d4b28756c8ce6ea5a29291baf2dc9ff9414b42676f61d5", size = 40177 }, - { url = "https://files.pythonhosted.org/packages/20/a2/bd0896fdc4f4c1db46d9bc361c8c79a9bf08ccc08ba054a98e38e7ba1557/propcache-0.2.0-cp312-cp312-win_amd64.whl", hash = "sha256:ad9c9b99b05f163109466638bd30ada1722abb01bbb85c739c50b6dc11f92dc3", size = 44446 }, - { url = "https://files.pythonhosted.org/packages/a8/a7/5f37b69197d4f558bfef5b4bceaff7c43cc9b51adf5bd75e9081d7ea80e4/propcache-0.2.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ecddc221a077a8132cf7c747d5352a15ed763b674c0448d811f408bf803d9ad7", size = 78120 }, - { url = "https://files.pythonhosted.org/packages/c8/cd/48ab2b30a6b353ecb95a244915f85756d74f815862eb2ecc7a518d565b48/propcache-0.2.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:0e53cb83fdd61cbd67202735e6a6687a7b491c8742dfc39c9e01e80354956763", size = 45127 }, - { url = "https://files.pythonhosted.org/packages/a5/ba/0a1ef94a3412aab057bd996ed5f0ac7458be5bf469e85c70fa9ceb43290b/propcache-0.2.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:92fe151145a990c22cbccf9ae15cae8ae9eddabfc949a219c9f667877e40853d", size = 44419 }, - { url = "https://files.pythonhosted.org/packages/b4/6c/ca70bee4f22fa99eacd04f4d2f1699be9d13538ccf22b3169a61c60a27fa/propcache-0.2.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d6a21ef516d36909931a2967621eecb256018aeb11fc48656e3257e73e2e247a", size = 229611 }, - { url = "https://files.pythonhosted.org/packages/19/70/47b872a263e8511ca33718d96a10c17d3c853aefadeb86dc26e8421184b9/propcache-0.2.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3f88a4095e913f98988f5b338c1d4d5d07dbb0b6bad19892fd447484e483ba6b", size = 234005 }, - { url = "https://files.pythonhosted.org/packages/4f/be/3b0ab8c84a22e4a3224719099c1229ddfdd8a6a1558cf75cb55ee1e35c25/propcache-0.2.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5a5b3bb545ead161be780ee85a2b54fdf7092815995661947812dde94a40f6fb", size = 237270 }, - { url = "https://files.pythonhosted.org/packages/04/d8/f071bb000d4b8f851d312c3c75701e586b3f643fe14a2e3409b1b9ab3936/propcache-0.2.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:67aeb72e0f482709991aa91345a831d0b707d16b0257e8ef88a2ad246a7280bf", size = 231877 }, - { url = "https://files.pythonhosted.org/packages/93/e7/57a035a1359e542bbb0a7df95aad6b9871ebee6dce2840cb157a415bd1f3/propcache-0.2.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3c997f8c44ec9b9b0bcbf2d422cc00a1d9b9c681f56efa6ca149a941e5560da2", size = 217848 }, - { url = "https://files.pythonhosted.org/packages/f0/93/d1dea40f112ec183398fb6c42fde340edd7bab202411c4aa1a8289f461b6/propcache-0.2.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:2a66df3d4992bc1d725b9aa803e8c5a66c010c65c741ad901e260ece77f58d2f", size = 216987 }, - { url = "https://files.pythonhosted.org/packages/62/4c/877340871251145d3522c2b5d25c16a1690ad655fbab7bb9ece6b117e39f/propcache-0.2.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:3ebbcf2a07621f29638799828b8d8668c421bfb94c6cb04269130d8de4fb7136", size = 212451 }, - { url = "https://files.pythonhosted.org/packages/7c/bb/a91b72efeeb42906ef58ccf0cdb87947b54d7475fee3c93425d732f16a61/propcache-0.2.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:1235c01ddaa80da8235741e80815ce381c5267f96cc49b1477fdcf8c047ef325", size = 212879 }, - { url = "https://files.pythonhosted.org/packages/9b/7f/ee7fea8faac57b3ec5d91ff47470c6c5d40d7f15d0b1fccac806348fa59e/propcache-0.2.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:3947483a381259c06921612550867b37d22e1df6d6d7e8361264b6d037595f44", size = 222288 }, - { url = "https://files.pythonhosted.org/packages/ff/d7/acd67901c43d2e6b20a7a973d9d5fd543c6e277af29b1eb0e1f7bd7ca7d2/propcache-0.2.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:d5bed7f9805cc29c780f3aee05de3262ee7ce1f47083cfe9f77471e9d6777e83", size = 228257 }, - { url = "https://files.pythonhosted.org/packages/8d/6f/6272ecc7a8daad1d0754cfc6c8846076a8cb13f810005c79b15ce0ef0cf2/propcache-0.2.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e4a91d44379f45f5e540971d41e4626dacd7f01004826a18cb048e7da7e96544", size = 221075 }, - { url = "https://files.pythonhosted.org/packages/7c/bd/c7a6a719a6b3dd8b3aeadb3675b5783983529e4a3185946aa444d3e078f6/propcache-0.2.0-cp313-cp313-win32.whl", hash = "sha256:f902804113e032e2cdf8c71015651c97af6418363bea8d78dc0911d56c335032", size = 39654 }, - { url = "https://files.pythonhosted.org/packages/88/e7/0eef39eff84fa3e001b44de0bd41c7c0e3432e7648ffd3d64955910f002d/propcache-0.2.0-cp313-cp313-win_amd64.whl", hash = "sha256:8f188cfcc64fb1266f4684206c9de0e80f54622c3f22a910cbd200478aeae61e", size = 43705 }, - { url = "https://files.pythonhosted.org/packages/3d/b6/e6d98278f2d49b22b4d033c9f792eda783b9ab2094b041f013fc69bcde87/propcache-0.2.0-py3-none-any.whl", hash = "sha256:2ccc28197af5313706511fab3a8b66dcd6da067a1331372c82ea1cb74285e036", size = 11603 }, +version = "0.2.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/20/c8/2a13f78d82211490855b2fb303b6721348d0787fdd9a12ac46d99d3acde1/propcache-0.2.1.tar.gz", hash = "sha256:3f77ce728b19cb537714499928fe800c3dda29e8d9428778fc7c186da4c09a64", size = 41735 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a7/a5/0ea64c9426959ef145a938e38c832fc551843481d356713ececa9a8a64e8/propcache-0.2.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:6b3f39a85d671436ee3d12c017f8fdea38509e4f25b28eb25877293c98c243f6", size = 79296 }, + { url = "https://files.pythonhosted.org/packages/76/5a/916db1aba735f55e5eca4733eea4d1973845cf77dfe67c2381a2ca3ce52d/propcache-0.2.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:39d51fbe4285d5db5d92a929e3e21536ea3dd43732c5b177c7ef03f918dff9f2", size = 45622 }, + { url = "https://files.pythonhosted.org/packages/2d/62/685d3cf268b8401ec12b250b925b21d152b9d193b7bffa5fdc4815c392c2/propcache-0.2.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6445804cf4ec763dc70de65a3b0d9954e868609e83850a47ca4f0cb64bd79fea", size = 45133 }, + { url = "https://files.pythonhosted.org/packages/4d/3d/31c9c29ee7192defc05aa4d01624fd85a41cf98e5922aaed206017329944/propcache-0.2.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f9479aa06a793c5aeba49ce5c5692ffb51fcd9a7016e017d555d5e2b0045d212", size = 204809 }, + { url = "https://files.pythonhosted.org/packages/10/a1/e4050776f4797fc86140ac9a480d5dc069fbfa9d499fe5c5d2fa1ae71f07/propcache-0.2.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d9631c5e8b5b3a0fda99cb0d29c18133bca1e18aea9effe55adb3da1adef80d3", size = 219109 }, + { url = "https://files.pythonhosted.org/packages/c9/c0/e7ae0df76343d5e107d81e59acc085cea5fd36a48aa53ef09add7503e888/propcache-0.2.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3156628250f46a0895f1f36e1d4fbe062a1af8718ec3ebeb746f1d23f0c5dc4d", size = 217368 }, + { url = "https://files.pythonhosted.org/packages/fc/e1/e0a2ed6394b5772508868a977d3238f4afb2eebaf9976f0b44a8d347ad63/propcache-0.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6b6fb63ae352e13748289f04f37868099e69dba4c2b3e271c46061e82c745634", size = 205124 }, + { url = "https://files.pythonhosted.org/packages/50/c1/e388c232d15ca10f233c778bbdc1034ba53ede14c207a72008de45b2db2e/propcache-0.2.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:887d9b0a65404929641a9fabb6452b07fe4572b269d901d622d8a34a4e9043b2", size = 195463 }, + { url = "https://files.pythonhosted.org/packages/0a/fd/71b349b9def426cc73813dbd0f33e266de77305e337c8c12bfb0a2a82bfb/propcache-0.2.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:a96dc1fa45bd8c407a0af03b2d5218392729e1822b0c32e62c5bf7eeb5fb3958", size = 198358 }, + { url = "https://files.pythonhosted.org/packages/02/f2/d7c497cd148ebfc5b0ae32808e6c1af5922215fe38c7a06e4e722fe937c8/propcache-0.2.1-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:a7e65eb5c003a303b94aa2c3852ef130230ec79e349632d030e9571b87c4698c", size = 195560 }, + { url = "https://files.pythonhosted.org/packages/bb/57/f37041bbe5e0dfed80a3f6be2612a3a75b9cfe2652abf2c99bef3455bbad/propcache-0.2.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:999779addc413181912e984b942fbcc951be1f5b3663cd80b2687758f434c583", size = 196895 }, + { url = "https://files.pythonhosted.org/packages/83/36/ae3cc3e4f310bff2f064e3d2ed5558935cc7778d6f827dce74dcfa125304/propcache-0.2.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:19a0f89a7bb9d8048d9c4370c9c543c396e894c76be5525f5e1ad287f1750ddf", size = 207124 }, + { url = "https://files.pythonhosted.org/packages/8c/c4/811b9f311f10ce9d31a32ff14ce58500458443627e4df4ae9c264defba7f/propcache-0.2.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:1ac2f5fe02fa75f56e1ad473f1175e11f475606ec9bd0be2e78e4734ad575034", size = 210442 }, + { url = "https://files.pythonhosted.org/packages/18/dd/a1670d483a61ecac0d7fc4305d91caaac7a8fc1b200ea3965a01cf03bced/propcache-0.2.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:574faa3b79e8ebac7cb1d7930f51184ba1ccf69adfdec53a12f319a06030a68b", size = 203219 }, + { url = "https://files.pythonhosted.org/packages/f9/2d/30ced5afde41b099b2dc0c6573b66b45d16d73090e85655f1a30c5a24e07/propcache-0.2.1-cp310-cp310-win32.whl", hash = "sha256:03ff9d3f665769b2a85e6157ac8b439644f2d7fd17615a82fa55739bc97863f4", size = 40313 }, + { url = "https://files.pythonhosted.org/packages/23/84/bd9b207ac80da237af77aa6e153b08ffa83264b1c7882495984fcbfcf85c/propcache-0.2.1-cp310-cp310-win_amd64.whl", hash = "sha256:2d3af2e79991102678f53e0dbf4c35de99b6b8b58f29a27ca0325816364caaba", size = 44428 }, + { url = "https://files.pythonhosted.org/packages/bc/0f/2913b6791ebefb2b25b4efd4bb2299c985e09786b9f5b19184a88e5778dd/propcache-0.2.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:1ffc3cca89bb438fb9c95c13fc874012f7b9466b89328c3c8b1aa93cdcfadd16", size = 79297 }, + { url = "https://files.pythonhosted.org/packages/cf/73/af2053aeccd40b05d6e19058419ac77674daecdd32478088b79375b9ab54/propcache-0.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f174bbd484294ed9fdf09437f889f95807e5f229d5d93588d34e92106fbf6717", size = 45611 }, + { url = "https://files.pythonhosted.org/packages/3c/09/8386115ba7775ea3b9537730e8cf718d83bbf95bffe30757ccf37ec4e5da/propcache-0.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:70693319e0b8fd35dd863e3e29513875eb15c51945bf32519ef52927ca883bc3", size = 45146 }, + { url = "https://files.pythonhosted.org/packages/03/7a/793aa12f0537b2e520bf09f4c6833706b63170a211ad042ca71cbf79d9cb/propcache-0.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b480c6a4e1138e1aa137c0079b9b6305ec6dcc1098a8ca5196283e8a49df95a9", size = 232136 }, + { url = "https://files.pythonhosted.org/packages/f1/38/b921b3168d72111769f648314100558c2ea1d52eb3d1ba7ea5c4aa6f9848/propcache-0.2.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d27b84d5880f6d8aa9ae3edb253c59d9f6642ffbb2c889b78b60361eed449787", size = 239706 }, + { url = "https://files.pythonhosted.org/packages/14/29/4636f500c69b5edea7786db3c34eb6166f3384b905665ce312a6e42c720c/propcache-0.2.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:857112b22acd417c40fa4595db2fe28ab900c8c5fe4670c7989b1c0230955465", size = 238531 }, + { url = "https://files.pythonhosted.org/packages/85/14/01fe53580a8e1734ebb704a3482b7829a0ef4ea68d356141cf0994d9659b/propcache-0.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cf6c4150f8c0e32d241436526f3c3f9cbd34429492abddbada2ffcff506c51af", size = 231063 }, + { url = "https://files.pythonhosted.org/packages/33/5c/1d961299f3c3b8438301ccfbff0143b69afcc30c05fa28673cface692305/propcache-0.2.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:66d4cfda1d8ed687daa4bc0274fcfd5267873db9a5bc0418c2da19273040eeb7", size = 220134 }, + { url = "https://files.pythonhosted.org/packages/00/d0/ed735e76db279ba67a7d3b45ba4c654e7b02bc2f8050671ec365d8665e21/propcache-0.2.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c2f992c07c0fca81655066705beae35fc95a2fa7366467366db627d9f2ee097f", size = 220009 }, + { url = "https://files.pythonhosted.org/packages/75/90/ee8fab7304ad6533872fee982cfff5a53b63d095d78140827d93de22e2d4/propcache-0.2.1-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:4a571d97dbe66ef38e472703067021b1467025ec85707d57e78711c085984e54", size = 212199 }, + { url = "https://files.pythonhosted.org/packages/eb/ec/977ffaf1664f82e90737275873461695d4c9407d52abc2f3c3e24716da13/propcache-0.2.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:bb6178c241278d5fe853b3de743087be7f5f4c6f7d6d22a3b524d323eecec505", size = 214827 }, + { url = "https://files.pythonhosted.org/packages/57/48/031fb87ab6081764054821a71b71942161619549396224cbb242922525e8/propcache-0.2.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:ad1af54a62ffe39cf34db1aa6ed1a1873bd548f6401db39d8e7cd060b9211f82", size = 228009 }, + { url = "https://files.pythonhosted.org/packages/1a/06/ef1390f2524850838f2390421b23a8b298f6ce3396a7cc6d39dedd4047b0/propcache-0.2.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:e7048abd75fe40712005bcfc06bb44b9dfcd8e101dda2ecf2f5aa46115ad07ca", size = 231638 }, + { url = "https://files.pythonhosted.org/packages/38/2a/101e6386d5a93358395da1d41642b79c1ee0f3b12e31727932b069282b1d/propcache-0.2.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:160291c60081f23ee43d44b08a7e5fb76681221a8e10b3139618c5a9a291b84e", size = 222788 }, + { url = "https://files.pythonhosted.org/packages/db/81/786f687951d0979007e05ad9346cd357e50e3d0b0f1a1d6074df334b1bbb/propcache-0.2.1-cp311-cp311-win32.whl", hash = "sha256:819ce3b883b7576ca28da3861c7e1a88afd08cc8c96908e08a3f4dd64a228034", size = 40170 }, + { url = "https://files.pythonhosted.org/packages/cf/59/7cc7037b295d5772eceb426358bb1b86e6cab4616d971bd74275395d100d/propcache-0.2.1-cp311-cp311-win_amd64.whl", hash = "sha256:edc9fc7051e3350643ad929df55c451899bb9ae6d24998a949d2e4c87fb596d3", size = 44404 }, + { url = "https://files.pythonhosted.org/packages/4c/28/1d205fe49be8b1b4df4c50024e62480a442b1a7b818e734308bb0d17e7fb/propcache-0.2.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:081a430aa8d5e8876c6909b67bd2d937bfd531b0382d3fdedb82612c618bc41a", size = 79588 }, + { url = "https://files.pythonhosted.org/packages/21/ee/fc4d893f8d81cd4971affef2a6cb542b36617cd1d8ce56b406112cb80bf7/propcache-0.2.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d2ccec9ac47cf4e04897619c0e0c1a48c54a71bdf045117d3a26f80d38ab1fb0", size = 45825 }, + { url = "https://files.pythonhosted.org/packages/4a/de/bbe712f94d088da1d237c35d735f675e494a816fd6f54e9db2f61ef4d03f/propcache-0.2.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:14d86fe14b7e04fa306e0c43cdbeebe6b2c2156a0c9ce56b815faacc193e320d", size = 45357 }, + { url = "https://files.pythonhosted.org/packages/7f/14/7ae06a6cf2a2f1cb382586d5a99efe66b0b3d0c6f9ac2f759e6f7af9d7cf/propcache-0.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:049324ee97bb67285b49632132db351b41e77833678432be52bdd0289c0e05e4", size = 241869 }, + { url = "https://files.pythonhosted.org/packages/cc/59/227a78be960b54a41124e639e2c39e8807ac0c751c735a900e21315f8c2b/propcache-0.2.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1cd9a1d071158de1cc1c71a26014dcdfa7dd3d5f4f88c298c7f90ad6f27bb46d", size = 247884 }, + { url = "https://files.pythonhosted.org/packages/84/58/f62b4ffaedf88dc1b17f04d57d8536601e4e030feb26617228ef930c3279/propcache-0.2.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:98110aa363f1bb4c073e8dcfaefd3a5cea0f0834c2aab23dda657e4dab2f53b5", size = 248486 }, + { url = "https://files.pythonhosted.org/packages/1c/07/ebe102777a830bca91bbb93e3479cd34c2ca5d0361b83be9dbd93104865e/propcache-0.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:647894f5ae99c4cf6bb82a1bb3a796f6e06af3caa3d32e26d2350d0e3e3faf24", size = 243649 }, + { url = "https://files.pythonhosted.org/packages/ed/bc/4f7aba7f08f520376c4bb6a20b9a981a581b7f2e385fa0ec9f789bb2d362/propcache-0.2.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bfd3223c15bebe26518d58ccf9a39b93948d3dcb3e57a20480dfdd315356baff", size = 229103 }, + { url = "https://files.pythonhosted.org/packages/fe/d5/04ac9cd4e51a57a96f78795e03c5a0ddb8f23ec098b86f92de028d7f2a6b/propcache-0.2.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:d71264a80f3fcf512eb4f18f59423fe82d6e346ee97b90625f283df56aee103f", size = 226607 }, + { url = "https://files.pythonhosted.org/packages/e3/f0/24060d959ea41d7a7cc7fdbf68b31852331aabda914a0c63bdb0e22e96d6/propcache-0.2.1-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:e73091191e4280403bde6c9a52a6999d69cdfde498f1fdf629105247599b57ec", size = 221153 }, + { url = "https://files.pythonhosted.org/packages/77/a7/3ac76045a077b3e4de4859a0753010765e45749bdf53bd02bc4d372da1a0/propcache-0.2.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:3935bfa5fede35fb202c4b569bb9c042f337ca4ff7bd540a0aa5e37131659348", size = 222151 }, + { url = "https://files.pythonhosted.org/packages/e7/af/5e29da6f80cebab3f5a4dcd2a3240e7f56f2c4abf51cbfcc99be34e17f0b/propcache-0.2.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:f508b0491767bb1f2b87fdfacaba5f7eddc2f867740ec69ece6d1946d29029a6", size = 233812 }, + { url = "https://files.pythonhosted.org/packages/8c/89/ebe3ad52642cc5509eaa453e9f4b94b374d81bae3265c59d5c2d98efa1b4/propcache-0.2.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:1672137af7c46662a1c2be1e8dc78cb6d224319aaa40271c9257d886be4363a6", size = 238829 }, + { url = "https://files.pythonhosted.org/packages/e9/2f/6b32f273fa02e978b7577159eae7471b3cfb88b48563b1c2578b2d7ca0bb/propcache-0.2.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b74c261802d3d2b85c9df2dfb2fa81b6f90deeef63c2db9f0e029a3cac50b518", size = 230704 }, + { url = "https://files.pythonhosted.org/packages/5c/2e/f40ae6ff5624a5f77edd7b8359b208b5455ea113f68309e2b00a2e1426b6/propcache-0.2.1-cp312-cp312-win32.whl", hash = "sha256:d09c333d36c1409d56a9d29b3a1b800a42c76a57a5a8907eacdbce3f18768246", size = 40050 }, + { url = "https://files.pythonhosted.org/packages/3b/77/a92c3ef994e47180862b9d7d11e37624fb1c00a16d61faf55115d970628b/propcache-0.2.1-cp312-cp312-win_amd64.whl", hash = "sha256:c214999039d4f2a5b2073ac506bba279945233da8c786e490d411dfc30f855c1", size = 44117 }, + { url = "https://files.pythonhosted.org/packages/0f/2a/329e0547cf2def8857157f9477669043e75524cc3e6251cef332b3ff256f/propcache-0.2.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:aca405706e0b0a44cc6bfd41fbe89919a6a56999157f6de7e182a990c36e37bc", size = 77002 }, + { url = "https://files.pythonhosted.org/packages/12/2d/c4df5415e2382f840dc2ecbca0eeb2293024bc28e57a80392f2012b4708c/propcache-0.2.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:12d1083f001ace206fe34b6bdc2cb94be66d57a850866f0b908972f90996b3e9", size = 44639 }, + { url = "https://files.pythonhosted.org/packages/d0/5a/21aaa4ea2f326edaa4e240959ac8b8386ea31dedfdaa636a3544d9e7a408/propcache-0.2.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:d93f3307ad32a27bda2e88ec81134b823c240aa3abb55821a8da553eed8d9439", size = 44049 }, + { url = "https://files.pythonhosted.org/packages/4e/3e/021b6cd86c0acc90d74784ccbb66808b0bd36067a1bf3e2deb0f3845f618/propcache-0.2.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ba278acf14471d36316159c94a802933d10b6a1e117b8554fe0d0d9b75c9d536", size = 224819 }, + { url = "https://files.pythonhosted.org/packages/3c/57/c2fdeed1b3b8918b1770a133ba5c43ad3d78e18285b0c06364861ef5cc38/propcache-0.2.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4e6281aedfca15301c41f74d7005e6e3f4ca143584ba696ac69df4f02f40d629", size = 229625 }, + { url = "https://files.pythonhosted.org/packages/9d/81/70d4ff57bf2877b5780b466471bebf5892f851a7e2ca0ae7ffd728220281/propcache-0.2.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5b750a8e5a1262434fb1517ddf64b5de58327f1adc3524a5e44c2ca43305eb0b", size = 232934 }, + { url = "https://files.pythonhosted.org/packages/3c/b9/bb51ea95d73b3fb4100cb95adbd4e1acaf2cbb1fd1083f5468eeb4a099a8/propcache-0.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bf72af5e0fb40e9babf594308911436c8efde3cb5e75b6f206c34ad18be5c052", size = 227361 }, + { url = "https://files.pythonhosted.org/packages/f1/20/3c6d696cd6fd70b29445960cc803b1851a1131e7a2e4ee261ee48e002bcd/propcache-0.2.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b2d0a12018b04f4cb820781ec0dffb5f7c7c1d2a5cd22bff7fb055a2cb19ebce", size = 213904 }, + { url = "https://files.pythonhosted.org/packages/a1/cb/1593bfc5ac6d40c010fa823f128056d6bc25b667f5393781e37d62f12005/propcache-0.2.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:e800776a79a5aabdb17dcc2346a7d66d0777e942e4cd251defeb084762ecd17d", size = 212632 }, + { url = "https://files.pythonhosted.org/packages/6d/5c/e95617e222be14a34c709442a0ec179f3207f8a2b900273720501a70ec5e/propcache-0.2.1-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:4160d9283bd382fa6c0c2b5e017acc95bc183570cd70968b9202ad6d8fc48dce", size = 207897 }, + { url = "https://files.pythonhosted.org/packages/8e/3b/56c5ab3dc00f6375fbcdeefdede5adf9bee94f1fab04adc8db118f0f9e25/propcache-0.2.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:30b43e74f1359353341a7adb783c8f1b1c676367b011709f466f42fda2045e95", size = 208118 }, + { url = "https://files.pythonhosted.org/packages/86/25/d7ef738323fbc6ebcbce33eb2a19c5e07a89a3df2fded206065bd5e868a9/propcache-0.2.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:58791550b27d5488b1bb52bc96328456095d96206a250d28d874fafe11b3dfaf", size = 217851 }, + { url = "https://files.pythonhosted.org/packages/b3/77/763e6cef1852cf1ba740590364ec50309b89d1c818e3256d3929eb92fabf/propcache-0.2.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:0f022d381747f0dfe27e99d928e31bc51a18b65bb9e481ae0af1380a6725dd1f", size = 222630 }, + { url = "https://files.pythonhosted.org/packages/4f/e9/0f86be33602089c701696fbed8d8c4c07b6ee9605c5b7536fd27ed540c5b/propcache-0.2.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:297878dc9d0a334358f9b608b56d02e72899f3b8499fc6044133f0d319e2ec30", size = 216269 }, + { url = "https://files.pythonhosted.org/packages/cc/02/5ac83217d522394b6a2e81a2e888167e7ca629ef6569a3f09852d6dcb01a/propcache-0.2.1-cp313-cp313-win32.whl", hash = "sha256:ddfab44e4489bd79bda09d84c430677fc7f0a4939a73d2bba3073036f487a0a6", size = 39472 }, + { url = "https://files.pythonhosted.org/packages/f4/33/d6f5420252a36034bc8a3a01171bc55b4bff5df50d1c63d9caa50693662f/propcache-0.2.1-cp313-cp313-win_amd64.whl", hash = "sha256:556fc6c10989f19a179e4321e5d678db8eb2924131e64652a51fe83e4c3db0e1", size = 43363 }, + { url = "https://files.pythonhosted.org/packages/41/b6/c5319caea262f4821995dca2107483b94a3345d4607ad797c76cb9c36bcc/propcache-0.2.1-py3-none-any.whl", hash = "sha256:52277518d6aae65536e9cea52d4e7fd2f7a66f4aa2d30ed3f2fcea620ace3c54", size = 11818 }, ] [[package]] name = "protobuf" -version = "5.28.3" +version = "5.29.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/74/6e/e69eb906fddcb38f8530a12f4b410699972ab7ced4e21524ece9d546ac27/protobuf-5.28.3.tar.gz", hash = "sha256:64badbc49180a5e401f373f9ce7ab1d18b63f7dd4a9cdc43c92b9f0b481cef7b", size = 422479 } +sdist = { url = "https://files.pythonhosted.org/packages/d2/4f/1639b7b1633d8fd55f216ba01e21bf2c43384ab25ef3ddb35d85a52033e8/protobuf-5.29.1.tar.gz", hash = "sha256:683be02ca21a6ffe80db6dd02c0b5b2892322c59ca57fd6c872d652cb80549cb", size = 424965 } wheels = [ - { url = "https://files.pythonhosted.org/packages/d1/c5/05163fad52d7c43e124a545f1372d18266db36036377ad29de4271134a6a/protobuf-5.28.3-cp310-abi3-win32.whl", hash = "sha256:0c4eec6f987338617072592b97943fdbe30d019c56126493111cf24344c1cc24", size = 419624 }, - { url = "https://files.pythonhosted.org/packages/9c/4c/4563ebe001ff30dca9d7ed12e471fa098d9759712980cde1fd03a3a44fb7/protobuf-5.28.3-cp310-abi3-win_amd64.whl", hash = "sha256:91fba8f445723fcf400fdbe9ca796b19d3b1242cd873907979b9ed71e4afe868", size = 431464 }, - { url = "https://files.pythonhosted.org/packages/1c/f2/baf397f3dd1d3e4af7e3f5a0382b868d25ac068eefe1ebde05132333436c/protobuf-5.28.3-cp38-abi3-macosx_10_9_universal2.whl", hash = "sha256:a3f6857551e53ce35e60b403b8a27b0295f7d6eb63d10484f12bc6879c715687", size = 414743 }, - { url = "https://files.pythonhosted.org/packages/85/50/cd61a358ba1601f40e7d38bcfba22e053f40ef2c50d55b55926aecc8fec7/protobuf-5.28.3-cp38-abi3-manylinux2014_aarch64.whl", hash = "sha256:3fa2de6b8b29d12c61911505d893afe7320ce7ccba4df913e2971461fa36d584", size = 316511 }, - { url = "https://files.pythonhosted.org/packages/5d/ae/3257b09328c0b4e59535e497b0c7537d4954038bdd53a2f0d2f49d15a7c4/protobuf-5.28.3-cp38-abi3-manylinux2014_x86_64.whl", hash = "sha256:712319fbdddb46f21abb66cd33cb9e491a5763b2febd8f228251add221981135", size = 316624 }, - { url = "https://files.pythonhosted.org/packages/ad/c3/2377c159e28ea89a91cf1ca223f827ae8deccb2c9c401e5ca233cd73002f/protobuf-5.28.3-py3-none-any.whl", hash = "sha256:cee1757663fa32a1ee673434fcf3bf24dd54763c79690201208bafec62f19eed", size = 169511 }, + { url = "https://files.pythonhosted.org/packages/50/c7/28669b04691a376cf7d0617d612f126aa0fff763d57df0142f9bf474c5b8/protobuf-5.29.1-cp310-abi3-win32.whl", hash = "sha256:22c1f539024241ee545cbcb00ee160ad1877975690b16656ff87dde107b5f110", size = 422706 }, + { url = "https://files.pythonhosted.org/packages/e3/33/dc7a7712f457456b7e0b16420ab8ba1cc8686751d3f28392eb43d0029ab9/protobuf-5.29.1-cp310-abi3-win_amd64.whl", hash = "sha256:1fc55267f086dd4050d18ef839d7bd69300d0d08c2a53ca7df3920cc271a3c34", size = 434505 }, + { url = "https://files.pythonhosted.org/packages/e5/39/44239fb1c6ec557e1731d996a5de89a9eb1ada7a92491fcf9c5d714052ed/protobuf-5.29.1-cp38-abi3-macosx_10_9_universal2.whl", hash = "sha256:d473655e29c0c4bbf8b69e9a8fb54645bc289dead6d753b952e7aa660254ae18", size = 417822 }, + { url = "https://files.pythonhosted.org/packages/fb/4a/ec56f101d38d4bef2959a9750209809242d86cf8b897db00f2f98bfa360e/protobuf-5.29.1-cp38-abi3-manylinux2014_aarch64.whl", hash = "sha256:b5ba1d0e4c8a40ae0496d0e2ecfdbb82e1776928a205106d14ad6985a09ec155", size = 319572 }, + { url = "https://files.pythonhosted.org/packages/04/52/c97c58a33b3d6c89a8138788576d372a90a6556f354799971c6b4d16d871/protobuf-5.29.1-cp38-abi3-manylinux2014_x86_64.whl", hash = "sha256:8ee1461b3af56145aca2800e6a3e2f928108c749ba8feccc6f5dd0062c410c0d", size = 319671 }, + { url = "https://files.pythonhosted.org/packages/3b/24/c8c49df8f6587719e1d400109b16c10c6902d0c9adddc8fff82840146f99/protobuf-5.29.1-py3-none-any.whl", hash = "sha256:32600ddb9c2a53dedc25b8581ea0f1fd8ea04956373c0c07577ce58d312522e0", size = 172547 }, ] [[package]] @@ -974,7 +973,7 @@ wheels = [ [[package]] name = "pytest" -version = "8.3.3" +version = "8.3.4" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "colorama", marker = "sys_platform == 'win32'" }, @@ -984,22 +983,22 @@ dependencies = [ { name = "pluggy" }, { name = "tomli", marker = "python_full_version < '3.11'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/8b/6c/62bbd536103af674e227c41a8f3dcd022d591f6eed5facb5a0f31ee33bbc/pytest-8.3.3.tar.gz", hash = "sha256:70b98107bd648308a7952b06e6ca9a50bc660be218d53c257cc1fc94fda10181", size = 1442487 } +sdist = { url = "https://files.pythonhosted.org/packages/05/35/30e0d83068951d90a01852cb1cef56e5d8a09d20c7f511634cc2f7e0372a/pytest-8.3.4.tar.gz", hash = "sha256:965370d062bce11e73868e0335abac31b4d3de0e82f4007408d242b4f8610761", size = 1445919 } wheels = [ - { url = "https://files.pythonhosted.org/packages/6b/77/7440a06a8ead44c7757a64362dd22df5760f9b12dc5f11b6188cd2fc27a0/pytest-8.3.3-py3-none-any.whl", hash = "sha256:a6853c7375b2663155079443d2e45de913a911a11d669df02a50814944db57b2", size = 342341 }, + { url = "https://files.pythonhosted.org/packages/11/92/76a1c94d3afee238333bc0a42b82935dd8f9cf8ce9e336ff87ee14d9e1cf/pytest-8.3.4-py3-none-any.whl", hash = "sha256:50e16d954148559c9a74109af1eaf0c945ba2d8f30f0a3d3335edde19788b6f6", size = 343083 }, ] [[package]] name = "pytest-httpx" -version = "0.34.0" +version = "0.35.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "httpx" }, { name = "pytest" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/86/08/d0be3fe5645c6cd9396093a9ddf97d60814a3b066fd5b38ddced34a13d14/pytest_httpx-0.34.0.tar.gz", hash = "sha256:3ca4b0975c0f93b985f17df19e76430c1086b5b0cce32b1af082d8901296a735", size = 54108 } +sdist = { url = "https://files.pythonhosted.org/packages/1f/89/5b12b7b29e3d0af3a4b9c071ee92fa25a9017453731a38f08ba01c280f4c/pytest_httpx-0.35.0.tar.gz", hash = "sha256:d619ad5d2e67734abfbb224c3d9025d64795d4b8711116b1a13f72a251ae511f", size = 54146 } wheels = [ - { url = "https://files.pythonhosted.org/packages/2c/72/7138a0faf5d780d6b9ceedef22da0b66ae8e22a676a12fd55a05c0cdd979/pytest_httpx-0.34.0-py3-none-any.whl", hash = "sha256:42cf0a66f7b71b9111db2897e8b38a903abd33a27b11c48aff4a3c7650313af2", size = 19440 }, + { url = "https://files.pythonhosted.org/packages/b0/ed/026d467c1853dd83102411a78126b4842618e86c895f93528b0528c7a620/pytest_httpx-0.35.0-py3-none-any.whl", hash = "sha256:ee11a00ffcea94a5cbff47af2114d34c5b231c326902458deed73f9c459fd744", size = 19442 }, ] [[package]] @@ -1057,27 +1056,27 @@ wheels = [ [[package]] name = "ruff" -version = "0.8.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/b2/d6/a2373f3ba7180ddb44420d2a9d1f1510e1a4d162b3d27282bedcb09c8da9/ruff-0.8.0.tar.gz", hash = "sha256:a7ccfe6331bf8c8dad715753e157457faf7351c2b69f62f32c165c2dbcbacd44", size = 3276537 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/ec/77/e889ee3ce7fd8baa3ed1b77a03b9fb8ec1be68be1418261522fd6a5405e0/ruff-0.8.0-py3-none-linux_armv6l.whl", hash = "sha256:fcb1bf2cc6706adae9d79c8d86478677e3bbd4ced796ccad106fd4776d395fea", size = 10518283 }, - { url = "https://files.pythonhosted.org/packages/da/c8/0a47de01edf19fb22f5f9b7964f46a68d0bdff20144d134556ffd1ba9154/ruff-0.8.0-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:295bb4c02d58ff2ef4378a1870c20af30723013f441c9d1637a008baaf928c8b", size = 10317691 }, - { url = "https://files.pythonhosted.org/packages/41/17/9885e4a0eeae07abd2a4ebabc3246f556719f24efa477ba2739146c4635a/ruff-0.8.0-py3-none-macosx_11_0_arm64.whl", hash = "sha256:7b1f1c76b47c18fa92ee78b60d2d20d7e866c55ee603e7d19c1e991fad933a9a", size = 9940999 }, - { url = "https://files.pythonhosted.org/packages/3e/cd/46b6f7043597eb318b5f5482c8ae8f5491cccce771e85f59d23106f2d179/ruff-0.8.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eb0d4f250a7711b67ad513fde67e8870109e5ce590a801c3722580fe98c33a99", size = 10772437 }, - { url = "https://files.pythonhosted.org/packages/5d/87/afc95aeb8bc78b1d8a3461717a4419c05aa8aa943d4c9cbd441630f85584/ruff-0.8.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0e55cce9aa93c5d0d4e3937e47b169035c7e91c8655b0974e61bb79cf398d49c", size = 10299156 }, - { url = "https://files.pythonhosted.org/packages/65/fa/04c647bb809c4d65e8eae1ed1c654d9481b21dd942e743cd33511687b9f9/ruff-0.8.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3f4cd64916d8e732ce6b87f3f5296a8942d285bbbc161acee7fe561134af64f9", size = 11325819 }, - { url = "https://files.pythonhosted.org/packages/90/26/7dad6e7d833d391a8a1afe4ee70ca6f36c4a297d3cca83ef10e83e9aacf3/ruff-0.8.0-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:c5c1466be2a2ebdf7c5450dd5d980cc87c8ba6976fb82582fea18823da6fa362", size = 12023927 }, - { url = "https://files.pythonhosted.org/packages/24/a0/be5296dda6428ba8a13bda8d09fbc0e14c810b485478733886e61597ae2b/ruff-0.8.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2dabfd05b96b7b8f2da00d53c514eea842bff83e41e1cceb08ae1966254a51df", size = 11589702 }, - { url = "https://files.pythonhosted.org/packages/26/3f/7602eb11d2886db545834182a9dbe500b8211fcbc9b4064bf9d358bbbbb4/ruff-0.8.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:facebdfe5a5af6b1588a1d26d170635ead6892d0e314477e80256ef4a8470cf3", size = 12782936 }, - { url = "https://files.pythonhosted.org/packages/4c/5d/083181bdec4ec92a431c1291d3fff65eef3ded630a4b55eb735000ef5f3b/ruff-0.8.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:87a8e86bae0dbd749c815211ca11e3a7bd559b9710746c559ed63106d382bd9c", size = 11138488 }, - { url = "https://files.pythonhosted.org/packages/b7/23/c12cdef58413cee2436d6a177aa06f7a366ebbca916cf10820706f632459/ruff-0.8.0-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:85e654f0ded7befe2d61eeaf3d3b1e4ef3894469cd664ffa85006c7720f1e4a2", size = 10744474 }, - { url = "https://files.pythonhosted.org/packages/29/61/a12f3b81520083cd7c5caa24ba61bb99fd1060256482eff0ef04cc5ccd1b/ruff-0.8.0-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:83a55679c4cb449fa527b8497cadf54f076603cc36779b2170b24f704171ce70", size = 10369029 }, - { url = "https://files.pythonhosted.org/packages/08/2a/c013f4f3e4a54596c369cee74c24870ed1d534f31a35504908b1fc97017a/ruff-0.8.0-py3-none-musllinux_1_2_i686.whl", hash = "sha256:812e2052121634cf13cd6fddf0c1871d0ead1aad40a1a258753c04c18bb71bbd", size = 10867481 }, - { url = "https://files.pythonhosted.org/packages/d5/f7/685b1e1d42a3e94ceb25eab23c70bdd8c0ab66a43121ef83fe6db5a58756/ruff-0.8.0-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:780d5d8523c04202184405e60c98d7595bdb498c3c6abba3b6d4cdf2ca2af426", size = 11237117 }, - { url = "https://files.pythonhosted.org/packages/03/20/401132c0908e8837625e3b7e32df9962e7cd681a4df1e16a10e2a5b4ecda/ruff-0.8.0-py3-none-win32.whl", hash = "sha256:5fdb6efecc3eb60bba5819679466471fd7d13c53487df7248d6e27146e985468", size = 8783511 }, - { url = "https://files.pythonhosted.org/packages/1d/5c/4d800fca7854f62ad77f2c0d99b4b585f03e2d87a6ec1ecea85543a14a3c/ruff-0.8.0-py3-none-win_amd64.whl", hash = "sha256:582891c57b96228d146725975fbb942e1f30a0c4ba19722e692ca3eb25cc9b4f", size = 9559876 }, - { url = "https://files.pythonhosted.org/packages/5b/bc/cc8a6a5ca4960b226dc15dd8fb511dd11f2014ff89d325c0b9b9faa9871f/ruff-0.8.0-py3-none-win_arm64.whl", hash = "sha256:ba93e6294e9a737cd726b74b09a6972e36bb511f9a102f1d9a7e1ce94dd206a6", size = 8939733 }, +version = "0.8.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/5e/2b/01245f4f3a727d60bebeacd7ee6d22586c7f62380a2597ddb22c2f45d018/ruff-0.8.2.tar.gz", hash = "sha256:b84f4f414dda8ac7f75075c1fa0b905ac0ff25361f42e6d5da681a465e0f78e5", size = 3349020 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/91/29/366be70216dba1731a00a41f2f030822b0c96c7c4f3b2c0cdce15cbace74/ruff-0.8.2-py3-none-linux_armv6l.whl", hash = "sha256:c49ab4da37e7c457105aadfd2725e24305ff9bc908487a9bf8d548c6dad8bb3d", size = 10530649 }, + { url = "https://files.pythonhosted.org/packages/63/82/a733956540bb388f00df5a3e6a02467b16c0e529132625fe44ce4c5fb9c7/ruff-0.8.2-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:ec016beb69ac16be416c435828be702ee694c0d722505f9c1f35e1b9c0cc1bf5", size = 10274069 }, + { url = "https://files.pythonhosted.org/packages/3d/12/0b3aa14d1d71546c988a28e1b412981c1b80c8a1072e977a2f30c595cc4a/ruff-0.8.2-py3-none-macosx_11_0_arm64.whl", hash = "sha256:f05cdf8d050b30e2ba55c9b09330b51f9f97d36d4673213679b965d25a785f3c", size = 9909400 }, + { url = "https://files.pythonhosted.org/packages/23/08/f9f08cefb7921784c891c4151cce6ed357ff49e84b84978440cffbc87408/ruff-0.8.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:60f578c11feb1d3d257b2fb043ddb47501ab4816e7e221fbb0077f0d5d4e7b6f", size = 10766782 }, + { url = "https://files.pythonhosted.org/packages/e4/71/bf50c321ec179aa420c8ec40adac5ae9cc408d4d37283a485b19a2331ceb/ruff-0.8.2-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:cbd5cf9b0ae8f30eebc7b360171bd50f59ab29d39f06a670b3e4501a36ba5897", size = 10286316 }, + { url = "https://files.pythonhosted.org/packages/f2/83/c82688a2a6117539aea0ce63fdf6c08e60fe0202779361223bcd7f40bd74/ruff-0.8.2-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b402ddee3d777683de60ff76da801fa7e5e8a71038f57ee53e903afbcefdaa58", size = 11338270 }, + { url = "https://files.pythonhosted.org/packages/7f/d7/bc6a45e5a22e627640388e703160afb1d77c572b1d0fda8b4349f334fc66/ruff-0.8.2-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:705832cd7d85605cb7858d8a13d75993c8f3ef1397b0831289109e953d833d29", size = 12058579 }, + { url = "https://files.pythonhosted.org/packages/da/3b/64150c93946ec851e6f1707ff586bb460ca671581380c919698d6a9267dc/ruff-0.8.2-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:32096b41aaf7a5cc095fa45b4167b890e4c8d3fd217603f3634c92a541de7248", size = 11615172 }, + { url = "https://files.pythonhosted.org/packages/e4/9e/cf12b697ea83cfe92ec4509ae414dc4c9b38179cc681a497031f0d0d9a8e/ruff-0.8.2-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e769083da9439508833cfc7c23e351e1809e67f47c50248250ce1ac52c21fb93", size = 12882398 }, + { url = "https://files.pythonhosted.org/packages/a9/27/96d10863accf76a9c97baceac30b0a52d917eb985a8ac058bd4636aeede0/ruff-0.8.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5fe716592ae8a376c2673fdfc1f5c0c193a6d0411f90a496863c99cd9e2ae25d", size = 11176094 }, + { url = "https://files.pythonhosted.org/packages/eb/10/cd2fd77d4a4e7f03c29351be0f53278a393186b540b99df68beb5304fddd/ruff-0.8.2-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:81c148825277e737493242b44c5388a300584d73d5774defa9245aaef55448b0", size = 10771884 }, + { url = "https://files.pythonhosted.org/packages/71/5d/beabb2ff18870fc4add05fa3a69a4cb1b1d2d6f83f3cf3ae5ab0d52f455d/ruff-0.8.2-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:d261d7850c8367704874847d95febc698a950bf061c9475d4a8b7689adc4f7fa", size = 10382535 }, + { url = "https://files.pythonhosted.org/packages/ae/29/6b3fdf3ad3e35b28d87c25a9ff4c8222ad72485ab783936b2b267250d7a7/ruff-0.8.2-py3-none-musllinux_1_2_i686.whl", hash = "sha256:1ca4e3a87496dc07d2427b7dd7ffa88a1e597c28dad65ae6433ecb9f2e4f022f", size = 10886995 }, + { url = "https://files.pythonhosted.org/packages/e9/dc/859d889b4d9356a1a2cdbc1e4a0dda94052bc5b5300098647e51a58c430b/ruff-0.8.2-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:729850feed82ef2440aa27946ab39c18cb4a8889c1128a6d589ffa028ddcfc22", size = 11220750 }, + { url = "https://files.pythonhosted.org/packages/0b/08/e8f519f61f1d624264bfd6b8829e4c5f31c3c61193bc3cff1f19dbe7626a/ruff-0.8.2-py3-none-win32.whl", hash = "sha256:ac42caaa0411d6a7d9594363294416e0e48fc1279e1b0e948391695db2b3d5b1", size = 8729396 }, + { url = "https://files.pythonhosted.org/packages/f8/d4/ba1c7ab72aba37a2b71fe48ab95b80546dbad7a7f35ea28cf66fc5cea5f6/ruff-0.8.2-py3-none-win_amd64.whl", hash = "sha256:2aae99ec70abf43372612a838d97bfe77d45146254568d94926e8ed5bbb409ea", size = 9594729 }, + { url = "https://files.pythonhosted.org/packages/23/34/db20e12d3db11b8a2a8874258f0f6d96a9a4d631659d54575840557164c8/ruff-0.8.2-py3-none-win_arm64.whl", hash = "sha256:fb88e2a506b70cfbc2de6fae6681c4f944f7dd5f2fe87233a7233d888bad73e8", size = 9035131 }, ] [[package]] @@ -1208,11 +1207,41 @@ wheels = [ [[package]] name = "tomli" -version = "2.1.0" +version = "2.2.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/1e/e4/1b6cbcc82d8832dd0ce34767d5c560df8a3547ad8cbc427f34601415930a/tomli-2.1.0.tar.gz", hash = "sha256:3f646cae2aec94e17d04973e4249548320197cfabdf130015d023de4b74d8ab8", size = 16622 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/de/f7/4da0ffe1892122c9ea096c57f64c2753ae5dd3ce85488802d11b0992cc6d/tomli-2.1.0-py3-none-any.whl", hash = "sha256:a5c57c3d1c56f5ccdf89f6523458f60ef716e210fc47c4cfb188c5ba473e0391", size = 13750 }, +sdist = { url = "https://files.pythonhosted.org/packages/18/87/302344fed471e44a87289cf4967697d07e532f2421fdaf868a303cbae4ff/tomli-2.2.1.tar.gz", hash = "sha256:cd45e1dc79c835ce60f7404ec8119f2eb06d38b1deba146f07ced3bbc44505ff", size = 17175 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/43/ca/75707e6efa2b37c77dadb324ae7d9571cb424e61ea73fad7c56c2d14527f/tomli-2.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678e4fa69e4575eb77d103de3df8a895e1591b48e740211bd1067378c69e8249", size = 131077 }, + { url = "https://files.pythonhosted.org/packages/c7/16/51ae563a8615d472fdbffc43a3f3d46588c264ac4f024f63f01283becfbb/tomli-2.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:023aa114dd824ade0100497eb2318602af309e5a55595f76b626d6d9f3b7b0a6", size = 123429 }, + { url = "https://files.pythonhosted.org/packages/f1/dd/4f6cd1e7b160041db83c694abc78e100473c15d54620083dbd5aae7b990e/tomli-2.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ece47d672db52ac607a3d9599a9d48dcb2f2f735c6c2d1f34130085bb12b112a", size = 226067 }, + { url = "https://files.pythonhosted.org/packages/a9/6b/c54ede5dc70d648cc6361eaf429304b02f2871a345bbdd51e993d6cdf550/tomli-2.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6972ca9c9cc9f0acaa56a8ca1ff51e7af152a9f87fb64623e31d5c83700080ee", size = 236030 }, + { url = "https://files.pythonhosted.org/packages/1f/47/999514fa49cfaf7a92c805a86c3c43f4215621855d151b61c602abb38091/tomli-2.2.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c954d2250168d28797dd4e3ac5cf812a406cd5a92674ee4c8f123c889786aa8e", size = 240898 }, + { url = "https://files.pythonhosted.org/packages/73/41/0a01279a7ae09ee1573b423318e7934674ce06eb33f50936655071d81a24/tomli-2.2.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:8dd28b3e155b80f4d54beb40a441d366adcfe740969820caf156c019fb5c7ec4", size = 229894 }, + { url = "https://files.pythonhosted.org/packages/55/18/5d8bc5b0a0362311ce4d18830a5d28943667599a60d20118074ea1b01bb7/tomli-2.2.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:e59e304978767a54663af13c07b3d1af22ddee3bb2fb0618ca1593e4f593a106", size = 245319 }, + { url = "https://files.pythonhosted.org/packages/92/a3/7ade0576d17f3cdf5ff44d61390d4b3febb8a9fc2b480c75c47ea048c646/tomli-2.2.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:33580bccab0338d00994d7f16f4c4ec25b776af3ffaac1ed74e0b3fc95e885a8", size = 238273 }, + { url = "https://files.pythonhosted.org/packages/72/6f/fa64ef058ac1446a1e51110c375339b3ec6be245af9d14c87c4a6412dd32/tomli-2.2.1-cp311-cp311-win32.whl", hash = "sha256:465af0e0875402f1d226519c9904f37254b3045fc5084697cefb9bdde1ff99ff", size = 98310 }, + { url = "https://files.pythonhosted.org/packages/6a/1c/4a2dcde4a51b81be3530565e92eda625d94dafb46dbeb15069df4caffc34/tomli-2.2.1-cp311-cp311-win_amd64.whl", hash = "sha256:2d0f2fdd22b02c6d81637a3c95f8cd77f995846af7414c5c4b8d0545afa1bc4b", size = 108309 }, + { url = "https://files.pythonhosted.org/packages/52/e1/f8af4c2fcde17500422858155aeb0d7e93477a0d59a98e56cbfe75070fd0/tomli-2.2.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:4a8f6e44de52d5e6c657c9fe83b562f5f4256d8ebbfe4ff922c495620a7f6cea", size = 132762 }, + { url = "https://files.pythonhosted.org/packages/03/b8/152c68bb84fc00396b83e7bbddd5ec0bd3dd409db4195e2a9b3e398ad2e3/tomli-2.2.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8d57ca8095a641b8237d5b079147646153d22552f1c637fd3ba7f4b0b29167a8", size = 123453 }, + { url = "https://files.pythonhosted.org/packages/c8/d6/fc9267af9166f79ac528ff7e8c55c8181ded34eb4b0e93daa767b8841573/tomli-2.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4e340144ad7ae1533cb897d406382b4b6fede8890a03738ff1683af800d54192", size = 233486 }, + { url = "https://files.pythonhosted.org/packages/5c/51/51c3f2884d7bab89af25f678447ea7d297b53b5a3b5730a7cb2ef6069f07/tomli-2.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:db2b95f9de79181805df90bedc5a5ab4c165e6ec3fe99f970d0e302f384ad222", size = 242349 }, + { url = "https://files.pythonhosted.org/packages/ab/df/bfa89627d13a5cc22402e441e8a931ef2108403db390ff3345c05253935e/tomli-2.2.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:40741994320b232529c802f8bc86da4e1aa9f413db394617b9a256ae0f9a7f77", size = 252159 }, + { url = "https://files.pythonhosted.org/packages/9e/6e/fa2b916dced65763a5168c6ccb91066f7639bdc88b48adda990db10c8c0b/tomli-2.2.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:400e720fe168c0f8521520190686ef8ef033fb19fc493da09779e592861b78c6", size = 237243 }, + { url = "https://files.pythonhosted.org/packages/b4/04/885d3b1f650e1153cbb93a6a9782c58a972b94ea4483ae4ac5cedd5e4a09/tomli-2.2.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:02abe224de6ae62c19f090f68da4e27b10af2b93213d36cf44e6e1c5abd19fdd", size = 259645 }, + { url = "https://files.pythonhosted.org/packages/9c/de/6b432d66e986e501586da298e28ebeefd3edc2c780f3ad73d22566034239/tomli-2.2.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b82ebccc8c8a36f2094e969560a1b836758481f3dc360ce9a3277c65f374285e", size = 244584 }, + { url = "https://files.pythonhosted.org/packages/1c/9a/47c0449b98e6e7d1be6cbac02f93dd79003234ddc4aaab6ba07a9a7482e2/tomli-2.2.1-cp312-cp312-win32.whl", hash = "sha256:889f80ef92701b9dbb224e49ec87c645ce5df3fa2cc548664eb8a25e03127a98", size = 98875 }, + { url = "https://files.pythonhosted.org/packages/ef/60/9b9638f081c6f1261e2688bd487625cd1e660d0a85bd469e91d8db969734/tomli-2.2.1-cp312-cp312-win_amd64.whl", hash = "sha256:7fc04e92e1d624a4a63c76474610238576942d6b8950a2d7f908a340494e67e4", size = 109418 }, + { url = "https://files.pythonhosted.org/packages/04/90/2ee5f2e0362cb8a0b6499dc44f4d7d48f8fff06d28ba46e6f1eaa61a1388/tomli-2.2.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f4039b9cbc3048b2416cc57ab3bda989a6fcf9b36cf8937f01a6e731b64f80d7", size = 132708 }, + { url = "https://files.pythonhosted.org/packages/c0/ec/46b4108816de6b385141f082ba99e315501ccd0a2ea23db4a100dd3990ea/tomli-2.2.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:286f0ca2ffeeb5b9bd4fcc8d6c330534323ec51b2f52da063b11c502da16f30c", size = 123582 }, + { url = "https://files.pythonhosted.org/packages/a0/bd/b470466d0137b37b68d24556c38a0cc819e8febe392d5b199dcd7f578365/tomli-2.2.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a92ef1a44547e894e2a17d24e7557a5e85a9e1d0048b0b5e7541f76c5032cb13", size = 232543 }, + { url = "https://files.pythonhosted.org/packages/d9/e5/82e80ff3b751373f7cead2815bcbe2d51c895b3c990686741a8e56ec42ab/tomli-2.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9316dc65bed1684c9a98ee68759ceaed29d229e985297003e494aa825ebb0281", size = 241691 }, + { url = "https://files.pythonhosted.org/packages/05/7e/2a110bc2713557d6a1bfb06af23dd01e7dde52b6ee7dadc589868f9abfac/tomli-2.2.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e85e99945e688e32d5a35c1ff38ed0b3f41f43fad8df0bdf79f72b2ba7bc5272", size = 251170 }, + { url = "https://files.pythonhosted.org/packages/64/7b/22d713946efe00e0adbcdfd6d1aa119ae03fd0b60ebed51ebb3fa9f5a2e5/tomli-2.2.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ac065718db92ca818f8d6141b5f66369833d4a80a9d74435a268c52bdfa73140", size = 236530 }, + { url = "https://files.pythonhosted.org/packages/38/31/3a76f67da4b0cf37b742ca76beaf819dca0ebef26d78fc794a576e08accf/tomli-2.2.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:d920f33822747519673ee656a4b6ac33e382eca9d331c87770faa3eef562aeb2", size = 258666 }, + { url = "https://files.pythonhosted.org/packages/07/10/5af1293da642aded87e8a988753945d0cf7e00a9452d3911dd3bb354c9e2/tomli-2.2.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:a198f10c4d1b1375d7687bc25294306e551bf1abfa4eace6650070a5c1ae2744", size = 243954 }, + { url = "https://files.pythonhosted.org/packages/5b/b9/1ed31d167be802da0fc95020d04cd27b7d7065cc6fbefdd2f9186f60d7bd/tomli-2.2.1-cp313-cp313-win32.whl", hash = "sha256:d3f5614314d758649ab2ab3a62d4f2004c825922f9e370b29416484086b264ec", size = 98724 }, + { url = "https://files.pythonhosted.org/packages/c7/32/b0963458706accd9afcfeb867c0f9175a741bf7b19cd424230714d722198/tomli-2.2.1-cp313-cp313-win_amd64.whl", hash = "sha256:a38aa0308e754b0e3c67e344754dff64999ff9b513e691d0e786265c93583c69", size = 109383 }, + { url = "https://files.pythonhosted.org/packages/6e/c2/61d3e0f47e2b74ef40a68b9e6ad5984f6241a942f7cd3bbfbdbd03861ea9/tomli-2.2.1-py3-none-any.whl", hash = "sha256:cb55c73c5f4408779d0cf3eef9f762b9c9f147a77de7b258bef0a5628adc85cc", size = 14257 }, ] [[package]] @@ -1289,80 +1318,80 @@ wheels = [ [[package]] name = "yarl" -version = "1.18.0" +version = "1.18.3" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "idna" }, { name = "multidict" }, { name = "propcache" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/5e/4b/53db4ecad4d54535aff3dfda1f00d6363d79455f62b11b8ca97b82746bd2/yarl-1.18.0.tar.gz", hash = "sha256:20d95535e7d833889982bfe7cc321b7f63bf8879788fee982c76ae2b24cfb715", size = 180098 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/80/8b/305e1bde6bbf900bb8909a4884488764ee5950dda4da06cec885c06dae68/yarl-1.18.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:074fee89caab89a97e18ef5f29060ef61ba3cae6cd77673acc54bfdd3214b7b7", size = 141186 }, - { url = "https://files.pythonhosted.org/packages/6a/85/a15e439d8faa6bd09a536d87ca7a32daa50cf8820cf220edbced702348a0/yarl-1.18.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b026cf2c32daf48d90c0c4e406815c3f8f4cfe0c6dfccb094a9add1ff6a0e41a", size = 94097 }, - { url = "https://files.pythonhosted.org/packages/12/9d/7d39082baae943f138df1bb96914f8d53fd65eb131b9d0965917b009b35d/yarl-1.18.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ae38bd86eae3ba3d2ce5636cc9e23c80c9db2e9cb557e40b98153ed102b5a736", size = 91915 }, - { url = "https://files.pythonhosted.org/packages/c0/35/7e6fbfeb413f281dda59d4a9fce7a0c43cb1f22cb6ac25151d4c4ce51651/yarl-1.18.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:685cc37f3f307c6a8e879986c6d85328f4c637f002e219f50e2ef66f7e062c1d", size = 315086 }, - { url = "https://files.pythonhosted.org/packages/76/2e/61b854cca176d8952d1448b15d59b9b4df27648e4cc9c1a2a01449238b21/yarl-1.18.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8254dbfce84ee5d1e81051ee7a0f1536c108ba294c0fdb5933476398df0654f3", size = 330221 }, - { url = "https://files.pythonhosted.org/packages/98/66/975c36deeb069888274c2edfa9d6aef44c7574e9b11bb0687130ddd02558/yarl-1.18.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:20de4a8b04de70c49698dc2390b7fd2d18d424d3b876371f9b775e2b462d4b41", size = 326650 }, - { url = "https://files.pythonhosted.org/packages/a4/06/511e5ac4e562cbd605a05c90875e36ec5bac93da0dc55c730b4b3b09face/yarl-1.18.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b0a2074a37285570d54b55820687de3d2f2b9ecf1b714e482e48c9e7c0402038", size = 319437 }, - { url = "https://files.pythonhosted.org/packages/7c/6a/8f6f8b17b28ed6eaaf20f5a80d391ae1c1bd5437af9ed552b9eb8903b11c/yarl-1.18.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3f576ed278860df2721a5d57da3381040176ef1d07def9688a385c8330db61a1", size = 309966 }, - { url = "https://files.pythonhosted.org/packages/b5/54/4d9dcbdaba18a948f8bea5b65835bfcc5a931426c79d8d2dafe45264ece8/yarl-1.18.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:3a3709450a574d61be6ac53d582496014342ea34876af8dc17cc16da32826c9a", size = 319519 }, - { url = "https://files.pythonhosted.org/packages/42/b7/de7fcde2c414d33a2be5ac9c31469ad33874a26a5e3421b2a9505a1a10ee/yarl-1.18.0-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:bd80ed29761490c622edde5dd70537ca8c992c2952eb62ed46984f8eff66d6e8", size = 321455 }, - { url = "https://files.pythonhosted.org/packages/4e/49/8ed0dc1973876f20b63fe66986f300fd0721f3d644b6a64be12ec436c197/yarl-1.18.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:32141e13a1d5a48525e519c9197d3f4d9744d818d5c7d6547524cc9eccc8971e", size = 324564 }, - { url = "https://files.pythonhosted.org/packages/0c/76/63209f71efde8875670441875ef1a46383a06f578f6babf819b0cf79ebd7/yarl-1.18.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:8b8d3e4e014fb4274f1c5bf61511d2199e263909fb0b8bda2a7428b0894e8dc6", size = 336798 }, - { url = "https://files.pythonhosted.org/packages/a8/f3/77e0cdee76359dade383b61eb995a3a2efcef3d64da3222f3cf52d38bd38/yarl-1.18.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:701bb4a8f4de191c8c0cc9a1e6d5142f4df880e9d1210e333b829ca9425570ed", size = 337902 }, - { url = "https://files.pythonhosted.org/packages/96/d9/0f97875e2498196a9b5561de32f3f25208485c7b43d676a65a2ee6c12fd7/yarl-1.18.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:a45d94075ac0647621eaaf693c8751813a3eccac455d423f473ffed38c8ac5c9", size = 331620 }, - { url = "https://files.pythonhosted.org/packages/71/a3/e3bd136838d29fec4acc4919bcfd2bd33296f6c281c829fa277e72bc2590/yarl-1.18.0-cp310-cp310-win32.whl", hash = "sha256:34176bfb082add67cb2a20abd85854165540891147f88b687a5ed0dc225750a0", size = 84045 }, - { url = "https://files.pythonhosted.org/packages/fd/20/a474648c2b49c9ed5eb0e7137add6373e5d9220eda7e6d4b43d306e67672/yarl-1.18.0-cp310-cp310-win_amd64.whl", hash = "sha256:73553bbeea7d6ec88c08ad8027f4e992798f0abc459361bf06641c71972794dc", size = 90221 }, - { url = "https://files.pythonhosted.org/packages/06/45/6ad7135d1c4ad3a6a49e2c37dc78a1805a7871879c03c3495d64c9605d49/yarl-1.18.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:b8e8c516dc4e1a51d86ac975b0350735007e554c962281c432eaa5822aa9765c", size = 141283 }, - { url = "https://files.pythonhosted.org/packages/45/6d/24b70ae33107d6eba303ed0ebfdf1164fe2219656e7594ca58628ebc0f1d/yarl-1.18.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:2e6b4466714a73f5251d84b471475850954f1fa6acce4d3f404da1d55d644c34", size = 94082 }, - { url = "https://files.pythonhosted.org/packages/8a/0e/da720989be11b662ca847ace58f468b52310a9b03e52ac62c144755f9d75/yarl-1.18.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c893f8c1a6d48b25961e00922724732d00b39de8bb0b451307482dc87bddcd74", size = 92017 }, - { url = "https://files.pythonhosted.org/packages/f5/76/e5c91681fa54658943cb88673fb19b3355c3a8ae911a33a2621b6320990d/yarl-1.18.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:13aaf2bdbc8c86ddce48626b15f4987f22e80d898818d735b20bd58f17292ee8", size = 340359 }, - { url = "https://files.pythonhosted.org/packages/cf/77/02cf72f09dea20980dea4ebe40dfb2c24916b864aec869a19f715428e0f0/yarl-1.18.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:dd21c0128e301851de51bc607b0a6da50e82dc34e9601f4b508d08cc89ee7929", size = 356336 }, - { url = "https://files.pythonhosted.org/packages/17/66/83a88d04e4fc243dd26109f3e3d6412f67819ab1142dadbce49706ef4df4/yarl-1.18.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:205de377bd23365cd85562c9c6c33844050a93661640fda38e0567d2826b50df", size = 353730 }, - { url = "https://files.pythonhosted.org/packages/76/77/0b205a532d22756ab250ab21924d362f910a23d641c82faec1c4ad7f6077/yarl-1.18.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ed69af4fe2a0949b1ea1d012bf065c77b4c7822bad4737f17807af2adb15a73c", size = 343882 }, - { url = "https://files.pythonhosted.org/packages/0b/47/2081ddce3da6096889c3947bdc21907d0fa15939909b10219254fe116841/yarl-1.18.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8e1c18890091aa3cc8a77967943476b729dc2016f4cfe11e45d89b12519d4a93", size = 335873 }, - { url = "https://files.pythonhosted.org/packages/25/3c/437304394494e757ae927c9a81bacc4bcdf7351a1d4e811d95b02cb6dbae/yarl-1.18.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:91b8fb9427e33f83ca2ba9501221ffaac1ecf0407f758c4d2f283c523da185ee", size = 347725 }, - { url = "https://files.pythonhosted.org/packages/c6/fb/fa6c642bc052fbe6370ed5da765579650510157dea354fe9e8177c3bc34a/yarl-1.18.0-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:536a7a8a53b75b2e98ff96edb2dfb91a26b81c4fed82782035767db5a465be46", size = 346161 }, - { url = "https://files.pythonhosted.org/packages/b0/09/8c0cf68a0fcfe3b060c9e5857bb35735bc72a4cf4075043632c636d007e9/yarl-1.18.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:a64619a9c47c25582190af38e9eb382279ad42e1f06034f14d794670796016c0", size = 349924 }, - { url = "https://files.pythonhosted.org/packages/bf/4b/1efe10fd51e2cedf53195d688fa270efbcd64a015c61d029d49c20bf0af7/yarl-1.18.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:c73a6bbc97ba1b5a0c3c992ae93d721c395bdbb120492759b94cc1ac71bc6350", size = 361865 }, - { url = "https://files.pythonhosted.org/packages/0b/1b/2b5efd6df06bf938f7e154dee8e2ab22d148f3311a92bf4da642aaaf2fc5/yarl-1.18.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:a173401d7821a2a81c7b47d4e7d5c4021375a1441af0c58611c1957445055056", size = 366030 }, - { url = "https://files.pythonhosted.org/packages/f8/db/786a5684f79278e62271038a698f56a51960f9e643be5d3eff82712f0b1c/yarl-1.18.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:7520e799b1f84e095cce919bd6c23c9d49472deeef25fe1ef960b04cca51c3fc", size = 358902 }, - { url = "https://files.pythonhosted.org/packages/91/2f/437d0de062f1a3e3cb17573971b3832232443241133580c2ba3da5001d06/yarl-1.18.0-cp311-cp311-win32.whl", hash = "sha256:c4cb992d8090d5ae5f7afa6754d7211c578be0c45f54d3d94f7781c495d56716", size = 84138 }, - { url = "https://files.pythonhosted.org/packages/9d/85/035719a9266bce85ecde820aa3f8c46f3b18c3d7ba9ff51367b2fa4ae2a2/yarl-1.18.0-cp311-cp311-win_amd64.whl", hash = "sha256:52c136f348605974c9b1c878addd6b7a60e3bf2245833e370862009b86fa4689", size = 90765 }, - { url = "https://files.pythonhosted.org/packages/23/36/c579b80a5c76c0d41c8e08baddb3e6940dfc20569db579a5691392c52afa/yarl-1.18.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:1ece25e2251c28bab737bdf0519c88189b3dd9492dc086a1d77336d940c28ced", size = 142376 }, - { url = "https://files.pythonhosted.org/packages/0c/5f/e247dc7c0607a0c505fea6c839721844bee55686dfb183c7d7b8ef8a9cb1/yarl-1.18.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:454902dc1830d935c90b5b53c863ba2a98dcde0fbaa31ca2ed1ad33b2a7171c6", size = 94692 }, - { url = "https://files.pythonhosted.org/packages/eb/e1/3081b578a6f21961711b9a1c49c2947abb3b0d0dd9537378fb06777ce8ee/yarl-1.18.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:01be8688fc211dc237e628fcc209dda412d35de7642453059a0553747018d075", size = 92527 }, - { url = "https://files.pythonhosted.org/packages/2f/fa/d9e1b9fbafa4cc82cd3980b5314741b33c2fe16308d725449a23aed32021/yarl-1.18.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4d26f1fa9fa2167bb238f6f4b20218eb4e88dd3ef21bb8f97439fa6b5313e30d", size = 332096 }, - { url = "https://files.pythonhosted.org/packages/93/b6/dd27165114317875838e216214fb86338dc63d2e50855a8f2a12de2a7fe5/yarl-1.18.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b234a4a9248a9f000b7a5dfe84b8cb6210ee5120ae70eb72a4dcbdb4c528f72f", size = 342047 }, - { url = "https://files.pythonhosted.org/packages/fc/9f/bad434b5279ae7a356844e14dc771c3d29eb928140bbc01621af811c8a27/yarl-1.18.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fe94d1de77c4cd8caff1bd5480e22342dbd54c93929f5943495d9c1e8abe9f42", size = 341712 }, - { url = "https://files.pythonhosted.org/packages/9a/9f/63864f43d131ba8c8cdf1bde5dd3f02f0eff8a7c883a5d7fad32f204fda5/yarl-1.18.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9b4c90c5363c6b0a54188122b61edb919c2cd1119684999d08cd5e538813a28e", size = 336654 }, - { url = "https://files.pythonhosted.org/packages/20/30/b4542bbd9be73de155213207eec019f6fe6495885f7dd59aa1ff705a041b/yarl-1.18.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:49a98ecadc5a241c9ba06de08127ee4796e1009555efd791bac514207862b43d", size = 325484 }, - { url = "https://files.pythonhosted.org/packages/69/bc/e2a9808ec26989cf0d1b98fe7b3cc45c1c6506b5ea4fe43ece5991f28f34/yarl-1.18.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:9106025c7f261f9f5144f9aa7681d43867eed06349a7cfb297a1bc804de2f0d1", size = 344213 }, - { url = "https://files.pythonhosted.org/packages/e2/17/0ee5a68886aca1a8071b0d24a1e1c0fd9970dead2ef2d5e26e027fb7ce88/yarl-1.18.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:f275ede6199d0f1ed4ea5d55a7b7573ccd40d97aee7808559e1298fe6efc8dbd", size = 340517 }, - { url = "https://files.pythonhosted.org/packages/fd/db/1fe4ef38ee852bff5ec8f5367d718b3a7dac7520f344b8e50306f68a2940/yarl-1.18.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:f7edeb1dcc7f50a2c8e08b9dc13a413903b7817e72273f00878cb70e766bdb3b", size = 346234 }, - { url = "https://files.pythonhosted.org/packages/b4/ee/5e5bccdb821eb9949ba66abb4d19e3299eee00282e37b42f65236120e892/yarl-1.18.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:c083f6dd6951b86e484ebfc9c3524b49bcaa9c420cb4b2a78ef9f7a512bfcc85", size = 359625 }, - { url = "https://files.pythonhosted.org/packages/3f/43/95a64d9e7ab4aa1c34fc5ea0edb35b581bc6ad33fd960a8ae34c2040b319/yarl-1.18.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:80741ec5b471fbdfb997821b2842c59660a1c930ceb42f8a84ba8ca0f25a66aa", size = 364239 }, - { url = "https://files.pythonhosted.org/packages/40/19/09ce976c624c9d3cc898f0be5035ddef0c0759d85b2313321cfe77b69915/yarl-1.18.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b1a3297b9cad594e1ff0c040d2881d7d3a74124a3c73e00c3c71526a1234a9f7", size = 357599 }, - { url = "https://files.pythonhosted.org/packages/7d/35/6f33fd29791af2ec161aebe8abe63e788c2b74a6c7e8f29c92e5f5e96849/yarl-1.18.0-cp312-cp312-win32.whl", hash = "sha256:cd6ab7d6776c186f544f893b45ee0c883542b35e8a493db74665d2e594d3ca75", size = 83832 }, - { url = "https://files.pythonhosted.org/packages/4e/8e/cdb40ef98597be107de67b11e2f1f23f911e0f1416b938885d17a338e304/yarl-1.18.0-cp312-cp312-win_amd64.whl", hash = "sha256:039c299a0864d1f43c3e31570045635034ea7021db41bf4842693a72aca8df3a", size = 90132 }, - { url = "https://files.pythonhosted.org/packages/2b/77/2196b657c66f97adaef0244e9e015f30eac0df59c31ad540f79ce328feed/yarl-1.18.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:6fb64dd45453225f57d82c4764818d7a205ee31ce193e9f0086e493916bd4f72", size = 140512 }, - { url = "https://files.pythonhosted.org/packages/0e/d8/2bb6e26fddba5c01bad284e4571178c651b97e8e06318efcaa16e07eb9fd/yarl-1.18.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:3adaaf9c6b1b4fc258584f4443f24d775a2086aee82d1387e48a8b4f3d6aecf6", size = 93875 }, - { url = "https://files.pythonhosted.org/packages/54/e4/99fbb884dd9f814fb0037dc1783766bb9edcd57b32a76f3ec5ac5c5772d7/yarl-1.18.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:da206d1ec78438a563c5429ab808a2b23ad7bc025c8adbf08540dde202be37d5", size = 91705 }, - { url = "https://files.pythonhosted.org/packages/3b/a2/5bd86eca9449e6b15d3b08005cf4e58e3da972240c2bee427b358c311549/yarl-1.18.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:576d258b21c1db4c6449b1c572c75d03f16a482eb380be8003682bdbe7db2f28", size = 333325 }, - { url = "https://files.pythonhosted.org/packages/94/50/a218da5f159cd985685bc72c500bb1a7fd2d60035d2339b8a9d9e1f99194/yarl-1.18.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c60e547c0a375c4bfcdd60eef82e7e0e8698bf84c239d715f5c1278a73050393", size = 344121 }, - { url = "https://files.pythonhosted.org/packages/a4/e3/830ae465811198b4b5ebecd674b5b3dca4d222af2155eb2144bfe190bbb8/yarl-1.18.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e3818eabaefb90adeb5e0f62f047310079d426387991106d4fbf3519eec7d90a", size = 345163 }, - { url = "https://files.pythonhosted.org/packages/7a/74/05c4326877ca541eee77b1ef74b7ac8081343d3957af8f9291ca6eca6fec/yarl-1.18.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a5f72421246c21af6a92fbc8c13b6d4c5427dfd949049b937c3b731f2f9076bd", size = 339130 }, - { url = "https://files.pythonhosted.org/packages/29/42/842f35aa1dae25d132119ee92185e8c75d8b9b7c83346506bd31e9fa217f/yarl-1.18.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7fa7d37f2ada0f42e0723632993ed422f2a679af0e200874d9d861720a54f53e", size = 326418 }, - { url = "https://files.pythonhosted.org/packages/f9/ed/65c0514f2d1e8b92a61f564c914381d078766cab38b5fbde355b3b3af1fb/yarl-1.18.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:42ba84e2ac26a3f252715f8ec17e6fdc0cbf95b9617c5367579fafcd7fba50eb", size = 345204 }, - { url = "https://files.pythonhosted.org/packages/23/31/351f64f0530c372fa01160f38330f44478e7bf3092f5ce2bfcb91605561d/yarl-1.18.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:6a49ad0102c0f0ba839628d0bf45973c86ce7b590cdedf7540d5b1833ddc6f00", size = 341652 }, - { url = "https://files.pythonhosted.org/packages/49/aa/0c6e666c218d567727c1d040d01575685e7f9b18052fd68a59c9f61fe5d9/yarl-1.18.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:96404e8d5e1bbe36bdaa84ef89dc36f0e75939e060ca5cd45451aba01db02902", size = 347257 }, - { url = "https://files.pythonhosted.org/packages/36/0b/33a093b0e13bb8cd0f27301779661ff325270b6644929001f8f33307357d/yarl-1.18.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:a0509475d714df8f6d498935b3f307cd122c4ca76f7d426c7e1bb791bcd87eda", size = 359735 }, - { url = "https://files.pythonhosted.org/packages/a8/92/dcc0b37c48632e71ffc2b5f8b0509347a0bde55ab5862ff755dce9dd56c4/yarl-1.18.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:1ff116f0285b5c8b3b9a2680aeca29a858b3b9e0402fc79fd850b32c2bcb9f8b", size = 365982 }, - { url = "https://files.pythonhosted.org/packages/0e/39/30e2a24a7a6c628dccb13eb6c4a03db5f6cd1eb2c6cda56a61ddef764c11/yarl-1.18.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e2580c1d7e66e6d29d6e11855e3b1c6381971e0edd9a5066e6c14d79bc8967af", size = 360128 }, - { url = "https://files.pythonhosted.org/packages/76/13/12b65dca23b1fb8ae44269a4d24048fd32ac90b445c985b0a46fdfa30cfe/yarl-1.18.0-cp313-cp313-win32.whl", hash = "sha256:14408cc4d34e202caba7b5ac9cc84700e3421a9e2d1b157d744d101b061a4a88", size = 309888 }, - { url = "https://files.pythonhosted.org/packages/f6/60/478d3d41a4bf0b9e7dca74d870d114e775d1ff7156b7d1e0e9972e8f97fd/yarl-1.18.0-cp313-cp313-win_amd64.whl", hash = "sha256:1db1537e9cb846eb0ff206eac667f627794be8b71368c1ab3207ec7b6f8c5afc", size = 315459 }, - { url = "https://files.pythonhosted.org/packages/30/9c/3f7ab894a37b1520291247cbc9ea6756228d098dae5b37eec848d404a204/yarl-1.18.0-py3-none-any.whl", hash = "sha256:dbf53db46f7cf176ee01d8d98c39381440776fcda13779d269a8ba664f69bec0", size = 44840 }, +sdist = { url = "https://files.pythonhosted.org/packages/b7/9d/4b94a8e6d2b51b599516a5cb88e5bc99b4d8d4583e468057eaa29d5f0918/yarl-1.18.3.tar.gz", hash = "sha256:ac1801c45cbf77b6c99242eeff4fffb5e4e73a800b5c4ad4fc0be5def634d2e1", size = 181062 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d2/98/e005bc608765a8a5569f58e650961314873c8469c333616eb40bff19ae97/yarl-1.18.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7df647e8edd71f000a5208fe6ff8c382a1de8edfbccdbbfe649d263de07d8c34", size = 141458 }, + { url = "https://files.pythonhosted.org/packages/df/5d/f8106b263b8ae8a866b46d9be869ac01f9b3fb7f2325f3ecb3df8003f796/yarl-1.18.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c69697d3adff5aa4f874b19c0e4ed65180ceed6318ec856ebc423aa5850d84f7", size = 94365 }, + { url = "https://files.pythonhosted.org/packages/56/3e/d8637ddb9ba69bf851f765a3ee288676f7cf64fb3be13760c18cbc9d10bd/yarl-1.18.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:602d98f2c2d929f8e697ed274fbadc09902c4025c5a9963bf4e9edfc3ab6f7ed", size = 92181 }, + { url = "https://files.pythonhosted.org/packages/76/f9/d616a5c2daae281171de10fba41e1c0e2d8207166fc3547252f7d469b4e1/yarl-1.18.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c654d5207c78e0bd6d749f6dae1dcbbfde3403ad3a4b11f3c5544d9906969dde", size = 315349 }, + { url = "https://files.pythonhosted.org/packages/bb/b4/3ea5e7b6f08f698b3769a06054783e434f6d59857181b5c4e145de83f59b/yarl-1.18.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5094d9206c64181d0f6e76ebd8fb2f8fe274950a63890ee9e0ebfd58bf9d787b", size = 330494 }, + { url = "https://files.pythonhosted.org/packages/55/f1/e0fc810554877b1b67420568afff51b967baed5b53bcc983ab164eebf9c9/yarl-1.18.3-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:35098b24e0327fc4ebdc8ffe336cee0a87a700c24ffed13161af80124b7dc8e5", size = 326927 }, + { url = "https://files.pythonhosted.org/packages/a9/42/b1753949b327b36f210899f2dd0a0947c0c74e42a32de3f8eb5c7d93edca/yarl-1.18.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3236da9272872443f81fedc389bace88408f64f89f75d1bdb2256069a8730ccc", size = 319703 }, + { url = "https://files.pythonhosted.org/packages/f0/6d/e87c62dc9635daefb064b56f5c97df55a2e9cc947a2b3afd4fd2f3b841c7/yarl-1.18.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e2c08cc9b16f4f4bc522771d96734c7901e7ebef70c6c5c35dd0f10845270bcd", size = 310246 }, + { url = "https://files.pythonhosted.org/packages/e3/ef/e2e8d1785cdcbd986f7622d7f0098205f3644546da7919c24b95790ec65a/yarl-1.18.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:80316a8bd5109320d38eef8833ccf5f89608c9107d02d2a7f985f98ed6876990", size = 319730 }, + { url = "https://files.pythonhosted.org/packages/fc/15/8723e22345bc160dfde68c4b3ae8b236e868f9963c74015f1bc8a614101c/yarl-1.18.3-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:c1e1cc06da1491e6734f0ea1e6294ce00792193c463350626571c287c9a704db", size = 321681 }, + { url = "https://files.pythonhosted.org/packages/86/09/bf764e974f1516efa0ae2801494a5951e959f1610dd41edbfc07e5e0f978/yarl-1.18.3-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:fea09ca13323376a2fdfb353a5fa2e59f90cd18d7ca4eaa1fd31f0a8b4f91e62", size = 324812 }, + { url = "https://files.pythonhosted.org/packages/f6/4c/20a0187e3b903c97d857cf0272d687c1b08b03438968ae8ffc50fe78b0d6/yarl-1.18.3-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:e3b9fd71836999aad54084906f8663dffcd2a7fb5cdafd6c37713b2e72be1760", size = 337011 }, + { url = "https://files.pythonhosted.org/packages/c9/71/6244599a6e1cc4c9f73254a627234e0dad3883ece40cc33dce6265977461/yarl-1.18.3-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:757e81cae69244257d125ff31663249b3013b5dc0a8520d73694aed497fb195b", size = 338132 }, + { url = "https://files.pythonhosted.org/packages/af/f5/e0c3efaf74566c4b4a41cb76d27097df424052a064216beccae8d303c90f/yarl-1.18.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b1771de9944d875f1b98a745bc547e684b863abf8f8287da8466cf470ef52690", size = 331849 }, + { url = "https://files.pythonhosted.org/packages/8a/b8/3d16209c2014c2f98a8f658850a57b716efb97930aebf1ca0d9325933731/yarl-1.18.3-cp310-cp310-win32.whl", hash = "sha256:8874027a53e3aea659a6d62751800cf6e63314c160fd607489ba5c2edd753cf6", size = 84309 }, + { url = "https://files.pythonhosted.org/packages/fd/b7/2e9a5b18eb0fe24c3a0e8bae994e812ed9852ab4fd067c0107fadde0d5f0/yarl-1.18.3-cp310-cp310-win_amd64.whl", hash = "sha256:93b2e109287f93db79210f86deb6b9bbb81ac32fc97236b16f7433db7fc437d8", size = 90484 }, + { url = "https://files.pythonhosted.org/packages/40/93/282b5f4898d8e8efaf0790ba6d10e2245d2c9f30e199d1a85cae9356098c/yarl-1.18.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:8503ad47387b8ebd39cbbbdf0bf113e17330ffd339ba1144074da24c545f0069", size = 141555 }, + { url = "https://files.pythonhosted.org/packages/6d/9c/0a49af78df099c283ca3444560f10718fadb8a18dc8b3edf8c7bd9fd7d89/yarl-1.18.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:02ddb6756f8f4517a2d5e99d8b2f272488e18dd0bfbc802f31c16c6c20f22193", size = 94351 }, + { url = "https://files.pythonhosted.org/packages/5a/a1/205ab51e148fdcedad189ca8dd587794c6f119882437d04c33c01a75dece/yarl-1.18.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:67a283dd2882ac98cc6318384f565bffc751ab564605959df4752d42483ad889", size = 92286 }, + { url = "https://files.pythonhosted.org/packages/ed/fe/88b690b30f3f59275fb674f5f93ddd4a3ae796c2b62e5bb9ece8a4914b83/yarl-1.18.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d980e0325b6eddc81331d3f4551e2a333999fb176fd153e075c6d1c2530aa8a8", size = 340649 }, + { url = "https://files.pythonhosted.org/packages/07/eb/3b65499b568e01f36e847cebdc8d7ccb51fff716dbda1ae83c3cbb8ca1c9/yarl-1.18.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b643562c12680b01e17239be267bc306bbc6aac1f34f6444d1bded0c5ce438ca", size = 356623 }, + { url = "https://files.pythonhosted.org/packages/33/46/f559dc184280b745fc76ec6b1954de2c55595f0ec0a7614238b9ebf69618/yarl-1.18.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c017a3b6df3a1bd45b9fa49a0f54005e53fbcad16633870104b66fa1a30a29d8", size = 354007 }, + { url = "https://files.pythonhosted.org/packages/af/ba/1865d85212351ad160f19fb99808acf23aab9a0f8ff31c8c9f1b4d671fc9/yarl-1.18.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:75674776d96d7b851b6498f17824ba17849d790a44d282929c42dbb77d4f17ae", size = 344145 }, + { url = "https://files.pythonhosted.org/packages/94/cb/5c3e975d77755d7b3d5193e92056b19d83752ea2da7ab394e22260a7b824/yarl-1.18.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ccaa3a4b521b780a7e771cc336a2dba389a0861592bbce09a476190bb0c8b4b3", size = 336133 }, + { url = "https://files.pythonhosted.org/packages/19/89/b77d3fd249ab52a5c40859815765d35c91425b6bb82e7427ab2f78f5ff55/yarl-1.18.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:2d06d3005e668744e11ed80812e61efd77d70bb7f03e33c1598c301eea20efbb", size = 347967 }, + { url = "https://files.pythonhosted.org/packages/35/bd/f6b7630ba2cc06c319c3235634c582a6ab014d52311e7d7c22f9518189b5/yarl-1.18.3-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:9d41beda9dc97ca9ab0b9888cb71f7539124bc05df02c0cff6e5acc5a19dcc6e", size = 346397 }, + { url = "https://files.pythonhosted.org/packages/18/1a/0b4e367d5a72d1f095318344848e93ea70da728118221f84f1bf6c1e39e7/yarl-1.18.3-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:ba23302c0c61a9999784e73809427c9dbedd79f66a13d84ad1b1943802eaaf59", size = 350206 }, + { url = "https://files.pythonhosted.org/packages/b5/cf/320fff4367341fb77809a2d8d7fe75b5d323a8e1b35710aafe41fdbf327b/yarl-1.18.3-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:6748dbf9bfa5ba1afcc7556b71cda0d7ce5f24768043a02a58846e4a443d808d", size = 362089 }, + { url = "https://files.pythonhosted.org/packages/57/cf/aadba261d8b920253204085268bad5e8cdd86b50162fcb1b10c10834885a/yarl-1.18.3-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:0b0cad37311123211dc91eadcb322ef4d4a66008d3e1bdc404808992260e1a0e", size = 366267 }, + { url = "https://files.pythonhosted.org/packages/54/58/fb4cadd81acdee6dafe14abeb258f876e4dd410518099ae9a35c88d8097c/yarl-1.18.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:0fb2171a4486bb075316ee754c6d8382ea6eb8b399d4ec62fde2b591f879778a", size = 359141 }, + { url = "https://files.pythonhosted.org/packages/9a/7a/4c571597589da4cd5c14ed2a0b17ac56ec9ee7ee615013f74653169e702d/yarl-1.18.3-cp311-cp311-win32.whl", hash = "sha256:61b1a825a13bef4a5f10b1885245377d3cd0bf87cba068e1d9a88c2ae36880e1", size = 84402 }, + { url = "https://files.pythonhosted.org/packages/ae/7b/8600250b3d89b625f1121d897062f629883c2f45339623b69b1747ec65fa/yarl-1.18.3-cp311-cp311-win_amd64.whl", hash = "sha256:b9d60031cf568c627d028239693fd718025719c02c9f55df0a53e587aab951b5", size = 91030 }, + { url = "https://files.pythonhosted.org/packages/33/85/bd2e2729752ff4c77338e0102914897512e92496375e079ce0150a6dc306/yarl-1.18.3-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:1dd4bdd05407ced96fed3d7f25dbbf88d2ffb045a0db60dbc247f5b3c5c25d50", size = 142644 }, + { url = "https://files.pythonhosted.org/packages/ff/74/1178322cc0f10288d7eefa6e4a85d8d2e28187ccab13d5b844e8b5d7c88d/yarl-1.18.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7c33dd1931a95e5d9a772d0ac5e44cac8957eaf58e3c8da8c1414de7dd27c576", size = 94962 }, + { url = "https://files.pythonhosted.org/packages/be/75/79c6acc0261e2c2ae8a1c41cf12265e91628c8c58ae91f5ff59e29c0787f/yarl-1.18.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:25b411eddcfd56a2f0cd6a384e9f4f7aa3efee14b188de13048c25b5e91f1640", size = 92795 }, + { url = "https://files.pythonhosted.org/packages/6b/32/927b2d67a412c31199e83fefdce6e645247b4fb164aa1ecb35a0f9eb2058/yarl-1.18.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:436c4fc0a4d66b2badc6c5fc5ef4e47bb10e4fd9bf0c79524ac719a01f3607c2", size = 332368 }, + { url = "https://files.pythonhosted.org/packages/19/e5/859fca07169d6eceeaa4fde1997c91d8abde4e9a7c018e371640c2da2b71/yarl-1.18.3-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e35ef8683211db69ffe129a25d5634319a677570ab6b2eba4afa860f54eeaf75", size = 342314 }, + { url = "https://files.pythonhosted.org/packages/08/75/76b63ccd91c9e03ab213ef27ae6add2e3400e77e5cdddf8ed2dbc36e3f21/yarl-1.18.3-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:84b2deecba4a3f1a398df819151eb72d29bfeb3b69abb145a00ddc8d30094512", size = 341987 }, + { url = "https://files.pythonhosted.org/packages/1a/e1/a097d5755d3ea8479a42856f51d97eeff7a3a7160593332d98f2709b3580/yarl-1.18.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:00e5a1fea0fd4f5bfa7440a47eff01d9822a65b4488f7cff83155a0f31a2ecba", size = 336914 }, + { url = "https://files.pythonhosted.org/packages/0b/42/e1b4d0e396b7987feceebe565286c27bc085bf07d61a59508cdaf2d45e63/yarl-1.18.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d0e883008013c0e4aef84dcfe2a0b172c4d23c2669412cf5b3371003941f72bb", size = 325765 }, + { url = "https://files.pythonhosted.org/packages/7e/18/03a5834ccc9177f97ca1bbb245b93c13e58e8225276f01eedc4cc98ab820/yarl-1.18.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:5a3f356548e34a70b0172d8890006c37be92995f62d95a07b4a42e90fba54272", size = 344444 }, + { url = "https://files.pythonhosted.org/packages/c8/03/a713633bdde0640b0472aa197b5b86e90fbc4c5bc05b727b714cd8a40e6d/yarl-1.18.3-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:ccd17349166b1bee6e529b4add61727d3f55edb7babbe4069b5764c9587a8cc6", size = 340760 }, + { url = "https://files.pythonhosted.org/packages/eb/99/f6567e3f3bbad8fd101886ea0276c68ecb86a2b58be0f64077396cd4b95e/yarl-1.18.3-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:b958ddd075ddba5b09bb0be8a6d9906d2ce933aee81100db289badbeb966f54e", size = 346484 }, + { url = "https://files.pythonhosted.org/packages/8e/a9/84717c896b2fc6cb15bd4eecd64e34a2f0a9fd6669e69170c73a8b46795a/yarl-1.18.3-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:c7d79f7d9aabd6011004e33b22bc13056a3e3fb54794d138af57f5ee9d9032cb", size = 359864 }, + { url = "https://files.pythonhosted.org/packages/1e/2e/d0f5f1bef7ee93ed17e739ec8dbcb47794af891f7d165fa6014517b48169/yarl-1.18.3-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:4891ed92157e5430874dad17b15eb1fda57627710756c27422200c52d8a4e393", size = 364537 }, + { url = "https://files.pythonhosted.org/packages/97/8a/568d07c5d4964da5b02621a517532adb8ec5ba181ad1687191fffeda0ab6/yarl-1.18.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ce1af883b94304f493698b00d0f006d56aea98aeb49d75ec7d98cd4a777e9285", size = 357861 }, + { url = "https://files.pythonhosted.org/packages/7d/e3/924c3f64b6b3077889df9a1ece1ed8947e7b61b0a933f2ec93041990a677/yarl-1.18.3-cp312-cp312-win32.whl", hash = "sha256:f91c4803173928a25e1a55b943c81f55b8872f0018be83e3ad4938adffb77dd2", size = 84097 }, + { url = "https://files.pythonhosted.org/packages/34/45/0e055320daaabfc169b21ff6174567b2c910c45617b0d79c68d7ab349b02/yarl-1.18.3-cp312-cp312-win_amd64.whl", hash = "sha256:7e2ee16578af3b52ac2f334c3b1f92262f47e02cc6193c598502bd46f5cd1477", size = 90399 }, + { url = "https://files.pythonhosted.org/packages/30/c7/c790513d5328a8390be8f47be5d52e141f78b66c6c48f48d241ca6bd5265/yarl-1.18.3-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:90adb47ad432332d4f0bc28f83a5963f426ce9a1a8809f5e584e704b82685dcb", size = 140789 }, + { url = "https://files.pythonhosted.org/packages/30/aa/a2f84e93554a578463e2edaaf2300faa61c8701f0898725842c704ba5444/yarl-1.18.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:913829534200eb0f789d45349e55203a091f45c37a2674678744ae52fae23efa", size = 94144 }, + { url = "https://files.pythonhosted.org/packages/c6/fc/d68d8f83714b221a85ce7866832cba36d7c04a68fa6a960b908c2c84f325/yarl-1.18.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:ef9f7768395923c3039055c14334ba4d926f3baf7b776c923c93d80195624782", size = 91974 }, + { url = "https://files.pythonhosted.org/packages/56/4e/d2563d8323a7e9a414b5b25341b3942af5902a2263d36d20fb17c40411e2/yarl-1.18.3-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:88a19f62ff30117e706ebc9090b8ecc79aeb77d0b1f5ec10d2d27a12bc9f66d0", size = 333587 }, + { url = "https://files.pythonhosted.org/packages/25/c9/cfec0bc0cac8d054be223e9f2c7909d3e8442a856af9dbce7e3442a8ec8d/yarl-1.18.3-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e17c9361d46a4d5addf777c6dd5eab0715a7684c2f11b88c67ac37edfba6c482", size = 344386 }, + { url = "https://files.pythonhosted.org/packages/ab/5d/4c532190113b25f1364d25f4c319322e86232d69175b91f27e3ebc2caf9a/yarl-1.18.3-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1a74a13a4c857a84a845505fd2d68e54826a2cd01935a96efb1e9d86c728e186", size = 345421 }, + { url = "https://files.pythonhosted.org/packages/23/d1/6cdd1632da013aa6ba18cee4d750d953104a5e7aac44e249d9410a972bf5/yarl-1.18.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:41f7ce59d6ee7741af71d82020346af364949314ed3d87553763a2df1829cc58", size = 339384 }, + { url = "https://files.pythonhosted.org/packages/9a/c4/6b3c39bec352e441bd30f432cda6ba51681ab19bb8abe023f0d19777aad1/yarl-1.18.3-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f52a265001d830bc425f82ca9eabda94a64a4d753b07d623a9f2863fde532b53", size = 326689 }, + { url = "https://files.pythonhosted.org/packages/23/30/07fb088f2eefdc0aa4fc1af4e3ca4eb1a3aadd1ce7d866d74c0f124e6a85/yarl-1.18.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:82123d0c954dc58db301f5021a01854a85bf1f3bb7d12ae0c01afc414a882ca2", size = 345453 }, + { url = "https://files.pythonhosted.org/packages/63/09/d54befb48f9cd8eec43797f624ec37783a0266855f4930a91e3d5c7717f8/yarl-1.18.3-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:2ec9bbba33b2d00999af4631a3397d1fd78290c48e2a3e52d8dd72db3a067ac8", size = 341872 }, + { url = "https://files.pythonhosted.org/packages/91/26/fd0ef9bf29dd906a84b59f0cd1281e65b0c3e08c6aa94b57f7d11f593518/yarl-1.18.3-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:fbd6748e8ab9b41171bb95c6142faf068f5ef1511935a0aa07025438dd9a9bc1", size = 347497 }, + { url = "https://files.pythonhosted.org/packages/d9/b5/14ac7a256d0511b2ac168d50d4b7d744aea1c1aa20c79f620d1059aab8b2/yarl-1.18.3-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:877d209b6aebeb5b16c42cbb377f5f94d9e556626b1bfff66d7b0d115be88d0a", size = 359981 }, + { url = "https://files.pythonhosted.org/packages/ca/b3/d493221ad5cbd18bc07e642894030437e405e1413c4236dd5db6e46bcec9/yarl-1.18.3-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:b464c4ab4bfcb41e3bfd3f1c26600d038376c2de3297760dfe064d2cb7ea8e10", size = 366229 }, + { url = "https://files.pythonhosted.org/packages/04/56/6a3e2a5d9152c56c346df9b8fb8edd2c8888b1e03f96324d457e5cf06d34/yarl-1.18.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:8d39d351e7faf01483cc7ff7c0213c412e38e5a340238826be7e0e4da450fdc8", size = 360383 }, + { url = "https://files.pythonhosted.org/packages/fd/b7/4b3c7c7913a278d445cc6284e59b2e62fa25e72758f888b7a7a39eb8423f/yarl-1.18.3-cp313-cp313-win32.whl", hash = "sha256:61ee62ead9b68b9123ec24bc866cbef297dd266175d53296e2db5e7f797f902d", size = 310152 }, + { url = "https://files.pythonhosted.org/packages/f5/d5/688db678e987c3e0fb17867970700b92603cadf36c56e5fb08f23e822a0c/yarl-1.18.3-cp313-cp313-win_amd64.whl", hash = "sha256:578e281c393af575879990861823ef19d66e2b1d0098414855dd367e234f5b3c", size = 315723 }, + { url = "https://files.pythonhosted.org/packages/f5/4b/a06e0ec3d155924f77835ed2d167ebd3b211a7b0853da1cf8d8414d784ef/yarl-1.18.3-py3-none-any.whl", hash = "sha256:b57f4f58099328dfb26c6a771d09fb20dbbae81d20cfb66141251ea063bd101b", size = 45109 }, ] [[package]] diff --git a/sdk/rust/crates/dagger-sdk/src/core/version.rs b/sdk/rust/crates/dagger-sdk/src/core/version.rs index ef0b4ded99..fb8cfdb6ab 100644 --- a/sdk/rust/crates/dagger-sdk/src/core/version.rs +++ b/sdk/rust/crates/dagger-sdk/src/core/version.rs @@ -1 +1 @@ -pub const DAGGER_ENGINE_VERSION: &'static str = "0.14.0"; +pub const DAGGER_ENGINE_VERSION: &'static str = "0.15.1"; diff --git a/sdk/rust/crates/dagger-sdk/src/gen.rs b/sdk/rust/crates/dagger-sdk/src/gen.rs index 2dbf230322..39974bfa79 100644 --- a/sdk/rust/crates/dagger-sdk/src/gen.rs +++ b/sdk/rust/crates/dagger-sdk/src/gen.rs @@ -1503,6 +1503,30 @@ pub struct Container { pub graphql_client: DynGraphQLClient, } #[derive(Builder, Debug, PartialEq)] +pub struct ContainerAsServiceOpts<'a> { + /// Command to run instead of the container's default command (e.g., ["go", "run", "main.go"]). + /// If empty, the container's default command is used. + #[builder(setter(into, strip_option), default)] + pub args: Option>, + /// Replace "${VAR}" or "$VAR" in the args according to the current environment variables defined in the container (e.g. "/$VAR/foo"). + #[builder(setter(into, strip_option), default)] + pub expand: Option, + /// Provides Dagger access to the executed command. + /// Do not use this option unless you trust the command being executed; the command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM. + #[builder(setter(into, strip_option), default)] + pub experimental_privileged_nesting: Option, + /// Execute the command with all root capabilities. This is similar to running a command with "sudo" or executing "docker run" with the "--privileged" flag. Containerization does not provide any security guarantees when using this option. It should only be used when absolutely necessary and only with trusted commands. + #[builder(setter(into, strip_option), default)] + pub insecure_root_capabilities: Option, + /// If set, skip the automatic init process injected into containers by default. + /// This should only be used if the user requires that their exec process be the pid 1 process in the container. Otherwise it may result in unexpected behavior. + #[builder(setter(into, strip_option), default)] + pub no_init: Option, + /// If the container has an entrypoint, prepend it to the args. + #[builder(setter(into, strip_option), default)] + pub use_entrypoint: Option, +} +#[derive(Builder, Debug, PartialEq)] pub struct ContainerAsTarballOpts { /// Force each layer of the image to use the specified compression algorithm. /// If this is unset, then if a layer already has a compressed blob in the engine's cache, that will be used (this can result in a mix of compression algorithms for different layers). If this is unset and a layer has no compressed blob in the engine's cache, then it will be compressed using Gzip. @@ -1859,6 +1883,10 @@ pub struct ContainerWithoutUnixSocketOpts { impl Container { /// Turn the container into a Service. /// Be sure to set any exposed ports before this conversion. + /// + /// # Arguments + /// + /// * `opt` - optional argument, see inner type for documentation, use _opts to use pub fn as_service(&self) -> Service { let query = self.selection.select("asService"); Service { @@ -1867,6 +1895,41 @@ impl Container { graphql_client: self.graphql_client.clone(), } } + /// Turn the container into a Service. + /// Be sure to set any exposed ports before this conversion. + /// + /// # Arguments + /// + /// * `opt` - optional argument, see inner type for documentation, use _opts to use + pub fn as_service_opts<'a>(&self, opts: ContainerAsServiceOpts<'a>) -> Service { + let mut query = self.selection.select("asService"); + if let Some(args) = opts.args { + query = query.arg("args", args); + } + if let Some(use_entrypoint) = opts.use_entrypoint { + query = query.arg("useEntrypoint", use_entrypoint); + } + if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting { + query = query.arg( + "experimentalPrivilegedNesting", + experimental_privileged_nesting, + ); + } + if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities { + query = query.arg("insecureRootCapabilities", insecure_root_capabilities); + } + if let Some(expand) = opts.expand { + query = query.arg("expand", expand); + } + if let Some(no_init) = opts.no_init { + query = query.arg("noInit", no_init); + } + Service { + proc: self.proc.clone(), + selection: query, + graphql_client: self.graphql_client.clone(), + } + } /// Returns a File representing the container serialized to a tarball. /// /// # Arguments @@ -2641,7 +2704,7 @@ impl Container { /// /// # Arguments /// - /// * `args` - Command to run instead of the container's default command (e.g., ["run", "main.go"]). + /// * `args` - Command to run instead of the container's default command (e.g., ["go", "run", "main.go"]). /// /// If empty, the container's default command is used. /// * `opt` - optional argument, see inner type for documentation, use _opts to use @@ -2661,7 +2724,7 @@ impl Container { /// /// # Arguments /// - /// * `args` - Command to run instead of the container's default command (e.g., ["run", "main.go"]). + /// * `args` - Command to run instead of the container's default command (e.g., ["go", "run", "main.go"]). /// /// If empty, the container's default command is used. /// * `opt` - optional argument, see inner type for documentation, use _opts to use @@ -6381,6 +6444,11 @@ impl ModuleSource { let query = self.selection.select("moduleOriginalName"); query.execute(self.graphql_client.clone()).await } + /// The pinned version of this module source. + pub async fn pin(&self) -> Result { + let query = self.selection.select("pin"); + query.execute(self.graphql_client.clone()).await + } /// The path to the module source's context directory on the caller's filesystem. Only valid for local sources. pub async fn resolve_context_path_from_caller(&self) -> Result { let query = self.selection.select("resolveContextPathFromCaller"); diff --git a/sdk/typescript/.changes/unreleased/Added-20241015-174724.yaml b/sdk/typescript/.changes/unreleased/Added-20241015-174724.yaml deleted file mode 100644 index 261920063e..0000000000 --- a/sdk/typescript/.changes/unreleased/Added-20241015-174724.yaml +++ /dev/null @@ -1,21 +0,0 @@ -kind: Added -body: |- - Allow external custom runtime as base image using `dagger.baseImage` field in the module's `package.json`. - - *Warning*: Only alpine images are supported by the runtime. - *Note*: You shoud also set `dagger.runtime` field to `node` or `bun` to force a specific runtime, otherwise - the runtime will be detected based on files present in the module. - - Example: - ```json - { - "dagger": { - "baseImage": "node:23.2.0-alpine@sha256:ecefaffd4706c5879af52e022fdb8ea30cbd6590e2a30d05347790d690727c6c", - "runtime": "node" - } - } - ``` -time: 2024-10-15T17:47:24.048124+02:00 -custom: - Author: TomChv - PR: "8675" diff --git a/sdk/typescript/.changes/unreleased/Added-20241105-135503.yaml b/sdk/typescript/.changes/unreleased/Added-20241105-135503.yaml deleted file mode 100644 index 22fce58e37..0000000000 --- a/sdk/typescript/.changes/unreleased/Added-20241105-135503.yaml +++ /dev/null @@ -1,56 +0,0 @@ -kind: Added -time: 2024-11-05T13:55:03.696161+01:00 -body: | - Add support for non-decorable keywords by resolving declarations by references. - - Support native `enum` keyword to define enumeration without decorators. - Example - ```ts - enum Example { - A = "A", - B = "B", - } - ``` - - Support native `type` keyword to define type without decorators. - This can be use to define data object or primitive type. - Example - ```ts - type Example = { - a: string - b: number - } - - type Integer = number - type Foo = string - ``` - Note: If the type is a data object, all properties will be exposed - to API & CLI. - - Support resolution of variable and enumerations as default values if they - are exported by the same module. - Example - ```ts - export enum Example { - A = "A", - B = "B", - } - - export const defaultValue = "foo" - - @object() - class Test { - @func() - defaultEnumVar(value: Example = Example.A): Example { - return value - } - - @func - defaultStringVar(value: string = defaultValue): string { - return value - } - } - ``` -custom: - Author: TomChv - PR: "8824" diff --git a/sdk/typescript/.changes/unreleased/Breaking-20241122-121153.yaml b/sdk/typescript/.changes/unreleased/Breaking-20241122-121153.yaml deleted file mode 100644 index bc4a6069f4..0000000000 --- a/sdk/typescript/.changes/unreleased/Breaking-20241122-121153.yaml +++ /dev/null @@ -1,9 +0,0 @@ -kind: Breaking -body: |- - `ExecErr.toString` no longer contains the values of `stdout` or `stderr`. - - When comparing error values for expected output, use the more specific values. -time: 2024-11-22T12:11:53.934008034Z -custom: - Author: vito - PR: "9033" diff --git a/sdk/typescript/.changes/unreleased/Changed-20241129-174122.yaml b/sdk/typescript/.changes/unreleased/Changed-20241129-174122.yaml deleted file mode 100644 index 123fe5f20c..0000000000 --- a/sdk/typescript/.changes/unreleased/Changed-20241129-174122.yaml +++ /dev/null @@ -1,8 +0,0 @@ -kind: Changed -body: |- - Bump runtime Node version's to new LTS (22.11.0) (JOD: https://nodejs.org/en/about/previous-releases) - Bump runtime Bun version's to 1.1.38 -time: 2024-11-29T17:41:22.881989+01:00 -custom: - Author: TomChv - PR: "8823" diff --git a/sdk/typescript/.changes/v0.15.0.md b/sdk/typescript/.changes/v0.15.0.md new file mode 100644 index 0000000000..7bf09e4a96 --- /dev/null +++ b/sdk/typescript/.changes/v0.15.0.md @@ -0,0 +1,94 @@ +## sdk/typescript/v0.15.0 - 2024-12-11 + +This SDK uses ๐Ÿš™ Engine + ๐Ÿš— CLI version `v0.15.0`. [See what changed in that release](https://github.com/dagger/dagger/releases/tag/v0.15.0). + +โฌข https://www.npmjs.com/package/@dagger.io/dagger +๐Ÿ“’ https://docs.dagger.io/reference/typescript/modules/api_client_gen + +### ๐Ÿ”ฅ Breaking Changes +- `ExecErr.toString` no longer contains the values of `stdout` or `stderr` by @vito in https://github.com/dagger/dagger/pull/9033 \ + When comparing error values for expected output, use the more specific values. + +### Added +- Allow external custom runtime as base image using `dagger.baseImage` field in the module's `package.json` by @TomChv in https://github.com/dagger/dagger/pull/8675 \ + + *Warning*: Only alpine images are supported by the runtime. + + *Note*: You should also set `dagger.runtime` field to `node` or `bun` to force a specific runtime, otherwise + the runtime will be detected based on files present in the module. + + Example: + ```json + { + "dagger": { + "baseImage": "node:23.2.0-alpine@sha256:ecefaffd4706c5879af52e022fdb8ea30cbd6590e2a30d05347790d690727c6c", + "runtime": "node" + } + } + ``` +- Add support for non-decorable keywords by resolving declarations by references by @TomChv in https://github.com/dagger/dagger/pull/8824 \ + + Support native `enum` keyword to define enumeration without decorators. + + Example: + ```ts + enum Example { + A = "A", + B = "B", + } + ``` + + Support native `type` keyword to define type without decorators. + This can be use to define data object or primitive type. + + Example: + ```ts + type Example = { + a: string + b: number + } + + type Integer = number + type Foo = string + ``` + Note: If the type is a data object, all properties will be exposed + to API & CLI. + + Support resolution of variable and enumerations as default values if they + are exported by the same module. + + Example: + ```ts + export enum Example { + A = "A", + B = "B", + } + + export const defaultValue = "foo" + + @object() + class Test { + @func() + defaultEnumVar(value: Example = Example.A): Example { + return value + } + + @func + defaultStringVar(value: string = defaultValue): string { + return value + } + } + ``` + +### Changed +- Bump runtime versions by @TomChv in https://github.com/dagger/dagger/pull/8823 \ + - Node version's to new LTS 22.11.0 (see https://nodejs.org/en/about/previous-releases) + - Bump runtime Bun version's to 1.1.38. + +### Dependencies +- Bump Engine to v0.15.0 by @jedevc in https://github.com/dagger/dagger/pull/9158 + +### What to do next +- Read the [documentation](https://docs.dagger.io/sdk/nodejs) +- Join our [Discord server](https://discord.gg/dagger-io) +- Follow us on [Twitter](https://twitter.com/dagger_io) diff --git a/sdk/typescript/.changes/v0.15.1.md b/sdk/typescript/.changes/v0.15.1.md new file mode 100644 index 0000000000..0a73060e57 --- /dev/null +++ b/sdk/typescript/.changes/v0.15.1.md @@ -0,0 +1,14 @@ +## sdk/typescript/v0.15.1 - 2024-12-12 + +This SDK uses ๐Ÿš™ Engine + ๐Ÿš— CLI version `v0.15.1`. [See what changed in that release](https://github.com/dagger/dagger/releases/tag/v0.15.1). + +โฌข https://www.npmjs.com/package/@dagger.io/dagger +๐Ÿ“’ https://docs.dagger.io/reference/typescript/modules/api_client_gen + +### Dependencies +- Bump Engine to v0.15.1 by @cwlbraa in https://github.com/dagger/dagger/pull/9183 + +### What to do next +- Read the [documentation](https://docs.dagger.io/sdk/nodejs) +- Join our [Discord server](https://discord.gg/dagger-io) +- Follow us on [Twitter](https://twitter.com/dagger_io) diff --git a/sdk/typescript/CHANGELOG.md b/sdk/typescript/CHANGELOG.md index a02d3abe39..cea3b62046 100644 --- a/sdk/typescript/CHANGELOG.md +++ b/sdk/typescript/CHANGELOG.md @@ -6,6 +6,116 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), and is generated by [Changie](https://github.com/miniscruff/changie). +## sdk/typescript/v0.15.1 - 2024-12-12 + +This SDK uses ๐Ÿš™ Engine + ๐Ÿš— CLI version `v0.15.1`. [See what changed in that release](https://github.com/dagger/dagger/releases/tag/v0.15.1). + +โฌข https://www.npmjs.com/package/@dagger.io/dagger +๐Ÿ“’ https://docs.dagger.io/reference/typescript/modules/api_client_gen + +### Dependencies +- Bump Engine to v0.15.1 by @cwlbraa in https://github.com/dagger/dagger/pull/9183 + +### What to do next +- Read the [documentation](https://docs.dagger.io/sdk/nodejs) +- Join our [Discord server](https://discord.gg/dagger-io) +- Follow us on [Twitter](https://twitter.com/dagger_io) + +## sdk/typescript/v0.15.0 - 2024-12-11 + +This SDK uses ๐Ÿš™ Engine + ๐Ÿš— CLI version `v0.15.0`. [See what changed in that release](https://github.com/dagger/dagger/releases/tag/v0.15.0). + +โฌข https://www.npmjs.com/package/@dagger.io/dagger +๐Ÿ“’ https://docs.dagger.io/reference/typescript/modules/api_client_gen + +### ๐Ÿ”ฅ Breaking Changes +- `ExecErr.toString` no longer contains the values of `stdout` or `stderr` by @vito in https://github.com/dagger/dagger/pull/9033 \ + When comparing error values for expected output, use the more specific values. + +### Added +- Allow external custom runtime as base image using `dagger.baseImage` field in the module's `package.json` by @TomChv in https://github.com/dagger/dagger/pull/8675 \ + + *Warning*: Only alpine images are supported by the runtime. + + *Note*: You should also set `dagger.runtime` field to `node` or `bun` to force a specific runtime, otherwise + the runtime will be detected based on files present in the module. + + Example: + ```json + { + "dagger": { + "baseImage": "node:23.2.0-alpine@sha256:ecefaffd4706c5879af52e022fdb8ea30cbd6590e2a30d05347790d690727c6c", + "runtime": "node" + } + } + ``` +- Add support for non-decorable keywords by resolving declarations by references by @TomChv in https://github.com/dagger/dagger/pull/8824 \ + + Support native `enum` keyword to define enumeration without decorators. + + Example: + ```ts + enum Example { + A = "A", + B = "B", + } + ``` + + Support native `type` keyword to define type without decorators. + This can be use to define data object or primitive type. + + Example: + ```ts + type Example = { + a: string + b: number + } + + type Integer = number + type Foo = string + ``` + Note: If the type is a data object, all properties will be exposed + to API & CLI. + + Support resolution of variable and enumerations as default values if they + are exported by the same module. + + Example: + ```ts + export enum Example { + A = "A", + B = "B", + } + + export const defaultValue = "foo" + + @object() + class Test { + @func() + defaultEnumVar(value: Example = Example.A): Example { + return value + } + + @func + defaultStringVar(value: string = defaultValue): string { + return value + } + } + ``` + +### Changed +- Bump runtime versions by @TomChv in https://github.com/dagger/dagger/pull/8823 \ + - Node version's to new LTS 22.11.0 (see https://nodejs.org/en/about/previous-releases) + - Bump runtime Bun version's to 1.1.38. + +### Dependencies +- Bump Engine to v0.15.0 by @jedevc in https://github.com/dagger/dagger/pull/9158 + +### What to do next +- Read the [documentation](https://docs.dagger.io/sdk/nodejs) +- Join our [Discord server](https://discord.gg/dagger-io) +- Follow us on [Twitter](https://twitter.com/dagger_io) + ## sdk/typescript/v0.14.0 - 2024-11-08 This SDK uses ๐Ÿš™ Engine + ๐Ÿš— CLI version `v0.14.0`. [See what changed in that release](https://github.com/dagger/dagger/releases/tag/v0.14.0). diff --git a/sdk/typescript/context/builder.ts b/sdk/typescript/context/builder.ts deleted file mode 100644 index 08fb9001c2..0000000000 --- a/sdk/typescript/context/builder.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { ConnectOpts } from "../connectOpts.js" -import { createGQLClient } from "../graphql/client.js" -import { Bin, CLI_VERSION } from "../provisioning/index.js" -import { Context } from "./context.js" - -/** - * @hidden - * - * Initialize a default client context from environment. - */ -export async function initDefaultContext( - cfg: ConnectOpts = {}, -): Promise { - let ctx = new Context() - - // Prefer DAGGER_SESSION_PORT if set - const daggerSessionPort = process.env["DAGGER_SESSION_PORT"] - if (daggerSessionPort) { - const sessionToken = process.env["DAGGER_SESSION_TOKEN"] - if (!sessionToken) { - throw new Error( - "DAGGER_SESSION_TOKEN must be set when using DAGGER_SESSION_PORT", - ) - } - - if (cfg.Workdir && cfg.Workdir !== "") { - throw new Error( - "cannot configure workdir for existing session (please use --workdir or host.directory with absolute paths instead)", - ) - } - - ctx = new Context({ - client: createGQLClient(Number(daggerSessionPort), sessionToken), - }) - } else { - // Otherwise, prefer _EXPERIMENTAL_DAGGER_CLI_BIN, with fallback behavior of - // downloading the CLI and using that as the bin. - const cliBin = process.env["_EXPERIMENTAL_DAGGER_CLI_BIN"] - const engineConn = new Bin(cliBin, CLI_VERSION) - const client = await engineConn.Connect(cfg) - - ctx = new Context({ client, subProcess: engineConn.subProcess }) - } - - return ctx -} diff --git a/sdk/typescript/context/context.ts b/sdk/typescript/context/context.ts deleted file mode 100644 index 6d783e9925..0000000000 --- a/sdk/typescript/context/context.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { GraphQLClient } from "graphql-request" - -import { ConnectOpts } from "../connectOpts.js" -import { ExecaChildProcess } from "../provisioning/bin.js" -import { initDefaultContext } from "./builder.js" - -interface ContextConfig { - client?: GraphQLClient - subProcess?: ExecaChildProcess -} - -/** - * Context abstracts the connection to the engine. - * - * It's required to implement the default global SDK. - * Its purpose is to store and returns the connection to the graphQL API, if - * no connection is set, it can create its own. - * - * This is also useful for lazy evaluation with the default global client, - * this one should only run the engine if it actually executes something. - */ -export class Context { - private _client?: GraphQLClient - private _subProcess?: ExecaChildProcess - - constructor(config?: ContextConfig) { - this._client = config?.client - this._subProcess = config?.subProcess - } - - /** - * Returns a GraphQL client connected to the engine. - * - * If no client is set, it will create one. - */ - public async connection(cfg: ConnectOpts = {}): Promise { - if (!this._client) { - const defaultCtx = await initDefaultContext(cfg) - this._client = defaultCtx._client as GraphQLClient - this._subProcess = defaultCtx._subProcess - } - - return this._client - } - - public getGQLClient(): GraphQLClient { - if (!this._client) { - throw new Error( - "graphQL connection not established yet, please use it inside a connect or connection function.", - ) - } - - return this._client - } - - /** - * Close the connection and the engine if this one was started by the node - * SDK. - */ - public close(): void { - if (this._subProcess) { - this._subProcess.kill("SIGTERM") - } - - // Reset client, so it can restart a new connection if necessary - this._client = undefined - } -} - -/** - * Expose a default context for the global client - */ -export const defaultContext = new Context() diff --git a/sdk/typescript/dev/src/index.ts b/sdk/typescript/dev/src/index.ts index b621458046..891b217b25 100644 --- a/sdk/typescript/dev/src/index.ts +++ b/sdk/typescript/dev/src/index.ts @@ -1,10 +1,4 @@ -import { - dag, - Container, - object, - func, - Directory, -} from "@dagger.io/dagger" +import { dag, Container, object, func, Directory } from "@dagger.io/dagger" @object() class TypescriptSdkDev { @@ -26,7 +20,7 @@ class TypescriptSdkDev { // Get source without generated files nor useless files. const sourceCode = dag.directory().withDirectory("/", source, { include: [ - "**/*.ts", + "src/**/*.ts", "tsconfig.json", "package.json", "yarn.lock", @@ -34,7 +28,6 @@ class TypescriptSdkDev { "eslint.config.js", ".prettierrc.cjs", ], - exclude: ["node_modules", "dist", "dev"], }) // Install dependencies and add source code. diff --git a/sdk/typescript/package.json b/sdk/typescript/package.json index a84ddcd9c2..611e8438f1 100644 --- a/sdk/typescript/package.json +++ b/sdk/typescript/package.json @@ -9,13 +9,13 @@ "dist/" ], "exports": { - ".": "./dist/index.js", - "./telemetry": "./dist/telemetry/index.js" + ".": "./dist/src/index.js", + "./telemetry": "./dist/src/telemetry/index.js" }, "engines": { "node": ">=18" }, - "main": "dist/index.js", + "main": "dist/src/index.js", "dependencies": { "@grpc/grpc-js": "^1.11.1", "@lifeomic/axios-fetch": "^3.1.0", @@ -63,6 +63,7 @@ "mocha": "^10.7.0", "prettier": "^3.3.3", "ts-node": "^10.9.2", + "tsx": "^4.19.2", "typescript-eslint": "^8.0.1" } } diff --git a/sdk/typescript/provisioning/engineconn.ts b/sdk/typescript/provisioning/engineconn.ts deleted file mode 100644 index f44729f58f..0000000000 --- a/sdk/typescript/provisioning/engineconn.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { GraphQLClient } from "graphql-request" -import { Writable } from "node:stream" - -export interface ConnectOpts { - Workdir?: string - Project?: string - LogOutput?: Writable - Timeout?: number -} - -export interface ConnectParams { - port: number - session_token: string -} - -export interface EngineConn { - /** - * Addr returns the connector address. - */ - Addr: () => string - - /** - * Connect initializes a ready to use GraphQL Client that - * points to the engine. - */ - Connect: (opts: ConnectOpts) => Promise - - /** - * Close stops the current connection. - */ - Close: () => Promise -} diff --git a/sdk/typescript/provisioning/index.ts b/sdk/typescript/provisioning/index.ts deleted file mode 100644 index 5b031e4263..0000000000 --- a/sdk/typescript/provisioning/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "./default.js" -export * from "./engineconn.js" -export * from "./bin.js" diff --git a/sdk/typescript/runtime/bin/__dagger.entrypoint.ts b/sdk/typescript/runtime/bin/__dagger.entrypoint.ts index a7f1570192..ba32ffed25 100644 --- a/sdk/typescript/runtime/bin/__dagger.entrypoint.ts +++ b/sdk/typescript/runtime/bin/__dagger.entrypoint.ts @@ -1,4 +1,34 @@ // THIS FILE IS AUTO GENERATED. PLEASE DO NOT EDIT. import { entrypoint } from "@dagger.io/dagger" +import * as fs from "fs" +import * as path from "path" -entrypoint() +const allowedExtensions = [".ts", ".mts"] + +function listTsFilesInModule(dir = import.meta.dirname): string[] { + const res = fs.readdirSync(dir).map((file) => { + const filepath = path.join(dir, file) + + const stat = fs.statSync(filepath) + + if (stat.isDirectory()) { + return listTsFilesInModule(filepath) + } + + const ext = path.extname(filepath) + if (allowedExtensions.find((allowedExt) => allowedExt === ext)) { + return [path.join(dir, file)] + } + + return [] + }) + + return res.reduce( + (p, c) => [...c, ...p], + [`${import.meta.dirname}/../sdk/src/api/client.gen.ts`], + ) +} + +const files = listTsFilesInModule() + +entrypoint(files) diff --git a/sdk/typescript/runtime/bin/__tsconfig.updator.ts b/sdk/typescript/runtime/bin/__tsconfig.updator.ts index 02032c0c3b..78d28644a3 100644 --- a/sdk/typescript/runtime/bin/__tsconfig.updator.ts +++ b/sdk/typescript/runtime/bin/__tsconfig.updator.ts @@ -4,8 +4,8 @@ const tsConfigPath = `./tsconfig.json` const daggerPathAlias = "@dagger.io/dagger" const daggerTelemetryPathAlias = "@dagger.io/dagger/telemetry" -const daggerPath = "./sdk" -const daggerTelemetryPath = "./sdk/telemetry" +const daggerPath = "./sdk/src" +const daggerTelemetryPath = "./sdk/src/telemetry" // If the tsconfig.json file doesn't exist, create it with default config. if (!fs.existsSync(tsConfigPath)) { @@ -15,8 +15,8 @@ if (!fs.existsSync(tsConfigPath)) { moduleResolution: "Node", experimentalDecorators: true, paths: { - "@dagger.io/dagger": ["./sdk"], - "@dagger.io/dagger/telemetry": ["./sdk/telemetry"], + "@dagger.io/dagger": ["./sdk/src"], + "@dagger.io/dagger/telemetry": ["./sdk/src/telemetry"], }, }, } diff --git a/sdk/typescript/runtime/go.mod b/sdk/typescript/runtime/go.mod index bea51ca228..b0bc905237 100644 --- a/sdk/typescript/runtime/go.mod +++ b/sdk/typescript/runtime/go.mod @@ -1,45 +1,53 @@ module main -go 1.22 +go 1.22.7 + +toolchain go1.23.2 + +require github.com/iancoleman/strcase v0.3.0 require ( - github.com/99designs/gqlgen v0.17.49 + github.com/99designs/gqlgen v0.17.57 github.com/Khan/genqlient v0.7.0 - github.com/iancoleman/strcase v0.3.0 - github.com/tidwall/gjson v1.17.1 - github.com/vektah/gqlparser/v2 v2.5.16 + github.com/cenkalti/backoff/v4 v4.3.0 // indirect + github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect + github.com/sosodev/duration v1.3.1 // indirect + github.com/stretchr/testify v1.10.0 // indirect + github.com/vektah/gqlparser/v2 v2.5.19 go.opentelemetry.io/otel v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 go.opentelemetry.io/otel/log v0.3.0 + go.opentelemetry.io/otel/metric v1.27.0 go.opentelemetry.io/otel/sdk v1.27.0 go.opentelemetry.io/otel/sdk/log v0.3.0 + go.opentelemetry.io/otel/sdk/metric v1.27.0 go.opentelemetry.io/otel/trace v1.27.0 go.opentelemetry.io/proto/otlp v1.3.1 golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa - golang.org/x/sync v0.7.0 - google.golang.org/grpc v1.64.0 + golang.org/x/mod v0.20.0 + golang.org/x/net v0.29.0 // indirect + golang.org/x/sync v0.9.0 + golang.org/x/sys v0.26.0 // indirect + golang.org/x/text v0.19.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect + google.golang.org/grpc v1.68.0 + google.golang.org/protobuf v1.35.2 // indirect ) -require ( - github.com/cenkalti/backoff/v4 v4.3.0 // indirect - github.com/go-logr/logr v1.4.1 // indirect - github.com/go-logr/stdr v1.2.2 // indirect - github.com/google/uuid v1.6.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect - github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect - github.com/sosodev/duration v1.3.1 // indirect - github.com/tidwall/match v1.1.1 // indirect - github.com/tidwall/pretty v1.2.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect - go.opentelemetry.io/otel/metric v1.27.0 // indirect - golang.org/x/mod v0.19.0 - golang.org/x/net v0.26.0 // indirect - golang.org/x/sys v0.21.0 // indirect - golang.org/x/text v0.16.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 // indirect - google.golang.org/protobuf v1.34.1 // indirect -) +replace go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc => go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 + +replace go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp => go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 + +replace go.opentelemetry.io/otel/log => go.opentelemetry.io/otel/log v0.3.0 + +replace go.opentelemetry.io/otel/sdk/log => go.opentelemetry.io/otel/sdk/log v0.3.0 diff --git a/sdk/typescript/runtime/go.sum b/sdk/typescript/runtime/go.sum index c591b4b2a4..7cbbd318a8 100644 --- a/sdk/typescript/runtime/go.sum +++ b/sdk/typescript/runtime/go.sum @@ -1,54 +1,48 @@ -github.com/99designs/gqlgen v0.17.49 h1:b3hNGexHd33fBSAd4NDT/c3NCcQzcAVkknhN9ym36YQ= -github.com/99designs/gqlgen v0.17.49/go.mod h1:tC8YFVZMed81x7UJ7ORUwXF4Kn6SXuucFqQBhN8+BU0= +github.com/99designs/gqlgen v0.17.57 h1:Ak4p60BRq6QibxY0lEc0JnQhDurfhxA67sp02lMjmPc= +github.com/99designs/gqlgen v0.17.57/go.mod h1:Jx61hzOSTcR4VJy/HFIgXiQ5rJ0Ypw8DxWLjbYDAUw0= github.com/Khan/genqlient v0.7.0 h1:GZ1meyRnzcDTK48EjqB8t3bcfYvHArCUUvgOwpz1D4w= github.com/Khan/genqlient v0.7.0/go.mod h1:HNyy3wZvuYwmW3Y7mkoQLZsa/R5n5yIRajS1kPBvSFM= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 h1:asbCHRVmodnJTuQ3qamDwqVOIjwqUPTYmYuemVOx+Ys= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0/go.mod h1:ggCgvZ2r7uOoQjOyu2Y1NhHmEPPzzuhWgcza5M1Ji1I= github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8= -github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= +github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= +github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= github.com/sosodev/duration v1.3.1 h1:qtHBDMQ6lvMQsL15g4aopM4HEfOaYuhWBw3NPTtlqq4= github.com/sosodev/duration v1.3.1/go.mod h1:RQIBBX0+fMLc/D9+Jb/fwvVmo0eZvDDEERAikUR6SDg= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/tidwall/gjson v1.17.1 h1:wlYEnwqAHgzmhNUFfw7Xalt2JzQvsMx2Se4PcoFCT/U= -github.com/tidwall/gjson v1.17.1/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= -github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= -github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= -github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= -github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= -github.com/vektah/gqlparser/v2 v2.5.16 h1:1gcmLTvs3JLKXckwCwlUagVn/IlV2bwqle0vJ0vy5p8= -github.com/vektah/gqlparser/v2 v2.5.16/go.mod h1:1lz1OeCqgQbQepsGxPVywrjdBHW2T08PUS3pJqepRww= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/vektah/gqlparser/v2 v2.5.19 h1:bhCPCX1D4WWzCDvkPl4+TP1N8/kLrWnp43egplt7iSg= +github.com/vektah/gqlparser/v2 v2.5.19/go.mod h1:y7kvl5bBlDeuWIvLtA9849ncyvx6/lj06RsMrEjVy3U= go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 h1:oM0GTNKGlc5qHctWeIGTVyda4iFFalOzMZ3Ehj5rwB4= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88/go.mod h1:JGG8ebaMO5nXOPnvKEl+DiA4MGwFjCbjsxT1WHIEBPY= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 h1:ccBrA8nCY5mM0y5uO7FT0ze4S0TuFcWdDB2FxGMTjkI= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0/go.mod h1:/9pb6634zi2Lk8LYg9Q0X8Ar6jka4dkFOylBLbVQPCE= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 h1:bFgvUr3/O4PHj3VQcFEuYKvRZJX1SJDQ+11JXuSB3/w= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0/go.mod h1:xJntEd2KL6Qdg5lwp97HMLQDVeAhrYxmzFseAMDPQ8I= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 h1:CIHWikMsN3wO+wq1Tp5VGdVRTcON+DmOJSfDjXypKOc= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0/go.mod h1:TNupZ6cxqyFEpLXAZW7On+mLFL0/g0TE3unIYL91xWc= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 h1:R9DE4kQ4k+YtfLI2ULwX82VtNQ2J8yZmA7ZIF/D+7Mc= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0/go.mod h1:OQFyQVrDlbe+R7xrEyDr/2Wr67Ol0hRUgsfA+V5A95s= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= @@ -63,6 +57,8 @@ go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kT go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= go.opentelemetry.io/otel/sdk/log v0.3.0 h1:GEjJ8iftz2l+XO1GF2856r7yYVh74URiF9JMcAacr5U= go.opentelemetry.io/otel/sdk/log v0.3.0/go.mod h1:BwCxtmux6ACLuys1wlbc0+vGBd+xytjmjajwqqIul2g= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= @@ -71,27 +67,23 @@ go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= -golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= -golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= -google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 h1:P8OJ/WCl/Xo4E4zoe4/bifHpSmmKwARqyqE4nW6J2GQ= -google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:RGnPtTG7r4i8sPlNyDeikXF99hMM+hN6QMm4ooG9g2g= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 h1:AgADTJarZTBqgjiUzRgfaBchgYB3/WFTC80GPwsMcRI= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= -google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= -google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= +golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= +golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ= +golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= +golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= +golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 h1:hjSy6tcFQZ171igDaN5QHOw2n6vx40juYbC/x67CEhc= +google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:qpvKtACPCQhAdu3PyQgV4l3LMXZEtft7y8QcarRsp9I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/grpc v1.68.0 h1:aHQeeJbo8zAkAa3pRzrVjZlbz6uSfeOXlJNQM0RAbz0= +google.golang.org/grpc v1.68.0/go.mod h1:fmSPC5AsjSBCK54MyHRx48kpOti1/jRfOlwEWywNjWA= +google.golang.org/protobuf v1.35.2 h1:8Ar7bF+apOIoThw1EdZl0p1oWvMqTHmpA2fRTyZO8io= +google.golang.org/protobuf v1.35.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/sdk/typescript/runtime/template/tsconfig.json b/sdk/typescript/runtime/template/tsconfig.json index 0a338a54b1..21099eef99 100644 --- a/sdk/typescript/runtime/template/tsconfig.json +++ b/sdk/typescript/runtime/template/tsconfig.json @@ -4,8 +4,8 @@ "moduleResolution": "Node", "experimentalDecorators": true, "paths": { - "@dagger.io/dagger": ["./sdk"], - "@dagger.io/dagger/telemetry": ["./sdk/telemetry"] + "@dagger.io/dagger": ["./sdk/src"], + "@dagger.io/dagger/telemetry": ["./sdk/src/telemetry"] } } } diff --git a/sdk/typescript/api/.gitattributes b/sdk/typescript/src/api/.gitattributes similarity index 100% rename from sdk/typescript/api/.gitattributes rename to sdk/typescript/src/api/.gitattributes diff --git a/sdk/typescript/api/client.gen.ts b/sdk/typescript/src/api/client.gen.ts similarity index 65% rename from sdk/typescript/api/client.gen.ts rename to sdk/typescript/src/api/client.gen.ts index 21a6d661a4..4a1f1ef262 100644 --- a/sdk/typescript/api/client.gen.ts +++ b/sdk/typescript/src/api/client.gen.ts @@ -2,49 +2,14 @@ * This file was auto-generated by `client-gen`. * Do not make direct changes to the file. */ -import { Context, defaultContext } from "../context/context.js" -import { computeQuery } from "./utils.js" - -/** - * @hidden - */ -export type QueryTree = { - operation: string - args?: Record -} - -/** - * @hidden - */ -export type Metadata = { - [key: string]: { - is_enum?: boolean - } -} - -interface ClientConfig { - queryTree?: QueryTree[] - ctx?: Context -} +import { Context } from "../common/context.js" class BaseClient { - protected _queryTree: QueryTree[] - protected _ctx: Context - /** * @hidden */ - constructor({ queryTree, ctx }: ClientConfig = {}) { - this._queryTree = queryTree || [] - this._ctx = ctx || new Context() - } - /** - * @hidden - */ - get queryTree() { - return this._queryTree - } + constructor(protected _ctx: Context = new Context()) {} } export type BuildArg = { @@ -83,6 +48,44 @@ export enum CacheSharingMode { */ export type CacheVolumeID = string & { __CacheVolumeID: never } +export type ContainerAsServiceOpts = { + /** + * Command to run instead of the container's default command (e.g., ["go", "run", "main.go"]). + * + * If empty, the container's default command is used. + */ + args?: string[] + + /** + * If the container has an entrypoint, prepend it to the args. + */ + useEntrypoint?: boolean + + /** + * Provides Dagger access to the executed command. + * + * Do not use this option unless you trust the command being executed; the command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM. + */ + experimentalPrivilegedNesting?: boolean + + /** + * Execute the command with all root capabilities. This is similar to running a command with "sudo" or executing "docker run" with the "--privileged" flag. Containerization does not provide any security guarantees when using this option. It should only be used when absolutely necessary and only with trusted commands. + */ + insecureRootCapabilities?: boolean + + /** + * Replace "${VAR}" or "$VAR" in the args according to the current environment variables defined in the container (e.g. "/$VAR/foo"). + */ + expand?: boolean + + /** + * If set, skip the automatic init process injected into containers by default. + * + * This should only be used if the user requires that their exec process be the pid 1 process in the container. Otherwise it may result in unexpected behavior. + */ + noInit?: boolean +} + export type ContainerAsTarballOpts = { /** * Identifiers for other platform specific containers. @@ -1387,11 +1390,8 @@ export class CacheVolume extends BaseClient { /** * Constructor is used for internal usage only, do not create object from it. */ - constructor( - parent?: { queryTree?: QueryTree[]; ctx: Context }, - _id?: CacheVolumeID, - ) { - super(parent) + constructor(ctx?: Context, _id?: CacheVolumeID) { + super(ctx) this._id = _id } @@ -1404,15 +1404,9 @@ export class CacheVolume extends BaseClient { return this._id } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("id") + + const response: Awaited = await ctx.execute() return response } @@ -1441,7 +1435,7 @@ export class Container extends BaseClient { * Constructor is used for internal usage only, do not create object from it. */ constructor( - parent?: { queryTree?: QueryTree[]; ctx: Context }, + ctx?: Context, _id?: ContainerID, _envVariable?: string, _exitCode?: number, @@ -1457,7 +1451,7 @@ export class Container extends BaseClient { _user?: string, _workdir?: string, ) { - super(parent) + super(ctx) this._id = _id this._envVariable = _envVariable @@ -1483,15 +1477,9 @@ export class Container extends BaseClient { return this._id } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("id") + + const response: Awaited = await ctx.execute() return response } @@ -1500,17 +1488,22 @@ export class Container extends BaseClient { * Turn the container into a Service. * * Be sure to set any exposed ports before this conversion. + * @param opts.args Command to run instead of the container's default command (e.g., ["go", "run", "main.go"]). + * + * If empty, the container's default command is used. + * @param opts.useEntrypoint If the container has an entrypoint, prepend it to the args. + * @param opts.experimentalPrivilegedNesting Provides Dagger access to the executed command. + * + * Do not use this option unless you trust the command being executed; the command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM. + * @param opts.insecureRootCapabilities Execute the command with all root capabilities. This is similar to running a command with "sudo" or executing "docker run" with the "--privileged" flag. Containerization does not provide any security guarantees when using this option. It should only be used when absolutely necessary and only with trusted commands. + * @param opts.expand Replace "${VAR}" or "$VAR" in the args according to the current environment variables defined in the container (e.g. "/$VAR/foo"). + * @param opts.noInit If set, skip the automatic init process injected into containers by default. + * + * This should only be used if the user requires that their exec process be the pid 1 process in the container. Otherwise it may result in unexpected behavior. */ - asService = (): Service => { - return new Service({ - queryTree: [ - ...this._queryTree, - { - operation: "asService", - }, - ], - ctx: this._ctx, - }) + asService = (opts?: ContainerAsServiceOpts): Service => { + const ctx = this._ctx.select("asService", { ...opts }) + return new Service(ctx) } /** @@ -1526,21 +1519,13 @@ export class Container extends BaseClient { * Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support. */ asTarball = (opts?: ContainerAsTarballOpts): File => { - const metadata: Metadata = { + const metadata = { forcedCompression: { is_enum: true }, mediaTypes: { is_enum: true }, } - return new File({ - queryTree: [ - ...this._queryTree, - { - operation: "asTarball", - args: { ...opts, __metadata: metadata }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("asTarball", { ...opts, __metadata: metadata }) + return new File(ctx) } /** @@ -1556,31 +1541,17 @@ export class Container extends BaseClient { * They can be accessed in the Dockerfile using the "secret" mount type and mount path /run/secrets/[secret-name], e.g. RUN --mount=type=secret,id=my-secret curl [http://example.com?token=$(cat /run/secrets/my-secret)](http://example.com?token=$(cat /run/secrets/my-secret)) */ build = (context: Directory, opts?: ContainerBuildOpts): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "build", - args: { context, ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("build", { context, ...opts }) + return new Container(ctx) } /** * Retrieves default arguments for future commands. */ defaultArgs = async (): Promise => { - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "defaultArgs", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("defaultArgs") + + const response: Awaited = await ctx.execute() return response } @@ -1593,31 +1564,17 @@ export class Container extends BaseClient { * @param opts.expand Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo"). */ directory = (path: string, opts?: ContainerDirectoryOpts): Directory => { - return new Directory({ - queryTree: [ - ...this._queryTree, - { - operation: "directory", - args: { path, ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("directory", { path, ...opts }) + return new Directory(ctx) } /** * Retrieves entrypoint to be prepended to the arguments of all commands. */ entrypoint = async (): Promise => { - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "entrypoint", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("entrypoint") + + const response: Awaited = await ctx.execute() return response } @@ -1631,16 +1588,9 @@ export class Container extends BaseClient { return this._envVariable } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "envVariable", - args: { name }, - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("envVariable", { name }) + + const response: Awaited = await ctx.execute() return response } @@ -1653,31 +1603,22 @@ export class Container extends BaseClient { id: EnvVariableID } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "envVariables", - }, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("envVariables").select("id") + + const response: Awaited = await ctx.execute() return response.map( (r) => new EnvVariable( - { - queryTree: [ + new Context( + [ { operation: "loadEnvVariableFromID", args: { id: r.id }, }, ], - ctx: this._ctx, - }, + this._ctx.getConnection(), + ), r.id, ), ) @@ -1693,15 +1634,9 @@ export class Container extends BaseClient { return this._exitCode } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "exitCode", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("exitCode") + + const response: Awaited = await ctx.execute() return response } @@ -1714,15 +1649,8 @@ export class Container extends BaseClient { * This currently works for Nvidia devices only. */ experimentalWithAllGPUs = (): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "experimentalWithAllGPUs", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("experimentalWithAllGPUs") + return new Container(ctx) } /** @@ -1734,16 +1662,8 @@ export class Container extends BaseClient { * @param devices List of devices to be accessible to this container. */ experimentalWithGPU = (devices: string[]): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "experimentalWithGPU", - args: { devices }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("experimentalWithGPU", { devices }) + return new Container(ctx) } /** @@ -1772,21 +1692,18 @@ export class Container extends BaseClient { return this._export } - const metadata: Metadata = { + const metadata = { forcedCompression: { is_enum: true }, mediaTypes: { is_enum: true }, } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "export", - args: { path, ...opts, __metadata: metadata }, - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("export", { + path, + ...opts, + __metadata: metadata, + }) + + const response: Awaited = await ctx.execute() return response } @@ -1801,31 +1718,22 @@ export class Container extends BaseClient { id: PortID } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "exposedPorts", - }, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("exposedPorts").select("id") + + const response: Awaited = await ctx.execute() return response.map( (r) => new Port( - { - queryTree: [ + new Context( + [ { operation: "loadPortFromID", args: { id: r.id }, }, ], - ctx: this._ctx, - }, + this._ctx.getConnection(), + ), r.id, ), ) @@ -1839,16 +1747,8 @@ export class Container extends BaseClient { * @param opts.expand Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt"). */ file = (path: string, opts?: ContainerFileOpts): File => { - return new File({ - queryTree: [ - ...this._queryTree, - { - operation: "file", - args: { path, ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("file", { path, ...opts }) + return new File(ctx) } /** @@ -1858,16 +1758,8 @@ export class Container extends BaseClient { * Formatted as [host]/[user]/[repo]:[tag] (e.g., "docker.io/dagger/dagger:main"). */ from = (address: string): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "from", - args: { address }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("from", { address }) + return new Container(ctx) } /** @@ -1878,15 +1770,9 @@ export class Container extends BaseClient { return this._imageRef } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "imageRef", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("imageRef") + + const response: Awaited = await ctx.execute() return response } @@ -1897,16 +1783,8 @@ export class Container extends BaseClient { * @param opts.tag Identifies the tag to import from the archive, if the archive bundles multiple tags. */ import_ = (source: File, opts?: ContainerImportOpts): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "import", - args: { source, ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("import", { source, ...opts }) + return new Container(ctx) } /** @@ -1918,16 +1796,9 @@ export class Container extends BaseClient { return this._label } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "label", - args: { name }, - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("label", { name }) + + const response: Awaited = await ctx.execute() return response } @@ -1940,31 +1811,22 @@ export class Container extends BaseClient { id: LabelID } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "labels", - }, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("labels").select("id") + + const response: Awaited = await ctx.execute() return response.map( (r) => new Label( - { - queryTree: [ + new Context( + [ { operation: "loadLabelFromID", args: { id: r.id }, }, ], - ctx: this._ctx, - }, + this._ctx.getConnection(), + ), r.id, ), ) @@ -1974,15 +1836,9 @@ export class Container extends BaseClient { * Retrieves the list of paths where a directory is mounted. */ mounts = async (): Promise => { - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "mounts", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("mounts") + + const response: Awaited = await ctx.execute() return response } @@ -1995,15 +1851,9 @@ export class Container extends BaseClient { return this._platform } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "platform", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("platform") + + const response: Awaited = await ctx.execute() return response } @@ -2035,21 +1885,18 @@ export class Container extends BaseClient { return this._publish } - const metadata: Metadata = { + const metadata = { forcedCompression: { is_enum: true }, mediaTypes: { is_enum: true }, } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "publish", - args: { address, ...opts, __metadata: metadata }, - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("publish", { + address, + ...opts, + __metadata: metadata, + }) + + const response: Awaited = await ctx.execute() return response } @@ -2058,15 +1905,8 @@ export class Container extends BaseClient { * Retrieves this container's root filesystem. Mounts are not included. */ rootfs = (): Directory => { - return new Directory({ - queryTree: [ - ...this._queryTree, - { - operation: "rootfs", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("rootfs") + return new Directory(ctx) } /** @@ -2079,15 +1919,9 @@ export class Container extends BaseClient { return this._stderr } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "stderr", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("stderr") + + const response: Awaited = await ctx.execute() return response } @@ -2102,15 +1936,9 @@ export class Container extends BaseClient { return this._stdout } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "stdout", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("stdout") + + const response: Awaited = await ctx.execute() return response } @@ -2121,25 +1949,21 @@ export class Container extends BaseClient { * It doesn't run the default command if no exec has been set. */ sync = async (): Promise => { - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "sync", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("sync") - return new Container({ - queryTree: [ - { - operation: "loadContainerFromID", - args: { id: response }, - }, - ], - ctx: this._ctx, - }) + const response: Awaited = await ctx.execute() + + return new Container( + new Context( + [ + { + operation: "loadContainerFromID", + args: { id: response }, + }, + ], + this._ctx.getConnection(), + ), + ) } /** @@ -2151,16 +1975,8 @@ export class Container extends BaseClient { * @param opts.insecureRootCapabilities Execute the command with all root capabilities. This is similar to running a command with "sudo" or executing "docker run" with the "--privileged" flag. Containerization does not provide any security guarantees when using this option. It should only be used when absolutely necessary and only with trusted commands. */ terminal = (opts?: ContainerTerminalOpts): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "terminal", - args: { ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("terminal", { ...opts }) + return new Container(ctx) } /** @@ -2177,16 +1993,9 @@ export class Container extends BaseClient { return } - await computeQuery( - [ - ...this._queryTree, - { - operation: "up", - args: { ...opts }, - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("up", { ...opts }) + + await ctx.execute() } /** @@ -2197,15 +2006,9 @@ export class Container extends BaseClient { return this._user } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "user", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("user") + + const response: Awaited = await ctx.execute() return response } @@ -2216,16 +2019,8 @@ export class Container extends BaseClient { * @param value The value of the annotation. */ withAnnotation = (name: string, value: string): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "withAnnotation", - args: { name, value }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withAnnotation", { name, value }) + return new Container(ctx) } /** @@ -2233,16 +2028,8 @@ export class Container extends BaseClient { * @param args Arguments to prepend to future executions (e.g., ["-v", "--no-cache"]). */ withDefaultArgs = (args: string[]): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "withDefaultArgs", - args: { args }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withDefaultArgs", { args }) + return new Container(ctx) } /** @@ -2257,16 +2044,8 @@ export class Container extends BaseClient { args: string[], opts?: ContainerWithDefaultTerminalCmdOpts, ): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "withDefaultTerminalCmd", - args: { args, ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withDefaultTerminalCmd", { args, ...opts }) + return new Container(ctx) } /** @@ -2287,16 +2066,8 @@ export class Container extends BaseClient { directory: Directory, opts?: ContainerWithDirectoryOpts, ): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "withDirectory", - args: { path, directory, ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withDirectory", { path, directory, ...opts }) + return new Container(ctx) } /** @@ -2308,16 +2079,8 @@ export class Container extends BaseClient { args: string[], opts?: ContainerWithEntrypointOpts, ): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "withEntrypoint", - args: { args, ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withEntrypoint", { args, ...opts }) + return new Container(ctx) } /** @@ -2331,21 +2094,13 @@ export class Container extends BaseClient { value: string, opts?: ContainerWithEnvVariableOpts, ): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "withEnvVariable", - args: { name, value, ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withEnvVariable", { name, value, ...opts }) + return new Container(ctx) } /** * Retrieves this container after executing the specified command inside it. - * @param args Command to run instead of the container's default command (e.g., ["run", "main.go"]). + * @param args Command to run instead of the container's default command (e.g., ["go", "run", "main.go"]). * * If empty, the container's default command is used. * @param opts.useEntrypoint If the container has an entrypoint, prepend it to the args. @@ -2363,20 +2118,16 @@ export class Container extends BaseClient { * This should only be used if the user requires that their exec process be the pid 1 process in the container. Otherwise it may result in unexpected behavior. */ withExec = (args: string[], opts?: ContainerWithExecOpts): Container => { - const metadata: Metadata = { + const metadata = { expect: { is_enum: true }, } - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "withExec", - args: { args, ...opts, __metadata: metadata }, - }, - ], - ctx: this._ctx, + const ctx = this._ctx.select("withExec", { + args, + ...opts, + __metadata: metadata, }) + return new Container(ctx) } /** @@ -2396,20 +2147,16 @@ export class Container extends BaseClient { port: number, opts?: ContainerWithExposedPortOpts, ): Container => { - const metadata: Metadata = { + const metadata = { protocol: { is_enum: true }, } - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "withExposedPort", - args: { port, ...opts, __metadata: metadata }, - }, - ], - ctx: this._ctx, + const ctx = this._ctx.select("withExposedPort", { + port, + ...opts, + __metadata: metadata, }) + return new Container(ctx) } /** @@ -2429,16 +2176,8 @@ export class Container extends BaseClient { source: File, opts?: ContainerWithFileOpts, ): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "withFile", - args: { path, source, ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withFile", { path, source, ...opts }) + return new Container(ctx) } /** @@ -2458,16 +2197,8 @@ export class Container extends BaseClient { sources: File[], opts?: ContainerWithFilesOpts, ): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "withFiles", - args: { path, sources, ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withFiles", { path, sources, ...opts }) + return new Container(ctx) } /** @@ -2476,16 +2207,8 @@ export class Container extends BaseClient { * @param value The value of the label (e.g., "2023-01-01T00:00:00Z"). */ withLabel = (name: string, value: string): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "withLabel", - args: { name, value }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withLabel", { name, value }) + return new Container(ctx) } /** @@ -2508,20 +2231,17 @@ export class Container extends BaseClient { cache: CacheVolume, opts?: ContainerWithMountedCacheOpts, ): Container => { - const metadata: Metadata = { + const metadata = { sharing: { is_enum: true }, } - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "withMountedCache", - args: { path, cache, ...opts, __metadata: metadata }, - }, - ], - ctx: this._ctx, + const ctx = this._ctx.select("withMountedCache", { + path, + cache, + ...opts, + __metadata: metadata, }) + return new Container(ctx) } /** @@ -2540,16 +2260,12 @@ export class Container extends BaseClient { source: Directory, opts?: ContainerWithMountedDirectoryOpts, ): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "withMountedDirectory", - args: { path, source, ...opts }, - }, - ], - ctx: this._ctx, + const ctx = this._ctx.select("withMountedDirectory", { + path, + source, + ...opts, }) + return new Container(ctx) } /** @@ -2568,16 +2284,8 @@ export class Container extends BaseClient { source: File, opts?: ContainerWithMountedFileOpts, ): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "withMountedFile", - args: { path, source, ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withMountedFile", { path, source, ...opts }) + return new Container(ctx) } /** @@ -2599,16 +2307,8 @@ export class Container extends BaseClient { source: Secret, opts?: ContainerWithMountedSecretOpts, ): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "withMountedSecret", - args: { path, source, ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withMountedSecret", { path, source, ...opts }) + return new Container(ctx) } /** @@ -2621,16 +2321,8 @@ export class Container extends BaseClient { path: string, opts?: ContainerWithMountedTempOpts, ): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "withMountedTemp", - args: { path, ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withMountedTemp", { path, ...opts }) + return new Container(ctx) } /** @@ -2650,16 +2342,8 @@ export class Container extends BaseClient { contents: string, opts?: ContainerWithNewFileOpts, ): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "withNewFile", - args: { path, contents, ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withNewFile", { path, contents, ...opts }) + return new Container(ctx) } /** @@ -2675,16 +2359,12 @@ export class Container extends BaseClient { username: string, secret: Secret, ): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "withRegistryAuth", - args: { address, username, secret }, - }, - ], - ctx: this._ctx, + const ctx = this._ctx.select("withRegistryAuth", { + address, + username, + secret, }) + return new Container(ctx) } /** @@ -2692,16 +2372,8 @@ export class Container extends BaseClient { * @param directory Directory to mount. */ withRootfs = (directory: Directory): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "withRootfs", - args: { directory }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withRootfs", { directory }) + return new Container(ctx) } /** @@ -2710,16 +2382,8 @@ export class Container extends BaseClient { * @param secret The identifier of the secret value. */ withSecretVariable = (name: string, secret: Secret): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "withSecretVariable", - args: { name, secret }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withSecretVariable", { name, secret }) + return new Container(ctx) } /** @@ -2734,16 +2398,8 @@ export class Container extends BaseClient { * @param service Identifier of the service container */ withServiceBinding = (alias: string, service: Service): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "withServiceBinding", - args: { alias, service }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withServiceBinding", { alias, service }) + return new Container(ctx) } /** @@ -2762,16 +2418,8 @@ export class Container extends BaseClient { source: Socket, opts?: ContainerWithUnixSocketOpts, ): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "withUnixSocket", - args: { path, source, ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withUnixSocket", { path, source, ...opts }) + return new Container(ctx) } /** @@ -2779,16 +2427,8 @@ export class Container extends BaseClient { * @param name The user to set (e.g., "root"). */ withUser = (name: string): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "withUser", - args: { name }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withUser", { name }) + return new Container(ctx) } /** @@ -2797,16 +2437,8 @@ export class Container extends BaseClient { * @param opts.expand Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo"). */ withWorkdir = (path: string, opts?: ContainerWithWorkdirOpts): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "withWorkdir", - args: { path, ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withWorkdir", { path, ...opts }) + return new Container(ctx) } /** @@ -2814,31 +2446,16 @@ export class Container extends BaseClient { * @param name The name of the annotation. */ withoutAnnotation = (name: string): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "withoutAnnotation", - args: { name }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withoutAnnotation", { name }) + return new Container(ctx) } /** * Retrieves this container with unset default arguments for future commands. */ withoutDefaultArgs = (): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "withoutDefaultArgs", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withoutDefaultArgs") + return new Container(ctx) } /** @@ -2850,16 +2467,8 @@ export class Container extends BaseClient { path: string, opts?: ContainerWithoutDirectoryOpts, ): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "withoutDirectory", - args: { path, ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withoutDirectory", { path, ...opts }) + return new Container(ctx) } /** @@ -2867,16 +2476,8 @@ export class Container extends BaseClient { * @param opts.keepDefaultArgs Don't remove the default arguments when unsetting the entrypoint. */ withoutEntrypoint = (opts?: ContainerWithoutEntrypointOpts): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "withoutEntrypoint", - args: { ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withoutEntrypoint", { ...opts }) + return new Container(ctx) } /** @@ -2884,16 +2485,8 @@ export class Container extends BaseClient { * @param name The name of the environment variable (e.g., "HOST"). */ withoutEnvVariable = (name: string): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "withoutEnvVariable", - args: { name }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withoutEnvVariable", { name }) + return new Container(ctx) } /** @@ -2905,20 +2498,16 @@ export class Container extends BaseClient { port: number, opts?: ContainerWithoutExposedPortOpts, ): Container => { - const metadata: Metadata = { + const metadata = { protocol: { is_enum: true }, } - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "withoutExposedPort", - args: { port, ...opts, __metadata: metadata }, - }, - ], - ctx: this._ctx, + const ctx = this._ctx.select("withoutExposedPort", { + port, + ...opts, + __metadata: metadata, }) + return new Container(ctx) } /** @@ -2927,16 +2516,8 @@ export class Container extends BaseClient { * @param opts.expand Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt"). */ withoutFile = (path: string, opts?: ContainerWithoutFileOpts): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "withoutFile", - args: { path, ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withoutFile", { path, ...opts }) + return new Container(ctx) } /** @@ -2948,16 +2529,8 @@ export class Container extends BaseClient { paths: string[], opts?: ContainerWithoutFilesOpts, ): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "withoutFiles", - args: { paths, ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withoutFiles", { paths, ...opts }) + return new Container(ctx) } /** @@ -2965,16 +2538,8 @@ export class Container extends BaseClient { * @param name The name of the label to remove (e.g., "org.opencontainers.artifact.created"). */ withoutLabel = (name: string): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "withoutLabel", - args: { name }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withoutLabel", { name }) + return new Container(ctx) } /** @@ -2986,16 +2551,8 @@ export class Container extends BaseClient { path: string, opts?: ContainerWithoutMountOpts, ): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "withoutMount", - args: { path, ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withoutMount", { path, ...opts }) + return new Container(ctx) } /** @@ -3005,16 +2562,8 @@ export class Container extends BaseClient { * Formatted as [host]/[user]/[repo]:[tag] (e.g. docker.io/dagger/dagger:main). */ withoutRegistryAuth = (address: string): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "withoutRegistryAuth", - args: { address }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withoutRegistryAuth", { address }) + return new Container(ctx) } /** @@ -3022,16 +2571,8 @@ export class Container extends BaseClient { * @param name The name of the environment variable (e.g., "HOST"). */ withoutSecretVariable = (name: string): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "withoutSecretVariable", - args: { name }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withoutSecretVariable", { name }) + return new Container(ctx) } /** @@ -3043,16 +2584,8 @@ export class Container extends BaseClient { path: string, opts?: ContainerWithoutUnixSocketOpts, ): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "withoutUnixSocket", - args: { path, ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withoutUnixSocket", { path, ...opts }) + return new Container(ctx) } /** @@ -3061,15 +2594,8 @@ export class Container extends BaseClient { * Should default to root. */ withoutUser = (): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "withoutUser", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withoutUser") + return new Container(ctx) } /** @@ -3078,15 +2604,8 @@ export class Container extends BaseClient { * Should default to "/". */ withoutWorkdir = (): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "withoutWorkdir", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withoutWorkdir") + return new Container(ctx) } /** @@ -3097,15 +2616,9 @@ export class Container extends BaseClient { return this._workdir } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "workdir", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("workdir") + + const response: Awaited = await ctx.execute() return response } @@ -3130,12 +2643,8 @@ export class CurrentModule extends BaseClient { /** * Constructor is used for internal usage only, do not create object from it. */ - constructor( - parent?: { queryTree?: QueryTree[]; ctx: Context }, - _id?: CurrentModuleID, - _name?: string, - ) { - super(parent) + constructor(ctx?: Context, _id?: CurrentModuleID, _name?: string) { + super(ctx) this._id = _id this._name = _name @@ -3149,15 +2658,9 @@ export class CurrentModule extends BaseClient { return this._id } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("id") + + const response: Awaited = await ctx.execute() return response } @@ -3170,15 +2673,9 @@ export class CurrentModule extends BaseClient { return this._name } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "name", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("name") + + const response: Awaited = await ctx.execute() return response } @@ -3187,15 +2684,8 @@ export class CurrentModule extends BaseClient { * The directory containing the module's source code loaded into the engine (plus any generated code that may have been created). */ source = (): Directory => { - return new Directory({ - queryTree: [ - ...this._queryTree, - { - operation: "source", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("source") + return new Directory(ctx) } /** @@ -3205,16 +2695,8 @@ export class CurrentModule extends BaseClient { * @param opts.include Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]). */ workdir = (path: string, opts?: CurrentModuleWorkdirOpts): Directory => { - return new Directory({ - queryTree: [ - ...this._queryTree, - { - operation: "workdir", - args: { path, ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("workdir", { path, ...opts }) + return new Directory(ctx) } /** @@ -3222,16 +2704,8 @@ export class CurrentModule extends BaseClient { * @param path Location of the file to retrieve (e.g., "README.md"). */ workdirFile = (path: string): File => { - return new File({ - queryTree: [ - ...this._queryTree, - { - operation: "workdirFile", - args: { path }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("workdirFile", { path }) + return new File(ctx) } } @@ -3248,13 +2722,13 @@ export class Directory extends BaseClient { * Constructor is used for internal usage only, do not create object from it. */ constructor( - parent?: { queryTree?: QueryTree[]; ctx: Context }, + ctx?: Context, _id?: DirectoryID, _digest?: string, _export?: string, _sync?: DirectoryID, ) { - super(parent) + super(ctx) this._id = _id this._digest = _digest @@ -3270,15 +2744,9 @@ export class Directory extends BaseClient { return this._id } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("id") + + const response: Awaited = await ctx.execute() return response } @@ -3293,16 +2761,8 @@ export class Directory extends BaseClient { * @param opts.engineVersion The engine version to upgrade to. */ asModule = (opts?: DirectoryAsModuleOpts): Module_ => { - return new Module_({ - queryTree: [ - ...this._queryTree, - { - operation: "asModule", - args: { ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("asModule", { ...opts }) + return new Module_(ctx) } /** @@ -3310,16 +2770,8 @@ export class Directory extends BaseClient { * @param other Identifier of the directory to compare. */ diff = (other: Directory): Directory => { - return new Directory({ - queryTree: [ - ...this._queryTree, - { - operation: "diff", - args: { other }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("diff", { other }) + return new Directory(ctx) } /** @@ -3330,15 +2782,9 @@ export class Directory extends BaseClient { return this._digest } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "digest", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("digest") + + const response: Awaited = await ctx.execute() return response } @@ -3348,16 +2794,8 @@ export class Directory extends BaseClient { * @param path Location of the directory to retrieve (e.g., "/src"). */ directory = (path: string): Directory => { - return new Directory({ - queryTree: [ - ...this._queryTree, - { - operation: "directory", - args: { path }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("directory", { path }) + return new Directory(ctx) } /** @@ -3371,16 +2809,8 @@ export class Directory extends BaseClient { * They will be mounted at /run/secrets/[secret-name]. */ dockerBuild = (opts?: DirectoryDockerBuildOpts): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "dockerBuild", - args: { ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("dockerBuild", { ...opts }) + return new Container(ctx) } /** @@ -3388,16 +2818,9 @@ export class Directory extends BaseClient { * @param opts.path Location of the directory to look at (e.g., "/src"). */ entries = async (opts?: DirectoryEntriesOpts): Promise => { - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "entries", - args: { ...opts }, - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("entries", { ...opts }) + + const response: Awaited = await ctx.execute() return response } @@ -3415,16 +2838,9 @@ export class Directory extends BaseClient { return this._export } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "export", - args: { path, ...opts }, - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("export", { path, ...opts }) + + const response: Awaited = await ctx.execute() return response } @@ -3434,16 +2850,8 @@ export class Directory extends BaseClient { * @param path Location of the file to retrieve (e.g., "README.md"). */ file = (path: string): File => { - return new File({ - queryTree: [ - ...this._queryTree, - { - operation: "file", - args: { path }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("file", { path }) + return new File(ctx) } /** @@ -3451,16 +2859,9 @@ export class Directory extends BaseClient { * @param pattern Pattern to match (e.g., "*.md"). */ glob = async (pattern: string): Promise => { - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "glob", - args: { pattern }, - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("glob", { pattern }) + + const response: Awaited = await ctx.execute() return response } @@ -3469,25 +2870,21 @@ export class Directory extends BaseClient { * Force evaluation in the engine. */ sync = async (): Promise => { - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "sync", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("sync") - return new Directory({ - queryTree: [ - { - operation: "loadDirectoryFromID", - args: { id: response }, - }, - ], - ctx: this._ctx, - }) + const response: Awaited = await ctx.execute() + + return new Directory( + new Context( + [ + { + operation: "loadDirectoryFromID", + args: { id: response }, + }, + ], + this._ctx.getConnection(), + ), + ) } /** @@ -3500,16 +2897,8 @@ export class Directory extends BaseClient { * @param opts.container If set, override the default container used for the terminal. */ terminal = (opts?: DirectoryTerminalOpts): Directory => { - return new Directory({ - queryTree: [ - ...this._queryTree, - { - operation: "terminal", - args: { ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("terminal", { ...opts }) + return new Directory(ctx) } /** @@ -3524,16 +2913,8 @@ export class Directory extends BaseClient { directory: Directory, opts?: DirectoryWithDirectoryOpts, ): Directory => { - return new Directory({ - queryTree: [ - ...this._queryTree, - { - operation: "withDirectory", - args: { path, directory, ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withDirectory", { path, directory, ...opts }) + return new Directory(ctx) } /** @@ -3547,16 +2928,8 @@ export class Directory extends BaseClient { source: File, opts?: DirectoryWithFileOpts, ): Directory => { - return new Directory({ - queryTree: [ - ...this._queryTree, - { - operation: "withFile", - args: { path, source, ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withFile", { path, source, ...opts }) + return new Directory(ctx) } /** @@ -3570,16 +2943,8 @@ export class Directory extends BaseClient { sources: File[], opts?: DirectoryWithFilesOpts, ): Directory => { - return new Directory({ - queryTree: [ - ...this._queryTree, - { - operation: "withFiles", - args: { path, sources, ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withFiles", { path, sources, ...opts }) + return new Directory(ctx) } /** @@ -3591,16 +2956,8 @@ export class Directory extends BaseClient { path: string, opts?: DirectoryWithNewDirectoryOpts, ): Directory => { - return new Directory({ - queryTree: [ - ...this._queryTree, - { - operation: "withNewDirectory", - args: { path, ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withNewDirectory", { path, ...opts }) + return new Directory(ctx) } /** @@ -3614,16 +2971,8 @@ export class Directory extends BaseClient { contents: string, opts?: DirectoryWithNewFileOpts, ): Directory => { - return new Directory({ - queryTree: [ - ...this._queryTree, - { - operation: "withNewFile", - args: { path, contents, ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withNewFile", { path, contents, ...opts }) + return new Directory(ctx) } /** @@ -3633,16 +2982,8 @@ export class Directory extends BaseClient { * Formatted in seconds following Unix epoch (e.g., 1672531199). */ withTimestamps = (timestamp: number): Directory => { - return new Directory({ - queryTree: [ - ...this._queryTree, - { - operation: "withTimestamps", - args: { timestamp }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withTimestamps", { timestamp }) + return new Directory(ctx) } /** @@ -3650,16 +2991,8 @@ export class Directory extends BaseClient { * @param path Location of the directory to remove (e.g., ".github/"). */ withoutDirectory = (path: string): Directory => { - return new Directory({ - queryTree: [ - ...this._queryTree, - { - operation: "withoutDirectory", - args: { path }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withoutDirectory", { path }) + return new Directory(ctx) } /** @@ -3667,16 +3000,8 @@ export class Directory extends BaseClient { * @param path Location of the file to remove (e.g., "/file.txt"). */ withoutFile = (path: string): Directory => { - return new Directory({ - queryTree: [ - ...this._queryTree, - { - operation: "withoutFile", - args: { path }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withoutFile", { path }) + return new Directory(ctx) } /** @@ -3684,16 +3009,8 @@ export class Directory extends BaseClient { * @param paths Location of the file to remove (e.g., ["/file.txt"]). */ withoutFiles = (paths: string[]): Directory => { - return new Directory({ - queryTree: [ - ...this._queryTree, - { - operation: "withoutFiles", - args: { paths }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withoutFiles", { paths }) + return new Directory(ctx) } /** @@ -3715,11 +3032,8 @@ export class Engine extends BaseClient { /** * Constructor is used for internal usage only, do not create object from it. */ - constructor( - parent?: { queryTree?: QueryTree[]; ctx: Context }, - _id?: EngineID, - ) { - super(parent) + constructor(ctx?: Context, _id?: EngineID) { + super(ctx) this._id = _id } @@ -3732,15 +3046,9 @@ export class Engine extends BaseClient { return this._id } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("id") + + const response: Awaited = await ctx.execute() return response } @@ -3749,15 +3057,8 @@ export class Engine extends BaseClient { * The local (on-disk) cache for the Dagger engine */ localCache = (): EngineCache => { - return new EngineCache({ - queryTree: [ - ...this._queryTree, - { - operation: "localCache", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("localCache") + return new EngineCache(ctx) } } @@ -3776,7 +3077,7 @@ export class EngineCache extends BaseClient { * Constructor is used for internal usage only, do not create object from it. */ constructor( - parent?: { queryTree?: QueryTree[]; ctx: Context }, + ctx?: Context, _id?: EngineCacheID, _keepBytes?: number, _maxUsedSpace?: number, @@ -3784,7 +3085,7 @@ export class EngineCache extends BaseClient { _prune?: Void, _reservedSpace?: number, ) { - super(parent) + super(ctx) this._id = _id this._keepBytes = _keepBytes @@ -3802,15 +3103,9 @@ export class EngineCache extends BaseClient { return this._id } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("id") + + const response: Awaited = await ctx.execute() return response } @@ -3819,16 +3114,8 @@ export class EngineCache extends BaseClient { * The current set of entries in the cache */ entrySet = (opts?: EngineCacheEntrySetOpts): EngineCacheEntrySet => { - return new EngineCacheEntrySet({ - queryTree: [ - ...this._queryTree, - { - operation: "entrySet", - args: { ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("entrySet", { ...opts }) + return new EngineCacheEntrySet(ctx) } /** @@ -3840,15 +3127,9 @@ export class EngineCache extends BaseClient { return this._keepBytes } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "keepBytes", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("keepBytes") + + const response: Awaited = await ctx.execute() return response } @@ -3861,15 +3142,9 @@ export class EngineCache extends BaseClient { return this._maxUsedSpace } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "maxUsedSpace", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("maxUsedSpace") + + const response: Awaited = await ctx.execute() return response } @@ -3882,15 +3157,9 @@ export class EngineCache extends BaseClient { return this._minFreeSpace } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "minFreeSpace", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("minFreeSpace") + + const response: Awaited = await ctx.execute() return response } @@ -3903,30 +3172,18 @@ export class EngineCache extends BaseClient { return } - await computeQuery( - [ - ...this._queryTree, - { - operation: "prune", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("prune") + + await ctx.execute() } reservedSpace = async (): Promise => { if (this._reservedSpace) { return this._reservedSpace } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "reservedSpace", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("reservedSpace") + + const response: Awaited = await ctx.execute() return response } @@ -3947,7 +3204,7 @@ export class EngineCacheEntry extends BaseClient { * Constructor is used for internal usage only, do not create object from it. */ constructor( - parent?: { queryTree?: QueryTree[]; ctx: Context }, + ctx?: Context, _id?: EngineCacheEntryID, _activelyUsed?: boolean, _createdTimeUnixNano?: number, @@ -3955,7 +3212,7 @@ export class EngineCacheEntry extends BaseClient { _diskSpaceBytes?: number, _mostRecentUseTimeUnixNano?: number, ) { - super(parent) + super(ctx) this._id = _id this._activelyUsed = _activelyUsed @@ -3973,15 +3230,9 @@ export class EngineCacheEntry extends BaseClient { return this._id } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("id") + + const response: Awaited = await ctx.execute() return response } @@ -3994,15 +3245,9 @@ export class EngineCacheEntry extends BaseClient { return this._activelyUsed } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "activelyUsed", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("activelyUsed") + + const response: Awaited = await ctx.execute() return response } @@ -4015,15 +3260,9 @@ export class EngineCacheEntry extends BaseClient { return this._createdTimeUnixNano } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "createdTimeUnixNano", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("createdTimeUnixNano") + + const response: Awaited = await ctx.execute() return response } @@ -4036,15 +3275,9 @@ export class EngineCacheEntry extends BaseClient { return this._description } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "description", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("description") + + const response: Awaited = await ctx.execute() return response } @@ -4057,15 +3290,9 @@ export class EngineCacheEntry extends BaseClient { return this._diskSpaceBytes } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "diskSpaceBytes", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("diskSpaceBytes") + + const response: Awaited = await ctx.execute() return response } @@ -4078,15 +3305,9 @@ export class EngineCacheEntry extends BaseClient { return this._mostRecentUseTimeUnixNano } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "mostRecentUseTimeUnixNano", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("mostRecentUseTimeUnixNano") + + const response: Awaited = await ctx.execute() return response } @@ -4104,12 +3325,12 @@ export class EngineCacheEntrySet extends BaseClient { * Constructor is used for internal usage only, do not create object from it. */ constructor( - parent?: { queryTree?: QueryTree[]; ctx: Context }, + ctx?: Context, _id?: EngineCacheEntrySetID, _diskSpaceBytes?: number, _entryCount?: number, ) { - super(parent) + super(ctx) this._id = _id this._diskSpaceBytes = _diskSpaceBytes @@ -4124,15 +3345,9 @@ export class EngineCacheEntrySet extends BaseClient { return this._id } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("id") + + const response: Awaited = await ctx.execute() return response } @@ -4145,15 +3360,9 @@ export class EngineCacheEntrySet extends BaseClient { return this._diskSpaceBytes } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "diskSpaceBytes", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("diskSpaceBytes") + + const response: Awaited = await ctx.execute() return response } @@ -4166,31 +3375,22 @@ export class EngineCacheEntrySet extends BaseClient { id: EngineCacheEntryID } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "entries", - }, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("entries").select("id") + + const response: Awaited = await ctx.execute() return response.map( (r) => new EngineCacheEntry( - { - queryTree: [ + new Context( + [ { operation: "loadEngineCacheEntryFromID", args: { id: r.id }, }, ], - ctx: this._ctx, - }, + this._ctx.getConnection(), + ), r.id, ), ) @@ -4204,15 +3404,9 @@ export class EngineCacheEntrySet extends BaseClient { return this._entryCount } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "entryCount", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("entryCount") + + const response: Awaited = await ctx.execute() return response } @@ -4231,13 +3425,13 @@ export class EnumTypeDef extends BaseClient { * Constructor is used for internal usage only, do not create object from it. */ constructor( - parent?: { queryTree?: QueryTree[]; ctx: Context }, + ctx?: Context, _id?: EnumTypeDefID, _description?: string, _name?: string, _sourceModuleName?: string, ) { - super(parent) + super(ctx) this._id = _id this._description = _description @@ -4253,15 +3447,9 @@ export class EnumTypeDef extends BaseClient { return this._id } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("id") + + const response: Awaited = await ctx.execute() return response } @@ -4274,15 +3462,9 @@ export class EnumTypeDef extends BaseClient { return this._description } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "description", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("description") + + const response: Awaited = await ctx.execute() return response } @@ -4295,15 +3477,9 @@ export class EnumTypeDef extends BaseClient { return this._name } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "name", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("name") + + const response: Awaited = await ctx.execute() return response } @@ -4312,15 +3488,8 @@ export class EnumTypeDef extends BaseClient { * The location of this enum declaration. */ sourceMap = (): SourceMap => { - return new SourceMap({ - queryTree: [ - ...this._queryTree, - { - operation: "sourceMap", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("sourceMap") + return new SourceMap(ctx) } /** @@ -4331,15 +3500,9 @@ export class EnumTypeDef extends BaseClient { return this._sourceModuleName } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "sourceModuleName", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("sourceModuleName") + + const response: Awaited = await ctx.execute() return response } @@ -4352,31 +3515,22 @@ export class EnumTypeDef extends BaseClient { id: EnumValueTypeDefID } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "values", - }, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("values").select("id") + + const response: Awaited = await ctx.execute() return response.map( (r) => new EnumValueTypeDef( - { - queryTree: [ + new Context( + [ { operation: "loadEnumValueTypeDefFromID", args: { id: r.id }, }, ], - ctx: this._ctx, - }, + this._ctx.getConnection(), + ), r.id, ), ) @@ -4395,12 +3549,12 @@ export class EnumValueTypeDef extends BaseClient { * Constructor is used for internal usage only, do not create object from it. */ constructor( - parent?: { queryTree?: QueryTree[]; ctx: Context }, + ctx?: Context, _id?: EnumValueTypeDefID, _description?: string, _name?: string, ) { - super(parent) + super(ctx) this._id = _id this._description = _description @@ -4415,15 +3569,9 @@ export class EnumValueTypeDef extends BaseClient { return this._id } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("id") + + const response: Awaited = await ctx.execute() return response } @@ -4436,15 +3584,9 @@ export class EnumValueTypeDef extends BaseClient { return this._description } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "description", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("description") + + const response: Awaited = await ctx.execute() return response } @@ -4457,15 +3599,9 @@ export class EnumValueTypeDef extends BaseClient { return this._name } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "name", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("name") + + const response: Awaited = await ctx.execute() return response } @@ -4474,15 +3610,8 @@ export class EnumValueTypeDef extends BaseClient { * The location of this enum value declaration. */ sourceMap = (): SourceMap => { - return new SourceMap({ - queryTree: [ - ...this._queryTree, - { - operation: "sourceMap", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("sourceMap") + return new SourceMap(ctx) } } @@ -4498,12 +3627,12 @@ export class EnvVariable extends BaseClient { * Constructor is used for internal usage only, do not create object from it. */ constructor( - parent?: { queryTree?: QueryTree[]; ctx: Context }, + ctx?: Context, _id?: EnvVariableID, _name?: string, _value?: string, ) { - super(parent) + super(ctx) this._id = _id this._name = _name @@ -4518,15 +3647,9 @@ export class EnvVariable extends BaseClient { return this._id } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("id") + + const response: Awaited = await ctx.execute() return response } @@ -4539,15 +3662,9 @@ export class EnvVariable extends BaseClient { return this._name } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "name", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("name") + + const response: Awaited = await ctx.execute() return response } @@ -4560,15 +3677,9 @@ export class EnvVariable extends BaseClient { return this._value } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "value", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("value") + + const response: Awaited = await ctx.execute() return response } @@ -4581,12 +3692,8 @@ export class Error extends BaseClient { /** * Constructor is used for internal usage only, do not create object from it. */ - constructor( - parent?: { queryTree?: QueryTree[]; ctx: Context }, - _id?: ErrorID, - _message?: string, - ) { - super(parent) + constructor(ctx?: Context, _id?: ErrorID, _message?: string) { + super(ctx) this._id = _id this._message = _message @@ -4600,15 +3707,9 @@ export class Error extends BaseClient { return this._id } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("id") + + const response: Awaited = await ctx.execute() return response } @@ -4621,15 +3722,9 @@ export class Error extends BaseClient { return this._message } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "message", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("message") + + const response: Awaited = await ctx.execute() return response } @@ -4649,12 +3744,12 @@ export class FieldTypeDef extends BaseClient { * Constructor is used for internal usage only, do not create object from it. */ constructor( - parent?: { queryTree?: QueryTree[]; ctx: Context }, + ctx?: Context, _id?: FieldTypeDefID, _description?: string, _name?: string, ) { - super(parent) + super(ctx) this._id = _id this._description = _description @@ -4669,15 +3764,9 @@ export class FieldTypeDef extends BaseClient { return this._id } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("id") + + const response: Awaited = await ctx.execute() return response } @@ -4690,15 +3779,9 @@ export class FieldTypeDef extends BaseClient { return this._description } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "description", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("description") + + const response: Awaited = await ctx.execute() return response } @@ -4711,15 +3794,9 @@ export class FieldTypeDef extends BaseClient { return this._name } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "name", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("name") + + const response: Awaited = await ctx.execute() return response } @@ -4728,30 +3805,16 @@ export class FieldTypeDef extends BaseClient { * The location of this field declaration. */ sourceMap = (): SourceMap => { - return new SourceMap({ - queryTree: [ - ...this._queryTree, - { - operation: "sourceMap", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("sourceMap") + return new SourceMap(ctx) } /** * The type of the field. */ typeDef = (): TypeDef => { - return new TypeDef({ - queryTree: [ - ...this._queryTree, - { - operation: "typeDef", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("typeDef") + return new TypeDef(ctx) } } @@ -4771,7 +3834,7 @@ export class File extends BaseClient { * Constructor is used for internal usage only, do not create object from it. */ constructor( - parent?: { queryTree?: QueryTree[]; ctx: Context }, + ctx?: Context, _id?: FileID, _contents?: string, _digest?: string, @@ -4780,7 +3843,7 @@ export class File extends BaseClient { _size?: number, _sync?: FileID, ) { - super(parent) + super(ctx) this._id = _id this._contents = _contents @@ -4799,15 +3862,9 @@ export class File extends BaseClient { return this._id } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("id") + + const response: Awaited = await ctx.execute() return response } @@ -4820,15 +3877,9 @@ export class File extends BaseClient { return this._contents } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "contents", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("contents") + + const response: Awaited = await ctx.execute() return response } @@ -4842,16 +3893,9 @@ export class File extends BaseClient { return this._digest } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "digest", - args: { ...opts }, - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("digest", { ...opts }) + + const response: Awaited = await ctx.execute() return response } @@ -4866,16 +3910,9 @@ export class File extends BaseClient { return this._export } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "export", - args: { path, ...opts }, - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("export", { path, ...opts }) + + const response: Awaited = await ctx.execute() return response } @@ -4888,15 +3925,9 @@ export class File extends BaseClient { return this._name } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "name", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("name") + + const response: Awaited = await ctx.execute() return response } @@ -4909,15 +3940,9 @@ export class File extends BaseClient { return this._size } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "size", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("size") + + const response: Awaited = await ctx.execute() return response } @@ -4926,25 +3951,21 @@ export class File extends BaseClient { * Force evaluation in the engine. */ sync = async (): Promise => { - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "sync", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("sync") - return new File({ - queryTree: [ - { - operation: "loadFileFromID", - args: { id: response }, - }, - ], - ctx: this._ctx, - }) + const response: Awaited = await ctx.execute() + + return new File( + new Context( + [ + { + operation: "loadFileFromID", + args: { id: response }, + }, + ], + this._ctx.getConnection(), + ), + ) } /** @@ -4952,16 +3973,8 @@ export class File extends BaseClient { * @param name Name to set file to. */ withName = (name: string): File => { - return new File({ - queryTree: [ - ...this._queryTree, - { - operation: "withName", - args: { name }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withName", { name }) + return new File(ctx) } /** @@ -4971,16 +3984,8 @@ export class File extends BaseClient { * Formatted in seconds following Unix epoch (e.g., 1672531199). */ withTimestamps = (timestamp: number): File => { - return new File({ - queryTree: [ - ...this._queryTree, - { - operation: "withTimestamps", - args: { timestamp }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withTimestamps", { timestamp }) + return new File(ctx) } /** @@ -5007,12 +4012,12 @@ export class Function_ extends BaseClient { * Constructor is used for internal usage only, do not create object from it. */ constructor( - parent?: { queryTree?: QueryTree[]; ctx: Context }, + ctx?: Context, _id?: FunctionID, _description?: string, _name?: string, ) { - super(parent) + super(ctx) this._id = _id this._description = _description @@ -5027,15 +4032,9 @@ export class Function_ extends BaseClient { return this._id } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("id") + + const response: Awaited = await ctx.execute() return response } @@ -5048,31 +4047,22 @@ export class Function_ extends BaseClient { id: FunctionArgID } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "args", - }, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("args").select("id") + + const response: Awaited = await ctx.execute() return response.map( (r) => new FunctionArg( - { - queryTree: [ + new Context( + [ { operation: "loadFunctionArgFromID", args: { id: r.id }, }, ], - ctx: this._ctx, - }, + this._ctx.getConnection(), + ), r.id, ), ) @@ -5086,15 +4076,9 @@ export class Function_ extends BaseClient { return this._description } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "description", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("description") + + const response: Awaited = await ctx.execute() return response } @@ -5107,15 +4091,9 @@ export class Function_ extends BaseClient { return this._name } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "name", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("name") + + const response: Awaited = await ctx.execute() return response } @@ -5124,30 +4102,16 @@ export class Function_ extends BaseClient { * The type returned by the function. */ returnType = (): TypeDef => { - return new TypeDef({ - queryTree: [ - ...this._queryTree, - { - operation: "returnType", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("returnType") + return new TypeDef(ctx) } /** * The location of this function declaration. */ sourceMap = (): SourceMap => { - return new SourceMap({ - queryTree: [ - ...this._queryTree, - { - operation: "sourceMap", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("sourceMap") + return new SourceMap(ctx) } /** @@ -5164,16 +4128,8 @@ export class Function_ extends BaseClient { typeDef: TypeDef, opts?: FunctionWithArgOpts, ): Function_ => { - return new Function_({ - queryTree: [ - ...this._queryTree, - { - operation: "withArg", - args: { name, typeDef, ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withArg", { name, typeDef, ...opts }) + return new Function_(ctx) } /** @@ -5181,16 +4137,8 @@ export class Function_ extends BaseClient { * @param description The doc string to set. */ withDescription = (description: string): Function_ => { - return new Function_({ - queryTree: [ - ...this._queryTree, - { - operation: "withDescription", - args: { description }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withDescription", { description }) + return new Function_(ctx) } /** @@ -5198,16 +4146,8 @@ export class Function_ extends BaseClient { * @param sourceMap The source map for the function definition. */ withSourceMap = (sourceMap: SourceMap): Function_ => { - return new Function_({ - queryTree: [ - ...this._queryTree, - { - operation: "withSourceMap", - args: { sourceMap }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withSourceMap", { sourceMap }) + return new Function_(ctx) } /** @@ -5236,14 +4176,14 @@ export class FunctionArg extends BaseClient { * Constructor is used for internal usage only, do not create object from it. */ constructor( - parent?: { queryTree?: QueryTree[]; ctx: Context }, + ctx?: Context, _id?: FunctionArgID, _defaultPath?: string, _defaultValue?: JSON, _description?: string, _name?: string, ) { - super(parent) + super(ctx) this._id = _id this._defaultPath = _defaultPath @@ -5260,15 +4200,9 @@ export class FunctionArg extends BaseClient { return this._id } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("id") + + const response: Awaited = await ctx.execute() return response } @@ -5281,15 +4215,9 @@ export class FunctionArg extends BaseClient { return this._defaultPath } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "defaultPath", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("defaultPath") + + const response: Awaited = await ctx.execute() return response } @@ -5302,15 +4230,9 @@ export class FunctionArg extends BaseClient { return this._defaultValue } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "defaultValue", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("defaultValue") + + const response: Awaited = await ctx.execute() return response } @@ -5323,15 +4245,9 @@ export class FunctionArg extends BaseClient { return this._description } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "description", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("description") + + const response: Awaited = await ctx.execute() return response } @@ -5340,15 +4256,9 @@ export class FunctionArg extends BaseClient { * Only applies to arguments of type Directory. The ignore patterns are applied to the input directory, and matching entries are filtered out, in a cache-efficient manner. */ ignore = async (): Promise => { - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "ignore", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("ignore") + + const response: Awaited = await ctx.execute() return response } @@ -5361,15 +4271,9 @@ export class FunctionArg extends BaseClient { return this._name } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "name", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("name") + + const response: Awaited = await ctx.execute() return response } @@ -5378,30 +4282,16 @@ export class FunctionArg extends BaseClient { * The location of this arg declaration. */ sourceMap = (): SourceMap => { - return new SourceMap({ - queryTree: [ - ...this._queryTree, - { - operation: "sourceMap", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("sourceMap") + return new SourceMap(ctx) } /** * The type of the argument. */ typeDef = (): TypeDef => { - return new TypeDef({ - queryTree: [ - ...this._queryTree, - { - operation: "typeDef", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("typeDef") + return new TypeDef(ctx) } } @@ -5420,7 +4310,7 @@ export class FunctionCall extends BaseClient { * Constructor is used for internal usage only, do not create object from it. */ constructor( - parent?: { queryTree?: QueryTree[]; ctx: Context }, + ctx?: Context, _id?: FunctionCallID, _name?: string, _parent?: JSON, @@ -5428,7 +4318,7 @@ export class FunctionCall extends BaseClient { _returnError?: Void, _returnValue?: Void, ) { - super(parent) + super(ctx) this._id = _id this._name = _name @@ -5446,15 +4336,9 @@ export class FunctionCall extends BaseClient { return this._id } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("id") + + const response: Awaited = await ctx.execute() return response } @@ -5467,31 +4351,22 @@ export class FunctionCall extends BaseClient { id: FunctionCallArgValueID } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "inputArgs", - }, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("inputArgs").select("id") + + const response: Awaited = await ctx.execute() return response.map( (r) => new FunctionCallArgValue( - { - queryTree: [ + new Context( + [ { operation: "loadFunctionCallArgValueFromID", args: { id: r.id }, }, ], - ctx: this._ctx, - }, + this._ctx.getConnection(), + ), r.id, ), ) @@ -5505,15 +4380,9 @@ export class FunctionCall extends BaseClient { return this._name } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "name", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("name") + + const response: Awaited = await ctx.execute() return response } @@ -5526,15 +4395,9 @@ export class FunctionCall extends BaseClient { return this._parent } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "parent", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("parent") + + const response: Awaited = await ctx.execute() return response } @@ -5547,15 +4410,9 @@ export class FunctionCall extends BaseClient { return this._parentName } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "parentName", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("parentName") + + const response: Awaited = await ctx.execute() return response } @@ -5569,16 +4426,9 @@ export class FunctionCall extends BaseClient { return } - await computeQuery( - [ - ...this._queryTree, - { - operation: "returnError", - args: { error }, - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("returnError", { error }) + + await ctx.execute() } /** @@ -5590,16 +4440,9 @@ export class FunctionCall extends BaseClient { return } - await computeQuery( - [ - ...this._queryTree, - { - operation: "returnValue", - args: { value }, - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("returnValue", { value }) + + await ctx.execute() } } @@ -5615,12 +4458,12 @@ export class FunctionCallArgValue extends BaseClient { * Constructor is used for internal usage only, do not create object from it. */ constructor( - parent?: { queryTree?: QueryTree[]; ctx: Context }, + ctx?: Context, _id?: FunctionCallArgValueID, _name?: string, _value?: JSON, ) { - super(parent) + super(ctx) this._id = _id this._name = _name @@ -5635,15 +4478,9 @@ export class FunctionCallArgValue extends BaseClient { return this._id } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("id") + + const response: Awaited = await ctx.execute() return response } @@ -5656,15 +4493,9 @@ export class FunctionCallArgValue extends BaseClient { return this._name } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "name", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("name") + + const response: Awaited = await ctx.execute() return response } @@ -5677,15 +4508,9 @@ export class FunctionCallArgValue extends BaseClient { return this._value } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "value", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("value") + + const response: Awaited = await ctx.execute() return response } @@ -5700,11 +4525,8 @@ export class GeneratedCode extends BaseClient { /** * Constructor is used for internal usage only, do not create object from it. */ - constructor( - parent?: { queryTree?: QueryTree[]; ctx: Context }, - _id?: GeneratedCodeID, - ) { - super(parent) + constructor(ctx?: Context, _id?: GeneratedCodeID) { + super(ctx) this._id = _id } @@ -5717,15 +4539,9 @@ export class GeneratedCode extends BaseClient { return this._id } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("id") + + const response: Awaited = await ctx.execute() return response } @@ -5734,30 +4550,17 @@ export class GeneratedCode extends BaseClient { * The directory containing the generated code. */ code = (): Directory => { - return new Directory({ - queryTree: [ - ...this._queryTree, - { - operation: "code", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("code") + return new Directory(ctx) } /** * List of paths to mark generated in version control (i.e. .gitattributes). */ vcsGeneratedPaths = async (): Promise => { - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "vcsGeneratedPaths", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("vcsGeneratedPaths") + + const response: Awaited = await ctx.execute() return response } @@ -5766,15 +4569,9 @@ export class GeneratedCode extends BaseClient { * List of paths to ignore in version control (i.e. .gitignore). */ vcsIgnoredPaths = async (): Promise => { - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "vcsIgnoredPaths", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("vcsIgnoredPaths") + + const response: Awaited = await ctx.execute() return response } @@ -5783,32 +4580,16 @@ export class GeneratedCode extends BaseClient { * Set the list of paths to mark generated in version control. */ withVCSGeneratedPaths = (paths: string[]): GeneratedCode => { - return new GeneratedCode({ - queryTree: [ - ...this._queryTree, - { - operation: "withVCSGeneratedPaths", - args: { paths }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withVCSGeneratedPaths", { paths }) + return new GeneratedCode(ctx) } /** * Set the list of paths to ignore in version control. */ withVCSIgnoredPaths = (paths: string[]): GeneratedCode => { - return new GeneratedCode({ - queryTree: [ - ...this._queryTree, - { - operation: "withVCSIgnoredPaths", - args: { paths }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withVCSIgnoredPaths", { paths }) + return new GeneratedCode(ctx) } /** @@ -5838,7 +4619,7 @@ export class GitModuleSource extends BaseClient { * Constructor is used for internal usage only, do not create object from it. */ constructor( - parent?: { queryTree?: QueryTree[]; ctx: Context }, + ctx?: Context, _id?: GitModuleSourceID, _cloneRef?: string, _commit?: string, @@ -5848,7 +4629,7 @@ export class GitModuleSource extends BaseClient { _rootSubpath?: string, _version?: string, ) { - super(parent) + super(ctx) this._id = _id this._cloneRef = _cloneRef @@ -5868,15 +4649,9 @@ export class GitModuleSource extends BaseClient { return this._id } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("id") + + const response: Awaited = await ctx.execute() return response } @@ -5889,15 +4664,9 @@ export class GitModuleSource extends BaseClient { return this._cloneRef } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "cloneRef", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("cloneRef") + + const response: Awaited = await ctx.execute() return response } @@ -5910,15 +4679,9 @@ export class GitModuleSource extends BaseClient { return this._commit } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "commit", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("commit") + + const response: Awaited = await ctx.execute() return response } @@ -5927,15 +4690,8 @@ export class GitModuleSource extends BaseClient { * The directory containing everything needed to load load and use the module. */ contextDirectory = (): Directory => { - return new Directory({ - queryTree: [ - ...this._queryTree, - { - operation: "contextDirectory", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("contextDirectory") + return new Directory(ctx) } /** @@ -5946,15 +4702,9 @@ export class GitModuleSource extends BaseClient { return this._htmlRepoURL } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "htmlRepoURL", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("htmlRepoURL") + + const response: Awaited = await ctx.execute() return response } @@ -5967,15 +4717,9 @@ export class GitModuleSource extends BaseClient { return this._htmlURL } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "htmlURL", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("htmlURL") + + const response: Awaited = await ctx.execute() return response } @@ -5988,15 +4732,9 @@ export class GitModuleSource extends BaseClient { return this._root } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "root", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("root") + + const response: Awaited = await ctx.execute() return response } @@ -6009,15 +4747,9 @@ export class GitModuleSource extends BaseClient { return this._rootSubpath } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "rootSubpath", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("rootSubpath") + + const response: Awaited = await ctx.execute() return response } @@ -6030,15 +4762,9 @@ export class GitModuleSource extends BaseClient { return this._version } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "version", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("version") + + const response: Awaited = await ctx.execute() return response } @@ -6054,12 +4780,8 @@ export class GitRef extends BaseClient { /** * Constructor is used for internal usage only, do not create object from it. */ - constructor( - parent?: { queryTree?: QueryTree[]; ctx: Context }, - _id?: GitRefID, - _commit?: string, - ) { - super(parent) + constructor(ctx?: Context, _id?: GitRefID, _commit?: string) { + super(ctx) this._id = _id this._commit = _commit @@ -6073,15 +4795,9 @@ export class GitRef extends BaseClient { return this._id } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("id") + + const response: Awaited = await ctx.execute() return response } @@ -6094,15 +4810,9 @@ export class GitRef extends BaseClient { return this._commit } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "commit", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("commit") + + const response: Awaited = await ctx.execute() return response } @@ -6112,16 +4822,8 @@ export class GitRef extends BaseClient { * @param opts.discardGitDir Set to true to discard .git directory. */ tree = (opts?: GitRefTreeOpts): Directory => { - return new Directory({ - queryTree: [ - ...this._queryTree, - { - operation: "tree", - args: { ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("tree", { ...opts }) + return new Directory(ctx) } } @@ -6134,11 +4836,8 @@ export class GitRepository extends BaseClient { /** * Constructor is used for internal usage only, do not create object from it. */ - constructor( - parent?: { queryTree?: QueryTree[]; ctx: Context }, - _id?: GitRepositoryID, - ) { - super(parent) + constructor(ctx?: Context, _id?: GitRepositoryID) { + super(ctx) this._id = _id } @@ -6151,15 +4850,9 @@ export class GitRepository extends BaseClient { return this._id } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("id") + + const response: Awaited = await ctx.execute() return response } @@ -6169,16 +4862,8 @@ export class GitRepository extends BaseClient { * @param name Branch's name (e.g., "main"). */ branch = (name: string): GitRef => { - return new GitRef({ - queryTree: [ - ...this._queryTree, - { - operation: "branch", - args: { name }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("branch", { name }) + return new GitRef(ctx) } /** @@ -6186,31 +4871,16 @@ export class GitRepository extends BaseClient { * @param id Identifier of the commit (e.g., "b6315d8f2810962c601af73f86831f6866ea798b"). */ commit = (id: string): GitRef => { - return new GitRef({ - queryTree: [ - ...this._queryTree, - { - operation: "commit", - args: { id }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("commit", { id }) + return new GitRef(ctx) } /** * Returns details for HEAD. */ head = (): GitRef => { - return new GitRef({ - queryTree: [ - ...this._queryTree, - { - operation: "head", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("head") + return new GitRef(ctx) } /** @@ -6218,16 +4888,8 @@ export class GitRepository extends BaseClient { * @param name Ref's name (can be a commit identifier, a tag name, a branch name, or a fully-qualified ref). */ ref = (name: string): GitRef => { - return new GitRef({ - queryTree: [ - ...this._queryTree, - { - operation: "ref", - args: { name }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("ref", { name }) + return new GitRef(ctx) } /** @@ -6235,16 +4897,8 @@ export class GitRepository extends BaseClient { * @param name Tag's name (e.g., "v0.3.9"). */ tag = (name: string): GitRef => { - return new GitRef({ - queryTree: [ - ...this._queryTree, - { - operation: "tag", - args: { name }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("tag", { name }) + return new GitRef(ctx) } /** @@ -6252,16 +4906,9 @@ export class GitRepository extends BaseClient { * @param opts.patterns Glob patterns (e.g., "refs/tags/v*"). */ tags = async (opts?: GitRepositoryTagsOpts): Promise => { - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "tags", - args: { ...opts }, - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("tags", { ...opts }) + + const response: Awaited = await ctx.execute() return response } @@ -6271,16 +4918,8 @@ export class GitRepository extends BaseClient { * @param header Secret used to populate the Authorization HTTP header */ withAuthHeader = (header: Secret): GitRepository => { - return new GitRepository({ - queryTree: [ - ...this._queryTree, - { - operation: "withAuthHeader", - args: { header }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withAuthHeader", { header }) + return new GitRepository(ctx) } /** @@ -6288,16 +4927,8 @@ export class GitRepository extends BaseClient { * @param token Secret used to populate the password during basic HTTP Authorization */ withAuthToken = (token: Secret): GitRepository => { - return new GitRepository({ - queryTree: [ - ...this._queryTree, - { - operation: "withAuthToken", - args: { token }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withAuthToken", { token }) + return new GitRepository(ctx) } /** @@ -6319,11 +4950,8 @@ export class Host extends BaseClient { /** * Constructor is used for internal usage only, do not create object from it. */ - constructor( - parent?: { queryTree?: QueryTree[]; ctx: Context }, - _id?: HostID, - ) { - super(parent) + constructor(ctx?: Context, _id?: HostID) { + super(ctx) this._id = _id } @@ -6336,15 +4964,9 @@ export class Host extends BaseClient { return this._id } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("id") + + const response: Awaited = await ctx.execute() return response } @@ -6356,16 +4978,8 @@ export class Host extends BaseClient { * @param opts.include Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]). */ directory = (path: string, opts?: HostDirectoryOpts): Directory => { - return new Directory({ - queryTree: [ - ...this._queryTree, - { - operation: "directory", - args: { path, ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("directory", { path, ...opts }) + return new Directory(ctx) } /** @@ -6373,16 +4987,8 @@ export class Host extends BaseClient { * @param path Location of the file to retrieve (e.g., "README.md"). */ file = (path: string): File => { - return new File({ - queryTree: [ - ...this._queryTree, - { - operation: "file", - args: { path }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("file", { path }) + return new File(ctx) } /** @@ -6395,16 +5001,8 @@ export class Host extends BaseClient { * An empty set of ports is not valid; an error will be returned. */ service = (opts?: HostServiceOpts): Service => { - return new Service({ - queryTree: [ - ...this._queryTree, - { - operation: "service", - args: { ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("service", { ...opts }) + return new Service(ctx) } /** @@ -6415,16 +5013,8 @@ export class Host extends BaseClient { * @param path Location of the file to set as a secret. */ setSecretFile = (name: string, path: string): Secret => { - return new Secret({ - queryTree: [ - ...this._queryTree, - { - operation: "setSecretFile", - args: { name, path }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("setSecretFile", { name, path }) + return new Secret(ctx) } /** @@ -6442,16 +5032,8 @@ export class Host extends BaseClient { * Note: enabling may result in port conflicts. */ tunnel = (service: Service, opts?: HostTunnelOpts): Service => { - return new Service({ - queryTree: [ - ...this._queryTree, - { - operation: "tunnel", - args: { service, ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("tunnel", { service, ...opts }) + return new Service(ctx) } /** @@ -6459,16 +5041,8 @@ export class Host extends BaseClient { * @param path Location of the Unix socket (e.g., "/var/run/docker.sock"). */ unixSocket = (path: string): Socket => { - return new Socket({ - queryTree: [ - ...this._queryTree, - { - operation: "unixSocket", - args: { path }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("unixSocket", { path }) + return new Socket(ctx) } } @@ -6485,12 +5059,8 @@ export class InputTypeDef extends BaseClient { /** * Constructor is used for internal usage only, do not create object from it. */ - constructor( - parent?: { queryTree?: QueryTree[]; ctx: Context }, - _id?: InputTypeDefID, - _name?: string, - ) { - super(parent) + constructor(ctx?: Context, _id?: InputTypeDefID, _name?: string) { + super(ctx) this._id = _id this._name = _name @@ -6504,15 +5074,9 @@ export class InputTypeDef extends BaseClient { return this._id } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("id") + + const response: Awaited = await ctx.execute() return response } @@ -6525,31 +5089,22 @@ export class InputTypeDef extends BaseClient { id: FieldTypeDefID } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "fields", - }, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("fields").select("id") + + const response: Awaited = await ctx.execute() return response.map( (r) => new FieldTypeDef( - { - queryTree: [ + new Context( + [ { operation: "loadFieldTypeDefFromID", args: { id: r.id }, }, ], - ctx: this._ctx, - }, + this._ctx.getConnection(), + ), r.id, ), ) @@ -6563,15 +5118,9 @@ export class InputTypeDef extends BaseClient { return this._name } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "name", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("name") + + const response: Awaited = await ctx.execute() return response } @@ -6590,13 +5139,13 @@ export class InterfaceTypeDef extends BaseClient { * Constructor is used for internal usage only, do not create object from it. */ constructor( - parent?: { queryTree?: QueryTree[]; ctx: Context }, + ctx?: Context, _id?: InterfaceTypeDefID, _description?: string, _name?: string, _sourceModuleName?: string, ) { - super(parent) + super(ctx) this._id = _id this._description = _description @@ -6612,15 +5161,9 @@ export class InterfaceTypeDef extends BaseClient { return this._id } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("id") + + const response: Awaited = await ctx.execute() return response } @@ -6633,15 +5176,9 @@ export class InterfaceTypeDef extends BaseClient { return this._description } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "description", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("description") + + const response: Awaited = await ctx.execute() return response } @@ -6654,31 +5191,22 @@ export class InterfaceTypeDef extends BaseClient { id: FunctionID } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "functions", - }, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("functions").select("id") + + const response: Awaited = await ctx.execute() return response.map( (r) => new Function_( - { - queryTree: [ + new Context( + [ { operation: "loadFunction_FromID", args: { id: r.id }, }, ], - ctx: this._ctx, - }, + this._ctx.getConnection(), + ), r.id, ), ) @@ -6692,15 +5220,9 @@ export class InterfaceTypeDef extends BaseClient { return this._name } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "name", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("name") + + const response: Awaited = await ctx.execute() return response } @@ -6709,15 +5231,8 @@ export class InterfaceTypeDef extends BaseClient { * The location of this interface declaration. */ sourceMap = (): SourceMap => { - return new SourceMap({ - queryTree: [ - ...this._queryTree, - { - operation: "sourceMap", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("sourceMap") + return new SourceMap(ctx) } /** @@ -6728,15 +5243,9 @@ export class InterfaceTypeDef extends BaseClient { return this._sourceModuleName } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "sourceModuleName", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("sourceModuleName") + + const response: Awaited = await ctx.execute() return response } @@ -6753,13 +5262,8 @@ export class Label extends BaseClient { /** * Constructor is used for internal usage only, do not create object from it. */ - constructor( - parent?: { queryTree?: QueryTree[]; ctx: Context }, - _id?: LabelID, - _name?: string, - _value?: string, - ) { - super(parent) + constructor(ctx?: Context, _id?: LabelID, _name?: string, _value?: string) { + super(ctx) this._id = _id this._name = _name @@ -6774,15 +5278,9 @@ export class Label extends BaseClient { return this._id } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("id") + + const response: Awaited = await ctx.execute() return response } @@ -6795,15 +5293,9 @@ export class Label extends BaseClient { return this._name } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "name", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("name") + + const response: Awaited = await ctx.execute() return response } @@ -6816,15 +5308,9 @@ export class Label extends BaseClient { return this._value } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "value", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("value") + + const response: Awaited = await ctx.execute() return response } @@ -6839,11 +5325,8 @@ export class ListTypeDef extends BaseClient { /** * Constructor is used for internal usage only, do not create object from it. */ - constructor( - parent?: { queryTree?: QueryTree[]; ctx: Context }, - _id?: ListTypeDefID, - ) { - super(parent) + constructor(ctx?: Context, _id?: ListTypeDefID) { + super(ctx) this._id = _id } @@ -6856,15 +5339,9 @@ export class ListTypeDef extends BaseClient { return this._id } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("id") + + const response: Awaited = await ctx.execute() return response } @@ -6873,15 +5350,8 @@ export class ListTypeDef extends BaseClient { * The type of the elements in the list. */ elementTypeDef = (): TypeDef => { - return new TypeDef({ - queryTree: [ - ...this._queryTree, - { - operation: "elementTypeDef", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("elementTypeDef") + return new TypeDef(ctx) } } @@ -6897,12 +5367,12 @@ export class LocalModuleSource extends BaseClient { * Constructor is used for internal usage only, do not create object from it. */ constructor( - parent?: { queryTree?: QueryTree[]; ctx: Context }, + ctx?: Context, _id?: LocalModuleSourceID, _relHostPath?: string, _rootSubpath?: string, ) { - super(parent) + super(ctx) this._id = _id this._relHostPath = _relHostPath @@ -6917,15 +5387,9 @@ export class LocalModuleSource extends BaseClient { return this._id } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("id") + + const response: Awaited = await ctx.execute() return response } @@ -6934,15 +5398,8 @@ export class LocalModuleSource extends BaseClient { * The directory containing everything needed to load load and use the module. */ contextDirectory = (): Directory => { - return new Directory({ - queryTree: [ - ...this._queryTree, - { - operation: "contextDirectory", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("contextDirectory") + return new Directory(ctx) } /** @@ -6953,15 +5410,9 @@ export class LocalModuleSource extends BaseClient { return this._relHostPath } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "relHostPath", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("relHostPath") + + const response: Awaited = await ctx.execute() return response } @@ -6974,15 +5425,9 @@ export class LocalModuleSource extends BaseClient { return this._rootSubpath } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "rootSubpath", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("rootSubpath") + + const response: Awaited = await ctx.execute() return response } @@ -7002,14 +5447,14 @@ export class Module_ extends BaseClient { * Constructor is used for internal usage only, do not create object from it. */ constructor( - parent?: { queryTree?: QueryTree[]; ctx: Context }, + ctx?: Context, _id?: ModuleID, _description?: string, _name?: string, _sdk?: string, _serve?: Void, ) { - super(parent) + super(ctx) this._id = _id this._description = _description @@ -7026,15 +5471,9 @@ export class Module_ extends BaseClient { return this._id } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("id") + + const response: Awaited = await ctx.execute() return response } @@ -7047,31 +5486,22 @@ export class Module_ extends BaseClient { id: ModuleID } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "dependencies", - }, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("dependencies").select("id") + + const response: Awaited = await ctx.execute() return response.map( (r) => new Module_( - { - queryTree: [ + new Context( + [ { operation: "loadModule_FromID", args: { id: r.id }, }, ], - ctx: this._ctx, - }, + this._ctx.getConnection(), + ), r.id, ), ) @@ -7085,31 +5515,22 @@ export class Module_ extends BaseClient { id: ModuleDependencyID } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "dependencyConfig", - }, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("dependencyConfig").select("id") + + const response: Awaited = await ctx.execute() return response.map( (r) => new ModuleDependency( - { - queryTree: [ + new Context( + [ { operation: "loadModuleDependencyFromID", args: { id: r.id }, }, ], - ctx: this._ctx, - }, + this._ctx.getConnection(), + ), r.id, ), ) @@ -7123,15 +5544,9 @@ export class Module_ extends BaseClient { return this._description } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "description", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("description") + + const response: Awaited = await ctx.execute() return response } @@ -7144,31 +5559,22 @@ export class Module_ extends BaseClient { id: TypeDefID } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "enums", - }, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("enums").select("id") + + const response: Awaited = await ctx.execute() return response.map( (r) => new TypeDef( - { - queryTree: [ + new Context( + [ { operation: "loadTypeDefFromID", args: { id: r.id }, }, ], - ctx: this._ctx, - }, + this._ctx.getConnection(), + ), r.id, ), ) @@ -7178,45 +5584,24 @@ export class Module_ extends BaseClient { * The generated files and directories made on top of the module source's context directory. */ generatedContextDiff = (): Directory => { - return new Directory({ - queryTree: [ - ...this._queryTree, - { - operation: "generatedContextDiff", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("generatedContextDiff") + return new Directory(ctx) } /** * The module source's context plus any configuration and source files created by codegen. */ generatedContextDirectory = (): Directory => { - return new Directory({ - queryTree: [ - ...this._queryTree, - { - operation: "generatedContextDirectory", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("generatedContextDirectory") + return new Directory(ctx) } /** * Retrieves the module with the objects loaded via its SDK. */ initialize = (): Module_ => { - return new Module_({ - queryTree: [ - ...this._queryTree, - { - operation: "initialize", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("initialize") + return new Module_(ctx) } /** @@ -7227,31 +5612,22 @@ export class Module_ extends BaseClient { id: TypeDefID } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "interfaces", - }, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("interfaces").select("id") + + const response: Awaited = await ctx.execute() return response.map( (r) => new TypeDef( - { - queryTree: [ + new Context( + [ { operation: "loadTypeDefFromID", args: { id: r.id }, }, ], - ctx: this._ctx, - }, + this._ctx.getConnection(), + ), r.id, ), ) @@ -7265,15 +5641,9 @@ export class Module_ extends BaseClient { return this._name } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "name", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("name") + + const response: Awaited = await ctx.execute() return response } @@ -7286,31 +5656,22 @@ export class Module_ extends BaseClient { id: TypeDefID } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "objects", - }, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("objects").select("id") + + const response: Awaited = await ctx.execute() return response.map( (r) => new TypeDef( - { - queryTree: [ + new Context( + [ { operation: "loadTypeDefFromID", args: { id: r.id }, }, ], - ctx: this._ctx, - }, + this._ctx.getConnection(), + ), r.id, ), ) @@ -7320,15 +5681,8 @@ export class Module_ extends BaseClient { * The container that runs the module's entrypoint. It will fail to execute if the module doesn't compile. */ runtime = (): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "runtime", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("runtime") + return new Container(ctx) } /** @@ -7339,15 +5693,9 @@ export class Module_ extends BaseClient { return this._sdk } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "sdk", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("sdk") + + const response: Awaited = await ctx.execute() return response } @@ -7362,30 +5710,17 @@ export class Module_ extends BaseClient { return } - await computeQuery( - [ - ...this._queryTree, - { - operation: "serve", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("serve") + + await ctx.execute() } /** * The source for the module. */ source = (): ModuleSource => { - return new ModuleSource({ - queryTree: [ - ...this._queryTree, - { - operation: "source", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("source") + return new ModuleSource(ctx) } /** @@ -7393,66 +5728,34 @@ export class Module_ extends BaseClient { * @param description The description to set */ withDescription = (description: string): Module_ => { - return new Module_({ - queryTree: [ - ...this._queryTree, - { - operation: "withDescription", - args: { description }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withDescription", { description }) + return new Module_(ctx) } /** * This module plus the given Enum type and associated values */ withEnum = (enum_: TypeDef): Module_ => { - return new Module_({ - queryTree: [ - ...this._queryTree, - { - operation: "withEnum", - args: { - enum: enum_, - }, - }, - ], - ctx: this._ctx, + const ctx = this._ctx.select("withEnum", { + enum: enum_, }) + return new Module_(ctx) } /** * This module plus the given Interface type and associated functions */ withInterface = (iface: TypeDef): Module_ => { - return new Module_({ - queryTree: [ - ...this._queryTree, - { - operation: "withInterface", - args: { iface }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withInterface", { iface }) + return new Module_(ctx) } /** * This module plus the given Object type and associated functions. */ withObject = (object: TypeDef): Module_ => { - return new Module_({ - queryTree: [ - ...this._queryTree, - { - operation: "withObject", - args: { object }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withObject", { object }) + return new Module_(ctx) } /** @@ -7461,16 +5764,8 @@ export class Module_ extends BaseClient { * @param opts.engineVersion The engine version to upgrade to. */ withSource = (source: ModuleSource, opts?: ModuleWithSourceOpts): Module_ => { - return new Module_({ - queryTree: [ - ...this._queryTree, - { - operation: "withSource", - args: { source, ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withSource", { source, ...opts }) + return new Module_(ctx) } /** @@ -7493,12 +5788,8 @@ export class ModuleDependency extends BaseClient { /** * Constructor is used for internal usage only, do not create object from it. */ - constructor( - parent?: { queryTree?: QueryTree[]; ctx: Context }, - _id?: ModuleDependencyID, - _name?: string, - ) { - super(parent) + constructor(ctx?: Context, _id?: ModuleDependencyID, _name?: string) { + super(ctx) this._id = _id this._name = _name @@ -7512,15 +5803,9 @@ export class ModuleDependency extends BaseClient { return this._id } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("id") + + const response: Awaited = await ctx.execute() return response } @@ -7533,15 +5818,9 @@ export class ModuleDependency extends BaseClient { return this._name } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "name", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("name") + + const response: Awaited = await ctx.execute() return response } @@ -7550,15 +5829,8 @@ export class ModuleDependency extends BaseClient { * The source for the dependency module. */ source = (): ModuleSource => { - return new ModuleSource({ - queryTree: [ - ...this._queryTree, - { - operation: "source", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("source") + return new ModuleSource(ctx) } } @@ -7573,6 +5845,7 @@ export class ModuleSource extends BaseClient { private readonly _kind?: ModuleSourceKind = undefined private readonly _moduleName?: string = undefined private readonly _moduleOriginalName?: string = undefined + private readonly _pin?: string = undefined private readonly _resolveContextPathFromCaller?: string = undefined private readonly _sourceRootSubpath?: string = undefined private readonly _sourceSubpath?: string = undefined @@ -7581,7 +5854,7 @@ export class ModuleSource extends BaseClient { * Constructor is used for internal usage only, do not create object from it. */ constructor( - parent?: { queryTree?: QueryTree[]; ctx: Context }, + ctx?: Context, _id?: ModuleSourceID, _asString?: string, _configExists?: boolean, @@ -7589,11 +5862,12 @@ export class ModuleSource extends BaseClient { _kind?: ModuleSourceKind, _moduleName?: string, _moduleOriginalName?: string, + _pin?: string, _resolveContextPathFromCaller?: string, _sourceRootSubpath?: string, _sourceSubpath?: string, ) { - super(parent) + super(ctx) this._id = _id this._asString = _asString @@ -7602,6 +5876,7 @@ export class ModuleSource extends BaseClient { this._kind = _kind this._moduleName = _moduleName this._moduleOriginalName = _moduleOriginalName + this._pin = _pin this._resolveContextPathFromCaller = _resolveContextPathFromCaller this._sourceRootSubpath = _sourceRootSubpath this._sourceSubpath = _sourceSubpath @@ -7615,15 +5890,9 @@ export class ModuleSource extends BaseClient { return this._id } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("id") + + const response: Awaited = await ctx.execute() return response } @@ -7632,30 +5901,16 @@ export class ModuleSource extends BaseClient { * If the source is a of kind git, the git source representation of it. */ asGitSource = (): GitModuleSource => { - return new GitModuleSource({ - queryTree: [ - ...this._queryTree, - { - operation: "asGitSource", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("asGitSource") + return new GitModuleSource(ctx) } /** * If the source is of kind local, the local source representation of it. */ asLocalSource = (): LocalModuleSource => { - return new LocalModuleSource({ - queryTree: [ - ...this._queryTree, - { - operation: "asLocalSource", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("asLocalSource") + return new LocalModuleSource(ctx) } /** @@ -7663,16 +5918,8 @@ export class ModuleSource extends BaseClient { * @param opts.engineVersion The engine version to upgrade to. */ asModule = (opts?: ModuleSourceAsModuleOpts): Module_ => { - return new Module_({ - queryTree: [ - ...this._queryTree, - { - operation: "asModule", - args: { ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("asModule", { ...opts }) + return new Module_(ctx) } /** @@ -7683,15 +5930,9 @@ export class ModuleSource extends BaseClient { return this._asString } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "asString", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("asString") + + const response: Awaited = await ctx.execute() return response } @@ -7704,15 +5945,9 @@ export class ModuleSource extends BaseClient { return this._configExists } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "configExists", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("configExists") + + const response: Awaited = await ctx.execute() return response } @@ -7721,15 +5956,8 @@ export class ModuleSource extends BaseClient { * The directory containing everything needed to load and use the module. */ contextDirectory = (): Directory => { - return new Directory({ - queryTree: [ - ...this._queryTree, - { - operation: "contextDirectory", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("contextDirectory") + return new Directory(ctx) } /** @@ -7740,31 +5968,22 @@ export class ModuleSource extends BaseClient { id: ModuleDependencyID } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "dependencies", - }, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("dependencies").select("id") + + const response: Awaited = await ctx.execute() return response.map( (r) => new ModuleDependency( - { - queryTree: [ + new Context( + [ { operation: "loadModuleDependencyFromID", args: { id: r.id }, }, ], - ctx: this._ctx, - }, + this._ctx.getConnection(), + ), r.id, ), ) @@ -7778,15 +5997,9 @@ export class ModuleSource extends BaseClient { return this._digest } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "digest", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("digest") + + const response: Awaited = await ctx.execute() return response } @@ -7796,16 +6009,8 @@ export class ModuleSource extends BaseClient { * @param path The path from the source directory to select. */ directory = (path: string): Directory => { - return new Directory({ - queryTree: [ - ...this._queryTree, - { - operation: "directory", - args: { path }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("directory", { path }) + return new Directory(ctx) } /** @@ -7816,15 +6021,9 @@ export class ModuleSource extends BaseClient { return this._kind } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "kind", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("kind") + + const response: Awaited = await ctx.execute() return response } @@ -7837,15 +6036,9 @@ export class ModuleSource extends BaseClient { return this._moduleName } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "moduleName", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("moduleName") + + const response: Awaited = await ctx.execute() return response } @@ -7858,15 +6051,24 @@ export class ModuleSource extends BaseClient { return this._moduleOriginalName } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "moduleOriginalName", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("moduleOriginalName") + + const response: Awaited = await ctx.execute() + + return response + } + + /** + * The pinned version of this module source. + */ + pin = async (): Promise => { + if (this._pin) { + return this._pin + } + + const ctx = this._ctx.select("pin") + + const response: Awaited = await ctx.execute() return response } @@ -7879,15 +6081,9 @@ export class ModuleSource extends BaseClient { return this._resolveContextPathFromCaller } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "resolveContextPathFromCaller", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("resolveContextPathFromCaller") + + const response: Awaited = await ctx.execute() return response } @@ -7897,16 +6093,8 @@ export class ModuleSource extends BaseClient { * @param dep The dependency module source to resolve. */ resolveDependency = (dep: ModuleSource): ModuleSource => { - return new ModuleSource({ - queryTree: [ - ...this._queryTree, - { - operation: "resolveDependency", - args: { dep }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("resolveDependency", { dep }) + return new ModuleSource(ctx) } /** @@ -7919,31 +6107,19 @@ export class ModuleSource extends BaseClient { path: string, opts?: ModuleSourceResolveDirectoryFromCallerOpts, ): Directory => { - return new Directory({ - queryTree: [ - ...this._queryTree, - { - operation: "resolveDirectoryFromCaller", - args: { path, ...opts }, - }, - ], - ctx: this._ctx, + const ctx = this._ctx.select("resolveDirectoryFromCaller", { + path, + ...opts, }) + return new Directory(ctx) } /** * Load the source from its path on the caller's filesystem, including only needed+configured files and directories. Only valid for local sources. */ resolveFromCaller = (): ModuleSource => { - return new ModuleSource({ - queryTree: [ - ...this._queryTree, - { - operation: "resolveFromCaller", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("resolveFromCaller") + return new ModuleSource(ctx) } /** @@ -7954,15 +6130,9 @@ export class ModuleSource extends BaseClient { return this._sourceRootSubpath } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "sourceRootSubpath", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("sourceRootSubpath") + + const response: Awaited = await ctx.execute() return response } @@ -7975,15 +6145,9 @@ export class ModuleSource extends BaseClient { return this._sourceSubpath } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "sourceSubpath", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("sourceSubpath") + + const response: Awaited = await ctx.execute() return response } @@ -7993,16 +6157,8 @@ export class ModuleSource extends BaseClient { * @param name The name of the view to retrieve. */ view = (name: string): ModuleSourceView => { - return new ModuleSourceView({ - queryTree: [ - ...this._queryTree, - { - operation: "view", - args: { name }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("view", { name }) + return new ModuleSourceView(ctx) } /** @@ -8013,31 +6169,22 @@ export class ModuleSource extends BaseClient { id: ModuleSourceViewID } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "views", - }, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("views").select("id") + + const response: Awaited = await ctx.execute() return response.map( (r) => new ModuleSourceView( - { - queryTree: [ + new Context( + [ { operation: "loadModuleSourceViewFromID", args: { id: r.id }, }, ], - ctx: this._ctx, - }, + this._ctx.getConnection(), + ), r.id, ), ) @@ -8048,16 +6195,8 @@ export class ModuleSource extends BaseClient { * @param dir The directory to set as the context directory. */ withContextDirectory = (dir: Directory): ModuleSource => { - return new ModuleSource({ - queryTree: [ - ...this._queryTree, - { - operation: "withContextDirectory", - args: { dir }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withContextDirectory", { dir }) + return new ModuleSource(ctx) } /** @@ -8065,16 +6204,8 @@ export class ModuleSource extends BaseClient { * @param dependencies The dependencies to append. */ withDependencies = (dependencies: ModuleDependency[]): ModuleSource => { - return new ModuleSource({ - queryTree: [ - ...this._queryTree, - { - operation: "withDependencies", - args: { dependencies }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withDependencies", { dependencies }) + return new ModuleSource(ctx) } /** @@ -8082,16 +6213,8 @@ export class ModuleSource extends BaseClient { * @param opts.merge Merge module dependencies into the current project's */ withInit = (opts?: ModuleSourceWithInitOpts): ModuleSource => { - return new ModuleSource({ - queryTree: [ - ...this._queryTree, - { - operation: "withInit", - args: { ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withInit", { ...opts }) + return new ModuleSource(ctx) } /** @@ -8099,16 +6222,8 @@ export class ModuleSource extends BaseClient { * @param name The name to set. */ withName = (name: string): ModuleSource => { - return new ModuleSource({ - queryTree: [ - ...this._queryTree, - { - operation: "withName", - args: { name }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withName", { name }) + return new ModuleSource(ctx) } /** @@ -8116,16 +6231,8 @@ export class ModuleSource extends BaseClient { * @param sdk The SDK to set. */ withSDK = (sdk: string): ModuleSource => { - return new ModuleSource({ - queryTree: [ - ...this._queryTree, - { - operation: "withSDK", - args: { sdk }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withSDK", { sdk }) + return new ModuleSource(ctx) } /** @@ -8133,16 +6240,8 @@ export class ModuleSource extends BaseClient { * @param path The path to set as the source subpath. */ withSourceSubpath = (path: string): ModuleSource => { - return new ModuleSource({ - queryTree: [ - ...this._queryTree, - { - operation: "withSourceSubpath", - args: { path }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withSourceSubpath", { path }) + return new ModuleSource(ctx) } /** @@ -8151,16 +6250,8 @@ export class ModuleSource extends BaseClient { * @param patterns The patterns to set as the view filters. */ withView = (name: string, patterns: string[]): ModuleSource => { - return new ModuleSource({ - queryTree: [ - ...this._queryTree, - { - operation: "withView", - args: { name, patterns }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withView", { name, patterns }) + return new ModuleSource(ctx) } /** @@ -8168,16 +6259,8 @@ export class ModuleSource extends BaseClient { * @param dependencies The dependencies to remove. */ withoutDependencies = (dependencies: string[]): ModuleSource => { - return new ModuleSource({ - queryTree: [ - ...this._queryTree, - { - operation: "withoutDependencies", - args: { dependencies }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withoutDependencies", { dependencies }) + return new ModuleSource(ctx) } /** @@ -8200,12 +6283,8 @@ export class ModuleSourceView extends BaseClient { /** * Constructor is used for internal usage only, do not create object from it. */ - constructor( - parent?: { queryTree?: QueryTree[]; ctx: Context }, - _id?: ModuleSourceViewID, - _name?: string, - ) { - super(parent) + constructor(ctx?: Context, _id?: ModuleSourceViewID, _name?: string) { + super(ctx) this._id = _id this._name = _name @@ -8219,15 +6298,9 @@ export class ModuleSourceView extends BaseClient { return this._id } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("id") + + const response: Awaited = await ctx.execute() return response } @@ -8240,15 +6313,9 @@ export class ModuleSourceView extends BaseClient { return this._name } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "name", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("name") + + const response: Awaited = await ctx.execute() return response } @@ -8257,15 +6324,9 @@ export class ModuleSourceView extends BaseClient { * The patterns of the view used to filter paths */ patterns = async (): Promise => { - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "patterns", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("patterns") + + const response: Awaited = await ctx.execute() return response } @@ -8284,13 +6345,13 @@ export class ObjectTypeDef extends BaseClient { * Constructor is used for internal usage only, do not create object from it. */ constructor( - parent?: { queryTree?: QueryTree[]; ctx: Context }, + ctx?: Context, _id?: ObjectTypeDefID, _description?: string, _name?: string, _sourceModuleName?: string, ) { - super(parent) + super(ctx) this._id = _id this._description = _description @@ -8306,15 +6367,9 @@ export class ObjectTypeDef extends BaseClient { return this._id } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("id") + + const response: Awaited = await ctx.execute() return response } @@ -8323,15 +6378,8 @@ export class ObjectTypeDef extends BaseClient { * The function used to construct new instances of this object, if any */ constructor_ = (): Function_ => { - return new Function_({ - queryTree: [ - ...this._queryTree, - { - operation: "constructor", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("constructor") + return new Function_(ctx) } /** @@ -8342,15 +6390,9 @@ export class ObjectTypeDef extends BaseClient { return this._description } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "description", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("description") + + const response: Awaited = await ctx.execute() return response } @@ -8363,31 +6405,22 @@ export class ObjectTypeDef extends BaseClient { id: FieldTypeDefID } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "fields", - }, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("fields").select("id") + + const response: Awaited = await ctx.execute() return response.map( (r) => new FieldTypeDef( - { - queryTree: [ + new Context( + [ { operation: "loadFieldTypeDefFromID", args: { id: r.id }, }, ], - ctx: this._ctx, - }, + this._ctx.getConnection(), + ), r.id, ), ) @@ -8401,31 +6434,22 @@ export class ObjectTypeDef extends BaseClient { id: FunctionID } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "functions", - }, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("functions").select("id") + + const response: Awaited = await ctx.execute() return response.map( (r) => new Function_( - { - queryTree: [ + new Context( + [ { operation: "loadFunction_FromID", args: { id: r.id }, }, ], - ctx: this._ctx, - }, + this._ctx.getConnection(), + ), r.id, ), ) @@ -8439,15 +6463,9 @@ export class ObjectTypeDef extends BaseClient { return this._name } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "name", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("name") + + const response: Awaited = await ctx.execute() return response } @@ -8456,15 +6474,8 @@ export class ObjectTypeDef extends BaseClient { * The location of this object declaration. */ sourceMap = (): SourceMap => { - return new SourceMap({ - queryTree: [ - ...this._queryTree, - { - operation: "sourceMap", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("sourceMap") + return new SourceMap(ctx) } /** @@ -8475,15 +6486,9 @@ export class ObjectTypeDef extends BaseClient { return this._sourceModuleName } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "sourceModuleName", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("sourceModuleName") + + const response: Awaited = await ctx.execute() return response } @@ -8503,14 +6508,14 @@ export class Port extends BaseClient { * Constructor is used for internal usage only, do not create object from it. */ constructor( - parent?: { queryTree?: QueryTree[]; ctx: Context }, + ctx?: Context, _id?: PortID, _description?: string, _experimentalSkipHealthcheck?: boolean, _port?: number, _protocol?: NetworkProtocol, ) { - super(parent) + super(ctx) this._id = _id this._description = _description @@ -8527,15 +6532,9 @@ export class Port extends BaseClient { return this._id } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("id") + + const response: Awaited = await ctx.execute() return response } @@ -8548,15 +6547,9 @@ export class Port extends BaseClient { return this._description } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "description", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("description") + + const response: Awaited = await ctx.execute() return response } @@ -8569,15 +6562,9 @@ export class Port extends BaseClient { return this._experimentalSkipHealthcheck } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "experimentalSkipHealthcheck", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("experimentalSkipHealthcheck") + + const response: Awaited = await ctx.execute() return response } @@ -8590,15 +6577,9 @@ export class Port extends BaseClient { return this._port } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "port", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("port") + + const response: Awaited = await ctx.execute() return response } @@ -8611,15 +6592,9 @@ export class Port extends BaseClient { return this._protocol } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "protocol", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("protocol") + + const response: Awaited = await ctx.execute() return response } @@ -8635,12 +6610,8 @@ export class Client extends BaseClient { /** * Constructor is used for internal usage only, do not create object from it. */ - constructor( - parent?: { queryTree?: QueryTree[]; ctx: Context }, - _defaultPlatform?: Platform, - _version?: string, - ) { - super(parent) + constructor(ctx?: Context, _defaultPlatform?: Platform, _version?: string) { + super(ctx) this._defaultPlatform = _defaultPlatform this._version = _version @@ -8658,16 +6629,8 @@ export class Client extends BaseClient { * @param digest Digest of the blob */ blob = (digest: string): Directory => { - return new Directory({ - queryTree: [ - ...this._queryTree, - { - operation: "blob", - args: { digest }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("blob", { digest }) + return new Directory(ctx) } /** @@ -8675,16 +6638,8 @@ export class Client extends BaseClient { * @param digest Digest of the image manifest */ builtinContainer = (digest: string): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "builtinContainer", - args: { digest }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("builtinContainer", { digest }) + return new Container(ctx) } /** @@ -8692,16 +6647,8 @@ export class Client extends BaseClient { * @param key A string identifier to target this cache volume (e.g., "modules-cache"). */ cacheVolume = (key: string): CacheVolume => { - return new CacheVolume({ - queryTree: [ - ...this._queryTree, - { - operation: "cacheVolume", - args: { key }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("cacheVolume", { key }) + return new CacheVolume(ctx) } /** @@ -8711,16 +6658,8 @@ export class Client extends BaseClient { * @param opts.platform Platform to initialize the container with. */ container = (opts?: ClientContainerOpts): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "container", - args: { ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("container", { ...opts }) + return new Container(ctx) } /** @@ -8729,30 +6668,16 @@ export class Client extends BaseClient { * If the caller is not currently executing in a function, this will return an error. */ currentFunctionCall = (): FunctionCall => { - return new FunctionCall({ - queryTree: [ - ...this._queryTree, - { - operation: "currentFunctionCall", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("currentFunctionCall") + return new FunctionCall(ctx) } /** * The module currently being served in the session, if any. */ currentModule = (): CurrentModule => { - return new CurrentModule({ - queryTree: [ - ...this._queryTree, - { - operation: "currentModule", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("currentModule") + return new CurrentModule(ctx) } /** @@ -8763,31 +6688,22 @@ export class Client extends BaseClient { id: TypeDefID } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "currentTypeDefs", - }, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("currentTypeDefs").select("id") + + const response: Awaited = await ctx.execute() return response.map( (r) => new TypeDef( - { - queryTree: [ + new Context( + [ { operation: "loadTypeDefFromID", args: { id: r.id }, }, ], - ctx: this._ctx, - }, + this._ctx.getConnection(), + ), r.id, ), ) @@ -8797,15 +6713,9 @@ export class Client extends BaseClient { * The default platform of the engine. */ defaultPlatform = async (): Promise => { - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "defaultPlatform", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("defaultPlatform") + + const response: Awaited = await ctx.execute() return response } @@ -8814,30 +6724,16 @@ export class Client extends BaseClient { * Creates an empty directory. */ directory = (): Directory => { - return new Directory({ - queryTree: [ - ...this._queryTree, - { - operation: "directory", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("directory") + return new Directory(ctx) } /** * The Dagger engine container configuration and state */ engine = (): Engine => { - return new Engine({ - queryTree: [ - ...this._queryTree, - { - operation: "engine", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("engine") + return new Engine(ctx) } /** @@ -8845,16 +6741,8 @@ export class Client extends BaseClient { * @param message A brief description of the error. */ error = (message: string): Error => { - return new Error({ - queryTree: [ - ...this._queryTree, - { - operation: "error", - args: { message }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("error", { message }) + return new Error(ctx) } /** @@ -8863,32 +6751,16 @@ export class Client extends BaseClient { * @param returnType Return type of the function. */ function_ = (name: string, returnType: TypeDef): Function_ => { - return new Function_({ - queryTree: [ - ...this._queryTree, - { - operation: "function", - args: { name, returnType }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("function", { name, returnType }) + return new Function_(ctx) } /** * Create a code generation result, given a directory containing the generated code. */ generatedCode = (code: Directory): GeneratedCode => { - return new GeneratedCode({ - queryTree: [ - ...this._queryTree, - { - operation: "generatedCode", - args: { code }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("generatedCode", { code }) + return new GeneratedCode(ctx) } /** @@ -8904,31 +6776,16 @@ export class Client extends BaseClient { * @param opts.sshAuthSocket Set SSH auth socket */ git = (url: string, opts?: ClientGitOpts): GitRepository => { - return new GitRepository({ - queryTree: [ - ...this._queryTree, - { - operation: "git", - args: { url, ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("git", { url, ...opts }) + return new GitRepository(ctx) } /** * Queries the host environment. */ host = (): Host => { - return new Host({ - queryTree: [ - ...this._queryTree, - { - operation: "host", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("host") + return new Host(ctx) } /** @@ -8937,96 +6794,48 @@ export class Client extends BaseClient { * @param opts.experimentalServiceHost A service which must be started before the URL is fetched. */ http = (url: string, opts?: ClientHttpOpts): File => { - return new File({ - queryTree: [ - ...this._queryTree, - { - operation: "http", - args: { url, ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("http", { url, ...opts }) + return new File(ctx) } /** * Load a CacheVolume from its ID. */ loadCacheVolumeFromID = (id: CacheVolumeID): CacheVolume => { - return new CacheVolume({ - queryTree: [ - ...this._queryTree, - { - operation: "loadCacheVolumeFromID", - args: { id }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("loadCacheVolumeFromID", { id }) + return new CacheVolume(ctx) } /** * Load a Container from its ID. */ loadContainerFromID = (id: ContainerID): Container => { - return new Container({ - queryTree: [ - ...this._queryTree, - { - operation: "loadContainerFromID", - args: { id }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("loadContainerFromID", { id }) + return new Container(ctx) } /** * Load a CurrentModule from its ID. */ loadCurrentModuleFromID = (id: CurrentModuleID): CurrentModule => { - return new CurrentModule({ - queryTree: [ - ...this._queryTree, - { - operation: "loadCurrentModuleFromID", - args: { id }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("loadCurrentModuleFromID", { id }) + return new CurrentModule(ctx) } /** * Load a Directory from its ID. */ loadDirectoryFromID = (id: DirectoryID): Directory => { - return new Directory({ - queryTree: [ - ...this._queryTree, - { - operation: "loadDirectoryFromID", - args: { id }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("loadDirectoryFromID", { id }) + return new Directory(ctx) } /** * Load a EngineCacheEntry from its ID. */ loadEngineCacheEntryFromID = (id: EngineCacheEntryID): EngineCacheEntry => { - return new EngineCacheEntry({ - queryTree: [ - ...this._queryTree, - { - operation: "loadEngineCacheEntryFromID", - args: { id }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("loadEngineCacheEntryFromID", { id }) + return new EngineCacheEntry(ctx) } /** @@ -9035,160 +6844,80 @@ export class Client extends BaseClient { loadEngineCacheEntrySetFromID = ( id: EngineCacheEntrySetID, ): EngineCacheEntrySet => { - return new EngineCacheEntrySet({ - queryTree: [ - ...this._queryTree, - { - operation: "loadEngineCacheEntrySetFromID", - args: { id }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("loadEngineCacheEntrySetFromID", { id }) + return new EngineCacheEntrySet(ctx) } /** * Load a EngineCache from its ID. */ loadEngineCacheFromID = (id: EngineCacheID): EngineCache => { - return new EngineCache({ - queryTree: [ - ...this._queryTree, - { - operation: "loadEngineCacheFromID", - args: { id }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("loadEngineCacheFromID", { id }) + return new EngineCache(ctx) } /** * Load a Engine from its ID. */ loadEngineFromID = (id: EngineID): Engine => { - return new Engine({ - queryTree: [ - ...this._queryTree, - { - operation: "loadEngineFromID", - args: { id }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("loadEngineFromID", { id }) + return new Engine(ctx) } /** * Load a EnumTypeDef from its ID. */ loadEnumTypeDefFromID = (id: EnumTypeDefID): EnumTypeDef => { - return new EnumTypeDef({ - queryTree: [ - ...this._queryTree, - { - operation: "loadEnumTypeDefFromID", - args: { id }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("loadEnumTypeDefFromID", { id }) + return new EnumTypeDef(ctx) } /** * Load a EnumValueTypeDef from its ID. */ loadEnumValueTypeDefFromID = (id: EnumValueTypeDefID): EnumValueTypeDef => { - return new EnumValueTypeDef({ - queryTree: [ - ...this._queryTree, - { - operation: "loadEnumValueTypeDefFromID", - args: { id }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("loadEnumValueTypeDefFromID", { id }) + return new EnumValueTypeDef(ctx) } /** * Load a EnvVariable from its ID. */ loadEnvVariableFromID = (id: EnvVariableID): EnvVariable => { - return new EnvVariable({ - queryTree: [ - ...this._queryTree, - { - operation: "loadEnvVariableFromID", - args: { id }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("loadEnvVariableFromID", { id }) + return new EnvVariable(ctx) } /** * Load a Error from its ID. */ loadErrorFromID = (id: ErrorID): Error => { - return new Error({ - queryTree: [ - ...this._queryTree, - { - operation: "loadErrorFromID", - args: { id }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("loadErrorFromID", { id }) + return new Error(ctx) } /** * Load a FieldTypeDef from its ID. */ loadFieldTypeDefFromID = (id: FieldTypeDefID): FieldTypeDef => { - return new FieldTypeDef({ - queryTree: [ - ...this._queryTree, - { - operation: "loadFieldTypeDefFromID", - args: { id }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("loadFieldTypeDefFromID", { id }) + return new FieldTypeDef(ctx) } /** * Load a File from its ID. */ loadFileFromID = (id: FileID): File => { - return new File({ - queryTree: [ - ...this._queryTree, - { - operation: "loadFileFromID", - args: { id }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("loadFileFromID", { id }) + return new File(ctx) } /** * Load a FunctionArg from its ID. */ loadFunctionArgFromID = (id: FunctionArgID): FunctionArg => { - return new FunctionArg({ - queryTree: [ - ...this._queryTree, - { - operation: "loadFunctionArgFromID", - args: { id }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("loadFunctionArgFromID", { id }) + return new FunctionArg(ctx) } /** @@ -9197,192 +6926,96 @@ export class Client extends BaseClient { loadFunctionCallArgValueFromID = ( id: FunctionCallArgValueID, ): FunctionCallArgValue => { - return new FunctionCallArgValue({ - queryTree: [ - ...this._queryTree, - { - operation: "loadFunctionCallArgValueFromID", - args: { id }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("loadFunctionCallArgValueFromID", { id }) + return new FunctionCallArgValue(ctx) } /** * Load a FunctionCall from its ID. */ loadFunctionCallFromID = (id: FunctionCallID): FunctionCall => { - return new FunctionCall({ - queryTree: [ - ...this._queryTree, - { - operation: "loadFunctionCallFromID", - args: { id }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("loadFunctionCallFromID", { id }) + return new FunctionCall(ctx) } /** * Load a Function from its ID. */ loadFunctionFromID = (id: FunctionID): Function_ => { - return new Function_({ - queryTree: [ - ...this._queryTree, - { - operation: "loadFunctionFromID", - args: { id }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("loadFunctionFromID", { id }) + return new Function_(ctx) } /** * Load a GeneratedCode from its ID. */ loadGeneratedCodeFromID = (id: GeneratedCodeID): GeneratedCode => { - return new GeneratedCode({ - queryTree: [ - ...this._queryTree, - { - operation: "loadGeneratedCodeFromID", - args: { id }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("loadGeneratedCodeFromID", { id }) + return new GeneratedCode(ctx) } /** * Load a GitModuleSource from its ID. */ loadGitModuleSourceFromID = (id: GitModuleSourceID): GitModuleSource => { - return new GitModuleSource({ - queryTree: [ - ...this._queryTree, - { - operation: "loadGitModuleSourceFromID", - args: { id }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("loadGitModuleSourceFromID", { id }) + return new GitModuleSource(ctx) } /** * Load a GitRef from its ID. */ loadGitRefFromID = (id: GitRefID): GitRef => { - return new GitRef({ - queryTree: [ - ...this._queryTree, - { - operation: "loadGitRefFromID", - args: { id }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("loadGitRefFromID", { id }) + return new GitRef(ctx) } /** * Load a GitRepository from its ID. */ loadGitRepositoryFromID = (id: GitRepositoryID): GitRepository => { - return new GitRepository({ - queryTree: [ - ...this._queryTree, - { - operation: "loadGitRepositoryFromID", - args: { id }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("loadGitRepositoryFromID", { id }) + return new GitRepository(ctx) } /** * Load a Host from its ID. */ loadHostFromID = (id: HostID): Host => { - return new Host({ - queryTree: [ - ...this._queryTree, - { - operation: "loadHostFromID", - args: { id }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("loadHostFromID", { id }) + return new Host(ctx) } /** * Load a InputTypeDef from its ID. */ loadInputTypeDefFromID = (id: InputTypeDefID): InputTypeDef => { - return new InputTypeDef({ - queryTree: [ - ...this._queryTree, - { - operation: "loadInputTypeDefFromID", - args: { id }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("loadInputTypeDefFromID", { id }) + return new InputTypeDef(ctx) } /** * Load a InterfaceTypeDef from its ID. */ loadInterfaceTypeDefFromID = (id: InterfaceTypeDefID): InterfaceTypeDef => { - return new InterfaceTypeDef({ - queryTree: [ - ...this._queryTree, - { - operation: "loadInterfaceTypeDefFromID", - args: { id }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("loadInterfaceTypeDefFromID", { id }) + return new InterfaceTypeDef(ctx) } /** * Load a Label from its ID. */ loadLabelFromID = (id: LabelID): Label => { - return new Label({ - queryTree: [ - ...this._queryTree, - { - operation: "loadLabelFromID", - args: { id }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("loadLabelFromID", { id }) + return new Label(ctx) } /** * Load a ListTypeDef from its ID. */ loadListTypeDefFromID = (id: ListTypeDefID): ListTypeDef => { - return new ListTypeDef({ - queryTree: [ - ...this._queryTree, - { - operation: "loadListTypeDefFromID", - args: { id }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("loadListTypeDefFromID", { id }) + return new ListTypeDef(ctx) } /** @@ -9391,239 +7024,120 @@ export class Client extends BaseClient { loadLocalModuleSourceFromID = ( id: LocalModuleSourceID, ): LocalModuleSource => { - return new LocalModuleSource({ - queryTree: [ - ...this._queryTree, - { - operation: "loadLocalModuleSourceFromID", - args: { id }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("loadLocalModuleSourceFromID", { id }) + return new LocalModuleSource(ctx) } /** * Load a ModuleDependency from its ID. */ loadModuleDependencyFromID = (id: ModuleDependencyID): ModuleDependency => { - return new ModuleDependency({ - queryTree: [ - ...this._queryTree, - { - operation: "loadModuleDependencyFromID", - args: { id }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("loadModuleDependencyFromID", { id }) + return new ModuleDependency(ctx) } /** * Load a Module from its ID. */ loadModuleFromID = (id: ModuleID): Module_ => { - return new Module_({ - queryTree: [ - ...this._queryTree, - { - operation: "loadModuleFromID", - args: { id }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("loadModuleFromID", { id }) + return new Module_(ctx) } /** * Load a ModuleSource from its ID. */ loadModuleSourceFromID = (id: ModuleSourceID): ModuleSource => { - return new ModuleSource({ - queryTree: [ - ...this._queryTree, - { - operation: "loadModuleSourceFromID", - args: { id }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("loadModuleSourceFromID", { id }) + return new ModuleSource(ctx) } /** * Load a ModuleSourceView from its ID. */ loadModuleSourceViewFromID = (id: ModuleSourceViewID): ModuleSourceView => { - return new ModuleSourceView({ - queryTree: [ - ...this._queryTree, - { - operation: "loadModuleSourceViewFromID", - args: { id }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("loadModuleSourceViewFromID", { id }) + return new ModuleSourceView(ctx) } /** * Load a ObjectTypeDef from its ID. */ loadObjectTypeDefFromID = (id: ObjectTypeDefID): ObjectTypeDef => { - return new ObjectTypeDef({ - queryTree: [ - ...this._queryTree, - { - operation: "loadObjectTypeDefFromID", - args: { id }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("loadObjectTypeDefFromID", { id }) + return new ObjectTypeDef(ctx) } /** * Load a Port from its ID. */ loadPortFromID = (id: PortID): Port => { - return new Port({ - queryTree: [ - ...this._queryTree, - { - operation: "loadPortFromID", - args: { id }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("loadPortFromID", { id }) + return new Port(ctx) } /** * Load a ScalarTypeDef from its ID. */ loadScalarTypeDefFromID = (id: ScalarTypeDefID): ScalarTypeDef => { - return new ScalarTypeDef({ - queryTree: [ - ...this._queryTree, - { - operation: "loadScalarTypeDefFromID", - args: { id }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("loadScalarTypeDefFromID", { id }) + return new ScalarTypeDef(ctx) } /** * Load a Secret from its ID. */ loadSecretFromID = (id: SecretID): Secret => { - return new Secret({ - queryTree: [ - ...this._queryTree, - { - operation: "loadSecretFromID", - args: { id }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("loadSecretFromID", { id }) + return new Secret(ctx) } /** * Load a Service from its ID. */ loadServiceFromID = (id: ServiceID): Service => { - return new Service({ - queryTree: [ - ...this._queryTree, - { - operation: "loadServiceFromID", - args: { id }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("loadServiceFromID", { id }) + return new Service(ctx) } /** * Load a Socket from its ID. */ loadSocketFromID = (id: SocketID): Socket => { - return new Socket({ - queryTree: [ - ...this._queryTree, - { - operation: "loadSocketFromID", - args: { id }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("loadSocketFromID", { id }) + return new Socket(ctx) } /** * Load a SourceMap from its ID. */ loadSourceMapFromID = (id: SourceMapID): SourceMap => { - return new SourceMap({ - queryTree: [ - ...this._queryTree, - { - operation: "loadSourceMapFromID", - args: { id }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("loadSourceMapFromID", { id }) + return new SourceMap(ctx) } /** * Load a Terminal from its ID. */ loadTerminalFromID = (id: TerminalID): Terminal => { - return new Terminal({ - queryTree: [ - ...this._queryTree, - { - operation: "loadTerminalFromID", - args: { id }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("loadTerminalFromID", { id }) + return new Terminal(ctx) } /** * Load a TypeDef from its ID. */ loadTypeDefFromID = (id: TypeDefID): TypeDef => { - return new TypeDef({ - queryTree: [ - ...this._queryTree, - { - operation: "loadTypeDefFromID", - args: { id }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("loadTypeDefFromID", { id }) + return new TypeDef(ctx) } /** * Create a new module. */ module_ = (): Module_ => { - return new Module_({ - queryTree: [ - ...this._queryTree, - { - operation: "module", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("module") + return new Module_(ctx) } /** @@ -9635,16 +7149,8 @@ export class Client extends BaseClient { source: ModuleSource, opts?: ClientModuleDependencyOpts, ): ModuleDependency => { - return new ModuleDependency({ - queryTree: [ - ...this._queryTree, - { - operation: "moduleDependency", - args: { source, ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("moduleDependency", { source, ...opts }) + return new ModuleDependency(ctx) } /** @@ -9658,32 +7164,16 @@ export class Client extends BaseClient { refString: string, opts?: ClientModuleSourceOpts, ): ModuleSource => { - return new ModuleSource({ - queryTree: [ - ...this._queryTree, - { - operation: "moduleSource", - args: { refString, ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("moduleSource", { refString, ...opts }) + return new ModuleSource(ctx) } /** * Reference a secret by name. */ secret = (name: string, opts?: ClientSecretOpts): Secret => { - return new Secret({ - queryTree: [ - ...this._queryTree, - { - operation: "secret", - args: { name, ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("secret", { name, ...opts }) + return new Secret(ctx) } /** @@ -9694,16 +7184,8 @@ export class Client extends BaseClient { * @param plaintext The plaintext of the secret */ setSecret = (name: string, plaintext: string): Secret => { - return new Secret({ - queryTree: [ - ...this._queryTree, - { - operation: "setSecret", - args: { name, plaintext }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("setSecret", { name, plaintext }) + return new Secret(ctx) } /** @@ -9713,46 +7195,25 @@ export class Client extends BaseClient { * @param column The column number within the line. */ sourceMap = (filename: string, line: number, column: number): SourceMap => { - return new SourceMap({ - queryTree: [ - ...this._queryTree, - { - operation: "sourceMap", - args: { filename, line, column }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("sourceMap", { filename, line, column }) + return new SourceMap(ctx) } /** * Create a new TypeDef. */ typeDef = (): TypeDef => { - return new TypeDef({ - queryTree: [ - ...this._queryTree, - { - operation: "typeDef", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("typeDef") + return new TypeDef(ctx) } /** * Get the current Dagger Engine version. */ version = async (): Promise => { - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "version", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("version") + + const response: Awaited = await ctx.execute() return response } @@ -9771,13 +7232,13 @@ export class ScalarTypeDef extends BaseClient { * Constructor is used for internal usage only, do not create object from it. */ constructor( - parent?: { queryTree?: QueryTree[]; ctx: Context }, + ctx?: Context, _id?: ScalarTypeDefID, _description?: string, _name?: string, _sourceModuleName?: string, ) { - super(parent) + super(ctx) this._id = _id this._description = _description @@ -9793,15 +7254,9 @@ export class ScalarTypeDef extends BaseClient { return this._id } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("id") + + const response: Awaited = await ctx.execute() return response } @@ -9814,15 +7269,9 @@ export class ScalarTypeDef extends BaseClient { return this._description } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "description", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("description") + + const response: Awaited = await ctx.execute() return response } @@ -9835,15 +7284,9 @@ export class ScalarTypeDef extends BaseClient { return this._name } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "name", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("name") + + const response: Awaited = await ctx.execute() return response } @@ -9856,15 +7299,9 @@ export class ScalarTypeDef extends BaseClient { return this._sourceModuleName } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "sourceModuleName", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("sourceModuleName") + + const response: Awaited = await ctx.execute() return response } @@ -9882,12 +7319,12 @@ export class Secret extends BaseClient { * Constructor is used for internal usage only, do not create object from it. */ constructor( - parent?: { queryTree?: QueryTree[]; ctx: Context }, + ctx?: Context, _id?: SecretID, _name?: string, _plaintext?: string, ) { - super(parent) + super(ctx) this._id = _id this._name = _name @@ -9902,15 +7339,9 @@ export class Secret extends BaseClient { return this._id } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("id") + + const response: Awaited = await ctx.execute() return response } @@ -9923,15 +7354,9 @@ export class Secret extends BaseClient { return this._name } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "name", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("name") + + const response: Awaited = await ctx.execute() return response } @@ -9944,15 +7369,9 @@ export class Secret extends BaseClient { return this._plaintext } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "plaintext", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("plaintext") + + const response: Awaited = await ctx.execute() return response } @@ -9973,7 +7392,7 @@ export class Service extends BaseClient { * Constructor is used for internal usage only, do not create object from it. */ constructor( - parent?: { queryTree?: QueryTree[]; ctx: Context }, + ctx?: Context, _id?: ServiceID, _endpoint?: string, _hostname?: string, @@ -9981,7 +7400,7 @@ export class Service extends BaseClient { _stop?: ServiceID, _up?: Void, ) { - super(parent) + super(ctx) this._id = _id this._endpoint = _endpoint @@ -9999,15 +7418,9 @@ export class Service extends BaseClient { return this._id } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("id") + + const response: Awaited = await ctx.execute() return response } @@ -10026,16 +7439,9 @@ export class Service extends BaseClient { return this._endpoint } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "endpoint", - args: { ...opts }, - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("endpoint", { ...opts }) + + const response: Awaited = await ctx.execute() return response } @@ -10048,15 +7454,9 @@ export class Service extends BaseClient { return this._hostname } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "hostname", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("hostname") + + const response: Awaited = await ctx.execute() return response } @@ -10069,31 +7469,22 @@ export class Service extends BaseClient { id: PortID } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "ports", - }, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("ports").select("id") + + const response: Awaited = await ctx.execute() return response.map( (r) => new Port( - { - queryTree: [ + new Context( + [ { operation: "loadPortFromID", args: { id: r.id }, }, ], - ctx: this._ctx, - }, + this._ctx.getConnection(), + ), r.id, ), ) @@ -10105,25 +7496,21 @@ export class Service extends BaseClient { * Services bound to a Container do not need to be manually started. */ start = async (): Promise => { - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "start", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("start") - return new Service({ - queryTree: [ - { - operation: "loadServiceFromID", - args: { id: response }, - }, - ], - ctx: this._ctx, - }) + const response: Awaited = await ctx.execute() + + return new Service( + new Context( + [ + { + operation: "loadServiceFromID", + args: { id: response }, + }, + ], + this._ctx.getConnection(), + ), + ) } /** @@ -10131,26 +7518,21 @@ export class Service extends BaseClient { * @param opts.kill Immediately kill the service without waiting for a graceful exit */ stop = async (opts?: ServiceStopOpts): Promise => { - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "stop", - args: { ...opts }, - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("stop", { ...opts }) - return new Service({ - queryTree: [ - { - operation: "loadServiceFromID", - args: { id: response }, - }, - ], - ctx: this._ctx, - }) + const response: Awaited = await ctx.execute() + + return new Service( + new Context( + [ + { + operation: "loadServiceFromID", + args: { id: response }, + }, + ], + this._ctx.getConnection(), + ), + ) } /** @@ -10165,16 +7547,9 @@ export class Service extends BaseClient { return } - await computeQuery( - [ - ...this._queryTree, - { - operation: "up", - args: { ...opts }, - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("up", { ...opts }) + + await ctx.execute() } /** @@ -10182,16 +7557,8 @@ export class Service extends BaseClient { * @param hostname The hostname to use. */ withHostname = (hostname: string): Service => { - return new Service({ - queryTree: [ - ...this._queryTree, - { - operation: "withHostname", - args: { hostname }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withHostname", { hostname }) + return new Service(ctx) } /** @@ -10213,11 +7580,8 @@ export class Socket extends BaseClient { /** * Constructor is used for internal usage only, do not create object from it. */ - constructor( - parent?: { queryTree?: QueryTree[]; ctx: Context }, - _id?: SocketID, - ) { - super(parent) + constructor(ctx?: Context, _id?: SocketID) { + super(ctx) this._id = _id } @@ -10230,15 +7594,9 @@ export class Socket extends BaseClient { return this._id } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("id") + + const response: Awaited = await ctx.execute() return response } @@ -10258,14 +7616,14 @@ export class SourceMap extends BaseClient { * Constructor is used for internal usage only, do not create object from it. */ constructor( - parent?: { queryTree?: QueryTree[]; ctx: Context }, + ctx?: Context, _id?: SourceMapID, _column?: number, _filename?: string, _line?: number, _module?: string, ) { - super(parent) + super(ctx) this._id = _id this._column = _column @@ -10282,15 +7640,9 @@ export class SourceMap extends BaseClient { return this._id } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("id") + + const response: Awaited = await ctx.execute() return response } @@ -10303,15 +7655,9 @@ export class SourceMap extends BaseClient { return this._column } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "column", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("column") + + const response: Awaited = await ctx.execute() return response } @@ -10324,15 +7670,9 @@ export class SourceMap extends BaseClient { return this._filename } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "filename", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("filename") + + const response: Awaited = await ctx.execute() return response } @@ -10345,15 +7685,9 @@ export class SourceMap extends BaseClient { return this._line } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "line", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("line") + + const response: Awaited = await ctx.execute() return response } @@ -10366,15 +7700,9 @@ export class SourceMap extends BaseClient { return this._module } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "module", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("module") + + const response: Awaited = await ctx.execute() return response } @@ -10390,12 +7718,8 @@ export class Terminal extends BaseClient { /** * Constructor is used for internal usage only, do not create object from it. */ - constructor( - parent?: { queryTree?: QueryTree[]; ctx: Context }, - _id?: TerminalID, - _sync?: TerminalID, - ) { - super(parent) + constructor(ctx?: Context, _id?: TerminalID, _sync?: TerminalID) { + super(ctx) this._id = _id this._sync = _sync @@ -10409,15 +7733,9 @@ export class Terminal extends BaseClient { return this._id } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("id") + + const response: Awaited = await ctx.execute() return response } @@ -10428,25 +7746,21 @@ export class Terminal extends BaseClient { * It doesn't run the default command if no exec has been set. */ sync = async (): Promise => { - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "sync", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("sync") - return new Terminal({ - queryTree: [ - { - operation: "loadTerminalFromID", - args: { id: response }, - }, - ], - ctx: this._ctx, - }) + const response: Awaited = await ctx.execute() + + return new Terminal( + new Context( + [ + { + operation: "loadTerminalFromID", + args: { id: response }, + }, + ], + this._ctx.getConnection(), + ), + ) } } @@ -10462,12 +7776,12 @@ export class TypeDef extends BaseClient { * Constructor is used for internal usage only, do not create object from it. */ constructor( - parent?: { queryTree?: QueryTree[]; ctx: Context }, + ctx?: Context, _id?: TypeDefID, _kind?: TypeDefKind, _optional?: boolean, ) { - super(parent) + super(ctx) this._id = _id this._kind = _kind @@ -10482,15 +7796,9 @@ export class TypeDef extends BaseClient { return this._id } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "id", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("id") + + const response: Awaited = await ctx.execute() return response } @@ -10499,90 +7807,48 @@ export class TypeDef extends BaseClient { * If kind is ENUM, the enum-specific type definition. If kind is not ENUM, this will be null. */ asEnum = (): EnumTypeDef => { - return new EnumTypeDef({ - queryTree: [ - ...this._queryTree, - { - operation: "asEnum", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("asEnum") + return new EnumTypeDef(ctx) } /** * If kind is INPUT, the input-specific type definition. If kind is not INPUT, this will be null. */ asInput = (): InputTypeDef => { - return new InputTypeDef({ - queryTree: [ - ...this._queryTree, - { - operation: "asInput", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("asInput") + return new InputTypeDef(ctx) } /** * If kind is INTERFACE, the interface-specific type definition. If kind is not INTERFACE, this will be null. */ asInterface = (): InterfaceTypeDef => { - return new InterfaceTypeDef({ - queryTree: [ - ...this._queryTree, - { - operation: "asInterface", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("asInterface") + return new InterfaceTypeDef(ctx) } /** * If kind is LIST, the list-specific type definition. If kind is not LIST, this will be null. */ asList = (): ListTypeDef => { - return new ListTypeDef({ - queryTree: [ - ...this._queryTree, - { - operation: "asList", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("asList") + return new ListTypeDef(ctx) } /** * If kind is OBJECT, the object-specific type definition. If kind is not OBJECT, this will be null. */ asObject = (): ObjectTypeDef => { - return new ObjectTypeDef({ - queryTree: [ - ...this._queryTree, - { - operation: "asObject", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("asObject") + return new ObjectTypeDef(ctx) } /** * If kind is SCALAR, the scalar-specific type definition. If kind is not SCALAR, this will be null. */ asScalar = (): ScalarTypeDef => { - return new ScalarTypeDef({ - queryTree: [ - ...this._queryTree, - { - operation: "asScalar", - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("asScalar") + return new ScalarTypeDef(ctx) } /** @@ -10593,15 +7859,9 @@ export class TypeDef extends BaseClient { return this._kind } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "kind", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("kind") + + const response: Awaited = await ctx.execute() return response } @@ -10614,15 +7874,9 @@ export class TypeDef extends BaseClient { return this._optional } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "optional", - }, - ], - await this._ctx.connection(), - ) + const ctx = this._ctx.select("optional") + + const response: Awaited = await ctx.execute() return response } @@ -10631,18 +7885,10 @@ export class TypeDef extends BaseClient { * Adds a function for constructing a new instance of an Object TypeDef, failing if the type is not an object. */ withConstructor = (function_: Function_): TypeDef => { - return new TypeDef({ - queryTree: [ - ...this._queryTree, - { - operation: "withConstructor", - args: { - function: function_, - }, - }, - ], - ctx: this._ctx, + const ctx = this._ctx.select("withConstructor", { + function: function_, }) + return new TypeDef(ctx) } /** @@ -10654,16 +7900,8 @@ export class TypeDef extends BaseClient { * @param opts.sourceMap The source map for the enum definition. */ withEnum = (name: string, opts?: TypeDefWithEnumOpts): TypeDef => { - return new TypeDef({ - queryTree: [ - ...this._queryTree, - { - operation: "withEnum", - args: { name, ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withEnum", { name, ...opts }) + return new TypeDef(ctx) } /** @@ -10673,16 +7911,8 @@ export class TypeDef extends BaseClient { * @param opts.sourceMap The source map for the enum value definition. */ withEnumValue = (value: string, opts?: TypeDefWithEnumValueOpts): TypeDef => { - return new TypeDef({ - queryTree: [ - ...this._queryTree, - { - operation: "withEnumValue", - args: { value, ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withEnumValue", { value, ...opts }) + return new TypeDef(ctx) } /** @@ -10697,86 +7927,46 @@ export class TypeDef extends BaseClient { typeDef: TypeDef, opts?: TypeDefWithFieldOpts, ): TypeDef => { - return new TypeDef({ - queryTree: [ - ...this._queryTree, - { - operation: "withField", - args: { name, typeDef, ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withField", { name, typeDef, ...opts }) + return new TypeDef(ctx) } /** * Adds a function for an Object or Interface TypeDef, failing if the type is not one of those kinds. */ withFunction = (function_: Function_): TypeDef => { - return new TypeDef({ - queryTree: [ - ...this._queryTree, - { - operation: "withFunction", - args: { - function: function_, - }, - }, - ], - ctx: this._ctx, + const ctx = this._ctx.select("withFunction", { + function: function_, }) + return new TypeDef(ctx) } /** * Returns a TypeDef of kind Interface with the provided name. */ withInterface = (name: string, opts?: TypeDefWithInterfaceOpts): TypeDef => { - return new TypeDef({ - queryTree: [ - ...this._queryTree, - { - operation: "withInterface", - args: { name, ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withInterface", { name, ...opts }) + return new TypeDef(ctx) } /** * Sets the kind of the type. */ withKind = (kind: TypeDefKind): TypeDef => { - const metadata: Metadata = { + const metadata = { kind: { is_enum: true }, } - return new TypeDef({ - queryTree: [ - ...this._queryTree, - { - operation: "withKind", - args: { kind, __metadata: metadata }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withKind", { kind, __metadata: metadata }) + return new TypeDef(ctx) } /** * Returns a TypeDef of kind List with the provided type for its elements. */ withListOf = (elementType: TypeDef): TypeDef => { - return new TypeDef({ - queryTree: [ - ...this._queryTree, - { - operation: "withListOf", - args: { elementType }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withListOf", { elementType }) + return new TypeDef(ctx) } /** @@ -10785,48 +7975,24 @@ export class TypeDef extends BaseClient { * Note that an object's fields and functions may be omitted if the intent is only to refer to an object. This is how functions are able to return their own object, or any other circular reference. */ withObject = (name: string, opts?: TypeDefWithObjectOpts): TypeDef => { - return new TypeDef({ - queryTree: [ - ...this._queryTree, - { - operation: "withObject", - args: { name, ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withObject", { name, ...opts }) + return new TypeDef(ctx) } /** * Sets whether this type can be set to null. */ withOptional = (optional: boolean): TypeDef => { - return new TypeDef({ - queryTree: [ - ...this._queryTree, - { - operation: "withOptional", - args: { optional }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withOptional", { optional }) + return new TypeDef(ctx) } /** * Returns a TypeDef of kind Scalar with the provided name. */ withScalar = (name: string, opts?: TypeDefWithScalarOpts): TypeDef => { - return new TypeDef({ - queryTree: [ - ...this._queryTree, - { - operation: "withScalar", - args: { name, ...opts }, - }, - ], - ctx: this._ctx, - }) + const ctx = this._ctx.select("withScalar", { name, ...opts }) + return new TypeDef(ctx) } /** @@ -10839,4 +8005,4 @@ export class TypeDef extends BaseClient { } } -export const dag = new Client({ ctx: defaultContext }) +export const dag = new Client() diff --git a/sdk/typescript/api/test/api.spec.ts b/sdk/typescript/src/api/test/api.spec.ts similarity index 93% rename from sdk/typescript/api/test/api.spec.ts rename to sdk/typescript/src/api/test/api.spec.ts index ec4ec50eeb..34951a8e6f 100644 --- a/sdk/typescript/api/test/api.spec.ts +++ b/sdk/typescript/src/api/test/api.spec.ts @@ -6,6 +6,7 @@ import { ExecError, TooManyNestedObjectsError, } from "../../common/errors/index.js" +import { buildQuery, queryFlatten } from "../../common/graphql/compute_query.js" import { Client, ClientContainerOpts, @@ -14,7 +15,6 @@ import { Directory, NetworkProtocol, } from "../../index.js" -import { buildQuery, queryFlatten } from "../utils.js" const querySanitizer = (query: string) => query.replace(/\s+/g, " ") @@ -23,7 +23,7 @@ describe("TypeScript SDK api", function () { const tree = new Client().container().from("alpine:3.16.2") assert.strictEqual( - querySanitizer(buildQuery(tree.queryTree)), + querySanitizer(buildQuery(tree["_ctx"]["_queryTree"])), `{ container { from (address: "alpine:3.16.2") } }`, ) }) @@ -32,14 +32,14 @@ describe("TypeScript SDK api", function () { const tree = new Client().container().from("alpine:3.16.2") assert.strictEqual( - querySanitizer(buildQuery(tree.queryTree)), + querySanitizer(buildQuery(tree["_ctx"]["_queryTree"])), `{ container { from (address: "alpine:3.16.2") } }`, ) const tree2 = new Client().git("fake_url", { keepGitDir: true }) assert.strictEqual( - querySanitizer(buildQuery(tree2.queryTree)), + querySanitizer(buildQuery(tree2["_ctx"]["_queryTree"])), `{ git (url: "fake_url",keepGitDir: true) }`, ) @@ -69,7 +69,7 @@ describe("TypeScript SDK api", function () { .withExec(["apk", "add", "curl"]) assert.strictEqual( - querySanitizer(buildQuery(tree.queryTree)), + querySanitizer(buildQuery(tree["_ctx"]["_queryTree"])), `{ container { from (address: "alpine:3.16.2") { withExec (args: ["apk","add","curl"]) }} }`, ) }) @@ -79,7 +79,7 @@ describe("TypeScript SDK api", function () { const pkg = image.withExec(["echo", "foo bar"]) assert.strictEqual( - querySanitizer(buildQuery(pkg.queryTree)), + querySanitizer(buildQuery(pkg["_ctx"]["_queryTree"])), `{ container { from (address: "alpine:3.16.2") { withExec (args: ["echo","foo bar"]) }} }`, ) }) @@ -126,7 +126,7 @@ describe("TypeScript SDK api", function () { }) assert.strictEqual( - querySanitizer(buildQuery(pkg.queryTree)), + querySanitizer(buildQuery(pkg["_ctx"]["_queryTree"])), `{ container { from (address: "alpine:3.16.2") { withExec (args: ["apk","add","curl"],experimentalPrivilegedNesting: true) }} }`, ) }) @@ -135,12 +135,12 @@ describe("TypeScript SDK api", function () { const image = new Client().container().from("alpine:3.16.2") const a = image.withExec(["echo", "hello", "world"]) assert.strictEqual( - querySanitizer(buildQuery(a.queryTree)), + querySanitizer(buildQuery(a["_ctx"]["_queryTree"])), `{ container { from (address: "alpine:3.16.2") { withExec (args: ["echo","hello","world"]) }} }`, ) const b = image.withExec(["echo", "foo", "bar"]) assert.strictEqual( - querySanitizer(buildQuery(b.queryTree)), + querySanitizer(buildQuery(b["_ctx"]["_queryTree"])), `{ container { from (address: "alpine:3.16.2") { withExec (args: ["echo","foo","bar"]) }} }`, ) }) @@ -304,8 +304,8 @@ describe("TypeScript SDK api", function () { .build(new Directory(), { buildArgs: [{ value: "foo", name: "test" }] }) assert.strictEqual( - querySanitizer(buildQuery(tree.queryTree)), - `{ container { build (context: {"_queryTree":[],"_ctx":{}},buildArgs: [{value:"foo",name:"test"}]) } }`, + querySanitizer(buildQuery(tree["_ctx"]["_queryTree"])), + `{ container { build (context: {"_ctx":{"_queryTree":[],"_connection":{}}},buildArgs: [{value:"foo",name:"test"}]) } }`, ) }) @@ -333,7 +333,7 @@ describe("TypeScript SDK api", function () { await connect( async (client) => { - const seededPlatformVariants = [] + const seededPlatformVariants: Container[] = [] for (const platform in platforms) { const name = platforms[platform] diff --git a/sdk/typescript/src/common/context.ts b/sdk/typescript/src/common/context.ts new file mode 100644 index 0000000000..d902d18ac9 --- /dev/null +++ b/sdk/typescript/src/common/context.ts @@ -0,0 +1,30 @@ +import { GraphQLClient } from "graphql-request" + +import { computeQuery, QueryTree } from "./graphql/compute_query.js" +import { globalConnection } from "./graphql/connection.js" + +export class Context { + constructor( + private _queryTree: QueryTree[] = [], + private _connection = globalConnection, + ) {} + + getGQLClient(): GraphQLClient { + return this._connection.getGQLClient() + } + + getConnection() { + return this._connection + } + + select(operation: string, args?: Record): Context { + return new Context( + [...this._queryTree, { operation, args }], + this._connection, + ) + } + + execute(): Promise { + return computeQuery(this._queryTree, this._connection.getGQLClient()) + } +} diff --git a/sdk/typescript/common/errors/DaggerSDKError.ts b/sdk/typescript/src/common/errors/DaggerSDKError.ts similarity index 100% rename from sdk/typescript/common/errors/DaggerSDKError.ts rename to sdk/typescript/src/common/errors/DaggerSDKError.ts diff --git a/sdk/typescript/common/errors/DockerImageRefValidationError.ts b/sdk/typescript/src/common/errors/DockerImageRefValidationError.ts similarity index 100% rename from sdk/typescript/common/errors/DockerImageRefValidationError.ts rename to sdk/typescript/src/common/errors/DockerImageRefValidationError.ts diff --git a/sdk/typescript/common/errors/EngineSessionConnectParamsParseError.ts b/sdk/typescript/src/common/errors/EngineSessionConnectParamsParseError.ts similarity index 100% rename from sdk/typescript/common/errors/EngineSessionConnectParamsParseError.ts rename to sdk/typescript/src/common/errors/EngineSessionConnectParamsParseError.ts diff --git a/sdk/typescript/common/errors/EngineSessionConnectionTimeoutError.ts b/sdk/typescript/src/common/errors/EngineSessionConnectionTimeoutError.ts similarity index 100% rename from sdk/typescript/common/errors/EngineSessionConnectionTimeoutError.ts rename to sdk/typescript/src/common/errors/EngineSessionConnectionTimeoutError.ts diff --git a/sdk/typescript/common/errors/EngineSessionErrorOptions.ts b/sdk/typescript/src/common/errors/EngineSessionErrorOptions.ts similarity index 100% rename from sdk/typescript/common/errors/EngineSessionErrorOptions.ts rename to sdk/typescript/src/common/errors/EngineSessionErrorOptions.ts diff --git a/sdk/typescript/common/errors/ExecError.ts b/sdk/typescript/src/common/errors/ExecError.ts similarity index 100% rename from sdk/typescript/common/errors/ExecError.ts rename to sdk/typescript/src/common/errors/ExecError.ts diff --git a/sdk/typescript/common/errors/FunctionNotFound.ts b/sdk/typescript/src/common/errors/FunctionNotFound.ts similarity index 100% rename from sdk/typescript/common/errors/FunctionNotFound.ts rename to sdk/typescript/src/common/errors/FunctionNotFound.ts diff --git a/sdk/typescript/common/errors/GraphQLRequestError.ts b/sdk/typescript/src/common/errors/GraphQLRequestError.ts similarity index 100% rename from sdk/typescript/common/errors/GraphQLRequestError.ts rename to sdk/typescript/src/common/errors/GraphQLRequestError.ts diff --git a/sdk/typescript/common/errors/InitEngineSessionBinaryError.ts b/sdk/typescript/src/common/errors/InitEngineSessionBinaryError.ts similarity index 100% rename from sdk/typescript/common/errors/InitEngineSessionBinaryError.ts rename to sdk/typescript/src/common/errors/InitEngineSessionBinaryError.ts diff --git a/sdk/typescript/common/errors/IntrospectionError.ts b/sdk/typescript/src/common/errors/IntrospectionError.ts similarity index 100% rename from sdk/typescript/common/errors/IntrospectionError.ts rename to sdk/typescript/src/common/errors/IntrospectionError.ts diff --git a/sdk/typescript/common/errors/NotAwaitedRequestError.ts b/sdk/typescript/src/common/errors/NotAwaitedRequestError.ts similarity index 100% rename from sdk/typescript/common/errors/NotAwaitedRequestError.ts rename to sdk/typescript/src/common/errors/NotAwaitedRequestError.ts diff --git a/sdk/typescript/common/errors/TooManyNestedObjectsError.ts b/sdk/typescript/src/common/errors/TooManyNestedObjectsError.ts similarity index 100% rename from sdk/typescript/common/errors/TooManyNestedObjectsError.ts rename to sdk/typescript/src/common/errors/TooManyNestedObjectsError.ts diff --git a/sdk/typescript/common/errors/UnknownDaggerError.ts b/sdk/typescript/src/common/errors/UnknownDaggerError.ts similarity index 100% rename from sdk/typescript/common/errors/UnknownDaggerError.ts rename to sdk/typescript/src/common/errors/UnknownDaggerError.ts diff --git a/sdk/typescript/common/errors/errors-codes.ts b/sdk/typescript/src/common/errors/errors-codes.ts similarity index 100% rename from sdk/typescript/common/errors/errors-codes.ts rename to sdk/typescript/src/common/errors/errors-codes.ts diff --git a/sdk/typescript/common/errors/index.ts b/sdk/typescript/src/common/errors/index.ts similarity index 87% rename from sdk/typescript/common/errors/index.ts rename to sdk/typescript/src/common/errors/index.ts index 49889bf977..5850a56210 100644 --- a/sdk/typescript/common/errors/index.ts +++ b/sdk/typescript/src/common/errors/index.ts @@ -9,4 +9,6 @@ export { TooManyNestedObjectsError } from "./TooManyNestedObjectsError.js" export { EngineSessionError } from "./EngineSessionErrorOptions.js" export { EngineSessionConnectionTimeoutError } from "./EngineSessionConnectionTimeoutError.js" export { NotAwaitedRequestError } from "./NotAwaitedRequestError.js" +export { FunctionNotFound } from "./FunctionNotFound.js" +export { IntrospectionError } from "./IntrospectionError.js" export { ERROR_CODES } from "./errors-codes.js" diff --git a/sdk/typescript/graphql/client.ts b/sdk/typescript/src/common/graphql/client.ts similarity index 100% rename from sdk/typescript/graphql/client.ts rename to sdk/typescript/src/common/graphql/client.ts diff --git a/sdk/typescript/api/utils.ts b/sdk/typescript/src/common/graphql/compute_query.ts similarity index 94% rename from sdk/typescript/api/utils.ts rename to sdk/typescript/src/common/graphql/compute_query.ts index fd042554a1..9762539ccb 100644 --- a/sdk/typescript/api/utils.ts +++ b/sdk/typescript/src/common/graphql/compute_query.ts @@ -7,8 +7,18 @@ import { UnknownDaggerError, NotAwaitedRequestError, ExecError, -} from "../common/errors/index.js" -import { Metadata, QueryTree } from "./client.gen.js" +} from "../errors/index.js" + +export type QueryTree = { + operation: string + args?: Record +} + +export type Metadata = { + [key: string]: { + is_enum?: boolean + } +} /** * Format argument into GraphQL query format. @@ -67,7 +77,7 @@ async function computeNestedQuery( client: GraphQLClient, ): Promise { // Check if there is a nested queryTree to be executed - const isQueryTree = (value: any) => value["_queryTree"] !== undefined + const isQueryTree = (value: any) => value["_ctx"] !== undefined // Check if there is a nested array of queryTree to be executed const isArrayQueryTree = (value: any[]) => @@ -77,13 +87,13 @@ async function computeNestedQuery( // and building it with their results. const computeQueryTree = async (value: any): Promise => { // Resolve sub queries if operation's args is a subquery - for (const op of value["_queryTree"]) { + for (const op of value["_ctx"]["_queryTree"]) { await computeNestedQuery([op], client) } // push an id that will be used by the container return buildQuery([ - ...value["_queryTree"], + ...value["_ctx"]["_queryTree"], { operation: "id", }, diff --git a/sdk/typescript/src/common/graphql/connect.ts b/sdk/typescript/src/common/graphql/connect.ts new file mode 100644 index 0000000000..4c63370416 --- /dev/null +++ b/sdk/typescript/src/common/graphql/connect.ts @@ -0,0 +1,36 @@ +import { GraphQLClient } from "graphql-request" + +import { ConnectOpts } from "../../connectOpts.js" +import { createGQLClient } from "./client.js" + +/** + * Execute the callback with a GraphQL client connected to the Dagger engine. + * It automatically provisions the engine if needed. + */ +export async function withGQLClient( + connectOpts: ConnectOpts, + cb: (gqlClient: GraphQLClient) => Promise, +): Promise { + if (process.env["DAGGER_SESSION_PORT"]) { + const port = process.env["DAGGER_SESSION_PORT"] + if (!process.env["DAGGER_SESSION_TOKEN"]) { + throw new Error( + "DAGGER_SESSION_TOKEN must be set if DAGGER_SESSION_PORT is set", + ) + } + + const token = process.env["DAGGER_SESSION_TOKEN"] + + return await cb(createGQLClient(Number(port), token)) + } + + try { + const provisioning = await import("../../provisioning/index.js") + + return await provisioning.withEngineSession(connectOpts, cb) + } catch (e) { + throw new Error( + `failed to execute function with automatic provisioning: ${e}`, + ) + } +} diff --git a/sdk/typescript/src/common/graphql/connection.ts b/sdk/typescript/src/common/graphql/connection.ts new file mode 100644 index 0000000000..9c503d4bec --- /dev/null +++ b/sdk/typescript/src/common/graphql/connection.ts @@ -0,0 +1,27 @@ +import { GraphQLClient } from "graphql-request" + +/** + * Wraps the GraphQL client to allow lazy initialization and setting + * the GQL client of the global Dagger client instance (`dag`). + */ +export class Connection { + constructor(private _gqlClient?: GraphQLClient) {} + + resetClient() { + this._gqlClient = undefined + } + + setGQLClient(gqlClient: GraphQLClient) { + this._gqlClient = gqlClient + } + + getGQLClient(): GraphQLClient { + if (!this._gqlClient) { + throw new Error("GraphQL client is not set") + } + + return this._gqlClient + } +} + +export const globalConnection = new Connection() diff --git a/sdk/typescript/common/utils.ts b/sdk/typescript/src/common/utils.ts similarity index 100% rename from sdk/typescript/common/utils.ts rename to sdk/typescript/src/common/utils.ts diff --git a/sdk/typescript/connect.ts b/sdk/typescript/src/connect.ts similarity index 59% rename from sdk/typescript/connect.ts rename to sdk/typescript/src/connect.ts index 9646aa9031..bc0bc76335 100644 --- a/sdk/typescript/connect.ts +++ b/sdk/typescript/src/connect.ts @@ -1,8 +1,11 @@ import * as opentelemetry from "@opentelemetry/api" +import { GraphQLClient } from "graphql-request" import { Client } from "./api/client.gen.js" +import { Context } from "./common/context.js" +import { withGQLClient } from "./common/graphql/connect.js" +import { Connection, globalConnection } from "./common/graphql/connection.js" import { ConnectOpts } from "./connectOpts.js" -import { Context, defaultContext } from "./context/context.js" import * as telemetry from "./telemetry/telemetry.js" export type CallbackFct = (client: Client) => Promise @@ -34,10 +37,14 @@ export async function connection( // Wrap connection into the opentelemetry context for propagation await opentelemetry.context.with(telemetry.getContext(), async () => { try { - await defaultContext.connection(cfg) - await fct() + await withGQLClient(cfg, async (gqlClient) => { + // Set the GQL client inside the global dagger client + globalConnection.setGQLClient(gqlClient) + + await fct() + }) } finally { - close() + globalConnection.resetClient() } }) } finally { @@ -45,13 +52,6 @@ export async function connection( } } -/** - * Close global client connection - */ -export function close() { - defaultContext.close() -} - /** * connect runs GraphQL server and initializes a * GraphQL client to execute query on it through its callback. @@ -61,20 +61,18 @@ export async function connect( cb: CallbackFct, config: ConnectOpts = {}, ): Promise { - const ctx = new Context() - const client = new Client({ ctx: ctx }) - - // Initialize connection - await ctx.connection(config) + await withGQLClient(config, async (gqlClient: GraphQLClient) => { + const connection = new Connection(gqlClient) + const ctx = new Context([], connection) + const client = new Client(ctx) - // Warning shall be throw if versions are not compatible - try { - await client.version() - } catch (e) { - console.error("failed to check version compatibility:", e) - } + // Warning shall be throw if versions are not compatible + try { + await client.version() + } catch (e) { + console.error("failed to check version compatibility:", e) + } - await cb(client).finally(() => { - ctx.close() + return await cb(client) }) } diff --git a/sdk/typescript/connectOpts.ts b/sdk/typescript/src/connectOpts.ts similarity index 100% rename from sdk/typescript/connectOpts.ts rename to sdk/typescript/src/connectOpts.ts diff --git a/sdk/typescript/index.ts b/sdk/typescript/src/index.ts similarity index 51% rename from sdk/typescript/index.ts rename to sdk/typescript/src/index.ts index a564a3aa6c..645f71c637 100644 --- a/sdk/typescript/index.ts +++ b/sdk/typescript/src/index.ts @@ -1,9 +1,17 @@ -export * from "./api/client.gen.js" -export * from "./common/errors/index.js" export { gql } from "graphql-tag" export { GraphQLClient } from "graphql-request" + +// Default client bindings +export * from "./api/client.gen.js" + +// Common errors +export * from "./common/errors/index.js" + +// Connection for library export type { CallbackFct } from "./connect.js" -export { connect, connection, close } from "./connect.js" +export { connect, connection } from "./connect.js" export type { ConnectOpts } from "./connectOpts.js" -export * from "./introspector/decorators/decorators.js" -export { entrypoint } from "./entrypoint/entrypoint.js" + +// Module library +export * from "./module/decorators.js" +export { entrypoint } from "./module/entrypoint/entrypoint.js" diff --git a/sdk/typescript/introspector/decorators/decorators.ts b/sdk/typescript/src/module/decorators.ts similarity index 97% rename from sdk/typescript/introspector/decorators/decorators.ts rename to sdk/typescript/src/module/decorators.ts index f5eb3c63f0..9b5fce257b 100644 --- a/sdk/typescript/introspector/decorators/decorators.ts +++ b/sdk/typescript/src/module/decorators.ts @@ -1,7 +1,7 @@ /** * Expose the decorator publicly, so they insert data into the global registry. */ -import { registry } from "../registry/registry.js" +import { registry } from "./registry.js" /** * The definition of the `@object` decorator that should be on top of any diff --git a/sdk/typescript/entrypoint/context.ts b/sdk/typescript/src/module/entrypoint/context.ts similarity index 62% rename from sdk/typescript/entrypoint/context.ts rename to sdk/typescript/src/module/entrypoint/context.ts index 50636dac9b..6c77cb5aa1 100644 --- a/sdk/typescript/entrypoint/context.ts +++ b/sdk/typescript/src/module/entrypoint/context.ts @@ -1,4 +1,4 @@ -import { Args } from "../introspector/executor/executor.js" +import { Args } from "../executor.js" export type InvokeCtx = { parentName: string diff --git a/sdk/typescript/entrypoint/entrypoint.ts b/sdk/typescript/src/module/entrypoint/entrypoint.ts similarity index 72% rename from sdk/typescript/entrypoint/entrypoint.ts rename to sdk/typescript/src/module/entrypoint/entrypoint.ts index dcc016e0f1..bd294c8306 100644 --- a/sdk/typescript/entrypoint/entrypoint.ts +++ b/sdk/typescript/src/module/entrypoint/entrypoint.ts @@ -1,26 +1,12 @@ -import * as path from "path" -import { fileURLToPath } from "url" - -import { dag } from "../api/client.gen.js" -import { connection } from "../connect.js" -import { Executor } from "../introspector/executor/executor.js" -import { Args } from "../introspector/executor/executor.js" -import { scan } from "../introspector/scanner/scan.js" -import { listFiles } from "../introspector/utils/files.js" +import { dag } from "../../api/client.gen.js" +import { connection } from "../../connect.js" +import { Executor, Args } from "../executor.js" +import { scan } from "../introspector/index.js" import { invoke } from "./invoke.js" import { load } from "./load.js" import { register } from "./register.js" -const __filename = fileURLToPath(import.meta.url) -const __dirname = path.dirname(__filename) - -const moduleSrcDirectory = `${__dirname}/../../src/` - -export async function entrypoint() { - // Pre list all files of the modules since we need it either for a registration - // or an invocation - const files = await listFiles(moduleSrcDirectory) - +export async function entrypoint(files: string[]) { // Start a Dagger session to get the call context await connection( async () => { diff --git a/sdk/typescript/entrypoint/invoke.ts b/sdk/typescript/src/module/entrypoint/invoke.ts similarity index 76% rename from sdk/typescript/entrypoint/invoke.ts rename to sdk/typescript/src/module/entrypoint/invoke.ts index 325228208a..474c6f3d3f 100644 --- a/sdk/typescript/entrypoint/invoke.ts +++ b/sdk/typescript/src/module/entrypoint/invoke.ts @@ -1,11 +1,13 @@ -import { FunctionNotFound } from "../common/errors/FunctionNotFound.js" -import { Executor } from "../introspector/executor/executor.js" -import { registry } from "../introspector/registry/registry.js" -import { DaggerConstructor as Constructor } from "../introspector/scanner/dagger_module/constructor.js" -import { DaggerEnumBase } from "../introspector/scanner/dagger_module/enumBase.js" -import { DaggerFunction as Method } from "../introspector/scanner/dagger_module/function.js" -import { DaggerModule } from "../introspector/scanner/dagger_module/module.js" -import { DaggerObjectBase } from "../introspector/scanner/dagger_module/objectBase.js" +import { FunctionNotFound } from "../../common/errors/index.js" +import { Executor } from "../executor.js" +import { + DaggerConstructor as Constructor, + DaggerFunction as Method, + DaggerEnumBase, + DaggerModule, + DaggerObjectBase, +} from "../introspector/dagger_module/index.js" +import { registry } from "../registry.js" import { InvokeCtx } from "./context.js" import { loadResult, diff --git a/sdk/typescript/entrypoint/load.ts b/sdk/typescript/src/module/entrypoint/load.ts similarity index 90% rename from sdk/typescript/entrypoint/load.ts rename to sdk/typescript/src/module/entrypoint/load.ts index 046329f3c6..4a282901b3 100644 --- a/sdk/typescript/entrypoint/load.ts +++ b/sdk/typescript/src/module/entrypoint/load.ts @@ -1,17 +1,18 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import Module from "node:module" -import { dag, TypeDefKind } from "../api/client.gen.js" -import { Executor } from "../introspector/executor/executor.js" -import { Args } from "../introspector/executor/executor.js" -import { DaggerConstructor as Constructor } from "../introspector/scanner/dagger_module/constructor.js" -import { DaggerEnum } from "../introspector/scanner/dagger_module/enum.js" -import { DaggerEnumBase } from "../introspector/scanner/dagger_module/enumBase.js" -import { DaggerFunction as Method } from "../introspector/scanner/dagger_module/function.js" -import { DaggerModule } from "../introspector/scanner/dagger_module/module.js" -import { DaggerObject } from "../introspector/scanner/dagger_module/object.js" -import { DaggerObjectBase } from "../introspector/scanner/dagger_module/objectBase.js" -import { TypeDef } from "../introspector/scanner/typedef.js" +import { dag, TypeDefKind } from "../../api/client.gen.js" +import { Executor, Args } from "../executor.js" +import { + DaggerConstructor as Constructor, + DaggerFunction as Method, + DaggerEnum, + DaggerEnumBase, + DaggerModule, + DaggerObject, + DaggerObjectBase, +} from "../introspector/dagger_module/index.js" +import { TypeDef } from "../introspector/typedef.js" import { InvokeCtx } from "./context.js" /** diff --git a/sdk/typescript/entrypoint/register.ts b/sdk/typescript/src/module/entrypoint/register.ts similarity index 92% rename from sdk/typescript/entrypoint/register.ts rename to sdk/typescript/src/module/entrypoint/register.ts index beb84b1053..1ce4db6e69 100644 --- a/sdk/typescript/entrypoint/register.ts +++ b/sdk/typescript/src/module/entrypoint/register.ts @@ -5,18 +5,20 @@ import { ModuleID, TypeDef, TypeDefKind, -} from "../api/client.gen.js" -import { DaggerArguments as Arguments } from "../introspector/scanner/dagger_module/argument.js" -import { DaggerConstructor as Constructor } from "../introspector/scanner/dagger_module/constructor.js" -import { DaggerFunction as Method } from "../introspector/scanner/dagger_module/function.js" -import { DaggerModule } from "../introspector/scanner/dagger_module/module.js" +} from "../../api/client.gen.js" +import { + DaggerArguments as Arguments, + DaggerConstructor as Constructor, + DaggerFunction as Method, + DaggerModule, +} from "../introspector/dagger_module/index.js" import { EnumTypeDef, ListTypeDef, ObjectTypeDef, ScalarTypeDef, TypeDef as ScannerTypeDef, -} from "../introspector/scanner/typedef.js" +} from "../introspector/typedef.js" /** * Register the module files and returns its ID diff --git a/sdk/typescript/introspector/executor/executor.ts b/sdk/typescript/src/module/executor.ts similarity index 91% rename from sdk/typescript/introspector/executor/executor.ts rename to sdk/typescript/src/module/executor.ts index eb7370f796..4cd12685b7 100644 --- a/sdk/typescript/introspector/executor/executor.ts +++ b/sdk/typescript/src/module/executor.ts @@ -1,8 +1,8 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import Module from "node:module" -import { FunctionNotFound } from "../../common/errors/FunctionNotFound.js" -import { DaggerModule } from "../scanner/dagger_module/module.js" +import { FunctionNotFound } from "../common/errors/index.js" +import { DaggerModule } from "./introspector/dagger_module/index.js" export type State = { [property: string]: any } diff --git a/sdk/typescript/introspector/scanner/case_convertor.ts b/sdk/typescript/src/module/introspector/case_convertor.ts similarity index 100% rename from sdk/typescript/introspector/scanner/case_convertor.ts rename to sdk/typescript/src/module/introspector/case_convertor.ts diff --git a/sdk/typescript/introspector/scanner/dagger_module/argument.ts b/sdk/typescript/src/module/introspector/dagger_module/argument.ts similarity index 94% rename from sdk/typescript/introspector/scanner/dagger_module/argument.ts rename to sdk/typescript/src/module/introspector/dagger_module/argument.ts index 2117ae59a3..524727d612 100644 --- a/sdk/typescript/introspector/scanner/dagger_module/argument.ts +++ b/sdk/typescript/src/module/introspector/dagger_module/argument.ts @@ -2,14 +2,14 @@ import ts from "typescript" import { TypeDefKind } from "../../../api/client.gen.js" -import { IntrospectionError } from "../../../common/errors/IntrospectionError.js" -import { ArgumentOptions } from "../../registry/registry.js" +import { IntrospectionError } from "../../../common/errors/index.js" +import { ArgumentOptions } from "../../registry.js" import { TypeDef } from "../typedef.js" -import { AST } from "../typescript_module/ast.js" import { + AST, isTypeDefResolved, resolveTypeDef, -} from "../typescript_module/typedef_utils.js" +} from "../typescript_module/index.js" import { ARGUMENT_DECORATOR } from "./decorator.js" import { References } from "./reference.js" diff --git a/sdk/typescript/introspector/scanner/dagger_module/constructor.ts b/sdk/typescript/src/module/introspector/dagger_module/constructor.ts similarity index 95% rename from sdk/typescript/introspector/scanner/dagger_module/constructor.ts rename to sdk/typescript/src/module/introspector/dagger_module/constructor.ts index 0a925659cd..843ceea581 100644 --- a/sdk/typescript/introspector/scanner/dagger_module/constructor.ts +++ b/sdk/typescript/src/module/introspector/dagger_module/constructor.ts @@ -1,6 +1,6 @@ import ts from "typescript" -import { AST } from "../typescript_module/ast.js" +import { AST } from "../typescript_module/index.js" import { DaggerArgument, DaggerArguments } from "./argument.js" import { References } from "./reference.js" diff --git a/sdk/typescript/introspector/scanner/dagger_module/decorator.ts b/sdk/typescript/src/module/introspector/dagger_module/decorator.ts similarity index 80% rename from sdk/typescript/introspector/scanner/dagger_module/decorator.ts rename to sdk/typescript/src/module/introspector/dagger_module/decorator.ts index 720999b862..04ed1160ce 100644 --- a/sdk/typescript/introspector/scanner/dagger_module/decorator.ts +++ b/sdk/typescript/src/module/introspector/dagger_module/decorator.ts @@ -1,10 +1,4 @@ -import { - argument, - func, - object, - enumType, - field, -} from "../../decorators/decorators.js" +import { argument, func, object, enumType, field } from "../../decorators.js" export type DaggerDecorators = | "object" diff --git a/sdk/typescript/introspector/scanner/dagger_module/enum.ts b/sdk/typescript/src/module/introspector/dagger_module/enum.ts similarity index 93% rename from sdk/typescript/introspector/scanner/dagger_module/enum.ts rename to sdk/typescript/src/module/introspector/dagger_module/enum.ts index 11742c12b1..ec02a322f2 100644 --- a/sdk/typescript/introspector/scanner/dagger_module/enum.ts +++ b/sdk/typescript/src/module/introspector/dagger_module/enum.ts @@ -1,7 +1,7 @@ import ts from "typescript" -import { IntrospectionError } from "../../../common/errors/IntrospectionError.js" -import { AST } from "../typescript_module/ast.js" +import { IntrospectionError } from "../../../common/errors/index.js" +import { AST } from "../typescript_module/index.js" import { DaggerEnumBase, DaggerEnumBaseValue } from "./enumBase.js" export type DaggerEnums = { [name: string]: DaggerEnum } diff --git a/sdk/typescript/introspector/scanner/dagger_module/enumBase.ts b/sdk/typescript/src/module/introspector/dagger_module/enumBase.ts similarity index 100% rename from sdk/typescript/introspector/scanner/dagger_module/enumBase.ts rename to sdk/typescript/src/module/introspector/dagger_module/enumBase.ts diff --git a/sdk/typescript/introspector/scanner/dagger_module/enumClass.ts b/sdk/typescript/src/module/introspector/dagger_module/enumClass.ts similarity index 88% rename from sdk/typescript/introspector/scanner/dagger_module/enumClass.ts rename to sdk/typescript/src/module/introspector/dagger_module/enumClass.ts index 9eef224c56..a68d58247d 100644 --- a/sdk/typescript/introspector/scanner/dagger_module/enumClass.ts +++ b/sdk/typescript/src/module/introspector/dagger_module/enumClass.ts @@ -1,12 +1,12 @@ import ts from "typescript" -import { IntrospectionError } from "../../../common/errors/IntrospectionError.js" -import { AST } from "../typescript_module/ast.js" +import { IntrospectionError } from "../../../common/errors/index.js" +import { AST } from "../typescript_module/index.js" import { DaggerEnumBase, DaggerEnumBaseValue } from "./enumBase.js" export type DaggerEnumClasses = { [name: string]: DaggerEnumClass } -export type DaggerEnumValues = { [name: string]: DaggerEnumClassValue } +export type DaggerEnumClassValues = { [name: string]: DaggerEnumClassValue } export class DaggerEnumClassValue implements DaggerEnumBaseValue { public name: string @@ -42,7 +42,7 @@ export class DaggerEnumClassValue implements DaggerEnumBaseValue { export class DaggerEnumClass implements DaggerEnumBase { public name: string public description: string - public values: DaggerEnumValues = {} + public values: DaggerEnumClassValues = {} private symbol: ts.Symbol diff --git a/sdk/typescript/introspector/scanner/dagger_module/function.ts b/sdk/typescript/src/module/introspector/dagger_module/function.ts similarity index 94% rename from sdk/typescript/introspector/scanner/dagger_module/function.ts rename to sdk/typescript/src/module/introspector/dagger_module/function.ts index b155e027ec..c42ddec07b 100644 --- a/sdk/typescript/introspector/scanner/dagger_module/function.ts +++ b/sdk/typescript/src/module/introspector/dagger_module/function.ts @@ -1,13 +1,13 @@ import ts from "typescript" import { TypeDefKind } from "../../../api/client.gen.js" -import { IntrospectionError } from "../../../common/errors/IntrospectionError.js" +import { IntrospectionError } from "../../../common/errors/index.js" import { TypeDef } from "../typedef.js" -import { AST } from "../typescript_module/ast.js" import { + AST, isTypeDefResolved, resolveTypeDef, -} from "../typescript_module/typedef_utils.js" +} from "../typescript_module/index.js" import { DaggerArgument, DaggerArguments } from "./argument.js" import { FUNCTION_DECORATOR } from "./decorator.js" import { References } from "./reference.js" diff --git a/sdk/typescript/src/module/introspector/dagger_module/index.ts b/sdk/typescript/src/module/introspector/dagger_module/index.ts new file mode 100644 index 0000000000..58f43adb7a --- /dev/null +++ b/sdk/typescript/src/module/introspector/dagger_module/index.ts @@ -0,0 +1,12 @@ +export * from "./constructor.js" +export * from "./argument.js" +export * from "./enum.js" +export * from "./enumBase.js" +export * from "./enumClass.js" +export * from "./function.js" +export * from "./module.js" +export * from "./object.js" +export * from "./objectBase.js" +export * from "./reference.js" +export * from "./typeObject.js" +export * from "./decorator.js" diff --git a/sdk/typescript/introspector/scanner/dagger_module/module.ts b/sdk/typescript/src/module/introspector/dagger_module/module.ts similarity index 98% rename from sdk/typescript/introspector/scanner/dagger_module/module.ts rename to sdk/typescript/src/module/introspector/dagger_module/module.ts index ea1c6a568f..899a76aaa7 100644 --- a/sdk/typescript/introspector/scanner/dagger_module/module.ts +++ b/sdk/typescript/src/module/introspector/dagger_module/module.ts @@ -2,13 +2,13 @@ import Module from "node:module" import ts from "typescript" import { TypeDefKind } from "../../../api/client.gen.js" -import { IntrospectionError } from "../../../common/errors/IntrospectionError.js" +import { IntrospectionError } from "../../../common/errors/index.js" import { + findModuleByExportedName, AST, CLIENT_GEN_FILE, ResolvedNodeWithSymbol, -} from "../typescript_module/ast.js" -import { findModuleByExportedName } from "../typescript_module/explorer.js" +} from "../typescript_module/index.js" import { ENUM_DECORATOR, OBJECT_DECORATOR } from "./decorator.js" import { DaggerEnum } from "./enum.js" import { DaggerEnumsBase } from "./enumBase.js" diff --git a/sdk/typescript/introspector/scanner/dagger_module/object.ts b/sdk/typescript/src/module/introspector/dagger_module/object.ts similarity index 96% rename from sdk/typescript/introspector/scanner/dagger_module/object.ts rename to sdk/typescript/src/module/introspector/dagger_module/object.ts index 6a6645a410..8756ef4ea4 100644 --- a/sdk/typescript/introspector/scanner/dagger_module/object.ts +++ b/sdk/typescript/src/module/introspector/dagger_module/object.ts @@ -1,7 +1,7 @@ import ts from "typescript" -import { IntrospectionError } from "../../../common/errors/IntrospectionError.js" -import { AST } from "../typescript_module/ast.js" +import { IntrospectionError } from "../../../common/errors/index.js" +import { AST } from "../typescript_module/index.js" import { DaggerConstructor } from "./constructor.js" import { FUNCTION_DECORATOR, OBJECT_DECORATOR } from "./decorator.js" import { DaggerFunction, DaggerFunctions } from "./function.js" diff --git a/sdk/typescript/introspector/scanner/dagger_module/objectBase.ts b/sdk/typescript/src/module/introspector/dagger_module/objectBase.ts similarity index 100% rename from sdk/typescript/introspector/scanner/dagger_module/objectBase.ts rename to sdk/typescript/src/module/introspector/dagger_module/objectBase.ts diff --git a/sdk/typescript/introspector/scanner/dagger_module/property.ts b/sdk/typescript/src/module/introspector/dagger_module/property.ts similarity index 94% rename from sdk/typescript/introspector/scanner/dagger_module/property.ts rename to sdk/typescript/src/module/introspector/dagger_module/property.ts index bd2d956ab5..fe3cc0416b 100644 --- a/sdk/typescript/introspector/scanner/dagger_module/property.ts +++ b/sdk/typescript/src/module/introspector/dagger_module/property.ts @@ -1,13 +1,13 @@ import ts from "typescript" import { TypeDefKind } from "../../../api/client.gen.js" -import { IntrospectionError } from "../../../common/errors/IntrospectionError.js" +import { IntrospectionError } from "../../../common/errors/index.js" import { TypeDef } from "../typedef.js" -import { AST } from "../typescript_module/ast.js" import { + AST, isTypeDefResolved, resolveTypeDef, -} from "../typescript_module/typedef_utils.js" +} from "../typescript_module/index.js" import { FIELD_DECORATOR, FUNCTION_DECORATOR } from "./decorator.js" import { DaggerObjectPropertyBase } from "./objectBase.js" import { References } from "./reference.js" diff --git a/sdk/typescript/introspector/scanner/dagger_module/reference.ts b/sdk/typescript/src/module/introspector/dagger_module/reference.ts similarity index 100% rename from sdk/typescript/introspector/scanner/dagger_module/reference.ts rename to sdk/typescript/src/module/introspector/dagger_module/reference.ts diff --git a/sdk/typescript/introspector/scanner/dagger_module/typeObject.ts b/sdk/typescript/src/module/introspector/dagger_module/typeObject.ts similarity index 93% rename from sdk/typescript/introspector/scanner/dagger_module/typeObject.ts rename to sdk/typescript/src/module/introspector/dagger_module/typeObject.ts index aa81615857..5ee4892735 100644 --- a/sdk/typescript/introspector/scanner/dagger_module/typeObject.ts +++ b/sdk/typescript/src/module/introspector/dagger_module/typeObject.ts @@ -1,7 +1,7 @@ import ts from "typescript" -import { IntrospectionError } from "../../../common/errors/IntrospectionError.js" -import { AST } from "../typescript_module/ast.js" +import { IntrospectionError } from "../../../common/errors/index.js" +import { AST } from "../typescript_module/index.js" import { DaggerObjectBase } from "./objectBase.js" import { References } from "./reference.js" import { diff --git a/sdk/typescript/introspector/scanner/dagger_module/typeObjectProperty.ts b/sdk/typescript/src/module/introspector/dagger_module/typeObjectProperty.ts similarity index 91% rename from sdk/typescript/introspector/scanner/dagger_module/typeObjectProperty.ts rename to sdk/typescript/src/module/introspector/dagger_module/typeObjectProperty.ts index 221470df53..7afa10a41a 100644 --- a/sdk/typescript/introspector/scanner/dagger_module/typeObjectProperty.ts +++ b/sdk/typescript/src/module/introspector/dagger_module/typeObjectProperty.ts @@ -1,13 +1,13 @@ import ts from "typescript" import { TypeDefKind } from "../../../api/client.gen.js" -import { IntrospectionError } from "../../../common/errors/IntrospectionError.js" +import { IntrospectionError } from "../../../common/errors/index.js" import { TypeDef } from "../typedef.js" -import { AST } from "../typescript_module/ast.js" import { + AST, isTypeDefResolved, resolveTypeDef, -} from "../typescript_module/typedef_utils.js" +} from "../typescript_module/index.js" import { DaggerObjectPropertyBase } from "./objectBase.js" import { References } from "./reference.js" diff --git a/sdk/typescript/introspector/scanner/scan.ts b/sdk/typescript/src/module/introspector/index.ts similarity index 68% rename from sdk/typescript/introspector/scanner/scan.ts rename to sdk/typescript/src/module/introspector/index.ts index 09136818b5..6c61aacf22 100644 --- a/sdk/typescript/introspector/scanner/scan.ts +++ b/sdk/typescript/src/module/introspector/index.ts @@ -1,8 +1,8 @@ -import { IntrospectionError } from "../../common/errors/IntrospectionError.js" -import { load } from "../../entrypoint/load.js" +import { IntrospectionError } from "../../common/errors/index.js" +import { load } from "../entrypoint/load.js" import { convertToPascalCase } from "./case_convertor.js" -import { DaggerModule } from "./dagger_module/module.js" -import { AST } from "./typescript_module/ast.js" +import { DaggerModule } from "./dagger_module/index.js" +import { AST } from "./typescript_module/index.js" export async function scan(files: string[], moduleName = "") { if (files.length === 0) { diff --git a/sdk/typescript/introspector/test/case_convertor.spec.ts b/sdk/typescript/src/module/introspector/test/case_convertor.spec.ts similarity index 94% rename from sdk/typescript/introspector/test/case_convertor.spec.ts rename to sdk/typescript/src/module/introspector/test/case_convertor.spec.ts index a68d0457e4..3270769d69 100644 --- a/sdk/typescript/introspector/test/case_convertor.spec.ts +++ b/sdk/typescript/src/module/introspector/test/case_convertor.spec.ts @@ -1,6 +1,6 @@ import assert from "assert" -import { convertToPascalCase } from "../scanner/case_convertor.js" +import { convertToPascalCase } from "../case_convertor.js" describe("case convertor", function () { describe("convertToPascalCase", function () { diff --git a/sdk/typescript/introspector/test/files.spec.ts b/sdk/typescript/src/module/introspector/test/files.spec.ts similarity index 100% rename from sdk/typescript/introspector/test/files.spec.ts rename to sdk/typescript/src/module/introspector/test/files.spec.ts diff --git a/sdk/typescript/introspector/test/invoke.spec.ts b/sdk/typescript/src/module/introspector/test/invoke.spec.ts similarity index 87% rename from sdk/typescript/introspector/test/invoke.spec.ts rename to sdk/typescript/src/module/introspector/test/invoke.spec.ts index d2f3d6058a..9ad4e9d348 100644 --- a/sdk/typescript/introspector/test/invoke.spec.ts +++ b/sdk/typescript/src/module/introspector/test/invoke.spec.ts @@ -4,12 +4,12 @@ import Module from "node:module" import * as path from "path" import { fileURLToPath } from "url" -import { connection } from "../../connect.js" +import { connection } from "../../../connect.js" import { InvokeCtx } from "../../entrypoint/context.js" import { invoke } from "../../entrypoint/invoke.js" import { load } from "../../entrypoint/load.js" -import { Executor } from "../executor/executor.js" -import { scan } from "../scanner/scan.js" +import { Executor } from "../../executor.js" +import { scan } from "../index.js" import { listFiles } from "../utils/files.js" const __filename = fileURLToPath(import.meta.url) @@ -120,68 +120,65 @@ describe("Invoke typescript function", function () { const executor = new Executor(modules, scanResult) // We wrap the execution into a Dagger connection - await connection( - async () => { - // Mocking the fetch from the dagger API - const inputBase = { - parentName: "State", - fnName: "base", - parentArgs: { - version: "3.16.2", - user: "root", - packages: [], - }, - fnArgs: { version: "3.16.0" }, - } - - const inputBaseResult = await invoke(executor, scanResult, inputBase) + await connection(async () => { + // Mocking the fetch from the dagger API + const inputBase = { + parentName: "State", + fnName: "base", + parentArgs: { + version: "3.16.2", + user: "root", + packages: [], + }, + fnArgs: { version: "3.16.0" }, + } - // Assert state has been updated by the function - assert.equal("3.16.0", inputBaseResult.version) - assert.equal("root", inputBaseResult.user) - assert.deepEqual([], inputBaseResult.packages) - assert.notEqual(undefined, inputBaseResult.ctr) + const inputBaseResult = await invoke(executor, scanResult, inputBase) - const inputInstall = { - parentName: "State", - fnName: "install", - // Would be fetched from dagger and parsed from dagger entrypoint - parentArgs: JSON.parse(JSON.stringify(inputBaseResult)), - fnArgs: { - pkgs: ["jq"], - }, - } + // Assert state has been updated by the function + assert.equal("3.16.0", inputBaseResult.version) + assert.equal("root", inputBaseResult.user) + assert.deepEqual([], inputBaseResult.packages) + assert.notEqual(undefined, inputBaseResult.ctr) - const inputInstallResult = await invoke( - executor, - scanResult, - inputInstall, - ) + const inputInstall = { + parentName: "State", + fnName: "install", + // Would be fetched from dagger and parsed from dagger entrypoint + parentArgs: JSON.parse(JSON.stringify(inputBaseResult)), + fnArgs: { + pkgs: ["jq"], + }, + } - // Verify state conservation - assert.equal("3.16.0", inputInstallResult.version) - assert.equal("root", inputInstallResult.user) - assert.deepEqual(["jq"], inputInstallResult.packages) - assert.notEqual(undefined, inputInstallResult.ctr) - - const inputExec = { - parentName: "State", - fnName: "exec", - // Would be fetched from dagger and parsed from dagger entrypoint - parentArgs: JSON.parse(JSON.stringify(inputInstallResult)), - fnArgs: { - cmd: ["jq", "-h"], - }, - } + const inputInstallResult = await invoke( + executor, + scanResult, + inputInstall, + ) + + // Verify state conservation + assert.equal("3.16.0", inputInstallResult.version) + assert.equal("root", inputInstallResult.user) + assert.deepEqual(["jq"], inputInstallResult.packages) + assert.notEqual(undefined, inputInstallResult.ctr) + + const inputExec = { + parentName: "State", + fnName: "exec", + // Would be fetched from dagger and parsed from dagger entrypoint + parentArgs: JSON.parse(JSON.stringify(inputInstallResult)), + fnArgs: { + cmd: ["jq", "-h"], + }, + } - const result = await invoke(executor, scanResult, inputExec) + const result = await invoke(executor, scanResult, inputExec) - // We verify the result, this could be serialized and set using `dag.ReturnValue` as a response - // In that case, we verify it's not failing and that it returned a value - assert.notEqual("", result) - }, - { LogOutput: process.stderr }, - ) + // We verify the result, this could be serialized and set using `dag.ReturnValue` as a response + // In that case, we verify it's not failing and that it returned a value + assert.notEqual("", result) + }) }) it("Should correctly handle multiple objects as fields", async function () { diff --git a/sdk/typescript/introspector/test/registry.spec.ts b/sdk/typescript/src/module/introspector/test/registry.spec.ts similarity index 97% rename from sdk/typescript/introspector/test/registry.spec.ts rename to sdk/typescript/src/module/introspector/test/registry.spec.ts index 2daf93ee71..fe8ece59e2 100644 --- a/sdk/typescript/introspector/test/registry.spec.ts +++ b/sdk/typescript/src/module/introspector/test/registry.spec.ts @@ -1,9 +1,9 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ import assert from "assert" -import { dag, Container } from "../../api/client.gen.js" -import { connection } from "../../connect.js" -import { Registry } from "../registry/registry.js" +import { dag, Container } from "../../../api/client.gen.js" +import { connection } from "../../../connect.js" +import { Registry } from "../../registry.js" describe("Registry", function () { it("Should support function", async function () { diff --git a/sdk/typescript/introspector/test/scan.spec.ts b/sdk/typescript/src/module/introspector/test/scan.spec.ts similarity index 97% rename from sdk/typescript/introspector/test/scan.spec.ts rename to sdk/typescript/src/module/introspector/test/scan.spec.ts index 9af0a7424e..0e70851a77 100644 --- a/sdk/typescript/introspector/test/scan.spec.ts +++ b/sdk/typescript/src/module/introspector/test/scan.spec.ts @@ -4,7 +4,7 @@ import * as fs from "fs" import path from "path" import { fileURLToPath } from "url" -import { scan } from "../scanner/scan.js" +import { scan } from "../index.js" import { listFiles } from "../utils/files.js" const __filename = fileURLToPath(import.meta.url) @@ -93,7 +93,7 @@ describe("scan by reference TypeScript", function () { ] for (const test of testCases) { - it(test.name, async function () { + it(`${test.name} - ${test.directory}`, async function () { this.timeout(60000) try { diff --git a/sdk/typescript/introspector/test/testdata/alias/expected.json b/sdk/typescript/src/module/introspector/test/testdata/alias/expected.json similarity index 100% rename from sdk/typescript/introspector/test/testdata/alias/expected.json rename to sdk/typescript/src/module/introspector/test/testdata/alias/expected.json diff --git a/sdk/typescript/introspector/test/testdata/alias/index.ts b/sdk/typescript/src/module/introspector/test/testdata/alias/index.ts similarity index 88% rename from sdk/typescript/introspector/test/testdata/alias/index.ts rename to sdk/typescript/src/module/introspector/test/testdata/alias/index.ts index 7af824ab40..5f53b80b79 100644 --- a/sdk/typescript/introspector/test/testdata/alias/index.ts +++ b/sdk/typescript/src/module/introspector/test/testdata/alias/index.ts @@ -1,5 +1,5 @@ -import { dag, Container } from "../../../../api/client.gen.js" -import { func, object } from "../../../decorators/decorators.js" +import { dag, Container } from "../../../../../api/client.gen.js" +import { func, object } from "../../../../decorators.js" @object() export class Bar { diff --git a/sdk/typescript/introspector/test/testdata/constructor/expected.json b/sdk/typescript/src/module/introspector/test/testdata/constructor/expected.json similarity index 100% rename from sdk/typescript/introspector/test/testdata/constructor/expected.json rename to sdk/typescript/src/module/introspector/test/testdata/constructor/expected.json diff --git a/sdk/typescript/introspector/test/testdata/constructor/index.ts b/sdk/typescript/src/module/introspector/test/testdata/constructor/index.ts similarity index 79% rename from sdk/typescript/introspector/test/testdata/constructor/index.ts rename to sdk/typescript/src/module/introspector/test/testdata/constructor/index.ts index d33e1ff319..212e06b0a6 100644 --- a/sdk/typescript/introspector/test/testdata/constructor/index.ts +++ b/sdk/typescript/src/module/introspector/test/testdata/constructor/index.ts @@ -1,7 +1,7 @@ /** * Constructor module */ -import { func, object } from "../../../decorators/decorators.js" +import { func, object } from "../../../../decorators.js" /** * Constructor class diff --git a/sdk/typescript/introspector/test/testdata/context/expected.json b/sdk/typescript/src/module/introspector/test/testdata/context/expected.json similarity index 100% rename from sdk/typescript/introspector/test/testdata/context/expected.json rename to sdk/typescript/src/module/introspector/test/testdata/context/expected.json diff --git a/sdk/typescript/introspector/test/testdata/context/index.ts b/sdk/typescript/src/module/introspector/test/testdata/context/index.ts similarity index 70% rename from sdk/typescript/introspector/test/testdata/context/index.ts rename to sdk/typescript/src/module/introspector/test/testdata/context/index.ts index 99c75bba75..4840fbb019 100644 --- a/sdk/typescript/introspector/test/testdata/context/index.ts +++ b/sdk/typescript/src/module/introspector/test/testdata/context/index.ts @@ -1,5 +1,5 @@ -import { Directory } from "../../../../api/client.gen.js" -import { func, object, argument } from "../../../decorators/decorators.js" +import { Directory } from "../../../../../api/client.gen.js" +import { func, object, argument } from "../../../../decorators.js" @object() export class Context { diff --git a/sdk/typescript/introspector/test/testdata/coreEnums/expected.json b/sdk/typescript/src/module/introspector/test/testdata/coreEnums/expected.json similarity index 100% rename from sdk/typescript/introspector/test/testdata/coreEnums/expected.json rename to sdk/typescript/src/module/introspector/test/testdata/coreEnums/expected.json diff --git a/sdk/typescript/introspector/test/testdata/coreEnums/index.ts b/sdk/typescript/src/module/introspector/test/testdata/coreEnums/index.ts similarity index 67% rename from sdk/typescript/introspector/test/testdata/coreEnums/index.ts rename to sdk/typescript/src/module/introspector/test/testdata/coreEnums/index.ts index d7c2abe538..8e29838017 100644 --- a/sdk/typescript/introspector/test/testdata/coreEnums/index.ts +++ b/sdk/typescript/src/module/introspector/test/testdata/coreEnums/index.ts @@ -1,5 +1,5 @@ -import { ImageLayerCompression } from "../../../../api/client.gen.js" -import { func, object } from "../../../decorators/decorators.js" +import { ImageLayerCompression } from "../../../../../api/client.gen.js" +import { func, object } from "../../../../decorators.js" @object() export class CoreEnums { diff --git a/sdk/typescript/introspector/test/testdata/enums/expected.json b/sdk/typescript/src/module/introspector/test/testdata/enums/expected.json similarity index 100% rename from sdk/typescript/introspector/test/testdata/enums/expected.json rename to sdk/typescript/src/module/introspector/test/testdata/enums/expected.json diff --git a/sdk/typescript/introspector/test/testdata/enums/index.ts b/sdk/typescript/src/module/introspector/test/testdata/enums/index.ts similarity index 83% rename from sdk/typescript/introspector/test/testdata/enums/index.ts rename to sdk/typescript/src/module/introspector/test/testdata/enums/index.ts index 417d69a67b..8c5ab23d84 100644 --- a/sdk/typescript/introspector/test/testdata/enums/index.ts +++ b/sdk/typescript/src/module/introspector/test/testdata/enums/index.ts @@ -1,9 +1,4 @@ -import { - enumType, - field, - func, - object, -} from "../../../decorators/decorators.js" +import { enumType, field, func, object } from "../../../../decorators.js" /** * Enum for Status diff --git a/sdk/typescript/introspector/test/testdata/generate_expected_scan.ts b/sdk/typescript/src/module/introspector/test/testdata/generate_expected_scan.ts similarity index 91% rename from sdk/typescript/introspector/test/testdata/generate_expected_scan.ts rename to sdk/typescript/src/module/introspector/test/testdata/generate_expected_scan.ts index 2dcf3088a8..adf077acc0 100644 --- a/sdk/typescript/introspector/test/testdata/generate_expected_scan.ts +++ b/sdk/typescript/src/module/introspector/test/testdata/generate_expected_scan.ts @@ -2,9 +2,9 @@ import * as fs from "fs" import * as path from "path" import { fileURLToPath } from "url" -import { scan } from "../../scanner/scan.js" +import { scan } from "../../index.js" +import { DaggerModule } from "../../dagger_module/index.js" import { listFiles } from "../../utils/files.js" -import { DaggerModule } from "../../scanner/abtractions/module.js" const __filename = fileURLToPath(import.meta.url) const __dirname = path.dirname(__filename) @@ -24,7 +24,7 @@ async function generateExpectedScan() { let result: DaggerModule try { - result = scan(files, `${entry}`) + result = await scan(files, `${entry}`) } catch (e) { console.error(`Failed to scan ${entry}: ${e}`) continue diff --git a/sdk/typescript/introspector/test/testdata/helloWorld/expected.json b/sdk/typescript/src/module/introspector/test/testdata/helloWorld/expected.json similarity index 100% rename from sdk/typescript/introspector/test/testdata/helloWorld/expected.json rename to sdk/typescript/src/module/introspector/test/testdata/helloWorld/expected.json diff --git a/sdk/typescript/introspector/test/testdata/helloWorld/helloWorld.ts b/sdk/typescript/src/module/introspector/test/testdata/helloWorld/helloWorld.ts similarity index 69% rename from sdk/typescript/introspector/test/testdata/helloWorld/helloWorld.ts rename to sdk/typescript/src/module/introspector/test/testdata/helloWorld/helloWorld.ts index 6faa70ff4f..6402c42ccf 100644 --- a/sdk/typescript/introspector/test/testdata/helloWorld/helloWorld.ts +++ b/sdk/typescript/src/module/introspector/test/testdata/helloWorld/helloWorld.ts @@ -1,4 +1,4 @@ -import { func, object } from "../../../decorators/decorators.js" +import { func, object } from "../../../../decorators.js" /** * HelloWorld class diff --git a/sdk/typescript/introspector/test/testdata/helloWorld/toIgnore.md b/sdk/typescript/src/module/introspector/test/testdata/helloWorld/toIgnore.md similarity index 100% rename from sdk/typescript/introspector/test/testdata/helloWorld/toIgnore.md rename to sdk/typescript/src/module/introspector/test/testdata/helloWorld/toIgnore.md diff --git a/sdk/typescript/introspector/test/testdata/invalid/expected.json b/sdk/typescript/src/module/introspector/test/testdata/invalid/expected.json similarity index 100% rename from sdk/typescript/introspector/test/testdata/invalid/expected.json rename to sdk/typescript/src/module/introspector/test/testdata/invalid/expected.json diff --git a/sdk/typescript/introspector/test/testdata/invalid/index.ts b/sdk/typescript/src/module/introspector/test/testdata/invalid/index.ts similarity index 100% rename from sdk/typescript/introspector/test/testdata/invalid/index.ts rename to sdk/typescript/src/module/introspector/test/testdata/invalid/index.ts diff --git a/sdk/typescript/introspector/test/testdata/list/expected.json b/sdk/typescript/src/module/introspector/test/testdata/list/expected.json similarity index 100% rename from sdk/typescript/introspector/test/testdata/list/expected.json rename to sdk/typescript/src/module/introspector/test/testdata/list/expected.json diff --git a/sdk/typescript/introspector/test/testdata/list/index.ts b/sdk/typescript/src/module/introspector/test/testdata/list/index.ts similarity index 85% rename from sdk/typescript/introspector/test/testdata/list/index.ts rename to sdk/typescript/src/module/introspector/test/testdata/list/index.ts index ba28dd7bc8..21ce8fb7b9 100644 --- a/sdk/typescript/introspector/test/testdata/list/index.ts +++ b/sdk/typescript/src/module/introspector/test/testdata/list/index.ts @@ -1,4 +1,4 @@ -import { func, object } from "../../../decorators/decorators.js" +import { func, object } from "../../../../decorators.js" @object() export class Integer { diff --git a/sdk/typescript/introspector/test/testdata/minimal/expected.json b/sdk/typescript/src/module/introspector/test/testdata/minimal/expected.json similarity index 100% rename from sdk/typescript/introspector/test/testdata/minimal/expected.json rename to sdk/typescript/src/module/introspector/test/testdata/minimal/expected.json diff --git a/sdk/typescript/introspector/test/testdata/minimal/index.ts b/sdk/typescript/src/module/introspector/test/testdata/minimal/index.ts similarity index 70% rename from sdk/typescript/introspector/test/testdata/minimal/index.ts rename to sdk/typescript/src/module/introspector/test/testdata/minimal/index.ts index a718206e3d..7d06fe3003 100644 --- a/sdk/typescript/introspector/test/testdata/minimal/index.ts +++ b/sdk/typescript/src/module/introspector/test/testdata/minimal/index.ts @@ -1,4 +1,4 @@ -import { func, object } from "../../../decorators/decorators.js" +import { func, object } from "../../../../decorators.js" /** * This is the Minimal object @@ -9,16 +9,16 @@ export class Minimal { * This is a field */ @func() - foo: string = "bar"; + foo: string = "bar" @func() hello(): string { - return "hello"; + return "hello" } @func() echo(msg: string): string { - return this.echoOpts(msg, "...", 3); + return this.echoOpts(msg, "...", 3) } /** @@ -30,9 +30,9 @@ export class Minimal { */ @func() echoOpts(msg: string, suffix: string = "", times: number = 1): string { - msg = msg += suffix; + msg = msg += suffix - return msg.repeat(times); + return msg.repeat(times) } /** @@ -42,30 +42,30 @@ export class Minimal { @func() echoMaybe(msg: string, isQuestion = false): string { if (isQuestion) { - return this.echo(msg + "?"); + return this.echo(msg + "?") } - return this.echo(msg); + return this.echo(msg) } @func() echoOptional(msg: string = "default"): string { - return this.echo(msg); + return this.echo(msg) } @func() echoOptionalSlice(msg: string[] = ["foobar"]): string { - return this.echo(msg.join("+")); + return this.echo(msg.join("+")) } @func() echoes(msgs: string[]): string[] { - return [this.echo(msgs.join(" "))]; + return [this.echo(msgs.join(" "))] } @func() echoesVariadic(...msgs: string[]): string { - return this.echo(msgs.join(" ")); + return this.echo(msgs.join(" ")) } @func() diff --git a/sdk/typescript/introspector/test/testdata/multiArgs/expected.json b/sdk/typescript/src/module/introspector/test/testdata/multiArgs/expected.json similarity index 100% rename from sdk/typescript/introspector/test/testdata/multiArgs/expected.json rename to sdk/typescript/src/module/introspector/test/testdata/multiArgs/expected.json diff --git a/sdk/typescript/introspector/test/testdata/multiArgs/index.ts b/sdk/typescript/src/module/introspector/test/testdata/multiArgs/index.ts similarity index 74% rename from sdk/typescript/introspector/test/testdata/multiArgs/index.ts rename to sdk/typescript/src/module/introspector/test/testdata/multiArgs/index.ts index 797d949a3b..753a98a469 100644 --- a/sdk/typescript/introspector/test/testdata/multiArgs/index.ts +++ b/sdk/typescript/src/module/introspector/test/testdata/multiArgs/index.ts @@ -1,4 +1,4 @@ -import { func, object } from "../../../decorators/decorators.js" +import { func, object } from "../../../../decorators.js" @object() // eslint-disable-next-line @typescript-eslint/no-unused-vars diff --git a/sdk/typescript/introspector/test/testdata/multipleObjects/bar.ts b/sdk/typescript/src/module/introspector/test/testdata/multipleObjects/bar.ts similarity index 72% rename from sdk/typescript/introspector/test/testdata/multipleObjects/bar.ts rename to sdk/typescript/src/module/introspector/test/testdata/multipleObjects/bar.ts index dc0ab85785..af90e15504 100644 --- a/sdk/typescript/introspector/test/testdata/multipleObjects/bar.ts +++ b/sdk/typescript/src/module/introspector/test/testdata/multipleObjects/bar.ts @@ -1,8 +1,8 @@ /** * Should be ignored */ -import { dag } from "../../../../api/client.gen.js" -import { func, object } from "../../../decorators/decorators.js" +import { dag } from "../../../../../api/client.gen.js" +import { func, object } from "../../../../decorators.js" /** * Bar class diff --git a/sdk/typescript/introspector/test/testdata/multipleObjects/expected.json b/sdk/typescript/src/module/introspector/test/testdata/multipleObjects/expected.json similarity index 100% rename from sdk/typescript/introspector/test/testdata/multipleObjects/expected.json rename to sdk/typescript/src/module/introspector/test/testdata/multipleObjects/expected.json diff --git a/sdk/typescript/introspector/test/testdata/multipleObjects/foo.ts b/sdk/typescript/src/module/introspector/test/testdata/multipleObjects/foo.ts similarity index 80% rename from sdk/typescript/introspector/test/testdata/multipleObjects/foo.ts rename to sdk/typescript/src/module/introspector/test/testdata/multipleObjects/foo.ts index fbc79fbfe8..17cb1d6a34 100644 --- a/sdk/typescript/introspector/test/testdata/multipleObjects/foo.ts +++ b/sdk/typescript/src/module/introspector/test/testdata/multipleObjects/foo.ts @@ -3,7 +3,7 @@ * * Compose of bar but its file description should be ignore. */ -import { func, object } from "../../../decorators/decorators.js" +import { func, object } from "../../../../decorators.js" import { Bar } from "./bar.js" /** diff --git a/sdk/typescript/introspector/test/testdata/multipleObjectsAsFields/expected.json b/sdk/typescript/src/module/introspector/test/testdata/multipleObjectsAsFields/expected.json similarity index 100% rename from sdk/typescript/introspector/test/testdata/multipleObjectsAsFields/expected.json rename to sdk/typescript/src/module/introspector/test/testdata/multipleObjectsAsFields/expected.json diff --git a/sdk/typescript/introspector/test/testdata/multipleObjectsAsFields/index.ts b/sdk/typescript/src/module/introspector/test/testdata/multipleObjectsAsFields/index.ts similarity index 76% rename from sdk/typescript/introspector/test/testdata/multipleObjectsAsFields/index.ts rename to sdk/typescript/src/module/introspector/test/testdata/multipleObjectsAsFields/index.ts index e929a3afb6..88aac386ef 100644 --- a/sdk/typescript/introspector/test/testdata/multipleObjectsAsFields/index.ts +++ b/sdk/typescript/src/module/introspector/test/testdata/multipleObjectsAsFields/index.ts @@ -1,4 +1,4 @@ -import { object, func } from "../../../decorators/decorators.js" +import { object, func } from "../../../../decorators.js" import { Lint } from "./lint.js" import { Test } from "./test.js" diff --git a/sdk/typescript/introspector/test/testdata/multipleObjectsAsFields/lint.ts b/sdk/typescript/src/module/introspector/test/testdata/multipleObjectsAsFields/lint.ts similarity index 56% rename from sdk/typescript/introspector/test/testdata/multipleObjectsAsFields/lint.ts rename to sdk/typescript/src/module/introspector/test/testdata/multipleObjectsAsFields/lint.ts index 641c8e4570..b20f284d08 100644 --- a/sdk/typescript/introspector/test/testdata/multipleObjectsAsFields/lint.ts +++ b/sdk/typescript/src/module/introspector/test/testdata/multipleObjectsAsFields/lint.ts @@ -1,4 +1,4 @@ -import { func, object } from "../../../decorators/decorators.js" +import { func, object } from "../../../../decorators.js" @object() export class Lint { diff --git a/sdk/typescript/introspector/test/testdata/multipleObjectsAsFields/test.ts b/sdk/typescript/src/module/introspector/test/testdata/multipleObjectsAsFields/test.ts similarity index 56% rename from sdk/typescript/introspector/test/testdata/multipleObjectsAsFields/test.ts rename to sdk/typescript/src/module/introspector/test/testdata/multipleObjectsAsFields/test.ts index 811e7829a2..e4c3a0798e 100644 --- a/sdk/typescript/introspector/test/testdata/multipleObjectsAsFields/test.ts +++ b/sdk/typescript/src/module/introspector/test/testdata/multipleObjectsAsFields/test.ts @@ -1,4 +1,4 @@ -import { func, object } from "../../../decorators/decorators.js" +import { func, object } from "../../../../decorators.js" @object() export class Test { diff --git a/sdk/typescript/introspector/test/testdata/noDecorators/expected.json b/sdk/typescript/src/module/introspector/test/testdata/noDecorators/expected.json similarity index 100% rename from sdk/typescript/introspector/test/testdata/noDecorators/expected.json rename to sdk/typescript/src/module/introspector/test/testdata/noDecorators/expected.json diff --git a/sdk/typescript/introspector/test/testdata/noDecorators/noDecorators.ts b/sdk/typescript/src/module/introspector/test/testdata/noDecorators/noDecorators.ts similarity index 77% rename from sdk/typescript/introspector/test/testdata/noDecorators/noDecorators.ts rename to sdk/typescript/src/module/introspector/test/testdata/noDecorators/noDecorators.ts index 1f56082c85..902a2694ef 100644 --- a/sdk/typescript/introspector/test/testdata/noDecorators/noDecorators.ts +++ b/sdk/typescript/src/module/introspector/test/testdata/noDecorators/noDecorators.ts @@ -1,4 +1,4 @@ -import { func } from "../../../decorators/decorators.js" +import { func } from "../../../../decorators.js" /** * HelloWorld class diff --git a/sdk/typescript/introspector/test/testdata/objectParam/expected.json b/sdk/typescript/src/module/introspector/test/testdata/objectParam/expected.json similarity index 100% rename from sdk/typescript/introspector/test/testdata/objectParam/expected.json rename to sdk/typescript/src/module/introspector/test/testdata/objectParam/expected.json diff --git a/sdk/typescript/introspector/test/testdata/objectParam/index.ts b/sdk/typescript/src/module/introspector/test/testdata/objectParam/index.ts similarity index 89% rename from sdk/typescript/introspector/test/testdata/objectParam/index.ts rename to sdk/typescript/src/module/introspector/test/testdata/objectParam/index.ts index d86d21ced6..0a7c7ddd78 100644 --- a/sdk/typescript/introspector/test/testdata/objectParam/index.ts +++ b/sdk/typescript/src/module/introspector/test/testdata/objectParam/index.ts @@ -1,4 +1,4 @@ -import { func, object } from "../../../decorators/decorators.js" +import { func, object } from "../../../../decorators.js" @object() export class Message { diff --git a/sdk/typescript/introspector/test/testdata/optionalParameter/expected.json b/sdk/typescript/src/module/introspector/test/testdata/optionalParameter/expected.json similarity index 100% rename from sdk/typescript/introspector/test/testdata/optionalParameter/expected.json rename to sdk/typescript/src/module/introspector/test/testdata/optionalParameter/expected.json diff --git a/sdk/typescript/introspector/test/testdata/optionalParameter/index.ts b/sdk/typescript/src/module/introspector/test/testdata/optionalParameter/index.ts similarity index 92% rename from sdk/typescript/introspector/test/testdata/optionalParameter/index.ts rename to sdk/typescript/src/module/introspector/test/testdata/optionalParameter/index.ts index ec0696c986..4b578fee60 100644 --- a/sdk/typescript/introspector/test/testdata/optionalParameter/index.ts +++ b/sdk/typescript/src/module/introspector/test/testdata/optionalParameter/index.ts @@ -1,4 +1,4 @@ -import { func, object } from "../../../decorators/decorators.js" +import { func, object } from "../../../../decorators.js" /** * OptionalParameter class diff --git a/sdk/typescript/introspector/test/testdata/primitives/index.ts b/sdk/typescript/src/module/introspector/test/testdata/primitives/index.ts similarity index 76% rename from sdk/typescript/introspector/test/testdata/primitives/index.ts rename to sdk/typescript/src/module/introspector/test/testdata/primitives/index.ts index 25e9244e31..9966e56c62 100644 --- a/sdk/typescript/introspector/test/testdata/primitives/index.ts +++ b/sdk/typescript/src/module/introspector/test/testdata/primitives/index.ts @@ -1,4 +1,4 @@ -import { func, object } from "../../../decorators/decorators.js" +import { func, object } from "../../../../decorators.js" @object() export class Primitives { diff --git a/sdk/typescript/introspector/test/testdata/privateMethod/expected.json b/sdk/typescript/src/module/introspector/test/testdata/privateMethod/expected.json similarity index 100% rename from sdk/typescript/introspector/test/testdata/privateMethod/expected.json rename to sdk/typescript/src/module/introspector/test/testdata/privateMethod/expected.json diff --git a/sdk/typescript/introspector/test/testdata/privateMethod/index.ts b/sdk/typescript/src/module/introspector/test/testdata/privateMethod/index.ts similarity index 85% rename from sdk/typescript/introspector/test/testdata/privateMethod/index.ts rename to sdk/typescript/src/module/introspector/test/testdata/privateMethod/index.ts index 0287b44085..6d22791fe8 100644 --- a/sdk/typescript/introspector/test/testdata/privateMethod/index.ts +++ b/sdk/typescript/src/module/introspector/test/testdata/privateMethod/index.ts @@ -1,7 +1,7 @@ /** * HelloWorld module with private things */ -import { func, object } from "../../../decorators/decorators.js" +import { func, object } from "../../../../decorators.js" /** * PrivateMethod class diff --git a/sdk/typescript/introspector/test/testdata/references/expected.json b/sdk/typescript/src/module/introspector/test/testdata/references/expected.json similarity index 100% rename from sdk/typescript/introspector/test/testdata/references/expected.json rename to sdk/typescript/src/module/introspector/test/testdata/references/expected.json diff --git a/sdk/typescript/introspector/test/testdata/references/index.ts b/sdk/typescript/src/module/introspector/test/testdata/references/index.ts similarity index 92% rename from sdk/typescript/introspector/test/testdata/references/index.ts rename to sdk/typescript/src/module/introspector/test/testdata/references/index.ts index 364473702f..44351f7190 100644 --- a/sdk/typescript/introspector/test/testdata/references/index.ts +++ b/sdk/typescript/src/module/introspector/test/testdata/references/index.ts @@ -1,4 +1,4 @@ -import { func, object } from "../../../decorators/decorators.js" +import { func, object } from "../../../../decorators.js" import { defaultEnum, TestEnum } from "./types.js" import type { STR, Data } from "./types.js" diff --git a/sdk/typescript/introspector/test/testdata/references/types.ts b/sdk/typescript/src/module/introspector/test/testdata/references/types.ts similarity index 100% rename from sdk/typescript/introspector/test/testdata/references/types.ts rename to sdk/typescript/src/module/introspector/test/testdata/references/types.ts diff --git a/sdk/typescript/introspector/test/testdata/scalar/expected.json b/sdk/typescript/src/module/introspector/test/testdata/scalar/expected.json similarity index 100% rename from sdk/typescript/introspector/test/testdata/scalar/expected.json rename to sdk/typescript/src/module/introspector/test/testdata/scalar/expected.json diff --git a/sdk/typescript/introspector/test/testdata/scalar/index.ts b/sdk/typescript/src/module/introspector/test/testdata/scalar/index.ts similarity index 65% rename from sdk/typescript/introspector/test/testdata/scalar/index.ts rename to sdk/typescript/src/module/introspector/test/testdata/scalar/index.ts index 1aff7eb8f1..c166b5f36b 100644 --- a/sdk/typescript/introspector/test/testdata/scalar/index.ts +++ b/sdk/typescript/src/module/introspector/test/testdata/scalar/index.ts @@ -1,5 +1,5 @@ -import type { Platform } from "../../../../api/client.gen.js" -import { func, object } from "../../../decorators/decorators.js" +import type { Platform } from "../../../../../api/client.gen.js" +import { func, object } from "../../../../decorators.js" @object() export class Scalar { diff --git a/sdk/typescript/introspector/test/testdata/state/expected.json b/sdk/typescript/src/module/introspector/test/testdata/state/expected.json similarity index 100% rename from sdk/typescript/introspector/test/testdata/state/expected.json rename to sdk/typescript/src/module/introspector/test/testdata/state/expected.json diff --git a/sdk/typescript/introspector/test/testdata/state/state.ts b/sdk/typescript/src/module/introspector/test/testdata/state/state.ts similarity index 88% rename from sdk/typescript/introspector/test/testdata/state/state.ts rename to sdk/typescript/src/module/introspector/test/testdata/state/state.ts index cc2bd0dd2c..96a5184136 100644 --- a/sdk/typescript/introspector/test/testdata/state/state.ts +++ b/sdk/typescript/src/module/introspector/test/testdata/state/state.ts @@ -3,8 +3,8 @@ * * Warning: Do not reproduce in production. */ -import { dag, Container } from "../../../../api/client.gen.js" -import { func, object } from "../../../decorators/decorators.js" +import { dag, Container } from "../../../../../api/client.gen.js" +import { func, object } from "../../../../decorators.js" /** * State module diff --git a/sdk/typescript/introspector/test/testdata/variadic/expected.json b/sdk/typescript/src/module/introspector/test/testdata/variadic/expected.json similarity index 100% rename from sdk/typescript/introspector/test/testdata/variadic/expected.json rename to sdk/typescript/src/module/introspector/test/testdata/variadic/expected.json diff --git a/sdk/typescript/introspector/test/testdata/variadic/index.ts b/sdk/typescript/src/module/introspector/test/testdata/variadic/index.ts similarity index 88% rename from sdk/typescript/introspector/test/testdata/variadic/index.ts rename to sdk/typescript/src/module/introspector/test/testdata/variadic/index.ts index b8c4965b1a..b45b25256c 100644 --- a/sdk/typescript/introspector/test/testdata/variadic/index.ts +++ b/sdk/typescript/src/module/introspector/test/testdata/variadic/index.ts @@ -1,4 +1,4 @@ -import { func, object } from "../../../decorators/decorators.js" +import { func, object } from "../../../../decorators.js" @object() export class Variadic { diff --git a/sdk/typescript/introspector/test/testdata/voidReturn/expected.json b/sdk/typescript/src/module/introspector/test/testdata/voidReturn/expected.json similarity index 100% rename from sdk/typescript/introspector/test/testdata/voidReturn/expected.json rename to sdk/typescript/src/module/introspector/test/testdata/voidReturn/expected.json diff --git a/sdk/typescript/introspector/test/testdata/voidReturn/index.ts b/sdk/typescript/src/module/introspector/test/testdata/voidReturn/index.ts similarity index 79% rename from sdk/typescript/introspector/test/testdata/voidReturn/index.ts rename to sdk/typescript/src/module/introspector/test/testdata/voidReturn/index.ts index 4a6b4ead7a..10a3c525d8 100644 --- a/sdk/typescript/introspector/test/testdata/voidReturn/index.ts +++ b/sdk/typescript/src/module/introspector/test/testdata/voidReturn/index.ts @@ -1,4 +1,4 @@ -import { func, object } from "../../../decorators/decorators.js" +import { func, object } from "../../../../decorators.js" /** * VoidReturn class diff --git a/sdk/typescript/introspector/scanner/typedef.ts b/sdk/typescript/src/module/introspector/typedef.ts similarity index 100% rename from sdk/typescript/introspector/scanner/typedef.ts rename to sdk/typescript/src/module/introspector/typedef.ts diff --git a/sdk/typescript/introspector/scanner/typescript_module/ast.ts b/sdk/typescript/src/module/introspector/typescript_module/ast.ts similarity index 98% rename from sdk/typescript/introspector/scanner/typescript_module/ast.ts rename to sdk/typescript/src/module/introspector/typescript_module/ast.ts index 853c1f6bcc..03308ad0b1 100644 --- a/sdk/typescript/introspector/scanner/typescript_module/ast.ts +++ b/sdk/typescript/src/module/introspector/typescript_module/ast.ts @@ -3,8 +3,8 @@ import Module from "node:module" import ts from "typescript" import { TypeDefKind } from "../../../api/client.gen.js" -import { IntrospectionError } from "../../../common/errors/IntrospectionError.js" -import { DaggerDecorators } from "../dagger_module/decorator.js" +import { IntrospectionError } from "../../../common/errors/index.js" +import { DaggerDecorators } from "../dagger_module/index.js" import { TypeDef } from "../typedef.js" import { DeclarationsMap, isDeclarationOf } from "./declarations.js" import { getValueByExportedName } from "./explorer.js" diff --git a/sdk/typescript/introspector/scanner/typescript_module/declarations.ts b/sdk/typescript/src/module/introspector/typescript_module/declarations.ts similarity index 100% rename from sdk/typescript/introspector/scanner/typescript_module/declarations.ts rename to sdk/typescript/src/module/introspector/typescript_module/declarations.ts diff --git a/sdk/typescript/introspector/scanner/typescript_module/explorer.ts b/sdk/typescript/src/module/introspector/typescript_module/explorer.ts similarity index 100% rename from sdk/typescript/introspector/scanner/typescript_module/explorer.ts rename to sdk/typescript/src/module/introspector/typescript_module/explorer.ts diff --git a/sdk/typescript/src/module/introspector/typescript_module/index.ts b/sdk/typescript/src/module/introspector/typescript_module/index.ts new file mode 100644 index 0000000000..8b4b43595b --- /dev/null +++ b/sdk/typescript/src/module/introspector/typescript_module/index.ts @@ -0,0 +1,3 @@ +export * from "./ast.js" +export * from "./explorer.js" +export * from "./typedef_utils.js" diff --git a/sdk/typescript/introspector/scanner/typescript_module/typedef_utils.ts b/sdk/typescript/src/module/introspector/typescript_module/typedef_utils.ts similarity index 93% rename from sdk/typescript/introspector/scanner/typescript_module/typedef_utils.ts rename to sdk/typescript/src/module/introspector/typescript_module/typedef_utils.ts index 5930d380ed..18ae39b507 100644 --- a/sdk/typescript/introspector/scanner/typescript_module/typedef_utils.ts +++ b/sdk/typescript/src/module/introspector/typescript_module/typedef_utils.ts @@ -1,5 +1,5 @@ import { TypeDefKind } from "../../../api/client.gen.js" -import { IntrospectionError } from "../../../common/errors/IntrospectionError.js" +import { IntrospectionError } from "../../../common/errors/index.js" import { TypeDef } from "../typedef.js" export function isTypeDefResolved(typeDef: TypeDef): boolean { diff --git a/sdk/typescript/introspector/utils/files.ts b/sdk/typescript/src/module/introspector/utils/files.ts similarity index 100% rename from sdk/typescript/introspector/utils/files.ts rename to sdk/typescript/src/module/introspector/utils/files.ts diff --git a/sdk/typescript/introspector/registry/registry.ts b/sdk/typescript/src/module/registry.ts similarity index 98% rename from sdk/typescript/introspector/registry/registry.ts rename to sdk/typescript/src/module/registry.ts index faa1a2e289..e850c14ebc 100644 --- a/sdk/typescript/introspector/registry/registry.ts +++ b/sdk/typescript/src/module/registry.ts @@ -5,7 +5,7 @@ // @emitDecoratorMetadata import "reflect-metadata" -import { UnknownDaggerError } from "../../common/errors/UnknownDaggerError.js" +import { UnknownDaggerError } from "../common/errors/index.js" export type Class = { new (...args: any[]): any } diff --git a/sdk/typescript/provisioning/.gitattributes b/sdk/typescript/src/provisioning/.gitattributes similarity index 100% rename from sdk/typescript/provisioning/.gitattributes rename to sdk/typescript/src/provisioning/.gitattributes diff --git a/sdk/typescript/provisioning/bin.ts b/sdk/typescript/src/provisioning/bin.ts similarity index 99% rename from sdk/typescript/provisioning/bin.ts rename to sdk/typescript/src/provisioning/bin.ts index 4d7d873575..1873319184 100644 --- a/sdk/typescript/provisioning/bin.ts +++ b/sdk/typescript/src/provisioning/bin.ts @@ -18,7 +18,7 @@ import { EngineSessionError, InitEngineSessionBinaryError, } from "../common/errors/index.js" -import { createGQLClient } from "../graphql/client.js" +import { createGQLClient } from "../common/graphql/client.js" import { ConnectOpts, EngineConn, ConnectParams } from "./engineconn.js" const CLI_HOST = "dl.dagger.io" diff --git a/sdk/typescript/provisioning/default.ts b/sdk/typescript/src/provisioning/default.ts similarity index 53% rename from sdk/typescript/provisioning/default.ts rename to sdk/typescript/src/provisioning/default.ts index 976437c7a3..d70bce7c86 100644 --- a/sdk/typescript/provisioning/default.ts +++ b/sdk/typescript/src/provisioning/default.ts @@ -1,2 +1,2 @@ // Code generated by dagger. DO NOT EDIT. -export const CLI_VERSION = "0.14.0" +export const CLI_VERSION = "0.15.1" diff --git a/sdk/typescript/src/provisioning/engineconn.ts b/sdk/typescript/src/provisioning/engineconn.ts new file mode 100644 index 0000000000..ba8bad4a5f --- /dev/null +++ b/sdk/typescript/src/provisioning/engineconn.ts @@ -0,0 +1,33 @@ +import { GraphQLClient } from "graphql-request" +import { Writable } from "node:stream" + +export interface ConnectOpts { + Workdir?: string + Project?: string + LogOutput?: Writable + Timeout?: number +} + +export interface ConnectParams { + port: number + session_token: string +} + +export interface EngineConn { + /** + * Library connection provisioning, it returns a ready to use GraphQL client + * connected to the Dagger engine. + * + * This test multiple options to connect to the Dagger Engine. + * 1. Check for already running engine through `DAGGER_SESSION_PORT` & `DAGGER_SESSION_TOKEN` + * environment variable. + * 2. Auto provision the engine from the Dagger CLI (install it if it doesn't exist) and + * connect the client. + */ + Connect: (opts: ConnectOpts) => Promise + + /** + * Close stops the current connection. + */ + Close: () => void +} diff --git a/sdk/typescript/src/provisioning/index.ts b/sdk/typescript/src/provisioning/index.ts new file mode 100644 index 0000000000..4f4cba91ae --- /dev/null +++ b/sdk/typescript/src/provisioning/index.ts @@ -0,0 +1,22 @@ +import { GraphQLClient } from "graphql-request" + +import { ConnectOpts } from "../connectOpts.js" +import { Bin } from "./bin.js" +import { CLI_VERSION } from "./default.js" + +export async function withEngineSession( + connectOpts: ConnectOpts, + cb: (gqlClient: GraphQLClient) => Promise, +): Promise { + const cliBin = process.env["_EXPERIMENTAL_DAGGER_CLI_BIN"] + const engineConn = new Bin(cliBin, CLI_VERSION) + const gqlClient = await engineConn.Connect(connectOpts) + + try { + const res = await cb(gqlClient) + + return res + } finally { + await engineConn.Close() + } +} diff --git a/sdk/typescript/telemetry/index.ts b/sdk/typescript/src/telemetry/index.ts similarity index 100% rename from sdk/typescript/telemetry/index.ts rename to sdk/typescript/src/telemetry/index.ts diff --git a/sdk/typescript/telemetry/init.ts b/sdk/typescript/src/telemetry/init.ts similarity index 100% rename from sdk/typescript/telemetry/init.ts rename to sdk/typescript/src/telemetry/init.ts diff --git a/sdk/typescript/telemetry/telemetry.ts b/sdk/typescript/src/telemetry/telemetry.ts similarity index 100% rename from sdk/typescript/telemetry/telemetry.ts rename to sdk/typescript/src/telemetry/telemetry.ts diff --git a/sdk/typescript/telemetry/tracer.ts b/sdk/typescript/src/telemetry/tracer.ts similarity index 100% rename from sdk/typescript/telemetry/tracer.ts rename to sdk/typescript/src/telemetry/tracer.ts diff --git a/sdk/typescript/test/connect.spec.ts b/sdk/typescript/src/test/connect.spec.ts similarity index 88% rename from sdk/typescript/test/connect.spec.ts rename to sdk/typescript/src/test/connect.spec.ts index d75180d81f..ecbee683d2 100644 --- a/sdk/typescript/test/connect.spec.ts +++ b/sdk/typescript/src/test/connect.spec.ts @@ -9,7 +9,7 @@ import * as tar from "tar" import { dag } from "../api/client.gen.js" import { GraphQLRequestError } from "../common/errors/index.js" -import { connect, close, connection } from "../connect.js" +import { connect, connection } from "../connect.js" import * as bin from "../provisioning/bin.js" import { CLI_VERSION } from "../provisioning/default.js" @@ -40,30 +40,30 @@ describe("TypeScript default client", function () { // Check if the connection is actually not set before calling an execution // We verify the lazy evaluation that way - assert.equal(dag["_ctx"]["_client"], undefined) + assert.equal(dag["_ctx"]["_connection"]["_gqlClient"], undefined) - const out = await dag + const ctr = dag .container() .from("alpine:3.16.2") .withExec(["echo", "hello", "world"]) - .stdout() - assert.equal(out, "hello world\n") + await connection(async () => { + const out = await ctr.stdout() - // Check if the connection is still up - assert.notEqual(dag["_ctx"]["_client"], undefined) + assert.equal(out, "hello world\n") - close() + // Check if the connection is still up + assert.notEqual(dag["_ctx"]["_connection"]["_gqlClient"], undefined) + }) - // Check if the connection has been correctly reset - assert.equal(dag["_ctx"]["_client"], undefined) + assert.equal(dag["_ctx"]["_connection"]["_gqlClient"], undefined) }) it("Should automatically close connection", async function () { this.timeout(60000) // Check if the connection is actually not set before calling connection - assert.equal(dag["_ctx"]["_client"], undefined) + assert.equal(dag["_ctx"]["_connection"]["_gqlClient"], undefined) await connection(async () => { const out = await dag @@ -75,23 +75,23 @@ describe("TypeScript default client", function () { assert.equal(out, "hello world\n") // Check if the connection is still up - assert.notEqual(dag["_ctx"]["_client"], undefined) + assert.notEqual(dag["_ctx"]["_connection"]["_gqlClient"], undefined) }) // Check if the connection has been correctly reset - assert.equal(dag["_ctx"]["_client"], undefined) + assert.equal(dag["_ctx"]["_connection"]["_gqlClient"], undefined) }) it("Should automatically close connection with config", async function () { this.timeout(60000) // Check if the connection is actually not set before calling connection - assert.equal(dag["_ctx"]["_client"], undefined) + assert.equal(dag["_ctx"]["_connection"]["_gqlClient"], undefined) await connection( async () => { // Check if the connection is up - assert.notEqual(dag["_ctx"]["_client"], undefined) + assert.notEqual(dag["_ctx"]["_connection"]["_gqlClient"], undefined) const out = await dag .container() @@ -105,7 +105,7 @@ describe("TypeScript default client", function () { ) // Check if the connection has been correctly reset - assert.equal(dag["_ctx"]["_client"], undefined) + assert.equal(dag["_ctx"]["_connection"]["_gqlClient"], undefined) }) }) @@ -125,13 +125,13 @@ describe("TypeScript sdk Connect", function () { await connect( async (client) => { const authorization = JSON.stringify( - client["_ctx"]["_client"]?.requestConfig.headers, + client["_ctx"]["_connection"]["_gqlClient"]?.requestConfig.headers, ) assert.equal( // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore - client["_ctx"]["_client"]["url"], + client["_ctx"]["_connection"]["_gqlClient"]["url"], "http://127.0.0.1:1234/query", ) assert.equal(authorization, `{"Authorization":"Basic Zm9vOg=="}`) diff --git a/sdk/typescript/telemetry/attributes.ts b/sdk/typescript/telemetry/attributes.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/typescript/tsconfig.json b/sdk/typescript/tsconfig.json index b02408058c..7fa2afa71b 100644 --- a/sdk/typescript/tsconfig.json +++ b/sdk/typescript/tsconfig.json @@ -1,11 +1,8 @@ { - "include": ["./**/*"], + "include": ["./src/**/*"], "exclude": [ - "./**/*.spec.ts", - "./dist/**/*", - "./**/testdata/*", - "./runtime/", - "./dev" + "**/testdata/*", + "./src/**/*.spec.ts", ], "compilerOptions": { "target": "ES2022", diff --git a/sdk/typescript/yarn.lock b/sdk/typescript/yarn.lock index d1ac787601..bcf26a74ff 100644 --- a/sdk/typescript/yarn.lock +++ b/sdk/typescript/yarn.lock @@ -134,6 +134,126 @@ dependencies: "@jridgewell/trace-mapping" "0.3.9" +"@esbuild/aix-ppc64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.23.1.tgz#51299374de171dbd80bb7d838e1cfce9af36f353" + integrity sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ== + +"@esbuild/android-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.23.1.tgz#58565291a1fe548638adb9c584237449e5e14018" + integrity sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw== + +"@esbuild/android-arm@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.23.1.tgz#5eb8c652d4c82a2421e3395b808e6d9c42c862ee" + integrity sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ== + +"@esbuild/android-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.23.1.tgz#ae19d665d2f06f0f48a6ac9a224b3f672e65d517" + integrity sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg== + +"@esbuild/darwin-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.23.1.tgz#05b17f91a87e557b468a9c75e9d85ab10c121b16" + integrity sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q== + +"@esbuild/darwin-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.23.1.tgz#c58353b982f4e04f0d022284b8ba2733f5ff0931" + integrity sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw== + +"@esbuild/freebsd-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.23.1.tgz#f9220dc65f80f03635e1ef96cfad5da1f446f3bc" + integrity sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA== + +"@esbuild/freebsd-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.23.1.tgz#69bd8511fa013b59f0226d1609ac43f7ce489730" + integrity sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g== + +"@esbuild/linux-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.23.1.tgz#8050af6d51ddb388c75653ef9871f5ccd8f12383" + integrity sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g== + +"@esbuild/linux-arm@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.23.1.tgz#ecaabd1c23b701070484990db9a82f382f99e771" + integrity sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ== + +"@esbuild/linux-ia32@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.23.1.tgz#3ed2273214178109741c09bd0687098a0243b333" + integrity sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ== + +"@esbuild/linux-loong64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.23.1.tgz#a0fdf440b5485c81b0fbb316b08933d217f5d3ac" + integrity sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw== + +"@esbuild/linux-mips64el@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.23.1.tgz#e11a2806346db8375b18f5e104c5a9d4e81807f6" + integrity sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q== + +"@esbuild/linux-ppc64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.23.1.tgz#06a2744c5eaf562b1a90937855b4d6cf7c75ec96" + integrity sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw== + +"@esbuild/linux-riscv64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.23.1.tgz#65b46a2892fc0d1af4ba342af3fe0fa4a8fe08e7" + integrity sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA== + +"@esbuild/linux-s390x@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.23.1.tgz#e71ea18c70c3f604e241d16e4e5ab193a9785d6f" + integrity sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw== + +"@esbuild/linux-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.23.1.tgz#d47f97391e80690d4dfe811a2e7d6927ad9eed24" + integrity sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ== + +"@esbuild/netbsd-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.23.1.tgz#44e743c9778d57a8ace4b72f3c6b839a3b74a653" + integrity sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA== + +"@esbuild/openbsd-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-arm64/-/openbsd-arm64-0.23.1.tgz#05c5a1faf67b9881834758c69f3e51b7dee015d7" + integrity sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q== + +"@esbuild/openbsd-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.23.1.tgz#2e58ae511bacf67d19f9f2dcd9e8c5a93f00c273" + integrity sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA== + +"@esbuild/sunos-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.23.1.tgz#adb022b959d18d3389ac70769cef5a03d3abd403" + integrity sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA== + +"@esbuild/win32-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.23.1.tgz#84906f50c212b72ec360f48461d43202f4c8b9a2" + integrity sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A== + +"@esbuild/win32-ia32@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.23.1.tgz#5e3eacc515820ff729e90d0cb463183128e82fac" + integrity sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ== + +"@esbuild/win32-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.23.1.tgz#81fd50d11e2c32b2d6241470e3185b70c7b30699" + integrity sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg== + "@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": version "4.4.0" resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" @@ -1176,6 +1296,36 @@ env-paths@^3.0.0: resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-3.0.0.tgz#2f1e89c2f6dbd3408e1b1711dd82d62e317f58da" integrity sha512-dtJUTepzMW3Lm/NPxRf3wP4642UWhjL2sQxc+ym2YMj1m/H2zDNQOlezafzkHwn6sMstjHTwG6iQQsctDW/b1A== +esbuild@~0.23.0: + version "0.23.1" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.23.1.tgz#40fdc3f9265ec0beae6f59824ade1bd3d3d2dab8" + integrity sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg== + optionalDependencies: + "@esbuild/aix-ppc64" "0.23.1" + "@esbuild/android-arm" "0.23.1" + "@esbuild/android-arm64" "0.23.1" + "@esbuild/android-x64" "0.23.1" + "@esbuild/darwin-arm64" "0.23.1" + "@esbuild/darwin-x64" "0.23.1" + "@esbuild/freebsd-arm64" "0.23.1" + "@esbuild/freebsd-x64" "0.23.1" + "@esbuild/linux-arm" "0.23.1" + "@esbuild/linux-arm64" "0.23.1" + "@esbuild/linux-ia32" "0.23.1" + "@esbuild/linux-loong64" "0.23.1" + "@esbuild/linux-mips64el" "0.23.1" + "@esbuild/linux-ppc64" "0.23.1" + "@esbuild/linux-riscv64" "0.23.1" + "@esbuild/linux-s390x" "0.23.1" + "@esbuild/linux-x64" "0.23.1" + "@esbuild/netbsd-x64" "0.23.1" + "@esbuild/openbsd-arm64" "0.23.1" + "@esbuild/openbsd-x64" "0.23.1" + "@esbuild/sunos-x64" "0.23.1" + "@esbuild/win32-arm64" "0.23.1" + "@esbuild/win32-ia32" "0.23.1" + "@esbuild/win32-x64" "0.23.1" + escalade@^3.1.1: version "3.1.2" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27" @@ -1435,7 +1585,7 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== -fsevents@~2.3.2: +fsevents@~2.3.2, fsevents@~2.3.3: version "2.3.3" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== @@ -1458,6 +1608,13 @@ get-stream@^9.0.0: "@sec-ant/readable-stream" "^0.4.1" is-stream "^4.0.1" +get-tsconfig@^4.7.5: + version "4.8.1" + resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.8.1.tgz#8995eb391ae6e1638d251118c7b56de7eb425471" + integrity sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg== + dependencies: + resolve-pkg-maps "^1.0.0" + glob-parent@^5.1.2, glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" @@ -2137,6 +2294,11 @@ resolve-from@^4.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== +resolve-pkg-maps@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz#616b3dc2c57056b5588c31cdf4b3d64db133720f" + integrity sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw== + resolve@^1.22.8: version "1.22.8" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" @@ -2376,6 +2538,16 @@ tslib@^2.1.0, tslib@^2.6.2: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.3.tgz#0438f810ad7a9edcde7a241c3d80db693c8cbfe0" integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ== +tsx@^4.19.2: + version "4.19.2" + resolved "https://registry.yarnpkg.com/tsx/-/tsx-4.19.2.tgz#2d7814783440e0ae42354d0417d9c2989a2ae92c" + integrity sha512-pOUl6Vo2LUq/bSa8S5q7b91cgNSjctn9ugq/+Mvow99qW6x/UZYwzxy/3NmqoT66eHYfCVvFvACC58UBPFf28g== + dependencies: + esbuild "~0.23.0" + get-tsconfig "^4.7.5" + optionalDependencies: + fsevents "~2.3.3" + type-check@^0.4.0, type-check@~0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" diff --git a/version/go.mod b/version/go.mod index b4c820cca3..3f75841e44 100644 --- a/version/go.mod +++ b/version/go.mod @@ -3,9 +3,9 @@ module github.com/dagger/dagger/version go 1.23.1 require ( - github.com/99designs/gqlgen v0.17.49 + github.com/99designs/gqlgen v0.17.55 github.com/Khan/genqlient v0.7.0 - github.com/vektah/gqlparser/v2 v2.5.16 + github.com/vektah/gqlparser/v2 v2.5.17 go.opentelemetry.io/otel v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 @@ -17,8 +17,8 @@ require ( go.opentelemetry.io/otel/trace v1.27.0 go.opentelemetry.io/proto/otlp v1.3.1 golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa - golang.org/x/mod v0.18.0 - golang.org/x/sync v0.8.0 + golang.org/x/mod v0.20.0 + golang.org/x/sync v0.10.0 google.golang.org/grpc v1.66.1 ) @@ -30,11 +30,14 @@ require ( github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect github.com/sosodev/duration v1.3.1 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect - go.opentelemetry.io/otel/metric v1.27.0 // indirect + go.opentelemetry.io/otel/metric v1.27.0 + go.opentelemetry.io/otel/sdk/metric v1.27.0 golang.org/x/net v0.29.0 // indirect - golang.org/x/sys v0.25.0 // indirect - golang.org/x/text v0.18.0 // indirect + golang.org/x/sys v0.28.0 // indirect + golang.org/x/text v0.21.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect google.golang.org/protobuf v1.34.2 // indirect diff --git a/version/go.sum b/version/go.sum index c9e3fee13d..b3c0ba74cb 100644 --- a/version/go.sum +++ b/version/go.sum @@ -1,5 +1,5 @@ -github.com/99designs/gqlgen v0.17.49 h1:b3hNGexHd33fBSAd4NDT/c3NCcQzcAVkknhN9ym36YQ= -github.com/99designs/gqlgen v0.17.49/go.mod h1:tC8YFVZMed81x7UJ7ORUwXF4Kn6SXuucFqQBhN8+BU0= +github.com/99designs/gqlgen v0.17.55 h1:3vzrNWYyzSZjGDFo68e5j9sSauLxfKvLp+6ioRokVtM= +github.com/99designs/gqlgen v0.17.55/go.mod h1:3Bq768f8hgVPGZxL8aY9MaYmbxa6llPM/qu1IGH1EJo= github.com/Khan/genqlient v0.7.0 h1:GZ1meyRnzcDTK48EjqB8t3bcfYvHArCUUvgOwpz1D4w= github.com/Khan/genqlient v0.7.0/go.mod h1:HNyy3wZvuYwmW3Y7mkoQLZsa/R5n5yIRajS1kPBvSFM= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= @@ -33,14 +33,18 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/vektah/gqlparser/v2 v2.5.16 h1:1gcmLTvs3JLKXckwCwlUagVn/IlV2bwqle0vJ0vy5p8= -github.com/vektah/gqlparser/v2 v2.5.16/go.mod h1:1lz1OeCqgQbQepsGxPVywrjdBHW2T08PUS3pJqepRww= +github.com/vektah/gqlparser/v2 v2.5.17 h1:9At7WblLV7/36nulgekUgIaqHZWn5hxqluxrxGUhOmI= +github.com/vektah/gqlparser/v2 v2.5.17/go.mod h1:1lz1OeCqgQbQepsGxPVywrjdBHW2T08PUS3pJqepRww= go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88 h1:oM0GTNKGlc5qHctWeIGTVyda4iFFalOzMZ3Ehj5rwB4= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88/go.mod h1:JGG8ebaMO5nXOPnvKEl+DiA4MGwFjCbjsxT1WHIEBPY= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 h1:ccBrA8nCY5mM0y5uO7FT0ze4S0TuFcWdDB2FxGMTjkI= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0/go.mod h1:/9pb6634zi2Lk8LYg9Q0X8Ar6jka4dkFOylBLbVQPCE= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 h1:bFgvUr3/O4PHj3VQcFEuYKvRZJX1SJDQ+11JXuSB3/w= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0/go.mod h1:xJntEd2KL6Qdg5lwp97HMLQDVeAhrYxmzFseAMDPQ8I= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 h1:CIHWikMsN3wO+wq1Tp5VGdVRTcON+DmOJSfDjXypKOc= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0/go.mod h1:TNupZ6cxqyFEpLXAZW7On+mLFL0/g0TE3unIYL91xWc= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 h1:R9DE4kQ4k+YtfLI2ULwX82VtNQ2J8yZmA7ZIF/D+7Mc= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0/go.mod h1:OQFyQVrDlbe+R7xrEyDr/2Wr67Ol0hRUgsfA+V5A95s= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= @@ -55,6 +59,8 @@ go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kT go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= go.opentelemetry.io/otel/sdk/log v0.3.0 h1:GEjJ8iftz2l+XO1GF2856r7yYVh74URiF9JMcAacr5U= go.opentelemetry.io/otel/sdk/log v0.3.0/go.mod h1:BwCxtmux6ACLuys1wlbc0+vGBd+xytjmjajwqqIul2g= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= @@ -63,16 +69,16 @@ go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= -golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= -golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= +golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= -golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= -golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= -golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= -golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 h1:hjSy6tcFQZ171igDaN5QHOw2n6vx40juYbC/x67CEhc= google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:qpvKtACPCQhAdu3PyQgV4l3LMXZEtft7y8QcarRsp9I= google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ=