#github-feed

1 messages ยท Page 2 of 1

vivid lintelBOT
#

Bumps mocha from 10.0.0 to 10.1.0.

Release notes
Sourced from mocha's releases.

v10.1.0
10.1.0 / 2022-10-16
:tada: Enhancements

#4896: Browser: add support for prefers-color-scheme: dark (@โ€‹greggman)

:nut_and_bolt: Other

#4912: Browser: increase contrast for replay buttons (@โ€‹JoshuaKGoldberg)
#4905: Use standard Promise.allSettled instead of polyfill (@โ€‹outsideris)
#4899: Upgrade official GitHub actions to latest (@โ€‹ddzz)
#4770: Fix regex in function c...

vivid lintelBOT
vivid lintelBOT
#

Current state of things:

  • We have a single go module
  • The vanity URL go.dagger.io points to the GitHub org (e.g. github.com/dagger)
    • The "root" import path of this repo is go.dagger.io/dagger
    • Therefore the SDK lives in go.dagger.io/dagger/sdk/go/dagger

Proposal:

  • Go SDK has its own, short, vanity URL (for example: go.dagger.io/dagger -- bikeshedding welcome)
  • Rest of the project needs to have a different URL (for example -- revert to github.com/dagger/dagger. Bi...
vivid lintelBOT
#

Today we have some v0.2 Dagger CUE code examples in https://github.com/dagger/examples. Those are referenced by the copy and paste "templates" here: https://docs.dagger.io/install/#explore-our-templates

We have some samples of Dagger cloak code in personal repos, for example:
https://github.com/kpenfound/dagger-demos
https://github.com/jpadams/dagger-jenkins-gradle

We propose to consolidate the examples in dagger/examples.
We propose to highlight Go SDK examples for the Go lau...

vivid lintelBOT
#

The new API is complete enough that nearly everything should be switched over to it. I've started on a pretty large refactor and it's much easier to just delete all this rather than keep maintaining it.

The last remaining thing that hasn't been ported over is dockerbuild, but since it returned a Filesystem it forced you to stay in the old API. Once we figure out how it should look we can define it in terms of Container.

I updated all the query examples + tests to the new API, exce...

ornate vigilBOT
vivid lintelBOT
vivid lintelBOT
#

context: #3401

I just now got tests passing, so I'm submitting this for any early feedback/course correction as it's a pretty large refactor.

Previously the engine would establish a single Buildkit gateway connection immediately, meaning we had to know all of the LocalDirs upfront for the entire engine runtime.

In all core interfaces, the gateway client is now replaced by a *core.Session which doubles as a SolveOpt state manager and establishes new gateway connections on-demand.
...

#

" The tricky part is usually persisting the Dagger Engine's cache when it runs in ephemeral worker machines - which is usually the case in CI. Buildkit supports a variety of backends for this: docker registry, S3, etc. In Dagger 0.2 you can control these settings. See https://docs.dagger.io/1237/persistent-cache-with-dagger

In cloak (aka future Dagger 0.3), these configuration settings are not yet available, but we plan to. It's just waiting on a few core design decisions. " - https://dis...

ornate vigilBOT
vivid lintelBOT
#

Bumps github.com/netlify/open-api/v2 from 2.12.0 to 2.12.1.

Release notes
Sourced from github.com/netlify/open-api/v2's releases.

@โ€‹netlify/open-api v2.12.1
Bug Fixes

createSiteBuild: add clear_cache field (2ac6c5c)

Changelog
Sourced from github.com/netlify/open-api/v2's changelog.

2.12.1 (2022-10-18)
Bug Fixes

createSiteBuild: add clear_cache field (2ac6c5c)

Commits

c254808 Merge pull request #400 from netlify/release-v2.12.1
bce5a88 chore...

vivid lintelBOT
#

Background

This aims to cover these 2 questions:

  1. Are SDKs vendored independently? e.g. Go SDK v0.1.0
  2. Does the Go SDK have its own import path (e.g. dagger.io/dagger or is it a relative from the repo (e.g. dagger.io/dagger/sdk/go/dagger)?

Topics are connected yet we can decide individually. Note however that:

  • We can use the SAME version with different import paths
  • However we can't use DIFFERENT versions for the same import path
  • A YES to either requires for t...
vivid lintelBOT
vivid lintelBOT
ornate vigilBOT
#

Problem

We are developing Dagger SDKs for several languages, and rewriting the Dagger CLI to be a language-agnostic client, rather than a CUE-specific engine.

We intend to continue maintaining the original CLI (codenamed "dagger classic"), but we have not yet decided what to rename it to, and how to document and package it going forward.

Solution

I propose the following transition plan for dagger classic:

  • Rename the classic CLI to cue-pipeline
  • Introduce the concept...
vivid lintelBOT
ornate vigilBOT
vivid lintelBOT
vivid lintelBOT
ornate vigilBOT
ornate vigilBOT
vivid lintelBOT
ornate vigilBOT
ornate vigilBOT
ornate vigilBOT
ornate vigilBOT
vivid lintelBOT
#

Implements the following API, based on #3151:

extend type Container {
  build(context: DirectoryID!, dockerfile: String): Container!
}
  • move container.from implementation to (*core.Container).From for consistency
  • add (*core.Container).Build which builds from a context dir + Dockerfile path
vivid lintelBOT
#

Bumps github.com/moby/buildkit from 0.10.4 to 0.10.5.

Release notes
Sourced from github.com/moby/buildkit's releases.

v0.10.5
https://hub.docker.com/r/moby/buildkit
Notable changes:
This release contains two security fixes.

Provide mitigation for Git vulnerability CVE-2022-39253. In systems with Git version lower than 2.38.1 invoking a build of a maliciously crafted Git repository with BUILDKIT_CONTEXT_KEEP_GIT_DIR=1 build-arg could lead to copying arbit...

vivid lintelBOT
#

Warning - do not publish docs until all parts of this plan are complete.

New Plan for launch:
Note - docs will evolve. These are just the Go SDK launch requirements.

The experience:

  1. Click on docs.dagger.io

Sees a single site that includes the following:

  • Introduction to Dagger Overview Page and a sidebar

Sidebar has the following:

  • Go SDK button to push to a Go SDK microsite with it's own sidebar
  • CUE SDK button that pushes to old Dagger Docs that are releva...
#

Only run the test workflow when Go-related files change

Also JS files in the sdk/nodejs dir.

We don't want to run this unnecessarily.

We also don't want to run this on tags. If we tagged something that was not linted correctly, something is very wrong in our release workflow and should be addressed. FWIW:
https://github.com/dagger/dagger/blob/77eed15d356836981e4c0975920674069e315edf/.github/workflows/release-v0.3.x.yml#L87-L95

We want to run on larger runners so we learn quicke...

ornate vigilBOT
vivid lintelBOT
#

Overview

This issue tracks the release of a new CUE SDK, which is the evolution and replacement of the original dagger 0.2 engine and tool, aka "dagger classic".

This issue should be closed when the first version of the CUE SDK is available and usable by users end-to-end. It does not include launch work: the work to make this SDK visible from our landing page, stable docs etc. is out of scope.

For more context, and ongoing debates on implementation, see https://github.com/dagger...

#

When new users arrive they often look for tutorials, readmes, samples, and examples.

We have an examples directory that came from the merge of the cloak codebase into main.
It contains examples of extensions.
We're not emphasizing extensions right now as we perfect the messaging and DX.
So we should rename this directory for now so new users are not confused into thinking these are relevant examples for Go SDK etc.

I propose renaming the directory to experimental or `extensio...

#

from @gerhard:
As far as I can tell, the changes will be mostly in Goreleaser, specifically https://github.com/dagger/dagger/blob/main/.goreleaser.yml

install.sh is fairly quick to figure out once we have the Goreleaser changes.

For Homebrew bottle, I think that we should introduce a new formula with the new name. I'm thinking deprecate the existing formula as dagger@0.2 - similar to go@1.18

For Homebrew tap, we introduce a new formula & deprecate the existing formula as `dagg...

ornate vigilBOT
ornate vigilBOT
vivid lintelBOT
#

What is the issue?

I have an action that builds a docker image and then one that pushes that image to AWS ECR. This works fine when I run this locally. This even works fine in a different Github Pipeline that I have. This isn't working when I setup an action that uses the install-only option. What seems to happen is the action that is pushing the image isn't waiting for the build step to complete, resulting in an error.

Log output

I turned on debug logging and have pasted some re...

vivid lintelBOT
vivid lintelBOT
ornate vigilBOT
#

Overview

Each Dagger SDK is its own software project, distinct from, and with a dependency on, the Dagger Engine.

graph TD;

py["Python SDK"]
go["Go SDK"]
ts["Typescript SDK"]
js["Javascript SDK"]
classic["Dagger classic"]
engine["Dagger Engine"]

py & go & ts & js & classic --> engine

Since each SDK is developed independently, they should be versioned released independently as well.

This also applies to Dagger Classic, the compat layer for Dagger 0.2 ...

ornate vigilBOT
#

This is what I think:

Q: What version schemes should we use for the SDKs?
Semver, starting with 0.1.0 for the first release.

Q: Should each SDK have its own repo?
No. If we spread, the coordination work will increase by O(nยฒ) a.k.a. O(my). Keeping all issues / PRs & discussions in a single repository keeps all context in a single place, with minimal synchronisation (reference the right ID). Having experienced first-...

#

Q: What version schemes should we use for the SDKs?

Agree with semver.

One question is whether the Go SDK should be a separate go module from the rest of our codebase (right now it's not). To be explicit, I'm talking about a submodule, not splitting out to separate repo.

I don't currently see any advantage to doing this really. The only "public" part of our go codebase should be the Go SDK I think, so I don't see a need to version it and the rest of the code separately.

  • However...
#

As @mircubed pointed out, we have a short term deadline in the form of the upcoming 0.3.0-alpha.1 release and, shortly after that, launching Go SDK in tech preview. Let's focus on the decisions we need to make before this deadline, and leave the rest for later.

Here are our options:

Option 1: coupled Option 2: decoupled
Versioning scheme for Go SDK Coupled to engine Semver
Version of Go SDK for tech preview next week 0.3.0-alpha.1 0.1.0-alpha.1...
vivid lintelBOT
#

Overview

The Go generated client executes the query when a scalar or list is requested.

https://github.com/dagger/dagger/blob/fdbf190307776b4cfb8acaa39cc82956d104e310/codegen/generator/templates/src/object.go.tmpl#L40-L44

Problem

When it's a list of objects you need to select the fields.

I looked the API for a problematic case:

type Container {
  envVariables: [EnvVariable!]!
}

type EnvVariable {
  name: String!
  value: String!
}

In fact wh...

vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

THIS IS STILL WIP - DO NOT MERGE

  • Created 3 separate Docusaurus sites in new websites/ directory
    • websites/main: parent site, URL will be docs.dagger.io/
    • websites/go-sdk: dedicated Go SDK child site, URL will be /go-sdk
    • websites/cue-sdk: dedicated CUE SDK child site, URL will be /cue-sdk
  • Created a shared area in websites/common for static assets, styles and themes so all sites can share these
  • Adjusted each site's configuration file to use shared area for static asset...
vivid lintelBOT
ornate vigilBOT
vivid lintelBOT
#

With this change we go from this:

client.Core().Directory().WithNewFile("hello.txt", api.DirectoryWithNewFileOpts{
    Contents: "foo",
})

To this:

client.Directory().WithNewFile("hello.txt", dagger.DirectoryWithNewFileOpts{
    Contents: "foo",
})
  1. client.Core() is gone -- instead client IS the codegen API
  2. codegen datatypes api.DirectoryWithNewFileOpts become top-level (dagger.DirectoryWithNewFileOpts)

What's the catch?

The se...

ornate vigilBOT
#

We're on the cusp of releasing the first semi-stable version of Dagger's new API + Go SDK. Up until now we've been changing everything constantly, making breaking changes every day, but once we have shipped an API that other folks code against we'll need to be more thoughtful and communicative.

This discussion is just to figure out how and where we should be communicating those changes.

Some points in no particular order:

  • Changes to the core API imply changes to every SDK.
  • Chang...
vivid lintelBOT
#

Tracking work here:
I made a fresh clone of dagger/dagger, switched to @vikram-dagger 's multi-site PR and added a docs/v0.3/sdk/cue directory.

I moved the contents of 0.2 docs in there: from sdk: cp -R ~/src/dagger-fork/docs/v0.2/* cue/.

I then started moving `dagger` to `dagger-cue`:

sed -i.bak -e 's/\`dagger\`/\`dagger-cue\`/g' **/*.md*

sed -i.bak -e 's/dagger do/dagger-cue do/g' **/*.md*
rm **/*.bak.bak

sed -i.bak -e 's/dagger project init/dagger-cue pro...
vivid lintelBOT
vivid lintelBOT
ornate vigilBOT
vivid lintelBOT
#

What are you trying to do?

Get buildkit progress logs from dagger dev since they were removed on this PR: https://discord.com/channels/@me/959517018074263563/1033054165351538740

cc @dola

Why is this important to you?

To get better visibility about what buildkit si doing from the Dagger side

How are you currently working around this?

No way to currently get buildkit progress by using the CLI

vivid lintelBOT
vivid lintelBOT
#

Bumps remark-code-import from 0.4.0 to 1.1.1.

Release notes
Sourced from remark-code-import's releases.

v1.1.0
New features

Support escaping spaces in file paths with .
Support using <rootDir> to reference the root directory.
Add the rootDir option to change the path of the root directory.
Add the allowImportingFromOutside option to allow importing files from outside the rootDir.

Full Changelog: https://github.com/kevin940726/re...

vivid lintelBOT
#

After this change:

  • A new 'docs/current' directory will be created for the current SDK-aware docs
  • The latest Go and CUE docs will live in 'docs/current/sdk/[go|cue]'
  • Doc UUIDs for the 'current' version will use numeric 6 chars
  • All internal links for the 'current' version will use the new doc UUIDs
  • All Go and CUE doc URLs in the 'current' version will be of the form '/sdk/[go|cue]/UUID/*'
  • The sidebar will use a new structure
  • The previous system for common files (files share...
vivid lintelBOT
#

Bumps github.com/containerd/containerd from 1.6.8 to 1.6.9.

Release notes
Sourced from github.com/containerd/containerd's releases.

containerd 1.6.9
Welcome to the v1.6.9 release of containerd!
The ninth patch release for containerd 1.6 contains various fixes, reorders the pod setup workflow in the CRI plugin to
prevent CNI resource leaks, and includes a new version of runc.
Notable Updates

Update oci.WithDefaultUnixDevices(): remove tun/tap from...

ornate vigilBOT
#

With the imminent release of the Dagger Go SDK, you can now use Dagger to program your CI/CD pipelines in two different languages: Go and CUE.

But why stop there? We plan on adding support for many other languages. Our goal is that, no matter what language you want to use to develop your CI/CD pipelines, Dagger has a SDK for it.

Of course, releasing a new SDK is work, so we need to prioritize. To help us prioritize, please 1) vote for which S...

vivid lintelBOT
vivid lintelBOT
#
  1. Updates to newest API
  2. Updates import path to be dagger.io/dagger
  3. Configures log output in the client so that users don't just sit waiting for something to happen w/ no feedback
  4. Fixes Exec in first example to actually run (need to call ExitCode or other scalar selectors)
  5. Includes use of dagger in first example, otherwise the build commands failed for me or the dagger import got auto removed which broke later steps
  6. Simplify some examples by including a bit more code (...
vivid lintelBOT
#

This PR is:

It introduces the following changes:

  • Remove all files which are used for local development
  • Remove all infra config
  • Remove all GitHub Actions workflows, tests & dagger CI
  • Remove all docs (all docs are kept in the main branch)

This branch - cue-sdk is only used for dagger-cue releases. Everything that was removed is in the v0.2.x branch.

vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

We are reverting the dagger & universe modules checks back in preparation for publishing v0.2.232

Once we merge this PR and publish v0.2.232, this should work:

dagger-cue do hello
1:04AM ERROR system | failed to load plan: this plan requires dagger 0.2.36 or newer. Run `dagger version --check` to check for latest version
this plan requires dagger 0.2.36 or newer. Run `dagger version --check` to check for latest version

Thank you @jpadams for reporting this. cc @shykes...

vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

Bumps github.com/spf13/cobra from 1.5.0 to 1.6.1.

Release notes
Sourced from github.com/spf13/cobra's releases.

v1.6.1
Bug fixes ๐Ÿ›

Fixes a panic when AddGroup isn't called before AddCommand(my-sub-command) is executed. This can happen within more complex cobra file structures that have many different inits to be executed. Now, the check for groups has been moved to ExecuteC and provides more flexibility when working with grouped commands - @โ€‹marckhouzam (a...

#

Signed-off-by: Erik Sipsma

Current major caveats:

  • Only supports registry cache import/export at the moment; other types can be added pretty easily though.
  • It won't work if you add extra mounts to your Container yet (caches will be missed). This also can be fixed pretty easily though (in theory)
  • The UX is technically usable but needs to be replaced with something better

The current (very much placeholder) interface is:

  • set DAGGER_CACHE_IMPORT to e.g. `type=reg...
vivid lintelBOT
#

Bumps amplitude-js from 8.21.1 to 8.21.2.

Release notes
Sourced from amplitude-js's releases.

v8.21.2
8.21.2 (2022-10-25)
Bug Fixes

nested object in options are shared across multiple instances (#559) (5129c45)

Changelog
Sourced from amplitude-js's changelog.

8.21.2 (2022-10-25)
Bug Fixes

nested object in options are shared across multiple instances (#559) (5129c45)

Commits

3a0d880 chore(release): 8.21.2 [skip ci]
5129c45 fix:...

vivid lintelBOT
vivid lintelBOT
#

What is the issue?

The following code executes but provides unexpected logs / output. Other similar use cases error due to missing files due to same issue. This may be something very simple (haven't used golang in many years) but seems like there may be an underlying issue with the execution engine.

I would expect this code to run the ls command twice, one time showing the two mounted directories, one time showing the root output. Instead in the logs I see ls with d1 and d2 (expec...

vivid lintelBOT
ornate vigilBOT
ornate vigilBOT
vivid lintelBOT
#

What are you trying to do?

One of the nice things I found with the earlier 0.2 cue based dagger, was the clean "pretty printed" progress display of ones pipeline - esp when running in a terimal.

image

When experimenting with the new Dagger Go SDK - the debug process output is nice for debugging, and would be preferred when running from a CI build, or when wishing to debug a pipeli...

ornate vigilBOT
vivid lintelBOT
vivid lintelBOT
#

I started thinking about this for Python but we got feedback from user Luis Guzman on Discord: Chaining syntax, Confusing behavior.

Go SDK

[...] I've found the chaining syntax a bit... unintuitive.

Initially, it's just not very clear what actually executes the GQL, but ultimately I've figured out - just find whatever takes a context.

Even then the user gives an example that he found confusing. I'll ...

vivid lintelBOT
vivid lintelBOT
#

Extensions can returns types like Container and Directory that are actually encoded payloads. These returns are cached in buildkit to enable skipping extension execution when nothing has changed.

The problem is that we will often need to change the structure of those payloads, sometimes in ways that are not fully backwards compatible. In those cases, we don't want cached results anymore. Otherwise we're gonna have to deal with converting old results to new ones, which is possible of course...

vivid lintelBOT
#

The need to explicitly select and pass around IDs rather than objects (i.e. pass a DirectoryID rather than a Directory) is an abstraction leak; it only makes sense in the implementation details, not UX. It is inherently a bit confusing + unintuitive and it also creates more problems in that ID is a special scalar where selecting it doesn't result in evaluation ([related discord thread](#1034734239675068458 message)).

This will alwa...

vivid lintelBOT
#

User reported that they expected this to result in evaluation:

id, _ := g.DaggerClient.Container().
        Build(src, dagger.ContainerBuildOpts{Dockerfile: "docker/Dockerfile")}).
        Stdout().Contents(context.Background())

But it didn't. The implementation reason is that Stdout only prints the output of previous Execs, not Build. However, that doesn't really make any intuitive sense.

Possible solutions:

  1. Stdout could return the progress output of the previous bui...
vivid lintelBOT
#
  • copy the entire filesync implementation from BuildKit and change it to just accept direct paths instead of an allowlist of paths
  • it is no longer required to pre-configure LocalDirs
  • add Directory.export
  • remove HostDirectory
  • change Host.workdir to return a Directory
  • change Host.directory to take a path and return a Directory

New API (same as #3421):

host {
  directory(path: String!): Directory!
  workdir: Directory!
}

directory {
  export(path: String!)...
vivid lintelBOT
#

Problem

When writing pipelines using the Go SDK, it's not always clear exactly what the resulting graphql query (or queries) will look like. This is especially needed when debugging, and learning Dagger.

Solution

Change the engine logger so that it prints raw graphql queries, rather than only buildkit-specific information.

vivid lintelBOT
#

What is the issue?

There are some code snippets in the getting started docs page here (https://docs.dagger.io/sdk/go/959738/get-started) that require manually copying and pasting certain sections of the snippet which is a bit confusing. I understand that this is done to avoid having huge snippets in the docs, but maybe there's a way where we can display a small snippet but have the copy button in the component to be able to copy the whole executable code.

ornate vigilBOT
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

[Discord Context](#general message)

others, for example to deploy to Azure Webapps you package a specific zip, then trigger the deployment to a slot, test it, then swap the slot with production to deploy.
specifically I am looking to streamline our azure devops pipelines. they handle our dotnetcore services, nextjs front end, and integration with some SAST tooling as part of the CI pipeline. we then publish the arti...

vivid lintelBOT
#

What are you trying to do?

Just trying to do a docker build within my dagger pipeline, can't see a way to pass in build args with container.Build().

I would think I could just pass in a struct of args to build. something like

container.build( dagger.buildArgs{
  {"foo": "bar"},{"biz":"bang"}
} )

Why is this important to you?

We have lots of multi-stage docker builds. Long term I can see a migration path to more efficient builds directly via dagger commands, bu...

vivid lintelBOT
vivid lintelBOT
#

I know that we're not yet optimizing for single queries by allowing to select multiple sibling fields but my brain keeps bringing it up and I'm fond of discussing possibilities here if anyone has ideas to add this feature.

Uncached Exec?

The common example that comes to mind for this is when you want to select both stdout and stderr from an exec, although there's a separate issue to attempt to simplify that:

  • #3496

In any case, those are two different scalars that need t...

vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

What are you trying to do?

A user was trying to build, inside Dagger, a Dockerfile containing an advanced buildkit feature: mount=type=ssh.

This mount option tells the Docker frontend to forward the ssh connection of the ssh-agent to the build step and execute some ssh commands with the forwarded ssh connection. We do not support it for the build and run operations (for now).

It is really useful, as it works locally, and with password protected ssh keys:

  1. You load it loca...
vivid lintelBOT
#

based on #3560 - will rebase once it's merged to make this diff easier

Adds include/exclude filters to the following APIs:

type Directory {
  withDirectory(path: String!, directory: DirectoryID!, exclude: [String!], include: [String!]): Directory!
}

type Host {
  workdir(exclude: [String!], include: [String!]): Directory!
  directory(path: String!, exclude: [String!], include: [String!]): Directory!
}
vivid lintelBOT
#

Create a demo using an existing and familiar project.

Context -

random thoughts about example for the next community call. I'd like to explore the idea of using a current well-known example project that gets built with GHA and deployed to some service (K8s, ECS, etc) and port it to Dagger.

All the examples that we've showcased so far seem to me that are "optimized" for the possibilities that Dagger enables without a clear path on how to go from there. I have the hypothesis ...

vivid lintelBOT
vivid lintelBOT
#

Bumps @svgr/webpack from 6.5.0 to 6.5.1.

Release notes
Sourced from @โ€‹svgr/webpack's releases.

v6.5.1
No release notes provided.

Changelog
Sourced from @โ€‹svgr/webpack's changelog.

6.5.1 (2022-10-27)
Reverts

Revert "feat(a11y): add attribute role="img" to the svg element (#750)" (1382232), closes #750

Commits

d5efedd v6.5.1
1b65014 Merge pull request #791 from gregberge/upgrade-deps
290748b chore: upgrade deps
e700943 Merge p...

vivid lintelBOT
#

It's hard to figure out which operation logs belong too -- especially with lazy evaluation.

Something I'm discovering as I continue building is that the lazy execution makes debugging tricky -- it's sometimes difficult to tell what code in my build app generated which build instructions as expressed in the output.

#1034221596853932084 message

Proposal:

  • Bring back contextual logging from Europa (e.g. wrap logs with gra...
#

Field ordering in codegen is alphabetical.

This causes inconsistencies, e.g.:

https://discord.com/channels/707636530424053791/1034775679897718834

maven = maven.WithMountedCache(cacheID, "/root/.m2/repository")
maven = maven.WithMountedFile("/root/.m2/settings.xml", mavenSettingsId)

Proposal: Keep same field ordering as defined in the schema

This is actually tricky to do because the introspection query returns a random order.

Solutions:

  1. Patch `graphql-g...
ornate vigilBOT
#

I was noticing how nicely Tekton Tasks are defined and wondered if Dagger Pipelines could easily use them. ๐Ÿค”

Looking at Task YAML in Tekton Hub and then looking at the codebase, it seems we could Unmarshal Tasks and map them to the Dagger Engine API. ๐Ÿ˜ƒ

For example, there's a "golang-build" task in the Hub: ๐Ÿ—๏ธ
https://hub.tekton.dev/tekton/task/golang-build
https://api.hub.tekton.dev/v1/resource/tekton/task/golang-build/0.3/raw

Seems like we could bring...

vivid lintelBOT
ornate vigilBOT
#

Problem

We are being sloppy about creating issues and keeping them up to date. We frequently have communication breakdowns where impromptu discord discussions (good) result in PRs (good) without clear context for anyone who wasn't in the discord thread (bad).

Solution

We should develop a habit that "if there's no issue, it doesn't exist".

To help us switch to this mindset, I propose organizing a one-hour issue party.

  • The issue party is a one-hour zoom call open to...
ornate vigilBOT
vivid lintelBOT
#

Problem

In the documentation, we talk about the Dagger Engine in these terms:

Using the SDK, your program opens a new session to a Dagger Engine: either by connecting to an existing engine, or by provisioning one on-the-fly.

graph LR;

subgraph program["Your Go program"]
  lib["Go library"]
end

engine["Dagger Engine"]

oci["OCI container runtime"]
subgraph A["your build pipeline"]
  A1[" "...
vivid lintelBOT
vivid lintelBOT
#

Partial implementation of #3558. Example:

Before:

modules := c.Directory()
for _, f := range []string{"go.mod", "go.sum", "sdk/go/go.mod", "sdk/go/go.sum"} {
	fileID, err := workdir.File(f).ID(ctx)
	if err != nil {
		return err
	}

	modules = modules.WithCopiedFile(f, fileID)
}

After:

modules := c.Directory()
for _, f := range []string{"go.mod", "go.sum", "sdk/go/go.mod", "sdk/go/go.sum"} {
	modules = modules.WithCopiedFile(f, workdir.File(f))
}
...
vivid lintelBOT
vivid lintelBOT
ornate vigilBOT
#

Hello ๐Ÿ‘‹

Have you been considering using goyek instead of Mage?

If so, could you share why have you chosen Mage over goyek? Otherwise, could you take a look and share your feedback if it would even consider using it if you were aware of it?

Feel free to ask any questions or share any feedback. You can also delete the discussion if you think it is a waste of your time ๐Ÿ˜‰

vivid lintelBOT
vivid lintelBOT
#

Just a quick pass to see if we could get support for the wasi/wasm32 platform on Dagger. Seems to be working and initial impression is that this could be cleaned up to the point of being mergeable; probably not a throwaway experiment.

Based on top of the multiplatform PR.

Usage

Example usage from included test case (pulling and running a test image I built that has a wasm binary and uses platform wasi/wasm32):
https://github.com/dag...

ornate vigilBOT
#

:wave:

AFAIK we haven't discussed using anything else instead of mage as the entrypoint for the Go SDK. In any case, mage is just a convenience and dagger should be able to play nicely with either framework / library.

If so, could you share why have you chosen Mage over goyek? Otherwise, could you take a look and share your feedback if it would even consider using it if you were aware of it?

I see you're the creator / main contributor of goyek. Let me turn this question arou...

ornate vigilBOT
#

Just to clarify @pellared , Dagger does not actually use Mage in its Go SDK, nor does it require you to use Mage.

As users of Dagger ourselves, we happen to use Dagger with Mage, but thatโ€™s just a personal choice. We could just as easily write our own main function, or use another tool.

I didnโ€™t know about goyek, but would love to see an example of using Dagger and goyek together, if the community finds it helpful perhaps we could make it a guide in our docs. Is this something youโ€™d b...

vivid lintelBOT
ornate vigilBOT
ornate vigilBOT
vivid lintelBOT
#

Per https://github.com/dagger/dagger/discussions/3601#discussioncomment-4015779

Usage examples:

$ ./goyek.sh 
no task provided
Tasks:
  build          Build builds the binary
  lint           All runs all lint targets (depends on: lint:codegen, lint:markdown)
task failed: build      0.023s
exit status 1
$ ./goyek.sh build
===== TASK  build
      build.go:16: exec: "docker": executable file not found in %PATH%
          Please visit https://dagger.io/help#go for troubleshoot...
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

What are you trying to do?

The goal of this feature is to support a code-only schema.
Instead of asking developers to use GraphQL syntax, we should let them writing their pipeline with their favorite language.

  • Typescript developers should be able to write only in typescript
  • Benefit of autocompletion in the IDE
  • Make the code more readable

Why is this important to you?

No response

How are you currently working around this?

PR #3459 has been created for this feature.

vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

Continuing the discussion here: https://github.com/dagger/dagger/pull/3421#issuecomment-1296089591

This is all just my interpretation and summary of that discussion, @vito please correct me if I misrepresent anything.

Problem

Buildkit sessions are hard to work with as is. They result in certain state being sticky for the duration of a client connection. But once that connection is closed, you can't resume the session or otherwise reobtain that sticky state.

Examples of state as...

vivid lintelBOT
#

There should be a guide explaining how to build a Go program with Dagger. Note: this is different from building a docker container.

Benefits of having this guide:

  • Seeing it in the list, clarifies to the user that this is something you can do
  • Reading its content, helps you actually getting it done
#

At minimum: Update the getting started guide for go to show exporting a multiplatform image (in addition to current example of local filesystem export)

It would also be nice to show running binaries for different platforms via emulation (i.e. you want to test binaries you built for different platforms). We could either put this in the getting started guide too or we could have a separate guide that explores multiplatform support in greater detail on its own.

#

Related #3555

There's been confusion over the "lazy" model, what is sync vs what is async (few discord threads, feedback forum, live YouTube video, ...)

Not only it's confusing, it's one of great advantages of dagger and it's not being understood: write "procedural" code (e.g. container1.Exec, container1.Exec, anotherGraph.mount(container1, container2) and have everything run in parallel, as fast as possible)

I think we should:

  • Document in the getting started (it's a major featu...
#

Bumps @docusaurus/preset-classic from 2.1.0 to 2.2.0.

Release notes
Sourced from @โ€‹docusaurus/preset-classic's releases.

2.2.0 (2022-10-29)

Blog post
Tweet

:rocket: New Feature

docusaurus-plugin-client-redirects

#8227 feat(plugin-client-redirects): keep the query string + hash (@โ€‹Xabilahu)

docusaurus

#8210 feat(core): add --config param to swizzle command (@โ€‹e-im)

docusaurus-mdx-loader, docusauru...

#

Bumps @docusaurus/core from 2.1.0 to 2.2.0.

Release notes
Sourced from @โ€‹docusaurus/core's releases.

2.2.0 (2022-10-29)

Blog post
Tweet

:rocket: New Feature

docusaurus-plugin-client-redirects

#8227 feat(plugin-client-redirects): keep the query string + hash (@โ€‹Xabilahu)

docusaurus

#8210 feat(core): add --config param to swizzle command (@โ€‹e-im)

docusaurus-mdx-loader, docusaurus-plugin-content-blog, docusaurus-p...

#

What is the issue?

Feedback from this video: https://youtu.be/w-3K8in9jb4?t=904

@marcosnils feedback -

Because he's not following the the docs by the line as he's an advanced Go developer, here he gets an error about dagger not being available as the dependency got removed when he did go mod tidy without having any code. Even though it's highlighted here (https://devel.docs.dagger.io/sdk/go/371491/install/), you can tell that he didn't read the message and went directly to the...

vivid lintelBOT
vivid lintelBOT
#

Right now the engine is presumed to be local to SDK clients.

Instead we are considering supporting the engine being on a remote machine (and colocated w/ buildkitd): https://github.com/dagger/dagger/issues/3595

There's a lot of things we need to do to get this to work though, which themselves branch out into many subissues. This issue lists out the top level problems that need to be solved and links to existing issues for them. We can modify this list as we think of new things.

  1. Se...
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

What is the issue?

Feedback from this video: https://youtu.be/w-3K8in9jb4?t=904

@marcosnils feedback -

Because he's not following the the docs by the line as he's an advanced Go developer, here he gets an error about dagger not being available as the dependency got removed when he did go mod tidy without having any code. Even though it's highlighted here (https://devel.docs.dagger.io/sdk/go/371491/install/), you can tell that he didn't read the message and went directly to the copy...

ornate vigilBOT
vivid lintelBOT
#

related to #3624

Now that we've hoisted the filesync implementation from Buildkit into our codebase, can we modify it to support dynamically syncing from remote filesync protocol streams?

The idea would be to give Buildkit a filesync session.Attachable for syncing local dirs into the graph, but have it accept a stream from a remote client rather than looking at directories local to the engine.

If that works, can we also implement the inverse for exporting to the client?

vivid lintelBOT
vivid lintelBOT
#
vivid lintelBOT
#

Signed-off-by: Erik Sipsma

I ended up just leaving the getting started guide alone. Any changes I made to it seemed like it over complicated it.

Instead, I just created a dedicated document for all the multiplatform features.

TODO before merge:

  • [ ] Decide on a better place in the sidebar. Seems like there could be a "Guide" section?
  • [ ] Double check all the code examples actually run (I was writing it in anticipation of the no-more-ID change, so haven't had a chance to chec...
vivid lintelBOT
vivid lintelBOT
#

Problem

When running pipelines from the Go SDK (and soon the Python and NodeJS SDKs), one can sometimes be unsure of what exactly is happening under the hood. This could be caused by inexperience (perhaps I am still learning Dagger), or debugging ("is the problem in my code? or at another layer?").

This problem is compounded when I need help from someone else. The only medium available for getting help is sharing my code, but that makes it difficult to reproduce. The person helping m...

ornate vigilBOT
vivid lintelBOT
#

What

  • Async only support[^1]
  • Flattened directory structure a bit
  • Refactored client factory to be modular
  • Use with dagger.Connection() as single entrypoint for getting the codegenโ€™d client
  • Return scalars wrapped in a Result object to make it a bit more explicit when queries execute
    • See #3555
    • Bonus of being easier to test
    • Not sure about result, interested in feedback[^2]
  • Codegen improvements

How

Look at the examples/python/simple-client exampl...

vivid lintelBOT
vivid lintelBOT
#

We should test Python SDK E2E before launching.

E2E experience to test:
@helderco FIXME

Docs to follow while testing:
@helderco FIXME

External Users -
Please comment on this Discord thread if you would like to help test the latest version and give feedback this week. I will add you to a private chat to give feedback. Please make issues and label it sdk/python

Maintainers to test -
Please che...

vivid lintelBOT
vivid lintelBOT
#

Implementation is all very rough (see various // TODO:s scattered about) but this proves the concept. Can successfully run all our tests with the Go SDK on both Linux and MacOS against the new engine image using the new engineconn.

Approach

High-level:

  1. Build a container image that contains both buildkitd and the cloak engine (currently called localhost/dagger-engine)
    • Build it for multiple arches
    • Include cloak engine binary for each arch+os combo in each of t...
vivid lintelBOT
vivid lintelBOT
#

Quoting @aluzzardi :

Chatted with @samalba about ECR and so forth.

So far my preference would be:

  1. Vanity URL + ECR.
  • With a vanity URL users don't see the "real" registry address, and that's the only thing Docker Hub has going on
  • Vanity requires infrastructure which will be on AWS, might as well have the registry there and not pay traffic between the 2
  • ECR is cheaper and way more stable than Hub
  1. IF vanity URLs don't work ... I'd suggest we go with GitHub
  • We're al...
vivid lintelBOT
#

Current + future needs for binary distribution:

  1. SDK Helper Binary - SDKs need a local binary to enable functionality like local dir sync that has not yet been implemented natively in each SDK language
  2. User-facing CLI - for debug graphql querying, for the eventual bash sdk...
vivid lintelBOT
#

What are you trying to do?

The new WithoutDirectory syntax is great, but I am looking for something closer to .dockerignore syntax.

I don't know the name of all directories I'd like to ignore when I read the host dir, but I know they will all contain a folder foo that will be quite heavy. I'd like to ignore all folders under **/foo

Why is this important to you?

See description. I have many many monorepos of this style.

How are you currently working around this?

Se...

vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

What are you trying to do?

I am implementing a conventional commit task and I require the .git directory to be present in my cloned repo so that I can generated a new semantic release

Why is this important to you?

Having access to the git metadata is useful for any tasks that need more information than just the source files.

How are you currently working around this?

The current workaround is to handle the git clone in a container via exec.

vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

Problem

The Dagger API supports pulling a remote git repository 1) by branch (git { branch }) and 2) by tag (git { tag }), but not by commit.

Solution

Add a new field to the API git { commit }

Under the hood it's all refs, but it's better to have a dedicated field for each, to be closer to the actual intent of the developer, and adapt the wording.

#

Simplifying the getting started guide by removing the errgroup concurrency since the DAG can solve it's own concurrency. Also build the project from host.workdir instead of a git repo.

Please review the revised guide and edit ๐Ÿ™

We also want this guide to reference the programming model. I can update that in this PR or we can make that change in another PR

#

We need a changelog, but we need to determine the how and where first. Once we have this, we can work on creating it.

Does the changelog cover each SDK or Dagger overall?
We have confirmed that we want it to be per SDK

Where does it live and how is it updated?
TBD

@vikram proposal - section is under each SDK category in docs. The format could follow this: https://gist.github.com/juampynr/4c18214a8eb554084e21d6e288a18a2c or https://keepachangelog.com/en/1.0.0/

@gerhard prop...

vivid lintelBOT
#

We need to confirm the API reference plan for the Python launch. In #3658, you can see an example from @vikram-dagger that is hosting our own API docs.

Issues with hosting ourselves:

  • the format isn't great automatically, so we will still need to it
  • Linter doesn't work, so we'd need to update linter roles for it
  • hosting ourselves

Let's use this issue to come to an agreement on what the Python API reference plan should be. We need a final decision by Monday, November 7th if ...

vivid lintelBOT
#

Problem

As reported by @marcosnils :

I had to use the git API recently and got surprised that I needed to specify either a branch or a tag. When doing git clone usually the server returns the default branch the HEAD points to, so I was hoping that I didn't need to specify it in Dagger. Not sure if that's required in the buildkit API?

After further research, buildkit does in fact support this:

https://github.com/moby/buildkit/blob/master/client/llb/source.go#L240-L242. IIUC ...

vivid lintelBOT
#

This is nowhere near ready but I wanted to put a PR up early.

  • Adds an endpoint for initializing a client session.
  • dagger.Connect now initializes a session and keeps it open for the duration of the client.
  • Subsequent queries are associated to the session via /query?session=.
  • Schema endpoints look up the session's gateway by ID (lazily instantiated for now; implementation detail).
  • Removes the global session; everything uses the client session instead.

The end result is t...

vivid lintelBOT
#

ci: multi-language support

  • Add a common interface to build/test/generate SDK code
  • Re-organize mage code to be under internal/mage
  • Rename build to engine:build and lint:markdown to docs:lint
$ mage -l
Targets:
  docs:lint           lints documentation files
  engine:build        builds the engine binary
  sdk:all:generate    re-generates all SDK APIs
  sdk:all:lint        runs all SDK linters
  sdk:all:test        runs all SDK tests
  sdk:go:generate ...
vivid lintelBOT
#

Reporting this as I am sure several users will fall into this.

TL;DR: It took me a while to understand the API, in particular @aluzzardi had to explain to me that a container's fs can be either initialized from a From() or WithFS(), but both are mutually exclusive!

In my example, I just wanted to copy a file to a base image. Here is what I went through the api step by step:

    1. I want to...
vivid lintelBOT
#

Add the ExperimentalPrivilegedNesting flag to Exec() which sets a valid DAGGER_HOST inside the container, allowing to communicate back to the same engine instance.

In short, this means that it's possible to run a program that uses the Go SDK within Dagger itself -- dagger.Connect() will automagically work out of the box.

This PR also enables to to run dagger tests using dagger in our own CI.

vivid lintelBOT
vivid lintelBOT
#

In the meantime see โ†’ https://github.com/dagger/dagger/issues/3642#issuecomment-1302054382

Purpose:

  • Easier to clone/fork/share
  • Can help communicated SDK changes on usage examples

Notes to self:

  • Include a few examples
    • Cowsay (client-simple example from dagger repo)
    • Add ported getting started guide from Go SDK
      • Shows off how similar they are and easy to port
    • Build a library with poetry[^1]
    • Deploy to test.pypy.org [^1]
    • Test a library against...
vivid lintelBOT
#

What is the issue?

When sharing the link https://docs.dagger.io/sdk/cue/526369/install in Discord, the preview snippet shows the include markdown directive instead of a snippet of the rendered page.

This doesn't happen when sharing the page on LinkedIn, so needs investigation if it's Discord-specific and also should be fixed to always display the actual page content, not the internal include directive.

vivid lintelBOT
vivid lintelBOT
#

Context

To move faster, sync support was put on pause.

Itโ€™s a bit of a pain to support both sync and async. NodeJS comes with an event loop built-in but in Python itโ€™s optional. Itโ€™s easy to just spin an event loop in a sync environment to run async dagger, but not the inverse.

If we start with only sync support then you canโ€™t run tasks concurrently and you canโ€™t use dagger in an async environment otherwise itโ€™ll block your event loop.

Todo

  • [ ] Figure out execution on ...
#

Context

Overview

This issue is for tracking feedback and the implementation for Python, specifically.

The current implementation is that leaf nodes return a wrapper object Result with a .value attribute that contains the requested value. The purpose of this object was twofold:

  1. Get a "rule of thumb" where you can say if it returns a Result than it's going to execute the query;
  2. Add other attributes to that objec...
vivid lintelBOT
#

What are you trying to do?

Browsing the Haxe docs the other day (https://haxe.org/manual/introduction.html) I've found it's commenting system quite friendly which lead me to this GH project https://github.com/utterance that allows enabling native GH issues as comments to docs / blogpost pages.

Since we don't have that in Dagger docs or blogposts I was thinking that it might be a good idea to give it a try

cc @slumbering @gerhard @shykes

Why is this important to you?

Get rap...

vivid lintelBOT
#

I've increased from 88 (default) to 119 because:

  • Looks better in a lot of cases
  • 119 is the max to for good code reviews in GitHub
  • Screen sizes theses days are bigger than the default cap

Cons:

  • Split pane editor in the IDE
  • With a chainable API it's better to force multiline sooner ๐Ÿ‘ˆ

Note: it'll create a PR with lots of cosmetic changes.

#

We support Python 3.10 now.

Python 3.11 has come out so we'll test for that soon.

Add support for Python 3.9, and maybe 3.8, so that more users can be included if they can't upgrade their Python.

This implies scaling back the use of the new features (e.g., using Optional[str] instead of str | None, etc).

๐Ÿ‘‰ Pythonistas, let me know your requirements. Do you have max ๐Ÿ you need support for?

ornate vigilBOT
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

I noticed that using Directory(), changes outside the specified directory will cache bust:

	src := c.Host().Workdir().Directory("sdk/python")

However, creating doing a WithDirectory won't:

	src := c.Directory().WithDirectory("/", c.Host().Workdir().Directory("sdk/python"))

I guess this is normal? This should at least be documented, or perhaps Directory.Directory() should have a copy flag?

/cc @vito @sipsma

vivid lintelBOT
vivid lintelBOT
#

Problem

The following query has a surprising and, in my opinion, undesirable result:

query customAlpine($fs: DirectoryID!) {
  container {
    from(address: "alpine:3.16") {
      withFS(id: $fs) {
        id
      }
  }
}
  • Expected behavior: download alpine, replace its root filesystem
  • Actual behavior: download alpine, wipe its contents, and set a new root filesystem

This is causing problem for users. For example see #3673

Solution

Ch...

vivid lintelBOT
vivid lintelBOT
#

SDK

This applies to all SDK targeting engine 0.3 or later. Currently that is only Go.

Problem

Developers learning Dagger get occasionally confused by the programming model. Most commonly the confusion revolves around the exact behavior of Container.Exec: when is a command actually executed, and why?

One reason of the confusion about Exec is its name: unlike almost every other step that lazily adds a node to the dag, it does not have the With prefix:

  • WithDirectory:...
vivid lintelBOT
#

What is the issue?

If you create an image and specify .WithEntrypoint(), the image fails to start with the error docker: Error response from daemon: No command specified.. Manually specifying a command when running the image fails with executable file not found in $PATH: unknown.. Exported images with unmodified entrypoints start successfully.

Log output

davidjackson@MacBook-Pro dagger-monorepo-dep-crawler % mage -d build/magefiles -w . imageTest   
#1 resolve image con...
vivid lintelBOT
#

We should test NodeJS SDK E2E before launching.

E2E experience to test:
Look at @slumbering 's guidance in his comment below. See #3642 for example

Docs to follow while testing:
@slumbering FIXME

External Users -
Please let us know in the general channel in Discord if you would like to help test the latest version and give feedback this week. I will add you to a private chat to give feedback. Please make issues for anything that you run into (big or small) and label it sdk/nodej...

vivid lintelBOT
#

What are you trying to do?

Trying to access the docker engine inside of a dagger container so I can create resources like KinD clusters, Docker networks, or build docker images without changing my existing workflows

Why is this important to you?

Almost %70-80 of our workflows use KinD cluster or other docker resources in an automated way.

How are you currently working around this?

I don't have any workaround for this one at the moment.

vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

In preparation for the GraphQL API announcement we need to provide Dagger users a way to execute GraphQL queries from a file. Currently, this is being allowed through the cloak command which is a binary that's not intended to be used by users. Below are some of the questions that initially I'm thinking need some answers:

  • Shall we extract the cloak do to something public that requires its own SDLC?
  • Is the current cloak do UX enough for this initial release? I'd assume so.
  • Do w...
ornate vigilBOT
vivid lintelBOT
vivid lintelBOT
#

Publishes the NodeJS SDK to the registry so that it can be installed by name.
ex: npm publish dagger-nodejs-sdk

https://www.npmjs.com is the npm Registry that has a public collection of packages of open-source code for Node.js.

In order to publish, follow the developer guide: https://docs.npmjs.com/cli/v9/using-npm/developers#the-packagejson-file

Tasks:

  • [ ] add a README.md
  • [ ] LICENSE
  • [ ] Do we want to publish only the dist directory (check package.json)
      ...
vivid lintelBOT
#

Bumps loader-utils from 2.0.2 to 2.0.3.

Release notes
Sourced from loader-utils's releases.

v2.0.3
2.0.3 (2022-10-20)
Bug Fixes

security: prototype pollution exploit (#217) (a93cf6f)

Changelog
Sourced from loader-utils's changelog.

2.0.3 (2022-10-20)
Bug Fixes

security: prototype pollution exploit (#217) (a93cf6f)

Commits

7162619 chore(release): 2.0.3
a93cf6f fix(security): prototype polution exploit (#217)
90c7c4b chore(release): 2.0.2...

vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

What is the issue?

In #2053 and #2228, the dagger CLI was patched in order to use the host http_proxy and https_proxy env. vars from the host.

However, with the recent release of the GO SDK, the same errors shows up again (see log output). However, the APKINDEX.tar.gz is reachable since I'm able to curl it.

Log output

#9 [build 3/6] RUN apk add --no-cache file git
#9 5.369 fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/community/x86_64/APKINDEX.tar.gz
#9 5.369 WARNING: Igno...

vivid lintelBOT
#

Overview

When a client opens a session to a Dagger Engine to query its API, some aspects of the session should be configurable with optional parameters. The client developer should be able to set these parameters in code, and the end user should be able to override them.

How to set parameters

With an SDK

When using a Dagger SDK, a developer may configure the session with arguments to the dagger.Connect function.

With the GraphQL API

When querying the Dagger G...

vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

We build our shim binary on the fly, which requires we pull an image. We currently pull from dockerhub, which can result in 429 throttling errors, which is surprising to users since they never even requested that image be pulled.

Two options:

  1. Pull the image from a different registry that doesn't have the same ratelimiting
  2. Don't build the shim like that anymore; maybe pre-build it and include it in our engine image now that that's an option

Current preference is 2.

#

Bumps sass from 1.55.0 to 1.56.0.

Release notes
Sourced from sass's releases.

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

Potentially breaking change: To match the CSS spec, SassScript expressions beginning with not or ( are no longer supported at the beginning of parenthesized sections of media queries. For example,
@media (widt...

vivid lintelBOT
#

Allow a user to specify wildcards in their paths for (dir *Directory) Without().

I need at least this for dagger-cue. Even better would be the ability to turn it on/off, but that would require an API change.

If we are up for that, I'd suggest this as the new API.

type Directory {
  withoutDirectory(path: String!, disableWildcards: bool): Directory!
}

I can make that change, if we're cool with it.

Another possibility is adding this API:

type Director...
vivid lintelBOT
#

What are you trying to do?

Provide an easy way to clear a directory of any files ignored by git. The formal definition can be found here .

My suggestion would be the following:
func (r *Directory) WithoutGitignore(path string) *Directory
This directory with all files removed that would be ignored by git

Side Note:
I don't currently need this but WithoutUntracked and other exclusions based on git might be useful as well.

Why is thi...

vivid lintelBOT
#

A few of us running mage sdk:python:test are getting very cryptic errors on the first step that runs dagger-in-dagger:

#1 resolve image config for docker.io/library/golang:1.19-alpine
Error: input:1: container.from error getting credentials - err: signal: killed, out: ``

Please visit https://dagger.io/help#go for troubleshooting guidance.
#1 ERROR: error getting credentials - err: signal: killed, out: ``                                                                             ...
vivid lintelBOT
vivid lintelBOT
#

From conversation in discord:

  1. We can use stable dagger to build dev dagger, but we should be sure that this "bootstrap" step only uses a stable sdk + engine. It thus might need to have its own go.mod (maybe can use the tools.go convention here?) so we can ensure its only using stable versions.
  2. Our CI steps will typically do something like:
    1. Build+start dev dagger (bootstrapping it with stable dagger)
    2. Export D...
vivid lintelBOT
#

Signed-off-by: Erik Sipsma

cc @helderco in some last minute discussions we decided to:

  1. Migrate more of the provisioning logic to be in the helper (it's no longer necessarily a long term goal that the helper bins are just a temporary crutch, so it doesn't make sense to immediately try to minimize their role)
  2. Rename dagger-sdk-helper -> dagger-engine-session

To be clear, none of the behavior has really changed overall, it just is running in different places.

More context i...

vivid lintelBOT
vivid lintelBOT
#

What is the issue?

cannot install dagger on Ubuntu WSL

Log output

sh debug downloading files into /tmp/tmp.dbKUNy3gXK
sh debug http_download https://dagger-io.s3.amazonaws.com/dagger-cue/releases/0.2.232/dagger-cue_v0.2.232_linux_amd64.tar.gz
sh debug http_download https://dagger-io.s3.amazonaws.com/dagger-cue/releases/0.2.232/checksums.txt
install: cannot create regular file './bin/dagger-cue': Permission denied

Steps to reproduce

cd /usr/local
curl -L https://dl.dagger....

vivid lintelBOT
#

This will add a GraphQL API documentation generated with (spectaql)[https://github.com/anvilco/spectaql] based on an introspection query or local schema files.
For now, the introspection query is pointing at the local server created with cloak dev, but this should change to a production endpoint or to the local schema files in the core/schema directory.

TODO

  • [ ] Add README
  • [ ] Change generation source from introspection query to local graphql files.
  • [ ] Allow insertion ...
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

Signed-off-by: Erik Sipsma

NOTE: we have no automated testing of Windows and we never have even really manually tested in the past to my knowledge.

We can currently build these client binaries successfully though. When I run the engine integration tests w/ these in Windows, a lot of tests pass but a lot fail (seems to primarily be ones involving local dirs).

We need to decide if it's worth including these binaries in the engine image.

Pros:

  1. Windows users can use at least ...
vivid lintelBOT
#

Bumps sass from 1.56.0 to 1.56.1.

Release notes
Sourced from sass's releases.

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

Importer results now validate that contents is actually a string and whether sourceMapUrl is an absolute URL.

See the full changelog for changes in earlier releases.

Changelog
Sourced from sas...

vivid lintelBOT
#

fixes #3739

  • track bootstrap SDK version in separate Go module
  • move mage code under magefiles/ so it can be optionally run with its own go.mod/go.sum without clashing with the root go.mod
    • while also automatically picked up by regular mage CLI when you don't care about bootstrapping
  • run mage boot:run TARGET to run a target using bootstrap SDK version
  • run mage boot:dev engine:test to run engine:test target against dev engine built using bootstrap SDK version
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

Main goal here is to automate provision testing. As part of that I found I was occasionally getting text busy errors trying to exec the engine-session binary.

After investigation this turned out to be incredibly obscure and highly specific to what the test case was doing. It could happen when:

  1. The engine-session binary was not already provisioned
  2. There are many fork/execs happening in parallel with the provisioning

It's actually a general unsolved problem in Go and Linux in ...

vivid lintelBOT
#

Signed-off-by: Erik Sipsma

Same thing as for Go, but in Python now: https://github.com/dagger/dagger/pull/3761


NOTE: this test won't yet run in CI because when we use dagger-in-dagger DAGGER_HOST gets overridden, so right now this test is only useful for us when running manually directly on hosts. I'm gonna fix this for both go+python+future-sdks in a follow up so it can also run in CI.


Also note: the ETXTBSY issue hit in Go (https://github.com/golang/go/issues/22315) ...

vivid lintelBOT
#

What are you trying to do?

Inspect the state of a filesystem to check for the existence of expected files or directories.

Why is this important to you?

When writing a build for a specific project, this is less important, since you'll have specific expectations around what the filesystem looks like. But when writing code that aims to be reusable between projects, it's helpful to be able to examine the filesystem you're working with so that you can choose between different behaviors ...

vivid lintelBOT
vivid lintelBOT
#

Related to #3668

Overview

Reference docs for Python are being published in https://dagger-io.readthedocs.org.

Builds are triggered automatically via a GitHub webhook, where RTD filters by tags starting with sdk/python/v. There's also a default build of latest that's re-built on changes to main.

Problem

I don't see a way to re-format the tags into a proper version, so you end up getting these versions: latest sdk-python-v0.1.0 sdk-python-v0.1.1.

I've look...

#

Related to #3668

Overview

Reference docs are being built when tags that start with sdk/python/v are detected.

Problem

The tag triggers a new PyPI deployment but that could fail. Since ReadTheDocs.org will publish based on git alone, and not on PyPI versions, you'll end up with a documented version that doesn't exist.

Solution

It makes more sense to trigger the build manually via a GET request to a custom webhook, inside mage's sdk:python:publish, and only afte...

vivid lintelBOT
vivid lintelBOT
#

Python's typing system doesn't work on runtime. You should get warnings from the IDE but nothing's stopping you from using the wrong value types while building the query.

If you do run a script like this you'll get a more cryptic error during serialization of the GraphQL query string.

We can do better and add runtime checks for this.

Thanks @charliermarsh for reporting!

vivid lintelBOT
#

Without this change:

python test.py #wait 10 to 30 seconds with no feedback

Hello from Dagger and Python 3.10.8

With this change:

python test.py #near immediate feedback

#1 resolve image config for docker.io/library/python:3.10-slim-buster
#1 DONE 1.7s

#2 mkfile /Dockerfile
#2 DONE 0.0s

#3 mkfile /main.go
#3 DONE 0.0s

#4 [internal] load metadata for docker.io/library/golang:1.18.2-alpine
#4 DONE 0.9s
...
#14 python -V
#0 0.077 Python 3.10.8
#14 DONE ...
vivid lintelBOT
vivid lintelBOT
#

Based on a discussion we had, we should document the main thoughts and possibilities for rendering examples for each SDK in a programmatic, integrated and maintainable manner across Dagger documentation.
The main implementation idea is to leverage on Docusaurus plugins and swizzling.
Because of time restraints, this should be revisited in the future.
cc @vikram-dagger @marcosnils

vivid lintelBOT
#

There have been two timeouts of this test recently:

It's not clear whether this is unique to this test case yet or not, but those are the examples we have of it happening.

Both occurences are getting blocked on the same line, waiting for an export to happen.

More interestingly (but possibly a red herring) is that they both may be bloc...

vivid lintelBOT
#

Signed-off-by: Erik Sipsma

Had an idea after discussing remote client sessions earlier around possible intermediary steps that get us towards that long term vision.

With the change here the engine integration tests (mage engine:test) run dagger-in-dagger and they all pass, including the ones involving localdirs. The only exception are the ones involving extensions (which I commented out for now), but that's just because I didn't fix those...

vivid lintelBOT
#

What are you trying to do?

One of the challenges with CI systems right now is the lack (or poor state) of analytics.

As a requirement for us to use dagger as a building block, we would love to have access to execution data so to build solid "pipeline observability", as a core feature to our product.

Why is this important to you?

Well, customers want it :)

Information about pipelines and "actions" execution time, failure trends, caching, are important to have for people in cha...

vivid lintelBOT
#

What is the issue?

Hi, I am having trouble with Python SDK. I went through the documentation and wanted to execute the script from docs:

"""
Execute a command
"""

import sys
import anyio
import dagger

async def test():
    config = dagger.Config(log_output=sys.stderr)

    async with dagger.Connection(config) as client:

        python = (
            client.container()

            # pull container
            .from_("python:3.10-slim-buster")

       ...
vivid lintelBOT
#

What is the issue?

When trying out 4 different approaches to excluding a file(test.txt)/directory(build) from a directory I am getting unexpected results.

In short, dir behaves as follows:

test.txt is excluded

workdir := client.Host().Workdir()

dir := client.Directory().WithDirectory(".", workdir, dagger.DirectoryWithDirectoryOpts{
	Exclude: []string{"test.txt"},
})

build is excluded

dir := client.Host().Workdir(dagger.HostWorkdirOpts{
	Exclude: []string{"...
vivid lintelBOT
#

Dagger fails to start to run the dagger-engine- if the container (with the same name) already exists and is stopped.

Prerequisites
Make sure that no dagger engine is running (docker ps -a). Then:

> cd sdk/go
> go test  -count=1 -race -run=TestImageProvision -v ./...
=== RUN   TestImageProvision
--- PASS: TestImageProvision (17.80s)
PASS
ok      dagger.io/dagger        18.037s
?       dagger.io/dagger/internal/engineconn    [no test files]
?       dagger.io/dagger/intern...
vivid lintelBOT
#

Bumps github.com/moby/buildkit from 0.10.5 to 0.10.6.

Release notes
Sourced from github.com/moby/buildkit's releases.

v0.10.6
https://hub.docker.com/r/moby/buildkit
Notable changes:

Fix possible panic on scanning files from local filesystem tonistiigi/fsutil#122
Make SELinux opt-in for OCI worker so it can be disabled on certain hosts moby/buildkit#3255

Commits

0c9b5ae Merge pull request #3272 from tonistiigi/v0.10-fsutil-go
9cf3b35 Merge pull reque...

vivid lintelBOT
#

Bumps node-fetch from 3.2.10 to 3.3.0.

Release notes
Sourced from node-fetch's releases.

v3.3.0
3.3.0 (2022-11-10)
Features

add static Response.json (#1670) (55a4870)

Commits

55a4870 feat: add static Response.json (#1670)
c071406 (1138) - Fixed HTTPResponseError with correct constructor and usage (#1666)
6f72caa docs: fix missing comma in example (#1623)
See full diff in compare view

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

vivid lintelBOT
#

What is the issue?

Hello team. I'm building the image in the following way:

image := w.client.Container().
        // We use this as a service base image because of an auth issue
        From("gcr.io/google.com/cloudsdktool/cloud-sdk:alpine").
        WithEnvVariable("PROJECT_ID", w.target.ProjectID).
        WithEnvVariable("PROJECT_NUMBER", w.target.ProjectNumber).
        WithEnvVariable("SERVICE_NAME", "intelligence").
        WithEnvVariable("COMMIT", w.target.SHA).
   ...
vivid lintelBOT
#

What is the issue?

When BUILDKIT_HOST is invalid (eg: points to bs or there is no buildkitd there), dagger will just bail out silently - no logs, no invalid exit code.

This makes detecting failure conditions quite hard.

Log output

Nothing

Steps to reproduce

BUILDKIT_HOST="FOOBAR" go run something.go
echo $?

Dagger version

dagger devel (788e5b687a44a4c7d73dcd6876a4fddcacfac32d) darwin/arm64

OS version

macOS 13.0.1 (22A400)

ornate vigilBOT
ornate vigilBOT
ornate vigilBOT
#

Pipeline metrics would be awesome. For example, time taken to run each
section. Some kind of cached historical metrics would also be nice to drive
trends and to calculate DORA metrics.

On Sun, Nov 13, 2022, 3:30 AM Benjamin Strasser @.***>
wrote:

Jump to code/Open Editor like Cypress IDE Integration
https://docs.cypress.io/guides/tooling/IDE-integration#File-Opener-Preference

โ€”
Reply to this email directly, view it on GitHub
<https://github.com/dagger/dagger/discussions/...

vivid lintelBOT
ornate vigilBOT
#

Support for running services like docker run -d is still under development. Stay tuned!

The docker build from a Dockerfile example works and is in the reference docs today here: https://pkg.go.dev/dagger.io/dagger#Container.Build:~:text=a Dockerfile build-,Example
Use docker login in your terminal before running to push to a registry that needs auth.

That example shows pulling the filesystem with the Dockerfile from a git repo, but you could read from the host filesystem ...

vivid lintelBOT
#

The api needs to be documented dynamically and hosted somewhere.
My first guess would be to use typedoc with a plugin that generate markdown. This output can be embeded in NodeJS SDK documentation under Reference.

Typedoc: https://typedoc.org/
Typedoc markdown plugin: https://github.com/tgreyuk/typedoc-plugin-markdown/tree/master/packages/typedoc-plugin-markdown

Every new SDK release would imply to regenerate the .md and output it into the docs.

vivid lintelBOT
#

There's a bunch of FIXMEs for this, this issue is to track their resolution.

  • [ ] Look for any exception that can be raised at each step of with dagger.Connection()
  • [ ] Look for any exception that can be raised when executing a query
  • [ ] Document with raises where appropriate
  • [ ] Create a dagger.Exception that can be used for a catch-all instead of using the built-in Exception
  • [ ] See how many exceptions from graphql can be re-raised as a dagger.Exception subcl...
vivid lintelBOT
#

Bumps node-fetch from 3.2.10 to 3.3.0.

Release notes
Sourced from node-fetch's releases.

v3.3.0
3.3.0 (2022-11-10)
Features

add static Response.json (#1670) (55a4870)

Commits

55a4870 feat: add static Response.json (#1670)
c071406 (1138) - Fixed HTTPResponseError with correct constructor and usage (#1666)
6f72caa docs: fix missing comma in example (#1623)
See full diff in compare view

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

vivid lintelBOT
#

There's an implicit plan to add tests by feature, but since the SDK was suddenly on a short timeline for launch, a lot was skipped for later improvement.

We need to go back and add more tests for current features. Some examples:

  • Test error handling for every step of query execution
  • Test return values for multiple different types
  • Battle test provisioning and connecting to API server (lots of things that can go wrong)
vivid lintelBOT
#

What is the issue?

When trying to run the example for the Dagger Python SDK on Windows I am getting the error: AttributeError: module 'os' has no attribute 'uname'
Link to the place in the code: https://github.com/dagger/dagger/blob/main/sdk/python/src/dagger/connectors/docker.py#L26

I guess this is only related to Windows as it looks like this function is not present there.

Log output

C:\Users\amuller20\Miniconda3\envs\dagger-sdk\python.exe C:\Users\amuller20\PycharmProjects\d...

vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

Bumps github.com/containerd/containerd from 1.6.9 to 1.6.10.

Release notes
Sourced from github.com/containerd/containerd's releases.

containerd 1.6.10
Welcome to the v1.6.10 release of containerd!
The tenth patch release for containerd 1.6 contains various fixes, including a CVE fix for Windows platforms.
Notable Updates

Always check userxattr for overlay on kernels >= 5.11 (#7646)
Bump hcsshim to 0.9.5 to fix container shutdown bug on Windows...

#

Bumps @typescript-eslint/eslint-plugin from 5.42.1 to 5.43.0.

Release notes
Sourced from @โ€‹typescript-eslint/eslint-plugin's releases.

v5.43.0
5.43.0 (2022-11-14)
Bug Fixes

eslint-plugin: [no-shadow] handle false positives on generics and parameters (#5902) (769e8c8)
eslint-plugin: [promise-function-async] handle keyword token (#5907) (f25a94f)

Features

eslint-plugin: [consistent-type-imports] supp...

#

Bumps @typescript-eslint/parser from 5.42.1 to 5.43.0.

Release notes
Sourced from @โ€‹typescript-eslint/parser's releases.

v5.43.0
5.43.0 (2022-11-14)
Bug Fixes

eslint-plugin: [no-shadow] handle false positives on generics and parameters (#5902) (769e8c8)
eslint-plugin: [promise-function-async] handle keyword token (#5907) (f25a94f)

Features

eslint-plugin: [consistent-type-imports] support fixing to inline ...

vivid lintelBOT
#

Implement cloak provisioning by pulling the
binary directly from docker image instead of
using local one.
This implementation is based on the Golang
and Python SDK.

Implement a generic system to include more
provisioner in the future thanks a map of
function.
This is based on the Golang connection
helpers.

:warning: Issue
The pull binary is currently broken; there are a bunch of extra bytes in it when it's written on the local host.
We're still trying to figure out with @s...

vivid lintelBOT
#

What is the issue?

during a dagger run, we can see different version of Go images being used.

Log output

#1 resolve image config for docker.io/library/golang:1.19-alpine
#1 DONE 0.7s

#2 mkfile /Dockerfile
#2 DONE 0.0s

#3 mkfile /main.go
#3 CACHED

#4 [internal] load metadata for docker.io/library/golang:1.18.2-alpine
#4 DONE 0.3s

#5 mkdir /meta
#5 DONE 0.0s

#6 [build 1/6] FROM docker.io/library/golang:1.18.2-alpine@sha256:4795c5d21f01e0777707ada02408debe77fe31848...

vivid lintelBOT
vivid lintelBOT
#

Previously unless you configured log output, no errors that occur in the engine-session binary would be visible to the end user, they would just get EOF as an error and nothing else, which is extremely confusing. This made it much harder to debug issue encountered in this PR for example: https://github.com/dagger/dagger/pull/3774

Now, even when log output is not set, the contents of stderr are temporarily buffered during provisioning and included in the error message if something goes wr...

vivid lintelBOT
vivid lintelBOT
#

What is the issue?

My company mandates that all docker images be proxied via Artifactory. Hence we can't pull docker.io/golang:alpine. We have to pull company.repo.com/golang:alpine after doing docker login company.repo.com. The private registry login does not translate into the buildkit image that dagger runs all its actions within.

Dagger engine downloads docker.io/library/golang:1.18.2-alpine which is blocked by the firewall. There is no way to customize this via Dagger Go ...

vivid lintelBOT
#

Problem

In order for a client library or tool to communicate with the Dagger Engine, it must open a GraphQL session. When using a Dagger SDK this is abstracted away. However some developers need to target the GraphQL API without the help of an SDK. At the moment this is a painful experience because, although Dagger's GraphQL implementation is standard, the procedure for opening a session is specific to Dagger - and it is quite painful to understand and implement.

Specifically, the ...

vivid lintelBOT
vivid lintelBOT
#

I think there might be a race condition here where we can read the port successfully but then the timeout gets hit before we clear it.

I don't really know the best way of handling this in nodejs, but I think you can use promise.Race for this: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/race#using_promise.race_to_implement_request_timeout

_Originally posted by @sipsma in https://github.com/dagger/dagger/pull/3820#discussion_r1022227...

vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

Example had a wrong reference to the old Result wrapper.

Removed comments with log_output tip because itโ€™s easy to miss and itโ€™s covered in the getting started guide on the documentation site. Added progress status instead to keep terminal clean.

Kept the version in README.md as simple as possible. Thatโ€™s just a carrot, the proper example is in the examples directory and in the docs.

Signed-off-by: Helder Correia

#

What is the issue?

I called mage sdk:all:lint and only the first package (Go) get linted.

Log output

too long to paste here

Steps to reproduce

replace runAll() by

func (t All) runAll(fn func(SDK) any) error {
	handlers := []any{}
	for i := range availableSDKs {

		i := i
		//handlers = append(handlers, fn(sdk))
		fmt.Fprintln(os.Stderr, "DBGTHE: appending", i)
		handlers = append(handlers, func(ctx context.Context) error { fmt.Fprintln(os.Stderr, "DBGTHE:", i...
vivid lintelBOT
#

The current approach for ensuring we don't leave a bunch of engine images+binaries around running forever is very primitive and doesn't allow multiple versions of an engine to coexist. More background in this comment and the one preceding it: https://github.com/dagger/dagger/pull/3647#issuecomment-1302721770

This means that we must always update engine dependencies in SDKs very close to each other and that users must update those SDKs in lockstep too if they use multiples from the same mac...

vivid lintelBOT
vivid lintelBOT
#

Right now we can't test provisioning via dagger-in-dagger so the testing is just manual: https://github.com/dagger/dagger/blob/main/RELEASING.md#go-sdk

We should automate this by either:

  1. Supporting mounting a docker.sock into containers: https://github.com/dagger/dagger/issues/3850
  2. Running the tests outside dagger-in-dagger

1. is my strong preference since it saves us from having to setup a bunch of dependencies for running the sdk tests directly on the host.


When we...

ornate vigilBOT
vivid lintelBOT
#

What are you trying to do?

Execute nodejs sdk example from https://github.com/dagger/dagger/pull/3823 inside of a container that mounts /var/run/docker.sock (so called Docker Outside of Docker (DooD) setup).

To reproduce, use the following Dockerfile:

FROM node:18.12.1-alpine3.16

RUN apk update \
    && apk add docker-cli \
    && rm -rf /var/cache/apk/*

RUN apk update \
    && apk add shadow docker-cli \
    && rm -rf /var/cache/apk/*
RUN addgroup -S docker && ad...
#

Bumps loader-utils from 2.0.3 to 2.0.4.

Release notes
Sourced from loader-utils's releases.

v2.0.4
2.0.4 (2022-11-11)
Bug Fixes

ReDoS problem (#225) (ac09944)

Changelog
Sourced from loader-utils's changelog.

2.0.4 (2022-11-11)
Bug Fixes

ReDoS problem (#225) (ac09944)

Commits

6688b50 chore(release): 2.0.4
ac09944 fix: ReDoS problem (#225)
See full diff in compare view

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

#

What is the issue?

Container.EnvVariables fails with the following error:

input:1: Field "envVariables" of type "[EnvVariable!]!" must have a sub selection.
package main

import (
	"context"
	"fmt"
	"os"

	"dagger.io/dagger"
)

func main() {
	ctx := context.Background()
	fmt.Println("Connecting")
	d, err := dagger.Connect(ctx, dagger.WithLogOutput(os.Stderr))
	if err != nil {
		panic(err)
	}

	fmt.Println("Getting EnvVariables from nginx:1.2...
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

Bumps strawberry-graphql from 0.140.3 to 0.142.2.

Release notes
Sourced from strawberry-graphql's releases.

๐Ÿ“ 0.142.2
This release changes the dataloader batch resolution to avoid resolving
futures that were canceled, and also from reusing them from the cache.
Trying to resolve a future that was canceled would raise asyncio.InvalidStateError
๐Ÿ“ 0.142.1
This release fixes a bug where using a custom scalar in a union would result
in an unclea...

ornate vigilBOT
vivid lintelBOT
#

Fixes #3690

Pythonโ€™s implementation of #3558

Before

pip_cache_id = await client.cache_volume(pip_cache_key).id()
venv_cache_id = await client.cache_volume(venv_cache_key).id()

container = (
    client.container()
ย  ย  .from_("python:slim")
ย  ย  .with_mounted_cache("/root/.cache/pip", pip_cache_id)
ย  ย  .with_mounted_cache("/opt/venv", venv_cache_id)
)

out = await container.exec(["pip", "list"]).stdout().contents()

After

container = (
    c...
vivid lintelBOT
ornate vigilBOT
#

I was scouring through all the docs and examples I was also similarly confused.

Perhaps a crucial documentation explaining the role of Dagger and its relation to existing CI platforms is missing.

At first (about a year or so ago), when I first learned about Dagger, it looked to me like a nice CI server independent way of describing pipeline steps and a shallow cli on top of that description to run various steps in different existing CI platforms (GitLab Pipelines, GitHub Actions, etc.) ...

vivid lintelBOT
vivid lintelBOT
#

What are you trying to do?

The goal is to support setting a Exec privileged so that processes like docker-in-docker can be run.

Why is this important to you?

Some of our projects are Kubernetes controllers. To test these tools like kind are needed to start up cluster components through containers, which is impossible without running the process in privileged mode.

It's also useful to like developing iptables, cgroups and some kernel stuff.

It is relatable even after the S...

ornate vigilBOT
#

Hey @luolong! thx for the feedback. Please find some answers to your questions below:

Perhaps a crucial documentation explaining the role of Dagger and its relation to existing CI platforms is missing.

I agree, given the recent shift on multi-language, we haven't had the time to improve other parts of our docs. A clear guide which clarifies what you're looking for is indeed missing. Tagging @vikram-dagger and @shykes for visibility.

Now, coming back to the project about a year ...

ornate vigilBOT
ornate vigilBOT
#

Hey @luolong! thx for the feedback. Please find some answers to your questions below:

Perhaps a crucial documentation explaining the role of Dagger and its relation to existing CI platforms is missing.

I agree, given the recent shift on multi-language, we haven't had the time to improve other parts of our docs. A clear guide which clarifies what you're looking for is indeed missing. Tagging @vikram-dagger and @shykes for visibility.

Currently we have this:

  • [What is D...
vivid lintelBOT
#

What is the issue?

I was trying to create plan files via Terraform plan via docker.#Run in dagger and export the resulting planfile. Using that planfile I had planned to insert it back into docker via docker.#Copy and apply it via terraform apply. However, when using client.filesystem in dagger.#Plan, it inexplicably breaks the planfile.
It gets corrupted and can't be used in terraform anymore, showing the following error:

Terraform couldn't read the given file as a state or pla...

vivid lintelBOT
vivid lintelBOT
#

Community Request - Could we get a releases channel for just release github/general release notification?

Advice -

I did change log driven releases for my team lately (using changie) and itโ€™s really helped as only release notifications get piped through. An announcement channel would be great as long as itโ€™s not dev level commits but release/tag driven

[Discord context](#general message)

vivid lintelBOT
#

Because of the optional contents, creating a new file looks something like this:

	newDir := c.Directory().WithNewDirectory("/foo").WithNewFile("some-file", dagger.DirectoryWithNewFileOpts{
		Contents: "some-content",
	})

By making contents required it would look like this:

	newDir := c.Directory().WithNewDirectory("/foo").WithNewFile("some-file", "some-content")

Creating an empty file would still be possible, although a bit quirky:

	newDir := c....
vivid lintelBOT
#

A current pain point of our SDKs is that any time you want to write your own util that's not in our API, it has to "break the chain".

e.g.

func AddAFewMounts(c *dagger.Container) *dagger.Container {
  return c.
    WithMountedDirectory("/foo", c.Host().Directory("foo").
    WithMountedDirectory("/bar", c.Host().Directory("bar")
}

func main() {
 ctr := Container().
    From("alpine").
    WithWorkdir("/foo")
ctr = AddAFewMounts(ctr) // The chain is broken!!!!!!
output, e...
vivid lintelBOT
vivid lintelBOT
#

What are you trying to do?

Generate and publish a docker image which has LABELs.

Related discussion : https://discord.com/channels/707636530424053791/1042501877906022481

Why is this important to you?

We have corporate policies that mandate certain labels on all docker images

How are you currently working around this?

The workaround is to manually create a dockerfile with the LABELs added. But this is inconvenient and bypasses the features provided by the API and SDK

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

Problem

Currently dagger automatically downloads a golang image, to produce the "shim" necessary to execute commands in containers. This causes several problems:

  • Users messages about downloading a golang image in their logs, which is confusing especially if you're not a Go developer. This has been brought up by users already
  • It creates a dependency on third-party infrastructure which we have less control over. Downtime, rate limiting etc

Solution

Host the shim in an ...

vivid lintelBOT
#

Bumps typescript from 4.8.4 to 4.9.3.

Release notes
Sourced from typescript's releases.

TypeScript 4.9
For release notes, check out the release announcement.
Downloads are available on:

npm
NuGet package

Changes:

93bd577458d55cd720b2677705feab5c91eb12ce Bump version to 4.9.3 and LKG.
107f832b80df2dc97748021cb00af2b6813db75b Update LKG.
31bee5682df130a14ffdd5742f994dbe7313dd0e Cherry-pick PR #50977 into release-4.9 (#51363) [ #50872 ]
1e2fa7ae15f...

vivid lintelBOT
#

Test (see the Relative path):

func TestDirectoryWithNewFile(t *testing.T) {
	t.Parallel()

	c, ctx := connect(t)
	defer c.Close()

	entries, err := c.Directory().WithNewFile("some-file", dagger.DirectoryWithNewFileOpts{
		Contents: "some-content",
	}).Entries(ctx)
	require.NoError(t, err)
	require.Equal(t, []string{"some-file"}, entries)

	// Relative path
	dir := c.Directory().WithNewDirectory("a").WithNewFile("some-file", dagger.DirectoryWithNewFileOpts{
		Contents...
vivid lintelBOT
vivid lintelBOT
vivid lintelBOT
#

Problem

When navigating to https://docs.dagger.io/install I see the old 0.2 install docs, without context making that clear. There are 2 problems here:

  • The URL doesn't have an ID so it implies that it's "mutable" and kept up-to-date
  • Lack of context makes the confusion worse

Solution

Reclaim "intuitive" URLs such as /install to always serve up-to-date contents; and/or add a banner on out-of-date content so that it's clear to the user.

vivid lintelBOT
#

What is the issue?

Problem:

If they want emulation to work yes. It's the same state as docker build{x} users for now. It's mentioned in the requirements here: https://docs.dagger.io/sdk/go/406009/multiplatform-support
But as @Jeremy Adams pointed out in the zoom meeting earlier that's not good because it's a requirement that applies to all of our SDKs, not just Go. So we need a language agnostic section or something.

We need to find a solution for guides that are related to all...

vivid lintelBOT
vivid lintelBOT