#github-feed

1 messages ยท Page 7 of 1

vivid lintelBOT
#

Bumps anyio from 3.7.1 to 4.0.0.

Release notes
Sourced from anyio's releases.

4.0.0

BACKWARDS INCOMPATIBLE Replaced AnyIO's own ExceptionGroup class with the PEP 654 BaseExceptionGroup and ExceptionGroup
BACKWARDS INCOMPATIBLE Changes to cancellation semantics:

Any exceptions raising out of a task groups are now nested inside an ExceptionGroup (or BaseExceptionGroup if one or more BaseException were included)
Fixed task group not raising a cancellati...

#

Bumps pygments from 2.15.1 to 2.16.1.

Release notes
Sourced from pygments's releases.

2.16.1

Fix native style missing from style list (#2484)

2.16.0

New lexers:

ASN.1 (#2462)
Blueprint (#2434)
BQN (#2472)
DNS zone files (#2464)
GraphQL (#2428)
Linux desktop files (following the specification of the Freedesktop group, formerly known as XDG) (#2470)
NVIDIA PTX (#2432)
OpenSCAD (#2449)
systemd (#2470)
TLS presentation language (#2455)
Verifpal (#243...

vivid lintelBOT
#

Bumps eslint from 8.46.0 to 8.48.0.

Release notes
Sourced from eslint's releases.

v8.48.0
Features

1fbb3b0 feat: correct update direction in for-direction (#17483) (Francesco Trotta)
d73fbf2 feat: rule tester do not create empty valid or invalid test suites (#17475) (fnx)
ee2f718 feat: Allow void in rule no-promise-executor-return (#17282) (nopeless)

Bug Fixes

7234f6a fix: update RuleTester JSDoc and deprecations (#17496) (Jonas Berlin)

Documentation
...

#

Bumps prettier from 2.8.7 to 3.0.3.

Release notes
Sourced from prettier's releases.

3.0.3
๐Ÿ”— Changelog
3.0.2
๐Ÿ”— Changelog
3.0.1
๐Ÿ”— Changelog
3.0.0
diff
๐Ÿ”— Release note
3.0.0-alpha.6
What's Changed

Update .d.ts files of plugins to use export default ... by @โ€‹fisker in prettier/prettier#14435

Other changes since v2, see 3.0.0-alpha.1 release notes
Full Changelog: https://github.com/prettier/prettier/compare/3.0.0-alpha.5...3.0.0-alpha.6
3.0.0-alpha.5
What...

#

Bumps graphql from 16.7.1 to 16.8.0.

Release notes
Sourced from graphql's releases.

v16.8.0 (2023-08-14)
New Feature ๐Ÿš€

#3950 Support fourfold nested lists (@โ€‹gschulze)

Committers: 1

Gunnar Schulze(@โ€‹gschulze)

Commits

e4f759d 16.8.0
bec1b49 Support fourfold nested lists (#3950)
See full diff in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=graphql&package...

#

Bumps execa from 7.2.0 to 8.0.1.

Release notes
Sourced from execa's releases.

v8.0.1
Fixes

Fix and document support for the {encoding: 'buffer'} option. It is the same as {encoding: null}, but preferred over it. (#572)

https://github.com/sindresorhus/execa/compare/v8.0.0...v8.0.1
v8.0.0
Breaking

Require Node.js 16.7.0 and later (#569)

https://github.com/sindresorhus/execa/compare/v7.2.0...v8.0.0

Commits

f4b8b3a 8.0.1
89c69fe Support {encoding...

#

Bumps eslint-config-prettier from 8.9.0 to 9.0.0.

Changelog
Sourced from eslint-config-prettier's changelog.

Version 9.0.0 (2023-08-05)

Added: The CLI helper tool now works with eslint.config.js (flat config). Just like ESLint itself, the CLI tool automatically first tries eslint.config.js and then eslintrc, and you can force which one to use by setting the [ESLINT_USE_FLAT_CONFIG] environment variable. Note that the config of eslint-co...

#

Bumps golang.org/x/tools from 0.11.0 to 0.12.0.

Release notes
Sourced from golang.org/x/tools's releases.

gopls/v0.12.0
This release contains a major rewrite of the way gopls computes and stores package information, with the goal of reducing memory usage and allowing gopls to scale to larger repositories. This change can also significantly reduce startup time when workspaces are reopened, as gopls now uses a file-based cache to persist data across sessions...

vivid lintelBOT
vivid lintelBOT
#

Overview

This is the "experimental release candidate" for the next mergeable chunk of the Project Zenith. It replaces #5659 which is now being shelved.

Compared to the previous XRC, this one:

  • Narrows down its focus to one killer feature: a cross-language component system
  • Introduces less new words, and prefers familiar words with unsurprising definitions. Specifically: functions and modules
  • Removes entirely the concept of higher-level "entrypoints": artifacts, checks, s...
vivid lintelBOT
vivid lintelBOT
#

What is the issue?

Using the go SDK , I'm running a bazel build in the container, and eventually, I get this output:

88: [690.0s] [output clipped, log limit 2MiB reached]

Probably related to https://github.com/docker/buildx/issues/484

Log output

No response

Steps to reproduce

I can't share the build, but when you have a log of dependencies, a build log can exceed the 2MiB limit.

SDK version

Go SDK v0.8.4

OS version

macOS 13.5.1

vivid lintelBOT
vivid lintelBOT
#

I've been carrying this refactor around between various long-running branches because it's nearly impossible to grok test failure output without it.

Previously all of our tests would just dump their client logs to os.Stdout or os.Stderr, resulting in all of them interleaving so it's impossible to tell one parallel test's output from another. Now each test's client logs are sent to an io.Writer that writes to t.Log, so the client logs will show up in the individual test failure's output...

vivid lintelBOT
#

What is the issue?

Currently, Dagger runs using a Buildkit daemon with root privileged through --privileged option.
It's been more than a year that the subject of Dagger rootless in on the pipe and I would like to use this issue to gather all information we got so far and suggest a solution so we can close the debat for now.

Privileges

The advantage of running rootless is that you run the engine as a non-root user, meaning
that you mitigate potential vulnerabilities in the...

vivid lintelBOT
vivid lintelBOT
#

What is the issue?

Ran dagger run --focus node --loader ts-node/esm ./ci.mts which contains wrapper code over Dagger SDK in typescript

It runs sucessfully, but out of the blue i get this error. When i create a new terminal it starts working again & then again after some time i get this erro

Log output

Cannot copy logs, the terminal just freezes when dagger exits. Attaching screenshot

![image](https://github.com/dagger/dagger/assets/24411676/694aa50a-2b6a-4981-b267-24ee80a9a...

vivid lintelBOT
vivid lintelBOT
ornate vigilBOT
vivid lintelBOT
vivid lintelBOT
#

Bumps golang.org/x/tools from 0.11.0 to 0.13.0.

Release notes
Sourced from golang.org/x/tools's releases.

gopls/v0.13.0
These are release notes are identical to that of gopls@v0.13.0-pre.3. Thanks to all who tested the prerelease!
go install golang.org/x/tools/gopls@v0.13.0

This release fixes several bugs and mitigates a few performance regressions. It also somewhat reduces the latency and CPU cost of most operations, and includes a few small additional f...

vivid lintelBOT
vivid lintelBOT
#

What is the issue?

Looking into the Quickstart guide, using NodeJS, for example in the test part, the exclude part in the code snippet was not working, because the folders I wanted to exclude were still being uploaded.
I went to other pages such as [this Work with the Host Filesystem guide](https://docs.dagger.io/421437/work-with-host-filesystem/#:~:text=.directory(%22.%22%2C%20%7B%20include%3A%20%5B%22*.*%22%5D%2C%20exclude%3A%20%5...

vivid lintelBOT
#

Bumps typedoc from 0.24.7 to 0.25.1.

Release notes
Sourced from typedoc's releases.

v0.25.1
Features

Added stripYamlFrontmatter config option to remove YAML frontmatter from README.md, #2381.
Added --excludeCategories config option to remove reflections present in any excluded category, #1407.
If no tsconfig.json file is present, TypeDoc will now attempt to compile without setting any compiler options, #2304.
Navigation is now written to a JS file a...

vivid lintelBOT
#

Overview

In #5757, we take the Zenith in a bold new direction:

  • everything is a function
  • functions are packaged together in modules
  • each module has an API
  • A module's API can be queried either 1) from other functions, or 2) directly by the end user

But for this design to work, we need a great UI for querying a module's API. More specifically, we need a great UI for running a module's functions (using its API).

We think Dagger will support many ways to do this...

vivid lintelBOT
#

When the Dagger CLI starts it creates a default runner by pulling the latest version of the engine image from registry.dagger.io. Right now this registry URL is hard coded:

https://github.com/dagger/dagger/blob/e5feaea7f1d6eb01d834e83b180fc3daed3463ea/engine/version.go#L12

In some corporate environments there are limitations to which registries are allowed. This makes it difficult to use the CLI because it's unable to download the image that is required in order to get the engine to ...

vivid lintelBOT
vivid lintelBOT
#

today

-m, --mod string        Path to dagger.json config file for the module or a directory containing that file. Either local path (e.g. "/path/to/some/dir") or a git repo (e.g. "git://github.com/dagger/dagger?ref=branch?subpath=path/to/some/dir"). (default ".")

possible fix

-m, --mod string        Path to dagger.json config file for the module or a directory containing that file. Either local path (e.g. "/path/to/some/dir") or a git repo (e.g. "git://github.com/dagger/da...
vivid lintelBOT
#

What is the issue?

Observed with a long running gradle task in the airbyte repo.

Workaround described in more detail here (not mounting secrets locally): https://github.com/airbytehq/airbyte/pull/30438

To summarize:

When secrets are mounted, a custom buffer is introduced for stdout/stderr: https://github.com/dagger/dagger/blob/v0.6.4/cmd/shim/main.go#L294

The real problem is that the buffering is not configurable: dagger relies on a golang library called transform to perfor...

vivid lintelBOT
#

What happened? What did you expect to happen?

Perhaps a dumb question, but I didn't find anything regarding this specific use case in the docs and I want to confirm this is possible and doesn't have any caveats.

My goal is to write an internal cli tool. The tool will run locally on users machines for interactive use and will also be containerized to run in automation- so it can run in k8s cron jobs and other places as a container.

The internal cli will wrap other shell commands lik...

vivid lintelBOT
vivid lintelBOT
#

This PR tracks the seen cache volumes at the resolver level so they
can be automatically discovered for syncronization at the engine start
/ stop time. This solution isn't ideal since it should be getting the
cache mounts from buildkit's store instead of the resolver but we
couldn't find a way to make it work with @aluzzardi. We're falling back
to this workaround until maybe @sipsma can shed some light.

Signed-off-by: Marcos Lilljedahl

vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

What are you trying to do?

This is a companion issue to https://github.com/dagger/dagger/issues/5791 . While debugging that particular issue, I wanted to tee the stdout and stderr of a long-running with_execed process into a file, and then tail that file.

I found it painful, as a non-container-expert, while developing my application locally, to figure out how to access those files. Eventually, and thanks to your help, I was able to do so by doing docker exec -it sh and in there...

vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

What are you trying to do?

Started from discord conversation here:

#1149095919330009098 message

I'd like to be able to "unset" the entrypoint by passing nil to .withEntrypoint. Currently, to unset the entrypoint, you need to pass an empty array. While this makes sense after thinking about it for a while, this isn't intuitive for the first time user.

Why is this important to you?

You frequently have to unset/change...

vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

This allow us to replace our custom logic for waiting for buildkit to be ready with the logic implemented upstream in https://github.com/moby/buildkit/pull/4200.

Additionally, we need a minor fix to ensure that Directory.Without continues working, since due to a bug in buildkit, allow not found was effectively always enabled (see https://github.com/moby/buildkit/pull/4051).

We also need to import some additional logic from buildkit now that the sources logic is reasonably significantl...

vivid lintelBOT
vivid lintelBOT
#

Occasionally, the engine container can end up in an inconsistent state, and exist, but not be running. Previously, in this scenario the dagger client would fail to create this container (since it already exists), but it would not be started - this results in the client hanging indefinitely.

To resolve this, we add new logic that detects when the engine container with the target name already exists, and just attempt to restart it instead of creating a new container.

vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

This is used when the Cache Service returns an error (for instance, if the account doesn't support caching).

Also useful if the Cache Service is down or misbehaving.

Caveats: The check only happens at initialization time. Once it's initialized, both cache backends are used (via solver.NewCombinedCacheManager) so it's anyone's guess what happens at that time.

I believe Erik had planned to revamp that part /cc @sipsma

vivid lintelBOT
ornate vigilBOT
ornate vigilBOT
ornate vigilBOT
#

I agree with Solomon. In fact that's a model we use today with our Jenkins
shared libraries. All the functions are in the same repo. I think that's
will suit companies who want to maintain a single repo for all their
internal dagger modules.

Honestly with that, both models are supported as you could technically have
a single module per repo if you want.

On Fri, Sep 22, 2023, 17:09 Solomon Hykes @.***> wrote:

I am definitely a big proponent of the "daggerverse repo". I lik...

vivid lintelBOT
#

What are you trying to do?

I want to drop into a shell inside a dagger container, so I can debug a pipeline and even have a dagger-defined development environment (so that developers would only need docker + dagger to develop an app).

For Docker, there is https://github.com/ktock/buildg.

I would imagine being able to write:

await appContainer
      .withServiceBinding("redis-server", redis.srv)
      .withServiceBinding("postgres-server", postgres.srv)
      .withWorkd...
vivid lintelBOT
#

What are you trying to do?

Installing dagger-cli from Homebrew is awesome.
less awesome is installing by

cd /usr/local
curl -L https://dl.dagger.io/dagger/install.sh | sh

I searched for "package" "install" and "completion" before opening this issue.
Labels: CLI, DX
(There is a thread describing the situation in detail at #1155601074393194658 message )

Why is this important to you?

I think that it will be e...

vivid lintelBOT
#

What is the issue?

The build target sdk:java:generate uses the daggerengine.version property to determine the name of the file where the API JSON schema is written. However if the engine version and property version do not match the schema file may contain an incorrect version API (e.g. if the engine version is 0.8.2 and the daggerengine.version property is 0.6.4 schema-0.6.4.json will contain the 0.8.2 API version)

The schema version should be inferred from the engine.

L...

vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

This PR improves the generation of the API schema file (used by codegen phase)

  • ensure the targeted version matches the CLI version
  • add "devel" alias and set the current targeted version to devel (a specific version should be set to a stable version when releasing the library)
  • infer the schema version from the CLI in sdk:java:generate build target
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

We (+@jpadams) have noticed slow-downs when installing via curl -L https://dl.dagger.io/dagger/install.sh | sh

This PR changes the base URL in install.sh from dagger-io.s3.amazonaws.com to dl.dagger.io

Since install.sh file was deleted part of https://github.com/dagger/dagger/commit/5a9c772020363668c18e73472534f01a5b03b8d5, this PR also adds it back. cc @aluzzardi

Next steps

vivid lintelBOT
vivid lintelBOT
ornate vigilBOT
vivid lintelBOT
#

What are you trying to do?

I have a build that pulls sources from a Git repository using the Git API. Internally Dagger resolves the branch or tag name to a commit hash:

223: git://github.com/my-org/sources.git#v1.1
223: [2.61s] c94c15a6ef1974b29877c8b99edf27708a3be78f	refs/heads/v1.1
223: git://github.com/my-org/sources.git#v1.1 DONE

It would be very helpful if there was a way to query commit has that Dagger resolved so that I can add it to the build metadata.

See a...

vivid lintelBOT
#

What is the issue?

If someone try using Dagger.Container.with_env_variable/4 with :expand true, the program will crash due to graphql syntax error.

Log output

  1) test env variable expand (Dagger.ClientTest)
     test/dagger/client_test.exs:260
     ** (MatchError) no match of right hand side value: {:error, %Dagger.QueryError{errors: [%{"locations" => [%{"column" => 106, "line" => 1}], "message" => "Argument \"expand\" has invalid value \"true\".\nExpected type \"Boole...
vivid lintelBOT
#

Bumps httpcore from 0.17.3 to 0.18.0.

Release notes
Sourced from httpcore's releases.

Version 0.18.0
0.18.0 (8th Sept 2023)

Add support for HTTPS proxies. (#745, # 786)
Handle sni_hostname extension with SOCKS proxy. (#774)
Change the type of Extensions from Mapping[Str, Any] to MutableMapping[Str, Any]. (#762)
Handle HTTP/1.1 half-closed connections gracefully. (#641)
Drop Python 3.7 support. (#727)

Changelog
Sourced from httpcore's changelog.

0....

#

Bumps rich from 13.5.2 to 13.6.0.

Release notes
Sourced from rich's releases.

The Python 3.12 release
Mostly a meta update in readiness for the release of Python3.12
[13.6.0] - 2023-09-30
Added

Added Python 3.12 to classifiers.

Markdown fixes
[13.5.3] - 2023-09-17
Fixed

Markdown table rendering issue with inline styles and links Textualize/rich#3115
Fix Markdown code blocks on a light background Textualize/rich#3123

Changelog
Sourced from rich's ...

#

Bumps packaging from 23.1 to 23.2.

Release notes
Sourced from packaging's releases.

23.2
What's Changed

parse_marker should consume the entire source string by @โ€‹mwerschy in pypa/packaging#687
Create a Security Policy file by @โ€‹joycebrum in pypa/packaging#695
Add python 3.12 to CI by @โ€‹mayeut in pypa/packaging#689
Remove URL validation from requirement parsing by @โ€‹uranusjr in pypa/packaging#684
Add types for packaging.version._Version by @โ€‹hauntsaninj...

#

Bumps httpx from 0.24.1 to 0.25.0.

Release notes
Sourced from httpx's releases.

Version 0.25.0
0.25.0 (11th Sep, 2023)
Removed

Drop support for Python 3.7. (#2813)

Added

Support HTTPS proxies. (#2845)
Change the type of Extensions from Mapping[Str, Any] to MutableMapping[Str, Any]. (#2803)
Add socket_options argument to httpx.HTTPTransport and httpx.AsyncHTTPTransport classes. (#2716)
The Response.raise_for_status() method now returns the response insta...

#

Bumps pytest-httpx from 0.23.1 to 0.26.0.

Release notes
Sourced from pytest-httpx's releases.

0.26.0 (2023-09-18)
Added

Added proxy_url parameter which allows matching on proxy URL.

0.25.0 (2023-09-11)
Changed

Requires httpx==0.25.*

Removed

pytest 6 is no longer supported.

0.24.0 (2023-09-04)
Added

Added match_json parameter which allows matching on JSON decoded body (matching against python representation instead of bytes).

Changed

Even i...

vivid lintelBOT
#

Bumps eslint from 8.48.0 to 8.50.0.

Release notes
Sourced from eslint's releases.

v8.50.0
Features

27d5a9e feat: add suggestions to array-callback-return (#17590) (Tanuj Kanti)
f9082ff feat: flat-rule-tester make sure default config always matches (#17585) (fnx)
83914ad feat: Implement SourceCode#applyInlineConfig() (#17351) (Nicholas C. Zakas)
22a5582 feat: add rule no-object-constructor, deprecate no-new-object (#17576) (Francesco Trotta)
85a3d9e feat:...

#

Bumps typescript from 5.1.3 to 5.2.2.

Release notes
Sourced from typescript's releases.

TypeScript 5.2
For release notes, check out the release announcement.
For the complete list of fixed issues, check out the

fixed issues query for Typescript 5.2.0 (Beta).
fixed issues query for Typescript 5.2.1 (RC).
fixed issues query for Typescript 5.2.2 (Stable).

Downloads are available on:

NuGet package

TypeScript 5.2 RC
For release notes, check out the ...

#

Bumps github.com/prometheus/procfs from 0.11.0 to 0.12.0.

Release notes
Sourced from github.com/prometheus/procfs's releases.

v0.12.0
What's Changed

Bump golang.org/x/sys from 0.9.0 to 0.10.0 by @โ€‹dependabot in prometheus/procfs#555
Fix annotation errors by @โ€‹weidongkl in prometheus/procfs#559
Synchronize common files from prometheus/prometheus by @โ€‹prombot in prometheus/procfs#563
Bump golang.org/x/sys from 0.10.0 to 0.11.0 by @โ€‹dependabot in promet...

#

Bumps oss.terrastruct.com/d2 from 0.4.0 to 0.6.1.

Release notes
Sourced from oss.terrastruct.com/d2's releases.

v0.6.1
The globs feature underwent a major rewrite and is now almost finalized.
Before
Previously, globs would evaluate once on all the shapes and connections declared above it. So if you wanted to set everything red, you had to add the line at the bottom.
x
y
*.style.fill: red

Now
*.style.fill: red
x
y

We still have one more release in 0.6 s...

#

Bumps sass from 1.66.1 to 1.68.0.

Release notes
Sourced from sass's releases.

Dart Sass 1.68.0
To install Sass 1.68.0, download one of the packages below and add it to your PATH, or see the Sass website for full installation instructions.
Changes

Fix the source spans associated with the abs-percent deprecation.

JS API

Non-filesystem importers can now set the nonCanonicalScheme field, which declares that one or more URL schemes (without :) will never ...

vivid lintelBOT
#

What happened? What did you expect to happen?

Referring to this example, I tried running a compose file through dagger like this:

        const compose = await client
            .container()
            .from('docker')
            .withUnixSocket('/var/run/docker.sock', client.host().unixSocket('npipe:////./pipe/docker_engine'))
            .withDirectory('/src', client.host().directory('.'), { exclude: [ 'node_modules', '/ci' ...
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

What happened? What did you expect to happen?

Context

After migrating our jobs to github enterprise cloud one of our builds stopped working. We're still running inside the same self hosted runner, but now they run in an amazon account instead of our onprem server. I have no idea if that has anything to do with it but just in case.

I'm using dagger 0.8.7 with the python SDK, running the python script without the dagger cli.

Discussion

This error is what sticks out to me.

``...

vivid lintelBOT
vivid lintelBOT
#

Bumps golang.org/x/oauth2 from 0.11.0 to 0.13.0.

Commits

3c5dbf0 go.mod: update golang.org/x dependencies
11625cc google: add authorized_user conditional to Credentials.UniverseDomain
8d6d45b google: add Credentials.UniverseDomain to support TPC
43b6a7b google: adding support for external account authorized user
14b275c oauth2: workaround misspelling of verification_uri
18352fc google/internal/externalaccount: adding BYOID Metrics
9095a51 oauth2: clarify ...

#

Bumps golang.org/x/crypto from 0.13.0 to 0.14.0.

Commits

e3cc52e go.mod: update golang.org/x dependencies
833695f ssh: add server side support for ping@openssh.com protocol extension
ec07f4e chacha20: drop Go 1.10 compatibility for arm64
b665ba6 all: use crypto/ed25519 instead of golang.org/x/crypto/ed25519
a1aeb9b ssh: add test cases for compatibility with old (buggy) clients
28c53ff ssh: add MultiAlgorithmSigner
3f0842a sha3: have ShakeHash extend hash....

vivid lintelBOT
#

https://github.com/dagger/dagger/pull/5757#issuecomment-1744739721

Right now if you have something like:

type Foo struct {
  Bar `json:"blahblah"`
}

The graphql schema for Foo will be populated with a field called Bar, but when we do json serialization we use blahblah, which means that if you try to query for the value of the Bar field, our gql server hits the trivial resolver codepath and looks for bar in the json object and doesn't find it (since it's been ser...

#

From @jedevc:


Looks like Opt types can't be pointers, e.g. something like this doesn't work:

type EchoOpts struct {
	Suffix string `doc:"String to append to the echoed message." default:"..."`
	Times  int    `doc:"Number of times to repeat the message." default:"3"`
}

func (m *Minimal) EchoOpts(msg string, opts *EchoOpts) string {
	return m.EchoOptsInline(msg, opts)
}

The arg type needs to be changed to opts EchoOpts for it to work as intended.

Givin...

vivid lintelBOT
vivid lintelBOT
#

Today, in zenith we have a small inconsistency in the way that host directory access works:

We can read the host's current directory:

	dag.Host().Directory(".")

But we can't export to the host:

	// this actually exports to the module container
	dir.Export(ctx, "build/")

I think there's two points here:

  1. As we encourage users to modularise existing dagger code, I think this will be a small papercut since this changes from the previous way of doing t...
vivid lintelBOT
#

While we want to encourage users to share code using zenith modules, users may still want to use parts of their code from the go ecosystem (cc @aluzzardi, who initially raised this on discord).

The client-side codegen means that types from one module are not interoperable with types from another module. For example, a Container type from module foo cannot be used as an argument to a function that takes a Container in module bar.

@sipsma proposed a solution for this:

Not for...

#

One open question we've discussed previously is how modules should work when run directly on the host. Prior to Zenith, we've tried to encourage users to prefer dagger run go run main.go instead of directly calling go run main.go - better progress, etc. With the code-gen, it's kind of become essential to wrap everything.

Attempting to do so today gives:

panic: DAGGER_SESSION_PORT is not set

Ideally, we'd be able to detect the case where a module is being run outside of ...

vivid lintelBOT
#

Custom function return types require at least one empty method defined on them to be detected by codegen (note the JSON tags are currently required, #5860).

// This is for a module "foo"

package main

import (
	"context"
)

type Foo struct{}

type X struct {
	Message string `json:"message"`
}

// This function definition is required, or we don't detect and incorporate this into schema generation.
// func (x *X) Void() {}

func (m *Foo) MyFunction(ctx context.Contex...
#

This is a bit of a papercut when working with zenith modules. For example,

  1. dagger mod init a new module
  2. dagger mod use a module found in daggerverse
  3. Add code to call a function from the module
  4. dagger mod use to update that module to a new version
  • If the new version changes the function signature of the called function, then this step will fail, returning an error - additionally, any changes to the codegen will be reverted, so the user isn't easily able to see the ...
vivid lintelBOT
vivid lintelBOT
#

Previously, any errors would be displayed as thousands of lines of graphql vomit.

Now, we have a nicely formatted output to indicate exactly what went wrong:

Error: failed to get loaded module ID: input:1: host.directory.asModule.serve failed to install module schema: schema validation failed: input:1813: Undefined type X.

      | ...
 1810 | }
 1811 |
 1812 | type Foo {
 1813 | 	myFunction(stringArg: String!): X!
 1814 | }
 1815 | extend type Query {
 1816 | 	foo: Fo...
vivid lintelBOT
#

https://github.com/moby/buildkit/compare/bbe48e778f9df07eabc7fc05023c8e97e3c5c5ce...86e25b3ad8c20fc420669949f24bb86c74082b2f

Mostly only docs and config changes, but brings in https://github.com/moby/buildkit/pull/4321, which helps to clear up Directory.File errors when the target path does not exist.

Before:

failed to get config file: lstat /tmp/buildkit-mount563380996/github/dagger.json: no such file or directory

After:

failed to get config file: lstat /githu...
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

This is an assorted set of sweeping changes that fix the longstanding bug involved with traversing lists of ID-able objects in the SDK. We've worked around this issue about 10 times in the past two weeks, and now I understand why!

In short, we need a reliable way to go from foos: [Foo!]! to selecting the Nth Foo and querying against it.

In Go this looks like the following, which actually panics prior to this PR:

funs, _ := mod.Functions(ctx)
for _, fun := range funs {
  ...
vivid lintelBOT
vivid lintelBOT
#

The blob source type we use to safely refer to local dir sync contents relies on the previous local dir sync ops to exist locally.

Before this change, there was a case where use of remote cache could result in the contents still being lazy in the remote cache rather than actually existing locally. This led to error messages like "missing descriptor handlers for lazy blobs".

This specifically happens because we need to split local dir syncs across 3 ops:

  1. The actual local dir source, ...
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

Dagger version

Dev version, built from main in the last 48 hours. (I don't remember from which commit, and there's no way to know from the binary).

Environment

$ uname -msv
Darwin Darwin Kernel Version 21.6.0: Wed Aug 10 14:28:23 PDT 2022; root:xnu-8020.141.5~2/RELEASE_ARM64_T6000 arm64

What I did

In a development version of github.com/shykes/daggerverse/dagger, with uncommitted changes:

dagger call

What I expect

Success...

vivid lintelBOT
#

This adds a sanity check to check that when we connect to a remote buildkit instance, that it's running the dagger engine, and not a vanilla instance of buildkit.

See https://github.com/dagger/dagger/issues/5852#issuecomment-1756568885:

If you are trying to connect to a host that was provisioned via buildx then it's not expected to work at this time. Dagger has a bit of divergence from the buildkitd that buildx uses.

We should hard fail on this kind of scenario, since it's possible...

vivid lintelBOT
#

This fixes #5871.

For example, previously this would have failed, since the Void method was required.

// foo is the module

type Foo struct{}

type X struct {
	Message string `json:"message"`
}

// This function definition is required, or we don't detect and
// incorporate this into schema generation.
// func (x *X) Void() {}

func (m *Foo) MyFunction(ctx context.Context, stringArg string) X {
	return X{Message: stringArg}
}

similarly with this example:

...

vivid lintelBOT
#

This was discussed in the zenith dev call today. This was a little bit of a problem before, but with Zenith, it's become a lot more difficult.

For example, just with a newly dagger mod init --sdk=go --name=foo running echo '{foo{myFunction(stringArg: "foo"){stdout}}}' | dagger query prints 68 lines of output - for something that's one operation.

Additionally, we get lots of operations reported - it's not immediately obvious what the user should do with this:

โง— 1.89s โœ” 30 โˆ… 2...
vivid lintelBOT
vivid lintelBOT
#

Bumps sass from 1.66.1 to 1.69.3.

Release notes
Sourced from sass's releases.

Dart Sass 1.69.3
To install Sass 1.69.3, download one of the packages below and add it to your PATH, or see the Sass website for full installation instructions.
Changes
Embedded Sass

Fix TypeScript type locations in package.json.

See the full changelog for changes in earlier releases.
Dart Sass 1.69.2
To install Sass 1.69.2, download one of the packages below and add it to yo...

vivid lintelBOT
vivid lintelBOT
#

Got something basically working (needs heavy cleanup in a few places still), but now have reached my Python knowledge limits and need @helderco's help ๐Ÿ™‚


TODO finish description below (I just saw Helder is online so want to publish ASAP)

Goals:

  1. Get Python SDK-as-Module working
  2. Simplify SDK-as-Module development+packaging process to extent possible
  3. Setup builtin SDKs to be usable without hard dependency on internet (i.e. pulling images from dockerhub)

Overview of mod...

vivid lintelBOT
vivid lintelBOT
#

What is the issue?

`client.container().from().withDirectory("/src", client.host().directory("."), { exclude: [ ] }.withWorkdir("/src").withExec(["/bin/bash", "-ce", "du -sch ; tree -a"]).stdout():

After adding tons of directories to the exclusion list, this command results in:

  • inside the container: 1.7 M total disk usage, 78 directories, 178 files
  • two upload steps: one that takes 58.53s and one that takes 14.46s, in serial

Running the commands directly on the host (w...

vivid lintelBOT
#

What is the issue?

It would be great to have a better high level overview of the differences between the CLI and the SDK to invoke dagger and when to use one or the other.

Right now we have this in the intro page but its a bit misleading because we say that you should use the CLI if you are a "fan of shell scripts", then the rest of the documentation (i.e. [go getting started](https://docs.dagger.io/sdk/go/959738/get-started#requireme...

vivid lintelBOT
#
package main

import (
	"fmt"
)

type Test struct{}

type Foo struct {
	Msg string
}

func (m *Test) TestListInput(foos []Foo) string {
	return fmt.Sprintf("%+v", foos)
}

Currently fails when building the module w/ error 41: [0.44s] ./dagger.gen.go:4250:15: undefined: test

Something must have broken in handling of list input types at some point I'm guessing?

cc @jedevc @vito

This should at least work in terms of codegen, handling it in dagger call is ...

vivid lintelBOT
vivid lintelBOT
#

PRs and CI on main are now failing due to trivy finding vulns in our engine image, due to a new GHSA around otel: https://github.com/dagger/dagger/security/dependabot/381

Unfortunately, simply bumping otel libs is never "simple". After bumping our go.mod, the engine and CLI started exiting on startup w/ error cannot merge resource due to conflicting Schema URL.

I'd be lying if I said I understood all the inner machinations of otel, but from my understanding this is due to the fact tha...

vivid lintelBOT
#

:warning: Based on https://github.com/dagger/dagger/pull/5893
:hammer_and_wrench: Fixes https://github.com/dagger/dagger/issues/5904 https://github.com/dagger/dagger/issues/5864

This PR uses the approach detailed in https://github.com/dagger/dagger/issues/5864#issuecomment-1765040417:

To resolve this, instead, we can just look at the Name of the struct - if it ends in "Opt" or similar, then we treat it as an opts struct.

All structs that end in "Opt"/"Opts"/"Option"/"Options" are ...

vivid lintelBOT
vivid lintelBOT
#

What is the issue?

Running the Dagger CLI using the --progress tty flag causes a panic in BuildKite.
It would be nice to view the tty output in Buildkite. It works in Github Actions.

Log output

Caught panic:
--
ย  | ย 
ย  | runtime error: slice bounds out of range [3:1]
ย  | ย 
ย  | Restoring terminal...
ย  | ย 
ย  | goroutine 1 [running]:
ย  | runtime/debug.Stack()
ย  | /usr/local/go/src/runtime/debug/stack.go:24 +0x65
ย  | runtime/debug.PrintStack()
ย  | /usr/local/go/src/r...
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

After https://github.com/dagger/dagger/pull/5900, SDK module references are just assumed to be non-moving (e.g. a git digest rather than branch)

We should support those being moving references and automatically pinned on dagger mod init/sync, but with some additional ability to upgrade them (dagger mod update-sdk as a strawman example).


Additionally, it would be great to move as much of the functionality needed here to be in the core API, so that it's reusable across SDKs and...

#

Some users hit roadblocks when the dagger engine has hard dependencies on pulling e.g. container images from dockerhub or other resources from the internet at runtime. This is typically due to stringent corporate firewall rules that require exceptions be made for any unapproved network calls to the internet.

Our builtin module SDKs (Go + Python currently, nodejs soon), currently have varying degrees of dependencies on base images + library dependencies that result in network calls to the i...

#

The workdir of Module Functions is currently set to be the directory containing dagger.json (and thus your module code). This is fine, but in the exceptional cases where a module needs to use a separate root dir (e.g. there's a go.mod, pyproject.toml or other resources required from a parent dir), you hit a papercut.

Example in the Python SDK module here: https://github.com/sipsma/dagger/blob/c847458d6df1e184487e3a29f6d00a86ef67e661/sdk/python/runtime/main.go#L82-L82

You want to b...

vivid lintelBOT
#

Noticed this while squashing another issue; this was accidentally pinning to an amd64 image rather than the multiplatform index.

I'm mildly confused how this went unnoticed as I previously ran ./hack/dev ./hack/make engine:test successfully locally on my arm64 machine after the previous update, but later saw it failing due to buildctl being amd64. Possibly I had some qemu setting enabled that got reset after a reboot?

Either way, verified ./hack/dev produces buildctl w/ right arch o...

#

We are getting flaky pip cache errors like https://github.com/dagger/dagger/actions/runs/6552195369/job/17794987073#step:4:1007

@helderco suggested it may be due to separate python versions being used in parallel on the same cache mount: https://github.com/dagger/dagger/pull/5906#issuecomment-1767391090

(I'll squash this quick since the flakes are quite annoying; just filing issue since I'm currently squashing something else and don't want to forget)

vivid lintelBOT
#

The engine client initializes its session w/ the server in a separate goroutine (due to the fact that it blocks for the duration of the session). This causes initial connection attempts to usually fail while the session is still be setup.

This creates a lot of scary-looking but harmless logs in the common case.

This changes the logic to only start printing failed connection attempts once the retry logic is going to wait over a second before the next attempt. The idea is to balance not s...

vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

one example in this PR: https://github.com/dagger/dagger/actions/runs/6576601775/job/17866381910?pr=5923#step:4:29887

Seems like the progress is not always fully flushed and we miss the DONE message sometimes.

I know we flush logs from dagger session -> SDK, but I don't know if we handle flushing them from the engine server -> engine client, so maybe that's the cause.

If there's a way to always fully flush...

#

The optional types on PortForward, frontend and protocol are being sent as null to the API when they are not set.

gql.transport.exceptions.TransportQueryError: {'message': 'Syntax Error GraphQL request (3:41) Unexpected Name "null"\n\n2:   host {\n3:     service: service(ports: [{frontend: null, backend: 3306, protoc
โ”ƒ ol: TCP}]) {\n                                           ^\n4:       id: id\n', 'locations': [{'line': 3, 'column': 41}]}
#

What is the issue?

Expect service on host port.

# Cargo.toml
# ...
[dependencies]
color-eyre = "0.6.2"
dagger-sdk = { git="https://github.com/dagger/dagger"}
# ...
// main.rs
use dagger_sdk::PortForward;


#[tokio::main]
async fn main() -> color_eyre::eyre::Result {

    let client = dagger_sdk::connect().await?;

    let service = client.host().service(vec![PortForward {
        protocol: dagger_sdk::NetworkProtocol::TCP,
        frontend: 80,
...
vivid lintelBOT
#

Tested:

docs/current/guides/snippets/use-services/expose-host-services-to-container/index.ts
docs/current/guides/snippets/use-services/expose-host-services-to-container/main.py

docs/current/guides/snippets/use-services/expose-service-containers-to-host/index.ts
docs/current/guides/snippets/use-services/expose-service-containers-to-host/main.py

docs/current/guides/snippets/use-services/start-stop-services/index.ts
docs/current/guides/snippets/use-services/start-stop-services/main.py

vivid lintelBOT
#

What is the issue?

I must use HTTPS / GH Token, can't use SSH for git clones.

There is no way for me to hide credentials that are in the git https url. The below snippet will print my please-dont-print password all over the place :(

package main

import (
	"context"
	"os"

	"dagger.io/dagger"
	log "github.com/sirupsen/logrus"
)

func main() {
	var err error
	ctx := context.Background()
	c, err := dagger.Connect(ctx, dagger.WithLogOutput(os.Stdout), dagge...
vivid lintelBOT
#

fixes DEV-2780

Will look into adding tests for this, have to step out for now.

Might also just wait until #5882 is merged, since right now this follows dagger query DX, same as dagger shell - just wanted to get the code written.

Usage:

$ dagger up                 # forward all ports to random ports
$ dagger up --native        # or -n, forward all ports to same port on host
$ dagger up --port 8080:80  # or -p, forward 8080 => 80
vivid lintelBOT
#

Marking as draft until I update the zenith docs, code is good to review now

Docs are important to update first because this is a breaking change for any existing zenith users


This change results in names being prefixed by module name for:

  1. Any objects defined by the module
  2. Any functions defined by the module that are extending objects from other pre-existing modules (or core)

This reduces the chance of conflicts when depending on 2+ modules that happen to use overlap...

ornate vigilBOT
vivid lintelBOT
#

What is the issue?

When configuring dagger.json with a parent directory that uses ".." to access repository code using dag.Host().Directory("."), it still returns the directory where my module code exists.

{
  "name": "hello",
  "sdk": "go",
  "root": "..",
  "sdkRuntime": "vito/dagger-sdk-go:no-ptrs@sha256:2bb26bae3f30b920a4530b7495127fe4986102b06a99ff170500e83c25739b27"
}

module code:

type Hello struct{}

func (m *Hello) World(ctx context.Cont...
vivid lintelBOT
vivid lintelBOT
#

This change changes the types internally to use + Send, Sync, for outer layers (this allows it to be moved across threads, and cpus), and internally to be moved to threads.

This is useful when you want to parallelize the rust code. This was previously not a problem, but after I moved the code to use deferred execution. I.e. ids() are only resolved at the end of the run (on syncs).

This is tricky because rust has strict compile checks around how many times a function is called and such. I've...

vivid lintelBOT
#

What is the issue?

Github release and dl.dagger.io releases don't match.

github releases

โฏ shasum -a 256 dagger_v0.9.0_linux_amd64\ \(1\).tar.gz
86171d7a703c3f74b17f4e5977ec26d909b2e101106e544675ccd923f5eb4e8a  dagger_v0.9.0_linux_amd64.tar.gz

dl.dagger.io

โฏ shasum -a 256 dagger_v0.9.0_linux_amd64.tar.gz
f85a19488ed4e6a0251ca047f5ab1d99c8242b38537a42ac8b9876f6bb7172ca  dagger_v0.9.0_linux_amd64.tar.gz

the github checksum matches the github release...

vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

We are hitting some problems with IDs growing to enormous size and exceeding gRPC messages limits in relatively normal cases (i.e. 13 functions defined in a module).

I didn't fully track down exactly what was happening, but suspected that it was related to the annoyance we were dealing with internally to store ModuleID on the Function object.

That annoyance only existed in order to support the Function.call "dynamic" API. That API isn't actually used anywhere right now, so I just tried ...

vivid lintelBOT
#

Fixes typo in file flag value check

dagger call workflows run --source /Users/aweris/development/workspaces/github.com/aweris/gale --workflow-file "/Users/aweris/development/workspaces/github.com/aweris/gale/ci/workflows/job-outputs.yaml" result
โœ˜ build "dagger call" ERROR [1.13s]
โ”œ [0.78s] loading module
โ”œ [0.35s] loading objects
โ€ข Engine: 61b34bf9d33e (version v0.9.0)
โง— 2.14s โœ” 30 โˆ… 12 โœ˜ 1
Error: parse flags: invalid argument "/Users/aweris/development/workspaces/github.com/aw...
#

What is the issue?

https://github.com/dagger/dagger/blob/43617cd5841e42df27268ae09f409e086075f954/cmd/dagger/flags.go#L110

When the flag value is set it fails when the value is not empty.

PR fixes the typo #5948

Log output

dagger call workflows run --source /Users/aweris/development/workspaces/github.com/aweris/gale --workflow-file "/Users/aweris/development/workspaces/github.com/aweris/gale/ci/workflows/job-outputs.yaml" result
โœ˜ build "dagger call" ERROR [1.13s]
โ”œ ...
vivid lintelBOT
#

Partially resolves https://github.com/dagger/dagger/issues/5930#issuecomment-1775291664.

Having duplicate error types meant that the git llb source attempting to look for the git secrets would not get an ErrNotFound, and would instead bail after looking for the first secret. See https://github.com/moby/buildkit/blob/d5c1d785b042cf834a05b08b73479d55b6acb533/source/git/source.go#L259-L265.

This update fixes this by ensuring that we use the same error type, so we properly look for all spec...

vivid lintelBOT
vivid lintelBOT
#

What is the issue?

When we call a module with local dependency using git-ref, cli isn't able to find dependencies.

dagger.json for following error log https://github.com/aweris/gale/blob/0fcf43c126b03fc4296f05970328aaca085c18af/daggerverse/gale/dagger.json#L1-L9

Log output

dagger call --mod github.com/aweris/gale/daggerverse/gale@0fcf43c126b03fc4296f05970328aaca085c18af
โœ˜ build "dagger call" ERROR [4.15s]
โ”œ [4.15s] loading module
โœ˜ asModule ERROR [0.00s]
โ€ข Engine: 61b3...

vivid lintelBOT
#

We've decided to disable this ability for now since it creates hard to
solve problems w/ namespacing (simply prefixing extension functions with
Module name often creates extremely awkward names) and is unclear in
terms of benefits relative to confusion in terms of API design.

It will be possible to re-add support for this in the future if desired
and in the meantime it would still be possible for a custom SDK to
implement support for this by identifying fields in the graphql schema
t...

vivid lintelBOT
#

Fixes #5953


I'm working on adding integ test coverage right now, just verified manually so far. Will push it here or as separate commit, depending on timing of this being merged.

Integ test requires way more work than the fix itself because we need to re-add the ability to create a git repo from a module source dir and then run it as a service container that a dev engine talks to. @vito I'm going to try doing this by running the dev engine as a service that has a dependency on t...

vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

The Python SDK is implemented as an SDK module, but it's still somewhat special in that it's builtin. Our code supports arbitrary SDK modules defined externally, but we haven't added test coverage for them yet.

Among other things, we should get coverage that an SDK module which has its own module dependencies is able to use those successfully while not mixing those dependencies in with the dependencies of the module its generating code for/creating a runtime container for.

Ref: conver...

vivid lintelBOT
#

The core.Context object was added back during cloak experiments w/ Extensions and intended to be used to pass common query context through the codebase.

However, it never got used in practice much (the original use case is totally gone) and creates incredibly subtle bugs since the context.Context API is hard to use with wrapped types.

I found another subtle bug w/ it while working on something else (setting progrock context in SDK module code that ended up being "persistent" beyond the ...

ornate vigilBOT
vivid lintelBOT
#

This is a quick push for next release to rename a package before it's more widespread and a bigger breaking change later.

It used to be "dagger.server", then we changed to environments and it was renamed to "dagger.env", and finally, before the change to modules, this was renamed more generally to "dagger.ext" (for extensions).

Renaming again to "dagger.mod", and removing the previous concept of multiple types of entrypoints to just "functions".

- from dagger.ext import func...
vivid lintelBOT
vivid lintelBOT
#

This started out as just fixing https://github.com/dagger/dagger/issues/5872, but looking into that uncovered some deeper problems that needed fixes+cleanups as a pre-req.

The deeper problems relate to this conversation the other day w/ @vito and @helderco: https://github.com/dagger/dagger/pull/5954#issuecomment-1776545239

I now understand why things seemed to mostly work before, but it turns out to have been a mildly astonishing set of coincidences rather than anything solid. Quick e...

vivid lintelBOT
vivid lintelBOT
#

:cry: Woops, I added some regressions in #5893

Added a couple fixes, with more detailed descriptions below.

fix: apply recursion only on added types in go SDK

The previous fix to apply recursion to detect nested types (in struct fields, return parameters, etc) was too extensive.

Specifically: if a struct type X was created that contains struct type Y, code for type Y would always be generated, even if type X would not be generated (which could happen it was at the top-level and...

vivid lintelBOT
#

What is the issue?

Using common parameter types like following code block causing runtime error: index out of range while generating module code.

func (ar *ActionRun) WithInput(name, value string) *ActionRun {
    ar.Config.With = append(ar.Config.With, fmt.Sprintf("%s=%s", name, value))
    return ar
}

Log output

dagger mod sync
โœ˜ asModule(sourceSubpath: "daggerverse/actions/runtime") ERROR [3.18s]
โœ˜ exec /usr/local/bin/codegen --module . --propag...
vivid lintelBOT
#
~/G/g/F/P/go โฏโฏโฏ dagger mod init --name Go --sdk go                                                                                                         bugfix/prevent-stack-smashing โœฑ โ—ผ
โœ˜ asModule(sourceSubpath: ".") ERROR [0.92s]
โœ˜ .....
โœ˜ generating go module: Go ERROR [0.09s]
โ”œ [0.02s] go mod tidy
โ”ƒ writing dagger.gen.go
โ”ƒ writing go.mod
โ”ƒ writing go.sum
โ”ƒ writing main.go
โ”ƒ creating directory querybuilder
โ”ƒ writing querybuilder/marshal.go
โ”ƒ writing querybuilder/querybui...
vivid lintelBOT
#

Though in theory it's possible to have completely different modules at different commits in a single git repo + subpath. That would imply calling dagger mod use github.com/jpadams/daggerverse/drupal could actually be expected to just append the newest commit to the list of dependencies rather than update the existing entry in the list of deps.

But that's probably such an obscure thing to want to do that maybe we should just ignore it and have the behavior be to replace the existing github...

vivid lintelBOT
vivid lintelBOT
#

What are you trying to do?

In CI there are many jobs where you need to decide based on there return code of a command (ok / not ok) how to proceed.

Simple example, upload the artefact if it is not already there If it exists, skip upload.

The current workaround is as described in your docs
https://docs.dagger.io/cookbook#continue-using-container-after-command-execution-fails

Of course, the solution is working. But I have often the case that I want decide the further based on t...

vivid lintelBOT
vivid lintelBOT
#

Using an exec op here to figure out the default branch of a git ref is not ideal: https://github.com/dagger/dagger/blob/dfdb520e16167d2629fb005bfedb20522270e580/core/modules/resolver.go#L299-L299

Among other things, it adds a hard dep on an image from dockerhub, which can create problems for users w/ stringent firewalls.

Instead, we should add that API to or core git api (similar to what @jedevc did recently with the new commit api).

However, I don't believe this API is anywhere up...

#

Otherwise we can get stale data.

Thankfully the new commit API helps us with half of this.

Continuing to use an exec-op to get the default branch is far from ideal though. The much better fix would be to move this all fully into our core api so we don't need any exec ops. But this will alleviate short term pain in the meantime.


Follow up issue for removing need to continue to use an exec op https://github.com/dagger/dagger/issues/5986

vivid lintelBOT
vivid lintelBOT
#

This cleans up the panic-ing behavior inside go sdk template functions. The important change is to try and recover and print a stack trace from panics during module code generation since this is the code that's most likely to actually panic.

This resolves #daggernauts message:

Hard to debug because I'm not getting a filename or line

The other functions can panic, but are much less likely to - they're also small en...

vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

This is a missing commit from https://github.com/dagger/dagger/pull/5964

With the introspection we avoid having to make a connection to the API at all, which also avoids any issue importing an incomplete or non-importable dagger package (due to errors).

Cleaned up the python cli in preparation for moving the mod init templates there. Typer would have been a better choice for sys.argv parsing but I still wanted to avoid adding a dependency just for this.

vivid lintelBOT
#

Bumps com.spotify.fmt:fmt-maven-plugin from 2.19 to 2.21.1.

Release notes
Sourced from com.spotify.fmt:fmt-maven-plugin's releases.

2.21.1
What's Changed

Upgrade dependencies by @โ€‹caesar-ralf in spotify/fmt-maven-plugin#180

Full Changelog: https://github.com/spotify/fmt-maven-plugin/compare/2.21...2.21.1
2.21
What's Changed

Use 2.19 for formatting code in this repo by @โ€‹klaraward in spotify/fmt-maven-plugin#154
Add metadata for Spotify OSS b...

#

Bumps org.mockito:mockito-core from 5.2.0 to 5.6.0.

Release notes
Sourced from org.mockito:mockito-core's releases.

v5.6.0
Changelog generated by Shipkit Changelog Gradle Plugin
5.6.0

2023-10-06 - 22 commit(s) by Andreas Turban, Stefan M, StevenCurran, Yevhen Lazhyntsev, dependabot[bot]
Use spdx identifier for license name (#3134)
Fixes #1382 Jupiter Captor annotation support (#3133)
Bump com.gradle.enter...

#

Bumps smallrye-graphql.version from 2.2.1 to 2.5.1.
Updates io.smallrye:smallrye-graphql-client-api from 2.2.1 to 2.5.1

Updates io.smallrye:smallrye-graphql-client-implementation-vertx from 2.2.1 to 2.5.1

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You...

#

Bumps org.junit:junit-bom from 5.9.3 to 5.10.0.

Release notes
Sourced from org.junit:junit-bom's releases.

JUnit 5.10.0 = Platform 1.10.0 + Jupiter 5.10.0 + Vintage 5.10.0
See Release Notes.
Full Changelog: https://github.com/junit-team/junit5/compare/r5.10.0-RC2...r5.10.0
JUnit 5.10.0-RC2 = Platform 1.10.0-RC2+ Jupiter 5.10.0-RC2 + Vintage 5.10.0-RC2
See Release Notes.
JUnit 5.10.0-RC1 = Platform 1.10.0-RC1 + Jupiter 5.10.0-RC1 + Vintage 5.10.0-RC1
S...

#

Bumps httpcore from 0.18.0 to 1.0.0.

Release notes
Sourced from httpcore's releases.

Version 1.0.0
1.0.0 (6th Oct 2023)
From version 1.0 our async support is now optional, as the package has minimal dependencies by default.
For async support use either pip install 'httpcore[asyncio]' or pip install 'httpcore[trio]'.
The project versioning policy is now explicitly governed by SEMVER. See https://semver.org/.

Async support becomes fully optional. (#809)
...

#

Bumps eslint from 8.50.0 to 8.52.0.

Release notes
Sourced from eslint's releases.

v8.52.0
Features

70648ee feat: report-unused-disable-directive to report unused eslint-enable (#17611) (Yosuke Ota)

Bug Fixes

5de9637 fix: Ensure shared references in rule configs are separated (#17666) (Nicholas C. Zakas)
dcfe573 fix: add preceding semicolon in suggestions of no-object-constructor (#17649) (Francesco Trotta)

Documentation

476d58a docs: Add note about i...

#

Bumps github.com/go-git/go-git/v5 from 5.9.0 to 5.10.0.

Release notes
Sourced from github.com/go-git/go-git/v5's releases.

v5.10.0
What's Changed

PlainInitOptions.Bare and allow using InitOptions with PlainInitWithOptions by @โ€‹ThinkChaos in go-git/go-git#782
Worktree, apply ProxyOption on Pull by @โ€‹nodivbyzero in go-git/go-git#840
Repository: add clone --shared feature by @โ€‹enverbisevac in go-git/go-git#860
build: Add github workflow to check commit mess...

#

Bumps google.golang.org/grpc from 1.58.3 to 1.59.0.

Commits

7765221 Change version to 1.59.0 (#6695)
e88f12e server: prohibit more than MaxConcurrentStreams handlers from running at once...
be7919c transport: Pass Header metadata to tap handle. (#6652)
e3f1514 Reapply "status: fix/improve status handling (#6662)" (#6673) (#6688)
696faa9 client: add a test for NewSubConn / StateListener / cc.Close racing (#6678)
318c717 readme: fix badges (#6687)
...

#

Bumps github.com/google/uuid from 1.3.0 to 1.4.0.

Release notes
Sourced from github.com/google/uuid's releases.

v1.4.0
1.4.0 (2023-10-26)
Features

UUIDs slice type with Strings() convenience method (#133) (cd5fbbd)

Fixes

Clarify that Parse's job is to parse but not necessarily validate strings. (Documents current behavior)

v1.3.1
1.3.1 (2023-08-18)
Bug Fixes

Use .EqualFold() to parse urn prefixed UUIDs (#118) (574e687)

Changelog
Sourced from github...

vivid lintelBOT
vivid lintelBOT
#

I added a utility command engine:testShim to our mage tool because I cannot run the shim directly on mac. I added a test TestScrubSecretLogLatency that iterates over 1 to 1500 secrets, and try to check for a time latency.

Unfortunately I couldn't, so maybe I did something wrong,but I think I correctly followed the instruction given in the issue.
We can run test with ./hack/make engine:testShim.

Here's the output I have when I executed tests:

--- PASS: TestScrubSecre...
vivid lintelBOT
#

What are you trying to do?

When using service containers, they just show up in the dagger TUI as "service nc512ita2341" with some randomly generated name, what I'd like to do is supply a user defined label to this, to make it more human-centered in its representation, so that I'd see something like

 Dagger Pipeline....                         
 โ”‚                                           
 โ”œโ”€โ”€โ–ถ service "Primary PostgreSQL Database"  
 โ”‚    โ”€โ”€โ–ถ .....INSERT INTO xxxx            ...
vivid lintelBOT
vivid lintelBOT
#

Notes

  • Can have either top-level functions or under a class named after the module (like in Go), but not both at the same time. The former is a convenience;
  • Classes must be decorated with @object_type to be exposed as a dagger.ObjectTypeDef;
  • Fields must be initialized with field to be exposed as a dagger.FieldTypeDef, otherwise it'll still serialize/deserialize;
  • Functions must be decorated with @function, even under a class, to be exposed as a dagger.Function;
  • ...
vivid lintelBOT
#

What are you trying to do?

Currently services tunneled to the host are exposed as *:.

It would be easoer to avoid port collision if we could expose the service on a certain adress on the host.
I.e. 127.0.0.2 for example.

client.Host().Tunnel(httpSrv, {Native:true, Host: "127.0.0.2").Start(ctx)

Why is this important to you?

he reason for this feature is that during the development phase and when debugging unit tests it is easier to run the service directly in you...

vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

Before

$ dagger -m github.com/shykes/daggerverse/supergit call remote --url https://github.com/dagger/dagger tags name
โœ˜ dagger call remote tags ERROR [0.00s]
โ”ƒ Error: unknown command "name" for "dagger call remote tags"                        
โ€ข Cloud URL: https://dagger.cloud/runs/143cd139-e3d5-423b-8558-09a118923dd6
โ€ข Engine: 002636d876e8 (version devel ())
โง— 2.50s โœ” 175 โˆ… 4 โœ˜ 1

After

$ dagger -m github.com/shykes/daggerverse/supergit call...
vivid lintelBOT
#

Long-term goal is to be able to know if we are breaking existing daggerverse modules as we make changes in PRs. Short-term goal is to know if we are breaking existing daggerverse modules being used in KubeCon.

This is incredibly barebones at the moment; just a hardcoded list of modules w/out any pinning and a test case that calls dagger functions on all of them in parallel in subtests. The hope is it's still useful (at least as an advisory check in GHA) and potentially the start of somet...

vivid lintelBOT
#

This PR updates the flag parsing to allow passing arrays of core types to dagger call.

For example, we can now directly invoke a function like this (the example from the integration test):

func (m *Minimal) Reads(ctx context.Context, files []File) (string, error) {
	var contents []string
	for _, f := range files {
		content, err := f.Contents(ctx)
		if err != nil {
			return "", err
		}
		contents = append(contents, content)
	}
	return strings.Join(contents, "+"), nil
}...
vivid lintelBOT
vivid lintelBOT
#
  • rename InputValue to InputObject to avoid confusion with InputValue class in io.dagger package
  • add helper methods to create InputObject by adding chainable withXXX methods

For instance it permits to replace

PortForward portForward = new PortForward();
portForward.setBackend(3306);
portForward.setFrontend(3306);
portForward.setProtocol(NetworkProtocol.TCP);
Service hostSrv = client.host().service(List.of(portForward));

to

Service hostSrv = client...
vivid lintelBOT
#

What is the issue?

When a log string contains an emoji, TUI logs an additional empty line.

Log output

Steps to reproduce

Print log messages containing emojis.

Example code to produce logs shared in the screenshot above.

package main

type Emoji struct{}

// Print returns a string with an emoji.
func (m *Emoji) Print() string {
	return "๐Ÿ˜€\n๐Ÿท๐Ÿ”‘\nA normal string\n"
}

SDK version

DaggerCLI v0.9.2

OS version

macOS 14.0

vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

This allows making slice types ([]any) optional, which is permitted at the API level, but wasn't allowed at the type constraint level.

We previously used this constraint because it was assumed that a user might constraint an Optional manually, and not set isSet. However, this is an edge case that pokes into the private internals of dagger.gen.go, and we now have the Opt helper for this. Users doing this kind of access should be aware of what they're doing.

Additionally, to r...

vivid lintelBOT
#

This fixes DEV-2936 (cc @shykes).

Before:

1: generating go module: playground
1: generating go module: playground ERROR: generate code: template: module:59:3: executing "module" at : error calling ModuleMainSrc: failed to convert method Read to function def: failed to convert param type: invalid type: invalid type
Error: generate code: template: module:59:3: executing "module" at : error calling...
vivid lintelBOT
#

What are you trying to do?

Running the sample at https://docs.dagger.io/cli/389936/run-pipelines-cli#step-2-create-a-dagger-client-in-bash

I'm on Win11 inside WSL2 running Ubuntu 22 LTS with Docker Desktop.

The error itself makes sense for .docker/config.json has:

"credsStore": "desktop.exe",

But any other tool using docker inside my WSL seems not to have such issues. I don't know if there's anything reasonable you can do about this. What you find is [this](ht...

vivid lintelBOT
#

Problem

When I call Container().WithEntrypoint(), the container's entrypoint is changed (good) but the default arguments, if any, remain unchanged (confusing).

Keeping the default arguments when changing the entrypoint is confusing, because default arguments are applied to the entrypoint. So although it's possibly that the arguments still apply to the new entrypoint, it's most likely not. This is especially confusing when setting the entrypoint of a third-party image: typically t...

vivid lintelBOT
#

Bumps uk.org.webcompere:system-stubs-jupiter from 2.0.2 to 2.1.3.

Release notes
Sourced from uk.org.webcompere:system-stubs-jupiter's releases.

v2.1.2
Add support for TestNG
v2.1.1
Improve build
v2.1.0
Remove dependency on Mockito and ensure environment variables mocking is global to all threads.

Build upgraded to Java 11+
Mockito no longer used
Byte buddy is now used to create the interceptor for environment variables

v2.0.3
Fix a null pointe...

#

Bumps docusaurus-plugin-typedoc from 0.19.2 to 0.21.0.

Changelog
Sourced from docusaurus-plugin-typedoc's changelog.

0.21.0 (2023-11-01)
Features

Support Docusaurus V3

0.20.2 (2023-09-27)
Bug Fixes

CLI command skips unrelated plugins (thanks @โ€‹spalladino)

0.20.1 (2023-09-07)
Bug Fixes

Fixed bootstrapping of TypeDoc options.

0.20.0 (2023-08-26)
Bug Fixes

TypeDoc 0.25 compatibility fixes....

#

Bumps github.com/grpc-ecosystem/go-grpc-middleware from 1.3.0 to 1.4.0.

Release notes
Sourced from github.com/grpc-ecosystem/go-grpc-middleware's releases.

v1.4.0
What's Changed

Do not stop retrying based on earlier good message from the stream by @โ€‹kartlee in grpc-ecosystem/go-grpc-middleware#313
Deprecate the server interceptor chain helpers by @โ€‹CAFxX in grpc-ecosystem/go-grpc-middleware#423
Simplify chain interceptors by @โ€‹aaronga...

#

Bumps github.com/klauspost/compress from 1.16.5 to 1.17.2.

Release notes
Sourced from github.com/klauspost/compress's releases.

v1.17.2
What's Changed

zstd: Fix corrupted output in "best" by @โ€‹klauspost in klauspost/compress#876

Full Changelog: https://github.com/klauspost/compress/compare/v1.17.1...v1.17.2
v1.17.1
What's Changed

s2: Fix S2 "best" dictionary wrong encoding by @โ€‹klauspost in klauspost/compress#871
flate: Reduce ...

vivid lintelBOT
#

Bumps typedoc-plugin-markdown from 3.16.0 to 3.17.0.

Release notes
Sourced from typedoc-plugin-markdown's releases.

typedoc-plugin-markdown@3.17.0
Features

Support MDXv2

Changelog
Sourced from typedoc-plugin-markdown's changelog.

3.17.0 (2023-11-01)
Features

Support MDXv2

Commits

bb7717a chore: Updated version
04368cf chore: re enabled specs
29857f5 fix: Support MDXv2 (#491)
See full...

vivid lintelBOT
vivid lintelBOT
#

What is the issue?

In dagger v0.8.x and before since service containers are handled as the dagger.Container type, calling ExposedPorts (https://pkg.go.dev/dagger.io/dagger#Container.ExposedPorts) on those will return the underlying image EXPOSED metadata.

Starting from v0.9 since the intended type to be used is dagger.Service, calling Ports (https://pkg.go.dev/dagger.io/dagger#Service.Ports) on that type doesn't yield to the same result.

This presents a functional regres...

vivid lintelBOT
#

What is the issue?

I do in a clean environment:
curl -L https://dl.dagger.io/dagger-cue/install.sh | sh

Log output

curl -L https://dl.dagger.io/dagger-cue/install.sh | sh

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 8679 100 8679 0 0 52671 0 --:--:-- --:--:-- --:--:-- 52920
sh debug downloading files into /tmp/tmp.HJLIig
sh debug http_download...

vivid lintelBOT
#

The change there makes the return value of graphql introspection stable, which is important since it's an input to the SDK Codegen+Runtime functions.

Previously, we were re-running those SDK functions way too often, which wasted tons of time, especially in modules with larger dependency DAGs.

One of Kyle's demo's took a minimum of 25s every run due to that; now it's down to 7s with this fix in place.

vivid lintelBOT
#

Fixes https://github.com/dagger/dagger/issues/5860.

Essentially, we configure the Go SDK to make sure that we always request the name of the field that we want the server to send/receive from. If we ask for field "A", we should get "A" and not the camel-cased "a". As a nice effect to do this, we need to add OriginalName support for fields. (@helderco I remember you saying something about this somewhere, but I couldn't find where you mentioned it, sorry).

This is still... not great (...

vivid lintelBOT
#

Support values include:

  • ./mydir
  • file://mydir
  • Various url schemes for git remote: git://, ssh://, https://, git+ssh://, git+https://
  • Encode git ref in URL fragment (defaults to main): https://github.com/dagger/dagger#v0.9.2
  • Not yet supported: tarball-over-https
  • Not yet supported: interpret local dir as a git repo, by encoding a git ref in the fragment, eg. file://.#main
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

There has been a recent change - 7pm GMT on Nov. 5, 2023 - in the route that publishes a module.

It used to be GET /crawl. It is not PUT /crawl. This private PR has more details: https://github.com/dagger/dagger.io/pull/3058#issuecomment-1793819422

This is a reminder that we need to change the route that dagger mod publish uses. We should also cut a new release soon after.

I will be travelling & will not have internet for the next 10 hours. Unless someone else doesn't beat me ...

vivid lintelBOT
vivid lintelBOT
#

Follow-up to https://github.com/dagger/dagger/pull/5907#discussion_r1371873008, worked out a neat way to properly handle those weird edge cases.

This PR fixes (and tests for) a couple edge cases with our custom comment parsing:

  • Don't read previous lines line-comments as doc-comments

    foo string, // this documents foo, not bar 
    bar string, // this should document bar
    
  • Don't read comments after the function as line-comments for the last arg

    func ...
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

While we namespace objects in graphql and in client codegen, in the go sdk codegen is all in the same package so if you want to name a type "Container" your code won't compile, even though it's gonna be namespaced later anyways.

This may also cause problems in the introduction of a new core type could create conflicts with existing modules and thus break them.

In terms of fixes:

  1. We should skip namespacing if an object already has the namespace applied. Eg if a module named cool has a typ...
#

On mobile so this will be abbreviated.

There's a bug in our use of merge-op to implement WithFile/WithDirectory which results in any parts of a parent dir that are a symlink to be replaced with an actual dir if With* is called to put a file/dir under them.

E.g. on ubuntu /bin is a symlink to usr/bin, but if you do 'ubuntu.WithFile("/bin/foo", someFile)' then the bin symlink is replaced with a dir named bin.

This is a situation in which we can't use merge op to optimize.


The approach...

#

Sometimes you want something to be part of an object's state but don't want it to show up in the api.

We actually do this all the time in core, but I don't believe it's possible today in the Go SDK (at least without hacks like custom json marshal).

I'm not sure if it's possible in Python (cc @helderco)

Struct tags are the most obvious solution here for go since it would be a simple bool off/on setting. In python, annotations of course.

#

This patch splits out the pull step to a separate place in the progress output, which is only printed if the image is actually pulled from the registry. This is added so we can have better insight into what part of connecting to the dagger engine is actually taking time (currently this is very opaque).

Note

For a follow-up, we should look at getting progress information from the pull, so that we can implement a progress bar, which would be even better. I think this requires t...

#

Right now users can't override goproxy which makes the engine unable to access go modules from e.g. corporate proxies.

There are obviously ways to just hack something together for this, but it would be greatly preferable to implement it as part of a more general concept of SDK settings.

In general, it probably makes sense for SDKs to accept configuration parameters and for those to usually be encoded in dagger.json.

However, goproxy in particular adds an extra layer of possible complicatio...

vivid lintelBOT
vivid lintelBOT
#

:warning: Requires #6068.

This adds the default tags back in for inline structs, as a bit of a workaround for doing so, since @vito asked nicely (see [here](#1167084892723617912 message) :smile:) I still think we should probably avoid directly pointing users at this, but maybe it might be fine for advanced users.

Not 100% sure about this, but given we can and have a place to put it, I think it might be fine to do so for now.

vivid lintelBOT
#

What is the issue?

When I attempted to publish the gale module on daggerverse, I received an error related to local dependency resolution.

Log output

module became stardust
I wasn't able to load a module from github.com/aweris/gale/daggerverse/gale@1dee85484cbfba12c609ba114839977547e94c7a. Check the logs below for details.

get name: input:1: git.commit.tree.directory.asModule failed to create module from config: failed to get runtime: failed to install deps during g...
#

What is the issue?

When following the quickstart "dagger up" example at https://docs.dagger.io/zenith/user/quickstart/532928/up#expose-a-service, I see the error Fatal glibc error: CPU does not support x86-64-v2.

Log output

 dagger up --native service 
โœ˜ dagger up service ERROR [30.60s]
โ”ƒ Error: failed to start tunnel: input:1: host.tunnel.start start upstream: exited: exit code: 127                                          
โ”ƒ output: Fatal glibc error: CPU does no...
vivid lintelBOT
vivid lintelBOT
#

What is the issue?

I have a dagger module returns following struct

// Info represents a repository information.
type Info struct {
	Owner         string     // Owner of the repository.
	Name          string     // Name of the repository.
	NameWithOwner string     // NameWithOwner combined version of owner and name. Format: owner/name.
	URL           string     // URL of the repository.
	Ref           string     // Ref is the branch or tag ref that triggered the workflow
...
vivid lintelBOT
#

This patch detects some additional edge cases when loading modules, notably:

  • Fail if the server tries to load a module where the config is not under the root - this is still also checked client-side for the main module. However, by adding checks server-side, we also get this for dependencies as well.

Additionally, a few small nitpicks:

  • Use path/filepath instead of path.

    path/filepath uses OS-depedendant separators, which, while we're not using this, highlights that the...

vivid lintelBOT
#

Fixes #5927

With this change, default values in input object fields are omitted.

For example:

svc = dagger.host().service([dagger.PortForward(8000)])

Destructures now as:

{"ports": [{"backend": 8000}]}

Previously it was destructuring with defaults included:

{'ports': [{'backend': 8000, 'frontend': None, 'protocol': None}]}

Where PortForward, on server side, frontend is set to be equal to backend unless it's set. By send...

vivid lintelBOT
vivid lintelBOT
#

:bulb: Inspired @shykes's comment in [discord](#docker message).

There's a few extra steps that WithExec takes, that currently docker run doesn't, mostly a lot of setting _DAGGER internal env vars.

Importantly though, these enable a few useful features :tada:

vivid lintelBOT
vivid lintelBOT
#

What is the issue?

I've tried converting the NodeJS docker with postgres example into Elixir, but the .with_service_binding doesn't seem to work properly - an error is always thrown. If I remove the service binding the workflow completes ok (although the tests fail, because they need the database). My workflow is:

defmodule Mix.Tasks.ElixirWithDagger.Test do
  use Mix.Task

  @impl Mix.Task
  def run(_args) do
    Application.ensure_all_started(:dagger)

    client...
vivid lintelBOT
#

What happened? What did you expect to happen?

We are facing an issue with running docker commands with dagger ever since v0.7.4. That is the last version where it worked for us. We planned to use dagger in our ci/cd and some tasks include docker commands. It also fails for simple commands such as docker ps. Here is a snippet of command we use in go:

socket := client.Container().
		From("docker").
		WithUnixSocket("/var/run/docker.sock", client.Host().UnixSocket("/var/run/dock...
vivid lintelBOT
#

What happened? What did you expect to happen?

I'm trying to extract UNIX utilities from pre-built docker images, like kubectl and helm, using python script. As it is popular approach to cut some time while reusing already existing artifacts, instead of building and storing tar image.

As far as I understand: dagger engine, being written on Go, in which strings are always implicitly encoded in UTF-8, reads all system files as byte arrays by default. While using

host_file = await...
vivid lintelBOT
#

What is the issue?

Can't use Optional in a function parameter (module).

Reported by user in Discord.

Log output

TypeError: Unsupported union type: typing.Optional[str]

Steps to reproduce

With this module:

from typing import Optional
from dagger.mod import function

@function
def foo(bar: Optional[str] = None) str:
    return bar or "foobar"

Run:

โฏ dagger cal...
vivid lintelBOT
#

What is the issue?

When not providing documentation with Annotated[str | None, Doc("foobar")], the union itself is annotated:

Usage:
dagger call foo [flags]

Flags:
--bar string Represent a PEP 604 union type

                 E.g. for int | str

-h, --help help for foo

It should be empty in this case.

Log output

No response

Steps to reproduce

Create module with:

from dagger.mod import function

@function
def foo(bar:...
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

:warning: Depends on https://github.com/dagger/dagger/pull/6057 (marking as draft until that one is merged)

This feature allows all module declared objects to be converted to a respective ID-type using the "id" field, and converted from an ID-type using the "loadFromID" helper. This effectively makes these types fully idable.

IDs are essentially the contents of the module type's data, JSON-encoded, and then base64-encoded, similar (but not identical) to standard IDs. At the moment, they...

vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

What happened? What did you expect to happen?

Hi everyone,

I am running dagger:

  • on Ubuntu20
  • with Python 3.10.12 in a pyenv environment
  • using poetry for the dependencies
  • behind a corporate proxy.

I am observing the following behavior:

vivid lintelBOT
#

Codegen wasn't including the module's subPath when generating files.

Example

dagger mod init --sdk=python --name=bare --root=..

Before

.
โ”œโ”€โ”€ bare
โ”‚  โ”œโ”€โ”€ sdk
โ”‚  โ”œโ”€โ”€ src
โ”‚  โ””โ”€โ”€ pyproject.toml
โ”œโ”€โ”€ .gitignore
โ””โ”€โ”€ dagger.json

After

.
โ”œโ”€โ”€ sdk
โ”œโ”€โ”€ src
โ”œโ”€โ”€ .gitignore
โ”œโ”€โ”€ dagger.json
โ””โ”€โ”€ pyproject.toml
vivid lintelBOT
#

What is the issue?

A dagger user reported an issue with their pipelines because it wasn't immediately obvious form them that when defining their pipeline using the chaining pattern, ordering is an important thing to take care about. For example:

func main() {
    ctx := context.Background()

    // create a Dagger client
    client, err := dagger.Connect(ctx, dagger.WithLogOutput(os.Stdout))
    if err != nil {
        panic(err)
    }
    defer client.Close()

    /...
vivid lintelBOT
#

These sorts of errors have been happening occasionally (~1 / day) in our CI approximately since we switched over everything to our shared runners:

Error: input:1: pipeline.pipeline.container.export failed to solve for container publish: failed to compute cache key: failed to get state for index 0 on copy /runc /usr/local/bin/runc

(run)

The exact message varies but seems to always happ...

vivid lintelBOT
#

Right now callers can pass their environment variables to modules by just reading them and setting them to function arg values, e.g. w/ the cli:

dagger call my-function --some-arg $SOME_ARG_VALUE

This suffices for straightforward use cases but multiple users have found it to be tedious + clunky once you need to pass a lot of env vars. It also isn't ideal for some use cases where the caller may not know what they are even supposed to pass.

This issue is to discuss any possible...

vivid lintelBOT
#

What are you trying to do?

Currently you can only dagger mod install modules hosted in public Git repositories. While this is great for OSS, it's not ideal for Enterprises that use private Git repositories like Gitlab and Github Enterprise.

We require a way to somehow pass in/use authentication (GH PAT for example) when adding a module hosted in a private git repository.

Discord thread: https://discord.com/channels/707636530424053791/1171809848057401375

Why is this importan...

ornate vigilBOT
vivid lintelBOT
#

This makes it easier to write Dagger benchmarks and reuse test helpers like connect:

func BenchmarkSomeFunctionality(b *testing.B) {
	c, ctx := connect(b)
	secretKeyReader := bytes.NewReader(secretKeyBytes)
	secretValue, err := io.ReadAll(secretKeyReader)

	s := c.SetSecret("key", string(secretValue))

	for i := 0; i < b.N; i++ {
		sec := c.Container().From(alpineImage).
			WithSecretVariable("KEY", s).
			WithExec([]string{"sh", "-c", "echo  -n \"$KEY " + index + "\""})...
vivid lintelBOT
#

The pattern of writing modules that use With* functions to enable updates of object state in a builder-pattern/"fluent" style works pretty well for codegen clients, but looks clunky in the CLI.

@goller has a great example here: https://github.com/goller/daggerverse/blob/60619b38448b058743c52abb3dd3b94be1b1f1c0/flags/main.go#L3-L26

If you embrace the with* pattern your CLI calls look like dagger call with-flag-1 --flag 1 style-1.

But if you instead embrace just putting a bunch o...

vivid lintelBOT
#

When LocalFileExport is called the following operations occur. stat is already populated with FileInfo:

...
	file, err := os.Open(mntFilePath)
	if err != nil {
		return fmt.Errorf("failed to open file: %s", err)
	}
	defer file.Close()
	stat, err := file.Stat()
	if err != nil {
		return fmt.Errorf("failed to stat file: %s", err)
	}
...

It seems there's a redundant file.Stat call in https://github.com/matiasinsaurralde/dagger/blob/main/engine/buildkit/filesync.go...

vivid lintelBOT
#

This change adds a module for developing the Python SDK.

Main purpose is to allow others to run Python tasks without having to have a Python environment in their computers. This can be done in phases but includes something from all of the following:

  1. Migrate hatch tasks;
  2. Add utilities for testing or linting any Python files (e.g., doc snippets);
  3. Migrate CI tasks (from mage);

The last one is related to a backlog item for using zenith in our CI. The ./ci module will use `./sd...

vivid lintelBOT
#
  • Expose a Node client that can be used without a Dagger connection set up.
  • Abstract the connection to the engine outside the NodeJS generated code.
  • Add test for default client.
  • Refactor provisioning to not return the client anymore but instead the connection's context.
  • Update tsconfig.json to a newer target version.
  • Update current connect function to use the context instead of directly creating the client.
  • Update generated code to use context, which make it lighter and ...
vivid lintelBOT
#

Right now changing the name of a module involves a manual write to dagger.json and then also updating your code to use the new name for the main module object, which is fairly involved.

We at minimum should give helpful error messages if someone tries to rename the module in dagger.json but doesn't rename it in their code.

It would be really great if it was possible to do the entire thing automatically, but the tricky part is that we'd need to rewrite parts of their module code automati...

vivid lintelBOT
#

Python tests didn't move to our dagger runners because the provisioning test has been failing when _EXPERIMENTAL_DAGGER_CLI_BIN is set, at least locally on macOS and on the custom runners. This test could have been skipped by changing the command to pytest -m "not provision" (in mage), but better to fix the test.

Refactored to be more fully async, and also simplified by relying on aiohttp for the async server.

vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

Right now Module authors define a top-level object for their module, can include fields in it, and can attach functions to it, but they can't define any arguments for constructing the module object itself.

This is not a limitation of the underlying graphql API; we create a field under Query for the module but we don't currently give authors any way of setting arguments on it. This creates some "impedance mismatch" since other objects in the module can implicitly have constructors since t...

vivid lintelBOT
vivid lintelBOT
#

Closes https://github.com/dagger/dagger/issues/6132

Very rough but minimal working example works now:

package main

func New(foo Optional[string]) *Test {
	return &Test{
		Foo: foo.GetOr("defaultfoo"),
	}
}

type Test struct {
	Foo string
}

func (m *Test) Echo() string {
	return m.Foo
}

dagger call echo on that module now returns defaultfoo.


Overall idea:

  1. WithConstructor is an api on TypeDef
    • Currently, it's only allowed to call thi...
vivid lintelBOT
#

Now that we have Zenith we can move off internal/mage and instead implement all our own CI as a module.

There's a very stale attempt in the ci/ dir of the dagger repo.

There's also some external modules that are more recent attempts here:

The idea would be to update ci/ to have all the equivalent functionality of interna...

vivid lintelBOT
#

What is the issue?

Currently, zenith do not support map types, resulting in compilation errors.

Log output

dagger call workflow string
โœ˜ load call ERROR [3.73s]
โ”œ [3.73s] loading module
โ”ƒ Error: failed to get loaded module ID: input:1: host.directory.asModule.s
โ”ƒ ve failed to load module types: failed to call module "gale" to get funct
โ”ƒ ns: failed to get function output directory: process "/usr/local/bin/code
โ”ƒ n --module . --propagate-logs=true --introspection-j...
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

What is the issue?

I have basic tsconfig.json (bellow) and I use ts-node but I have to use dynamic import and can not import types. Whatever I tried (type module in package.json, .mts extension, ...) I ended up with different errors.

// tsconfig.json
{
    "extends": "@tsconfig/node20"
}

image

Is there a reason not to support CommonJS?
I think the easiest way to suppor...

vivid lintelBOT
#

What is the issue?

This task is to replace node --loader ts-node/esm with tsx in our docs where running .ts/.mts scripts.

In the Node.js get started https://docs.dagger.io/sdk/nodejs/783645/get-started:

  • You no longer need a tsconfig.json as well. This step is not needed: npx tsc --init --module esnext --moduleResolution nodenext.
  • Instead of npm install ts-node typescript use npm install tsx.
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

Finally found some free time to revive this effort, making good progress. Completely exploratory, in dire need of refactoring.

Context: https://github.com/dagger/dagger/issues/3923#issuecomment-1714090592

TODO:

  • [ ] Get all tests passing, go over XXX's and TODOs
  • [ ] Write proper PR description
  • [ ] Figure out whether core.ModuleObject is needed, or how this should work for modules in general
  • [ ] Implement + understand impure / non-cached resolver semantics
  • [ ] Imple...
vivid lintelBOT
#

Add a program to introspect typescript files and convert it to a GraphQL schema.
Enable decorators in Node SDK.
Add analysis function.
Add typescript compiler.
Add decorators to declare expose object and methods to a GQL schema.
Add unit tests

TODO:

  • [ ] Add more tests
  • [ ] Convert analysed metadata to GraphQL schema

Related to DEV-3029

vivid lintelBOT
#

What are you trying to do?

I'm running couchbase as a service. It need to expose all the 6+ ports of couchbase so it can be accessed properly. But only the 8091 should be checked for health, because the other ports are unreliable. I'm using the Go SDK.

Why is this important to you?

I would like to have an option in the ContainerWithExposedPortOpts so I can disable the health check for certain ports.

How are you currently working around this?

I don't have a workaround, becau...

vivid lintelBOT
#

What is the issue?

I have two private images on gcr.io which necessary for run the e2e tests in our system. I created a service account which has permission to pull these images and I created a json key. We are using bitbucket pipelines at the moment and I can pull these images in a way like this:

 services:
    ....
    vault:
      image:
        name: gcr.io/company/vault:latest
        username: _json_key
        password: '$GCR_IMAGE_PULLER_KEY'
    couchbase:
      ...
vivid lintelBOT
#

Discord discussion: https://discord.com/channels/707636530424053791/1177373379255349248

As we need to add more support in Go for things like marking a field as private, setting default values, etc.

The most obvious option was to require use of structs (including the Opts struct idea, the "inline anonymous struct for args", etc.) and annotate more information via struct tags.

However, after discussion we realized a better general solution would be to not rely on struct tags but inst...

vivid lintelBOT
#

What is the issue?

Given the following pipeline:

func main() {
	// initialize Dagger client
	ctx := context.Background()
	client, err := dagger.Connect(ctx, dagger.WithLogOutput(os.Stderr))
	if err != nil {
		panic(err)
	}
	defer client.Close()

	src := client.Host().Directory(".", dagger.HostDirectoryOpts{
		Include: []string{"bar"},
	})

	mountCache := client.Host().Directory("mount")

	_, err = client.Container().
		From("alpine").
		WithWorkdir("/root").
...
vivid lintelBOT
vivid lintelBOT
#

Added the experimental PHP SDK (https://github.com/the-diamond-dogs/dagger-php-sdk) into sdk/php

Features :

  • PHP 8.2 with psalm static analysis (level 4)
  • Code generation from GraphQL introspection schema
  • Basic provisioning (DAGGER_SESSION_* env vars)
  • Auto provisioning
  • Unit tests
  • docker compose based development environment (for now)

Example code :

$client = Dagger::connect();
$output = $client->pipeline('test')
    ->container()
    ->from('alpine'...
vivid lintelBOT
#

What is the issue?

When writing a module like in steps to reproduce section, and then run dagger shell up. After that, I see dagger panic and disappear so fast and dagger shell ran successfully.

After that, I found an image (nixpkgs/nix) has only linux/amd64 and my machine (lima) cannot run it.

Log output

From the log you will see:

But if you seek to 00:11 in my video, you will see container panic:

https://github.com/dagger/dagger/assets/484530/e59805a2-b3bc-...

vivid lintelBOT
#

Still WIP (doesn't compile atm); been over the hump of "figure out what to even do" for a while now but the "last mile" of aligning every detail has been a real slog and taking somewhat longer than anticipated, so still some work left. Feel free to leave any high-level thoughts in the meantime though.

Overall, it's working out pretty nicely. One of the biggest benefit has turned out to be just creating wrapper types in core/schema around the actual API types in core (for Module, Object...

vivid lintelBOT
vivid lintelBOT
#

Split out from https://github.com/dagger/dagger/pull/6134 (note - all we actually need here is the buildkit update. Buildkit master already uses a more recent version of Docker which should not be affected by https://github.com/dagger/dagger/security/dependabot/386).

There are two significant changes in upstream (both made by me) since we last updated:

  • Git URL parsing has changed to return a custom type, to bridge over the differences between standard URLs and SCP-style URLs. This act...
vivid lintelBOT
#

What is the issue?

While using the support for Dockerfiles in Dagger, each time the pipeline is executed, the disk space grows indefinitely even if all operations are cached

Log output

N/A

Steps to reproduce

Use the following example pipeline

FROM alpine
package main

import (
	"context"
	"os"

	"dagger.io/dagger"
)

func main() {
	ctx := context.Background()

	// initialize Dagger client
	client, err := dagger.Connect(ctx, dagge...
vivid lintelBOT
#

When setting a remote git repository as a directory from the CLI, it makes sense to default to keeping the remote git directory. Some modules may use it - if it's there it can be used, and it doesn't really actually add any extra time to download.

I encountered this while attempting to run my hugo module https://github.com/jedevc/daggerverse/tree/main/hugo against a git repo - since hugo can use git metadata as part of the build, it needs access to those files. There's not really a way to ...

vivid lintelBOT
#

What is the issue?

I'm organizing my code by moving non-Dagger definitions to a sub-package. But Dagger only accepts models from the main package as return types.

Define Everything in main

This example as working as expected

package main

type Foo struct{}

type Bar struct {
	BarID string
}

func NewBar() *Bar {
	return &Bar{
		BarID: "foo-bar-main-id",
	}
}

// example usage: "dagger call container-echo --string-arg yo"
func (m *Foo) Test() *Bar {
...
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

Fixes https://github.com/dagger/dagger/issues/6162.

This allows defining defaults and optional parameters for Go modules using "dagger" pragmas. These are inspired in style by "go" pragmas.

Thankfully, this is actually a pretty simple patch, so we can bikeshed exact syntax - the earlier refactoring of opts through parsing args into paramSpecs makes this relatively simple to work with (also because of the way baseType and paramType are separated out, it's no extra effort to keep ...

vivid lintelBOT
#

Discovered while replying to #1179628240738975744 message:

This depends on the above CacheSharingMode - the docs for what those all do are here: https://github.com/dagger/dagger/blob/main/core/schema/cache.graphqls#L4-L17
Not quite sure why these aren't documented in the sdk docs though, that's a bit odd and might be worth a bit of a dig (will take a look!)

Turns out we weren't outputting the comments for enums - these fields...

vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

Fixes https://github.com/dagger/dagger/issues/6127

โš ๏ธ Warning
This is a breaking change for those using the global client or python modules.

What changed?

Global client instance

Previously the global client was accessible via the global dagger namespace, now they're in dagger.dag:

import dagger
+from dagger import dag

def fn() -> dagger.Container:
-    return dagger.container()
+    return dag.container()

Internally:

dag = d...
vivid lintelBOT
#

Fixes https://github.com/dagger/dagger/issues/6172 which I've actually wanted for ages (cc @aweris)

This allows go modules to accept arguments and return values that are of types from other packages that are not the current one.

For example, this allows module authors to structure their modules as they like with sub-packages while not exposing those details to the outside world.

This is a pretty straightforward change - to do this we need to:

  • Disable the explicit check that disa...
#

Originally reported and summarized from #1178719192585879643 message :tada:

When generating dagger.gen.go, it's possible for the user to name their arguments to clash with other internal names.

For example, a user can name their arguments to collide with imported names, like json, fmt and os or with internal local variables like parent, inputArgs and err.

These kind of collisions cause weird internal errors that...

vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

Depends on #6181.

This parses doc comments on top-level objects the same as we do for inline comments:

  • Ensure that the comments are trimmed to not have spaces.
  • Fallback to the line comment if no doc comment was found.

While doing this, I also found a bug that meant that the description for objects in the graphql API was being discarded and not appropriately set on the struct. And also found that we weren't even correctly detecting the struct comments from the go parse...

vivid lintelBOT
#

Bumps golang.org/x/tools from 0.15.0 to 0.16.0.

Commits

a9ef4cf go.mod: update golang.org/x dependencies
d9b9452 gopls/internal/lsp/cache: move quick-fix bundling logic to the cache pkg
1733061 go/analysis/passes/testinggoroutine: report by enclosing regions
b19be0f gopls/internal/cmd/help_test.go: document
daa4aa5 gopls/internal/lsp/source: stubmethods: fix out-of-bounds index
a586d0d go/types/internal/play: show more types.Scope detail
53ad329 gopls/inte...

#

Bumps golang.org/x/crypto from 0.15.0 to 0.16.0.

Commits

325b735 ssh/test: skip TestSSHCLIAuth on Windows
1eadac5 go.mod: update golang.org/x dependencies
b2d7c26 ssh: add (*Client).DialContext method
1c17e20 ssh: fix certificate authentication with OpenSSH 7.2-7.7
270bf25 curve25519/internal/field/_asm: go mod tidy to fix x/sys version
1cf1811 ssh: use the correct token from the client
a2edfb5 cryptobyte: fix ReadOptionalASN1Boolean
ff15cd5 ssh: eliminat...

#

Bumps github.com/google/go-containerregistry from 0.15.2 to 0.17.0.

Release notes
Sourced from github.com/google/go-containerregistry's releases.

v0.17.0
What's Changed

:eagle: Validate index architectures match children :eagle: by @โ€‹jonjohnsonjr in google/go-containerregistry#1776
Set Content-Length for blob uploads by @โ€‹jonjohnsonjr in google/go-containerregistry#1781
Don't wrap DefaultKeychain with refreshes by @โ€‹jonjohnsonjr in google/g...

#

Bumps golang.org/x/sys from 0.14.0 to 0.15.0.

Commits

13b15b7 unix: add IoctlLoopConfigure on linux
11eadc0 windows: add AddDllDirectory and RemoveDllDirectory
e4099bf unix: fix trimmed socket opt string in GetsockoptString
9888904 unix: update BPF constants for Linux kernel 6.6
2d0c736 unix: use fchmodat2 in Fchmodat
ec230da unix: use fcntl(2) libc stub on OpenBSD
See full diff in compare view

[![Dependabot compatibility score](https://dependabot-badge...

#

Bumps golang.org/x/net from 0.18.0 to 0.19.0.

Commits

a8e0109 go.mod: update golang.org/x dependencies
13e88dd quic: rename listener{_test}.go to endpoint{_test}.go
e26b9a4 quic: rename Listener to Endpoint
399218d quic: implement stream flush
d87f99b quic: idle timeouts, handshake timeouts, and keepalive
7b5abfa quic: basic qlog support
See full diff in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compa...

#

Bumps typescript from 5.2.2 to 5.3.2.

Release notes
Sourced from typescript's releases.

TypeScript 5.3
For release notes, check out the release announcement.
For the complete list of fixed issues, check out the

fixed issues query for Typescript 5.3.0 (Beta).
fixed issues query for Typescript 5.3.1 (RC).
fixed issues query for Typescript 5.3.2 (Stable).

Downloads are available on:

NuGet package

TypeScript 5.3 RC
For release notes, check out the ...

#

Bumps eslint from 8.52.0 to 8.54.0.

Release notes
Sourced from eslint's releases.

v8.54.0
Features

a7a883b feat: for-direction rule add check for condition in reverse order (#17755) (Angelo Annunziata)
1452dc9 feat: Add suggestions to no-console (#17680) (Joel Mathew Koshy)
21ebf8a feat: update no-array-constructor rule (#17711) (Francesco Trotta)

Bug Fixes

98926e6 fix: Ensure that extra data is not accidentally stored in the cache file (#17760) (Milos...

#

Bumps prettier from 2.8.7 to 3.1.0.

Release notes
Sourced from prettier's releases.

3.1.0
diff
๐Ÿ”— Release note
3.0.3
๐Ÿ”— Changelog
3.0.2
๐Ÿ”— Changelog
3.0.1
๐Ÿ”— Changelog
3.0.0
diff
๐Ÿ”— Release note
3.0.0-alpha.6
What's Changed

Update .d.ts files of plugins to use export default ... by @โ€‹fisker in prettier/prettier#14435

Other changes since v2, see 3.0.0-alpha.1 release notes
Full Changelog: https://github.com/prettier/prettier/compare/3.0.0-alpha.5...3.0.0-...

#

Bumps smallrye-graphql.version from 2.5.1 to 2.6.0.
Updates io.smallrye:smallrye-graphql-client-api from 2.5.1 to 2.6.0

Updates io.smallrye:smallrye-graphql-client-implementation-vertx from 2.5.1 to 2.6.0

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You...

#

Bumps org.mockito:mockito-core from 5.6.0 to 5.7.0.

Release notes
Sourced from org.mockito:mockito-core's releases.

v5.7.0
Changelog generated by Shipkit Changelog Gradle Plugin
5.7.0

2023-11-02 - 15 commit(s) by Stefan M, Tim van der Lippe, Valery Yatsynovich, Vladimir Glinskikh, ascopes, dependabot[bot]
Bump org.jetbrains.kotlin:kotlin-gradle-plugin from 1.9.10 to 1.9.20 (#3166)
Bump org.jetbrains.kotlin:kotlin-stdlib from 1.9...

vivid lintelBOT
#

Updates the requirements on sphinx-rtd-theme to permit the latest version.

Changelog
Sourced from sphinx-rtd-theme's changelog.

2.0.0
Added

Support for Sphinx versions 6.x and 7.x
Support for docutils <=0.20

Deprecations

The HTML4 writer is now officially deprecated. An error will be thrown if your
project configuration still uses the HTML4 writer.
Support for Sphinx versions < 5.0 was removed.
In addition, our supported dependenci...

#

Bumps idna from 3.5 to 3.6.

Changelog
Sourced from idna's changelog.

3.6 (2023-11-25)
++++++++++++++++

Fix regression to include tests in source distribution.

Commits

4ae74cf Release v3.6
21888f3 Merge pull request #164 from mgorny/sdist-test
c5ba76a Include tests in sdist
2eb16d3 Merge pull request #162 from kjd/release-3.5
See full diff in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_...

ornate vigilBOT
vivid lintelBOT
vivid lintelBOT
#

Found while investigating #6163 (this isn't the root cause, but while attempting to reproduce this I had the idea to change WithMountedDirectory to use llb.Readonly - which causes the caching issue to "go away").

This seems to have been introduced as an oversight in #5757 - we do use the readonly bool option in some places, so this should improve the performance of those operations.

Absolutely no idea how to test this :cry:


We were passing a boolean to indicate if moun...

vivid lintelBOT
#

What is the issue?

My Dagger pipeline fails upon Container.file("...") or Container.directory("...").

Factors:

  • CPU is Amlogic S905X3 (architecture is ARMv8.2-A 64-bit)
  • Reproducible in Dagger versions 8.4 through 9.3 (did not test earlier versions)
  • Using Podman + Podman-Docker Wrapper

The relevant code:

let build_artifact = client
    .container()
    .from(`docker.io/almalinux:9.3-minimal`)
    ... // install a bunch of packages, create non-root user
    .wit...
vivid lintelBOT
#

Fixes https://github.com/dagger/dagger/issues/6163 :tada: (cc @gerhard @marcosnils)

By prefixing the returned CacheKey with "session:" we activated the code path in buildkit that randomizes the digest to ensure that we don't get fast-cast hits (since session ids can be reused). See https://github.com/moby/buildkit/blob/06c971ffb4d3873207fe8ff7672026a718784060/solver/llbsolver/ops/source.go#L91-L94.

However, unlike LocalSources, BlobSources are not tied to a specific session (after initi...

vivid lintelBOT
vivid lintelBOT
#

(Just realized I never made a public github issue for this, creating now for some preliminary discussion as I've started working on the implementation)

As part of https://github.com/dagger/dagger/pull/6102#issuecomment-1813475256 we realized that support for interfaces will enable some important use cases that would otherwise require opening up the gates to dependency version hell (see the discussion on the linked PR for more details on the dependency hell problem). Desire for interface su...

vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
ornate vigilBOT
#

I'm experimenting with the dagger SDK in Go. I have the pipeline working, but I'm getting some mixed results with the caching of images when they are defined as services.

This is the main part of where they are defined


func (ci *BackendCI) test(ctx context.Context, glob string) error {
	postgres := ci.dag.Container().
		From(imagePostgres).
		WithEnvVariable("POSTGRES_PASSWORD", "postgres").
		WithEnvVariable("POSTGRES_USER", "postgres").
		AsService()
	recipes := ci.dag....
vivid lintelBOT
#

This is a pre-req for interface support but also stands on its own fairly well and fixes a bug along the way, so spinning it out to its own PR.

This change results in a module's own API being served to it by the engine when invoked. Note that this is a change to the API being served only and not full-blown dag.Self-like support, which would require modules also generate client bindings to themselves (and is where all the tricky issues ari...

vivid lintelBOT
#

Summary

Refactor the scanner to supports Dagger Typedef.
Add Node Runtime module.
Add typescript to module option.
Add Node module template.
Add entrypoint script to register or invoke a function. Improve register to reorder argument in the right order. Fix node generator enum supports and protected field. Regenerate client.

Quickstart

Go on this branch and create a dev engine from the dagger repository using ./hack/dev then follow commands below

# Create...
vivid lintelBOT
#

Draft until:

  • [ ] Constructors are released in v0.9.4
  • [ ] Python example is added (pending question to Helder below)

I also think that constructor support sort of makes the existing chaining example less compelling since it can be done better now w/ the constructor, so I'll also think of whether it makes sense to update that.

@helderco I was going to add Python too, but realized that because of the way it works in Python there's not really much difference between the existing chain...

vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

Marking as draft until release of v0.9.4.

With the following PRs in, we need to make some updates to our go zenith docs:

  • #6057
  • #6179

@sipsma @vito I think it makes sense to prefer // +optional over the Optional type - but still keeping it in for now. I don't have particularly strong opinions from a docs perspective whether we entirely remove the mention of the Optional struct or we keep it as a passing mention.

vivid lintelBOT
vivid lintelBOT
#

This means that we will always pass in an inline opts struct without the pointers, but we preserve the default value in the other cases.

So for example, given a *string parameter, if was optional and not set, we should default to nil, not a pointer to an empty string (which was the previous behaviour).

Tests for this as well, and also handles a weird and edgy case where we could maybe have an *Optional.

Original bug reported by @aweris (thanks thanks!!):

// Ex...
vivid lintelBOT
#

(converting a linear issue created+written by @shykes to GH since it relates to other public GH issues)

Context

The Dagger CLI has powerful "verbs" for executing a pipeline of Zenith functions, then doing something with the result. So far the following verbs exist:

  • dagger call: generic verb for executing a pipeline, streaming logs, and reporting errors
  • dagger download: save the result of the pipeline to the local filesystem. Supports string, File, Directory
  • `dagger...
vivid lintelBOT
#

The fix was to cast the function decorator's return type to the wrapped function instead of the Function descriptor.

Not fixed 100% though since it's not handling the use case of using another object's constructor in a method (e.g., foo = function(Foo)), but that's a very recent feature that's not released yet. Will follow up as soon as possible.

Renamed TypeVar("F") to R for clarity so that Func[P, R] reads like "Function [with] Parameters and R_eturn t...

vivid lintelBOT
vivid lintelBOT