#github-feed
1 messages ยท Page 1 of 1 (latest)
What are you trying to do?
I want to do Dagger Project update without pulling all the code. Right now, Dagger project update requires you to do a full update instead of giving you the ability to pick precisely what you need.
(feedback from Dagger user interview)
Why is this important to you?
There is a lot of code that is needed, so it would be great if the user could choose what they actually need.
How are you currently working around this?
Just doing Dagger Project upd...
user feedback -
The user gets an error every time there is a dagger update. The error message is extremely long. It would be great if we could shorten the error message when an update is required.
Based on user feedback -
The user would like examples of how to build containers to upload to different cloud registries. There is an understanding that the user needs to alter the syntax, but documentation on the best practice will be a good starting point.
What are you trying to do?
Currently, we need to wait for the Dagger team to cut a release before we have dagger project update and get the latest actions from universe.
It would be nice if we could dagger project update --main to fetch the latest version from the main branch.
Why is this important to you?
So I can consume new actions from GitHub Actions without awful hacks
How are you currently working around this?
Currently not, but could add a step to GHA to pull th...
Bumps @svgr/webpack from 6.3.0 to 6.3.1.
Release notes
Sourced from @โsvgr/webpack's releases.
v6.3.1
Bug Fixes
fix duplicate plugin/preset detected error (#747) (3c6a54c), closes #746
fix exports compat with ESM (#749) (f3e304c)
Changelog
Sourced from @โsvgr/webpack's changelog.
6.3.1 (2022-07-22)
Bug Fixes
fix duplicate plugin/preset detected error (#747) (3c6a54c), closes #746
fix exports compat with ESM (#749) (f3e304c)
Commits
1dbc3e2 v6...
GitLab example getting better and better here: https://docs.dagger.io/1201/ci-environment
Have a CircleCI example going up in PR right now. With more complex example (caching) to follow.
- [ ] CircleCI - adding simple example, more to come: https://github.com/dagger/dagger/issues/2842
- [ ] TravisCI - updating YAML title and removing
--- - [X] GitLab - updated example, used wget for simplification - https://github.com/dagger/dagger/pull/2828
@tadavid-cae @Pre-Z What would ADO support look like?
Would there need to be an extension or just an Azure Pipelines YAML example?
idea to change Plan doc title to explain role of the Plan in relation to Actions versus making the Plan the "starting point" or "central focus".
"It all starts with a plan" -> "A Dagger Plan orchestrates the Actions"
- rename preview actions to environment actions
- Create #Run, a resuable construct to help write other actions which
run in the uffizzi container - Add test for uffizzi create environment action which use secrets from sercrets_sops.yaml
What are you trying to do?
cloning the dagger/todoapp repo is very long and heavy. The size of the history of this fork is not so interesting to us.
Should we do some shallow clone and start from here?
How much would we push patches to upstream for this specific case, anyway?
Why is this important to you?
People on low bandwidth (bad network infrastructure in some areas, slow mobile connection, etc), having to wait multiple minutes for a clone of a todoapp is too much and can m...
doc:
- what is sops
- directions on generating
agekeypair - directions on encrypting and editing a yaml file with `sops
Signed-off-by: Vibhav Bobade
This will change the documentation UX by implementing a new design for the introduction user flow.
The main idea is to gather feedback and to remove/modify elements that are not necessary/appropriate and add new ones that enhance the UX.
Main modifications include illustrations, labels, internal navigation, layout and content.
From #647
Bumps sass from 1.53.0 to 1.54.0.
Release notes
Sourced from sass's releases.
Dart Sass 1.54.0
To install Sass 1.54.0, download one of the packages below and add it to your PATH, or see the Sass website for full installation instructions.
Changes
Deprecate selectors with leading or trailing combinators, or with multiple combinators in a row. If they're included in style rules after nesting is resolved, Sass will now produce a deprecation warning and, i...
What is the issue?
The user wrote a blog post on Dagger and where they ran into issues. In this case, they mentioned they needed to go to the source code to understand how to use the package. Maybe we can add more documentation around this to make it easier for the users?
[Blog post (feedback in the "Introducing the points that I thought were not good with Dagger" section) ](https://dev-classmethod-jp.translate.goog/articles/dagger_cicd_get_started/?_x_tr_sl=ja&_x_tr_tl=en&_x_tr_hl=e...
What is the issue?
The user wrote a blog post on Dagger and where they ran into issues. In this case, the user wasn't confident about how to handle dependent modules because we didn't have docs that were able to explain it.
blurb from blog:
In Dagger,...
Unfortunately, because of how go:embed dagger.io universe.dagger.io includes files, the aws/_scripts folder is not included in the embed. This causes the aws packages to fail in other repositories.
This change should fix that.
Signed-off-by: Joel Longtine
There will be template examples for common use cases, but there also should be an empty plan with most things commented out but visible to show what's possible.
The template examples are working examples that are in a git repo.
The empty template (with lots of possibilities exposed) could be a dagger project init --template type.
I'd love to read about integrating Dagger into a Jenkins pipeline. It's something I'll have to do at some point and would be nice to have some reading material by then.
@sagikazarmark what aspects would you want covered?
We have a basic Jenkinsfile example and an accompanying video here: https://docs.dagger.io/1201/ci-environment (Jenkins tab).
I've heard other users mention:
- Jenkins shared libraries
- Generating pipelines from shared libraries
Ah, haven't seen that, thanks!
We do have a shared jenkins library with that accepts declarative configuration to build the final, multi-stage pipeline.
The library takes care of things like fetching secrets from a Hashicorp Vault and injecting them as env vars. Seeing how that would work with Dagger would be interesting.
Otherwise having at least a basic pipeline is a good start, so thanks for pointing me to that.
We do have a shared jenkins library with that accepts declarative configuration to build the final, multi-stage pipeline.
I'd love to learn more about that! Any pointers?
The library takes care of things like fetching secrets from a Hashicorp Vault and injecting them as env vars. Seeing how that would work with Dagger would be interesting.
Very cool! I'd love to get something like that going as an example, for sure. Any suggestions/pointers/links welcome :)
I'd love to learn more about that! Any pointers?
Sadly it's not open source, but it's basically a set of groovy scripts.
I want to integrate Dagger into our pipeline at some point. I'll see if I can publish some of it once it's done.
Full guide explaining what is an FS, how it relates to dagger and how to leverage it, with examples and diagrams
cc @jpadams. This is quite a big one, we might need to review it 1:1
Signed-off-by: guillaume
What are you trying to do?
It would be nice to have first class support to get a kubeconfig file for AKS and authenticate with something like service principal credentials.
Why is this important to you?
We are deploying into AKS, and without authentication mechanism its not possible.
How are you currently working around this?
I have custom scripts/images/actions that handle the auth part for me, so that I can use the resulting kubeconfig in actions that connect to the kubern...
Bumps amplitude-js from 8.18.5 to 8.19.0.
Release notes
Sourced from amplitude-js's releases.
v8.19.0
8.19.0 (2022-07-25)
Features
add partner_id support (#545) (7b343ea)
Changelog
Sourced from amplitude-js's changelog.
8.19.0 (2022-07-25)
Features
add partner_id support (#545) (7b343ea)
Commits
70c908d chore(release): 8.19.0 [skip ci]
de5f8c7 build: fixes permissions check for deploy workflow (#547)
5547c11 docs: removes beta...
Signed-off-by: Marcos Lilljedahl
What is the issue?
When trying to access Dagger documentation via the link on the home page I get redirected to a broken "Page Not Found" page with URL https://docs.dagger.io/restricted.
This isn't an expected behaviour, is it?
- Change hidden Dagger subcommand to
dagger cuelsp. - Update LSP imports
- Update server Mode initialization to work with functional server initialization paradigm + server initialization error management
Signed-off-by: guillaume
Signed-off-by: jffarge
I've skimmed the doc. There's no info about how to register a (self hosted) runner, how to host a dagger UI (cloud) in case I want to have it self hosted. How does it load-balance multiple jobs between the runners. How to configure the runners. No word about any integration with k8s.
Basically, right now it doesn't seem any different from running images in any CI system.
Signed-off-by: Marcos Lilljedahl
There's no info about how to register a (self hosted) runner, how to host a dagger UI (cloud) in case I want to have it self hosted. How does it load-balance multiple jobs between the runners. How to configure the runners. No word about any integration with k8s.
Basically, right now it doesn't seem any different from running images in any CI system.
Hey @TriplEight, apologies for the confusion. Dagger cloud is not a CI/CD platform like the ones you're thinking about (gitlab, github ac...
User installing in Azure Pipelines tools folder needs to install in a specific folder where there is no bin folder. If they use the Dagger installer, they need to move the dagger binary (or symlink) after download.
Explain how to run single actions. Closes #2554
cc @jpadams
Signed-off-by: guillaume
Signed-off-by: Nico Braun
resolve: #2860
Add
- generic action to get an aks token for a specific resource or scope
- action to get aks credetials for user or admin
clarified that the Dagger support team can see their data
Signed-off-by: Miranda Carter
We have a repo to hold Dagger examples including what we're calling "templates": small, ready-to-run examples of Dagger being used for a specific platform or language (think Node.js, Java, Python, etc). The templates are currently mostly "build" examples, but that could be expanded to simple "deploy" or "test" scenarios as well.
https://github.com/dagger/examples
If there is an example template that you'd like to see, please create a comment below. Ideally, one comment per template type...
Fixes #2653. It explains the 4 most common CUE patterns present in our codebase.
cc @jpadams
Signed-off-by: guillaume
Bumps @docusaurus/core from 2.0.0-rc.1 to 2.0.1.
Changelog
Sourced from @โdocusaurus/core's changelog.
Docusaurus 2 Changelog
:nail_care: Polish
docusaurus
#7781 refactor(core): log Docusaurus & Node version before exiting (@โJosh-Cena)
Committers: 2
Joshua Chen (@โJosh-Cena)
Sรฉbastien Lorber (@โslorber)
Commits
1ddee1c v2.0.1
1065e55 refactor(core): log Docusaurus & Node version before exiting (#7781...
https://docs.dagger.io/1221/action/#definition
Note that this action includes one sub-action: core.#WriteFile. An action can incorporate any number of sub-actions.
Fixes #2849
cc @jpadams
Signed-off-by: guillaume
Fixes #2866.
cc @jpadams. Please merge #2880 first
Fixes #2813. Shows an example of a proper use of raw strings
cc @jpadams
Signed-off-by: guillaume
Can't use dagger login from server
10:18AM INFO system | logging into your dagger account
10:18AM INFO system | opening https://auth.dagger.cloud/authorize?....
10:18AM FATAL system | login failed: exec: "xdg-open,x-www-browser,www-browser": executable file not found in $PATH
thx for the feedback @sebasjm. Expect some updates about this really soon :raised_hands:
This will avoid the CLI from complaining about different versions between Docusaurus and preset-classic
Signed-off-by: crjm
Also add a yarn task that is able to update it automatically. I was getting warnings when running this locally before the update.
npx is required for browserlist --update-db to work.
- docs: Make the section on links in docs clearer
- docs: Expand on how to run the linters
- docs: Fix link to PR
This should be rebase & merged after https://github.com/dagger/dagger/pull/2884
Allows to fallback to oauth device flow (https://www.oauth.com/oauth2-servers/device-flow/)
when browser cannot be opened.
We're currently using a fork of the official google oauth2 client until
this PR gets merged (https://github.com/golang/oauth2/pull/578)
Signed-off-by: Marcos Lilljedahl
This explains why we need to do it separately, on top of GoReleaser updating our Homebrew tap:
Bump of the LSP version to latest release:
- LSP used to break on aliased imports. One open-source contributor helped (#82)
- Also adds a better error message on single file opening (#83)
Signed-off-by: guillaume
This PR should improve the sam package for daggger.
- Connect to tcp socket if you wanna build the sam image in a GitLab CI environment
- Improve code documentation
- Add README.md to give an overview how to use the package locally and also in a GitLab environment
Dagger Cloud run URL
https://dagger.cloud/runs/7849c1fd-8788-4b50-a02d-b5fb4b82d886
What happened? What did you expect to happen?
The actions Foo is supposed to run a Kustomize action (under template field).
But seems like it at run time expect an input value in my dagger plan.
Why this happen ?
Since this runs on the main branch, the github.ref value will be set to refs/heads/main and the
https://github.com/mislav/bump-homebrew-formula-action will fail as we have seen in this run: https://github.com/dagger/dagger/runs/7651780409?check_suite_focus=true#step:9:13
This sets the tag-name value explicitly which should fix it according to https://github.com/mislav/bump-homebrew-formula-action#manual-trigger
Follow-up to https://github.com/dagger/dagger/pull/2888
Follow-up to https://github.com/dagger/dagger/pull/2892.
We created this as a branch so that we can iterate on it quicker, as a pair with @grouville, and be able to submit an actual homebrew-core PR to ensure that everything works as expected: https://github.com/Homebrew/homebrew-core/pull/107233.
The merge should be quick @grouville since you already have all the context.
Bumps sass from 1.54.0 to 1.54.1.
Release notes
Sourced from sass's releases.
Dart Sass 1.54.1
To install Sass 1.54.1, download one of the packages below and add it to your PATH, or see the Sass website for full installation instructions.
Changes
When unifying selectors for @extend and selector.unify(), ensure that :root, :scope, :host, and :host-context only appear at the beginning of complex selectors.
See the full changelog for changes in earlier re...
What is the issue?
The helm action is alpha has a bug. It is using an environment variable in docker.#Run: command: args but variables are not exanded in this place.
Log output
No response
Steps to reproduce
No response
Dagger version
dagger 0.2.27 (954664e6d) linux/amd64
OS version
debian bullseye wsl2 windows 10
fix: #2895
Signed-off-by: Nico Braun
- Clarify the use of the sub-action term
- Introduce the notion of an action's domain logic
- Explain what a universe package is, and how it relates to composite actions.
Fixes #2701 and #2879
cc @jpadams
Signed-off-by: Guillaume de Rouville
Inspired by golang's playground share feature (https://github.com/golang/playground/blob/ac3e19cbe189f79620bc5ddd033c99822640de1a/share.go#L28-L43), we're using an 11 digit
URL compatible UUID.
Signed-off-by: Marcos Lilljedahl
Bumps sass from 1.54.1 to 1.54.2.
Release notes
Sourced from sass's releases.
Dart Sass 1.54.2
To install Sass 1.54.2, download one of the packages below and add it to your PATH, or see the Sass website for full installation instructions.
Changes
No user-visible changes.
See the full changelog for changes in earlier releases.
Changelog
Sourced from sass's changelog.
1.54.2
No user-visible changes.
Commits
126f0a6 Release 1.54.2 (#1770)
See fu...
Signed-off-by: Brittan DeYoung
Add an action for importing terraform resources. example:
importResource: terraform.#Import & {
source: init.output
address: "random_uuid.test"
id: "aabbccdd-eeff-0011-2233-445566778899"
}
What is the issue?
Need a reference doc on all of the environment variables that can be used to run dagger
From user:
is there a list of environment variables that can be used to configure dagger such as DAGGER_LOG_FORMAT or BUILDKIT_HOST?
What is the issue?
I'm trying to wrap my head around inputs, outputs, and dependencies. From my understanding, one action is dependent on another if it uses the output of that action. But let's say I have this:
actions: {
source: core.#Source & {
path: "."
}
pull: docker.#Pull & {
source: "node:current"
}
copy: docker.#Copy & {
input: pull.output
contents: source.output
}
install: bash.#Run & {
inp...
Added optional parameters to improve the install script and updated the documentation to reflect this update:
-DaggerVersion: allows specifying the version to install. Will default tolatest-InteractiveInstall: Allows running the script unattended. Defaults to$false-InstallPath: Allows passing in a specific location for installing thedagger.exebinary.
Add documentation on how to run dagger in Azure Pipelines
This PR is dependent on the Powershell script improvements in the following PR #2903
Bumps sass from 1.54.1 to 1.54.3.
Release notes
Sourced from sass's releases.
Dart Sass 1.54.3
To install Sass 1.54.3, download one of the packages below and add it to your PATH, or see the Sass website for full installation instructions.
Changes
Release a native ARM64 executable for Mac OS.
See the full changelog for changes in earlier releases.
Dart Sass 1.54.2
To install Sass 1.54.2, download one of the packages below and add it to your PATH, or see...
Hey,
There were a small typo in this page.
Cheers
What are you trying to do?
When I build my docker image using a dockerfile, I pass a name and tag using the -t flag. However, I can't find any options to set this using docker.#Dockerfile or even core.#Dockerfile.
Why is this important to you?
I need to be able to properly name and tag my docker images to push them to Elastic Container Registry.
How are you currently working around this?
I'm not. I can't see anyway to tag my image
Signed-off-by: Noah Troncoso
Note this is pretty much an exact copy of the yarn package. There were just a couple tweaks to make it work for npm
User intended to invoke actions.two through dagger do two and was surprised that actions.one was triggered by the fact that a client: filesystem: write: used actions.one's output.
They figured anything not related to the requested action would not run. In other words, they felt that anything related to actions.one would only execute if they asked for dagger do one.
package main
...
What are you trying to do?
It would be nice to have a aks specific helm.#Upgrade action that handles the authentication part. If user credentials are used, the kubelogin plugin is required so the regular helm base image is not sufficient.
Why is this important to you?
I want to be able to deploy to aks without alot of custom code or multiple actions to build an image and handle auth part.
How are you currently working around this?
I am using custom actions.
add
- aks helm upgrade action
Signed-off-by: Nico Braun
The How-it-works page has some bad redirects. This is the fix
Signed-off-by: Guillaume de Rouville
Add directions on how to retrieve the sops_age_key file and use
sops to add a new secret to tests/secrets_sops.yaml.
What is the issue?
It's often necessary to use information about the client (laptop, CI runner, etc) in order to decide which portions of a CUE tree should be included in a plan via if statement guards, etc. Today, there is no guarantee that essential fields like client.platform for os and arch or client.env.XXX will be available, but they should be.
That means that plans that handle multiple operating systems or which have portions conditional on environment variables are...
Signed-off-by: Brittan DeYoung
- Updated Workspace Action to be functional
- Updated the workspace field on the terraform Run action to be optional (sometimes it is preferred to manage this using the workspace commands.)
- Added tests for the workspace command.
Huh...still 404? I clicked your link
<img width="600" alt="image" src="https://user-images.githubusercontent.com/3187222/183738699-7a2230f3-5b3b-42fc-8215-3a663b2c63a2.png">
It's a private repository right now, that's why
What is the issue?
There is a "Get started" button on your homepage which leads to https://docs.dagger.io/getting-started but results in a 404.
Click the Docs link in the header takes me where I need to go but just a heads up to fix that little bug.
What is the issue?
I installed dagger on my Apple Silicon Mac, cloned the tutorial app "todoapp" per the tutorial's instructions but received an error.
dagger do build
ERROR system | failed to load plan: package "dagger.io" is incompatible with this version of dagger (requires 0.2.11 or newer). Run `dagger project update` to resolve this
Log output
ERROR system | failed to load plan: package "dagger.io" is incompatible with this version of dagger (requires 0.2.11 or n...
Set the correct AuthStyle to avoid undesired behavior from the oauth2
library when polling to check that the device code has been validated
Signed-off-by: Marcos Lilljedahl
Below is a copy of Dagger's July 2022 Newsletter. If you'd like to have the newsletters come directly to your inbox, you can subscribe here.
Latest News
Introducing Dagger for VS Code
You asked us for a VS Code extension with proper Language Server support for CUE, so we made it happen! We are excited to introduce the first version of [Dagger fo...
Doc explaining the best design pattern to create actions with customizable images
Signed-off-by: Guillaume de Rouville
Signed-off-by: Marcos Lilljedahl
@jritsema do you have an example in the AWS docs/examples that would be a good first example to emulate?
Guessing it's:
- copy in source code
- build an image
- push to ECR
- then the harder parts :) ECS task definition in
awscli or CFT or Terraform or Pulumi or ...
This will add the Blog link to the Navbar and fix spacing between items to be more consistent with the mockup.
Signed-off-by: crjm
Bumps sass from 1.54.3 to 1.54.4.
Release notes
Sourced from sass's releases.
Dart Sass 1.54.4
To install Sass 1.54.4, download one of the packages below and add it to your PATH, or see the Sass website for full installation instructions.
Changes
Improve error messages when passing incorrect units that are also out-of-bounds to various color functions.
See the full changelog for changes in earlier releases.
Changelog
Sourced from sass's changelog.
...
What are you trying to do?
I want to merge PR but sometimes test fail for no good reason except they are flaky.
Why is this important to you?
Flaky test can be a productivity killer. It can lead you to the wrong rabbit hole when you don't need it.
I know go test accepts the -count flag. We could use it with 10 or 30 to run those tests many times on main, and if it fails, it means there must be some race condition or some flaky test.
We're better investigating this problem...
This will switch images in how-it-works.mdx with an optimized version to improve load time and UX.
Signed-off-by: crjm
I would love to see some terraform examples. Like a lambda function
deployment.
On Wed, Aug 10, 2022, 11:15 AM Jeremy Adams @.***>
wrote:
@jritsema https://github.com/jritsema do you have an example in the AWS
docs/examples that would be a good first example to emulate?Guessing it's:
- copy in source code
- build an image
- push to ECR
- then the harder parts :) ECS task definition in aws cli or CFT or
Terraform or Pulumi or ...โ
Reply to t...
Autorelease #49 failed due to missing gh token. When implementing the homebrew autorelease feature, a command using the gh CLI was moved to a job without copying the GITHUB_TOKEN env var.
cc @gerhard
Signed-off-by: Guillaume de Rouville
Exhaustive list of current env var available with Dagger
@crjm. The table is too small, I don't know how I could improve the design, to represent the same idea
Signed-off-by: Guillaume de Rouville
What is the issue?
In the overview page, the tutorial box is missing the CTA button. It is the only box that doesn't have a button, which doesn't match the flow of the rest of the CTAs.
Reference:

It should look like the tutorial box here:
 channel in discord for my issue.
Eventually, I figured out what I was doing wrong and solved it with an absolute path.
This change updates files, directories and secrets within export to r...
I have been playing with dagger.
- building a maven project with .m2 cache
- pushing to ecr
- cloning another repository and building manifest after pushing to ecr
- running terraform and waiting for user approval
- using buildkit on kubernetes
Updated all terraform actions and base "run" action to support specifying a custom version of terraform cli.
What is the issue?
I am noticing that occasionally the Github CI checks for Universe are reaching some sort of timeout limit that is causing these tests to fail. A re run will usually clear up the issue. It would be good to resolve these so that new users are not confused about failing tests.
Here is an example action run with the timeout failure:
https://github.com/dagger/dagger/actions/runs/2861943183
I have been attempting to find where this timeout is taken place. If I do I ...
Bumps github.com/mattn/go-colorable from 0.1.12 to 0.1.13.
Commits
11a925c update dependencies
See full diff in compare view
Hey :wave:
Interested in if folks would find a LXC backend for Dagger useful, and how difficult that would likely be to implement?
I've got a couple of CI pipelines for end-to-end testing of services that check on the state of systemd units, and presence of snap packages etc. These things are pretty hard to achieve in a purely OCI-image world; adding LXC support would still keep the process pretty light and container based, but give more options to teams with more system-oriented code ...
Dagger uses Buildkit to manage containers. And Buildkit relies on runc. So you should ask this question on the buildkit repository.
However technically, nothing prevents you to leverage lxc-* commands from within dagger actions, you would just have to mount the LXC socket to the containers you run with dagger.
Internal broken links are not being sufficiently monitered by Docusaurus: every week, we find at least one broken link.
The current best way to check them is to manually follow this command: https://github.com/dagger/dagger/blame/main/docs/README.md#L39.
However, it is not enough:
- some internal redirections are not being caught when building the docs (relative path inclusion). It is however the recommended behavior from our docs (and theirs): https://docs.dagger.io/1227/contributing...
Are you thinking about nomad deployments? Or using nomad as a scheduler to handle build pipelines?
Added a step in the getting started docs to indicate that running dagger project update is expected in order to get the example app running after initial download. I also made this same update to the example app readme file and have an open PR on that repo.
Closes: #2438
Signed-off-by: Brittan DeYoung
I guess my initial thought was to be able to deploy to an existing cluster, but I'm not entirely sure.
Bumps github.com/docker/buildx from 0.8.2 to 0.9.0.
Release notes
Sourced from github.com/docker/buildx's releases.
v0.9.0-rc2
Welcome to the 0.9.0-rc2 release of buildx!
This is a pre-release of buildx
Please try out the release binaries and report any issues at
https://github.com/docker/buildx/issues.
Notable changes
New --print flag can be used to run helper functions supported by the BuildKit frontend performing the build and print their results. In ...
[dagger/dagger] Pull request opened: #2950 feature: install completion script for bash, zsh and fish
For now, it works on debian derived system.
I need people to test on Mac OS to tell me if that works as well.
Yeh, fair enough - seems like BuildKit itself is probably a little too tied to OCI to make LXD a likely feature.
I have got something working by mounting the socket for now, thanks for the tip.
What are you trying to do?
I would like to get thoughts on making the default version for all universe.dagger.io packages to be latest. In the current behavior, a developer will be hard coded directly to the _#DefaultVersion specified in the package unless they pass in a different version.
If we were to do this, we would need to make sure that each package does have the ability to pass in a custom version as an input.
Why is this important to you?
This may be a great way t...
This will make changes in the UI based on internal feedback.
Signed-off-by: crjm
Signed-off-by: Miranda Carter
Signed-off-by: Tanguy โง Herrmann
Inside git worktrees, linter is not working, as the .git repository is located elsewhere.
Extend the ci library with new git.#Worktree package that creates a git repo (if we dagger do lint from a git worktree) to avoid breaks
Signed-off-by: Guillaume de Rouville
Bumps github.com/docker/buildx from 0.8.2 to 0.9.1.
Release notes
Sourced from github.com/docker/buildx's releases.
v0.9.1
Notable changes
Fix regression on building compose files that contain services without a build block #1277
Ensure used buildkit version also shows up in the inspect command #1279
v0.9.0
Welcome to the 0.9.0 release of buildx!
Please try out the release binaries and report any issues at
https://github.com/docker/buildx/issues.
Notabl...
Bumps github.com/tliron/kutil from 0.1.61 to 0.1.62.
Commits
ecc9037 Terminal: switch to termenv library
4ad2fa3 ARD and reflection improvements
066138c Support MessagePack (in addition to CBOR)
See full diff in compare view
[](https://docs.git...
Problem
When I go to the new "How it works" docs page, I expect that clicking "next" at the bottom of the page will take me linearly through each part of the "How it works". Instead it sends me to an entirely different section. I found that surprising and inconvenient
Solution
Change the "next" link at the top of "How it works" section so that it allows a linear navigation through the section's contents.
dagger project init example will provide the following information:
Project initialized in "example"! To install dagger packages, go to subfolder "example" and run "dagger project update"
This will update bottom pagination between the How It Works and Core Concepts sections.
Closes #2958
Signed-off-by: crjm
I cloned the dagger/todoapp repo, I copy/pasted the content of the workflows, and it failed with:
1:35PMINFclient.filesystem."./build".write | completed duration=200ms
1:35PMINFactions.deploy.container._exec | #19 0.364 cat: can't open '/run/secrets/token': No such file or directory
It was because I didn't set a NETLIFY_TOKEN. But it wasn't explicit about it.
We should intercept this error and make it more explicit:
a secret seems to have not been set
secret...
This will change static and hovering colors on the navbar when the viewport is small, on both light and dark modes.
Signed-off-by: crjm
Hey ๐ !
I've spent some time on the new version of our docs. That's an awesome work ๐ ๐ !! I'm sure this will help our users to find the appropriate path.
After using it, I saw minor issues + some suggestions.
Overview page
- It should be titled Overview instead of Welcome. Every other pages are titled regarding their label in the sidebar (Install Dagger, How it works...).
- The image in the overview page (Where does Dagger fit?) looks wrong comparing to the original one. Col...
Bumps sass from 1.54.4 to 1.54.5.
Release notes
Sourced from sass's releases.
Dart Sass 1.54.5
To install Sass 1.54.5, download one of the packages below and add it to your PATH, or see the Sass website for full installation instructions.
Changes
Properly consider a ~ c to be a superselector of a ~ b ~ c and a + b + c.
Properly consider b > c to be a superselector of a > b > c, and similarly for other combinators.
Properly calculate specif...
This will make Docusaurus throw an error on build when finding broken links in Markdown or components.
From #2946
Signed-off-by: crjm
This will update the files added on the redesign, to avoid over-engineering.
Signed-off-by: crjm
Signed-off-by: jffarge
Bumps github.com/moby/buildkit from 0.10.3 to 0.10.4.
Release notes
Sourced from github.com/moby/buildkit's releases.
v0.10.4
https://hub.docker.com/r/moby/buildkit
Notable changes:
Default Dockerfile frontend has been updated to v1.4.3 with fixes to handling platforms and timestamps for named image contexts. changelog
Fix cancellation error not being detected and erroneously cached #2926
Fix interactive containers not releasing resources when client doe...
What are you trying to do?
No response
Why is this important to you?
No response
How are you currently working around this?
No response
What are you trying to do?
1:32AM INFO actions.check.run._exec | #9 492.3 Can not connect to Ryuk at localhost:65170
1:32AM INFO actions.check.run._exec | #9 492.3 java.net.ConnectException: Connection refused
1:32AM INFO actions.check.run._exec | #9 492.3 at java.base/sun.nio.ch.Net.pollConnect(Native Method)
1:32AM INFO actions.check.run._exec | #9 492.3 at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:672)
1:32AM INFO actions.check.run._exec | #9 492.3 at java.base/sun....
Hi,
Is there a way to display the trace ID on the client side when OTEL_EXPORTER_JAEGER_ENDPOINT is set? That would be amazing to have something like that instead of having to compare the timestamps of your CI pipeline with your Jaeger endpoint :smile:
Thanks
Florian
Bumps google.golang.org/grpc from 1.48.0 to 1.49.0.
Release notes
Sourced from google.golang.org/grpc's releases.
Release 1.49.0
New Features
gcp/observability: add support for Environment Variable GRPC_CONFIG_OBSERVABILITY_JSON (#5525)
gcp/observability: add support for custom tags (#5565)
Behavior Changes
server: reduce log level from Warning to Info for early connection establishment errors (#5524)
Special Thanks: @โjpkrohling
Bug Fixes
client: ...
Bumps amplitude-js from 8.19.0 to 8.20.0.
Release notes
Sourced from amplitude-js's releases.
v8.20.0
8.20.0 (2022-08-24)
Features
enable the ability to overwrite the referrer (#551) (03c0a89)
Changelog
Sourced from amplitude-js's changelog.
8.20.0 (2022-08-24)
Features
enable the ability to overwrite the referrer (#551) (03c0a89)
Commits
b4187d2 chore(release): 8.20.0 [skip ci]
03c0a89 feat: enable the ability to overwrite th...
What are you trying to do?
I'd like to create a reusable dagger package to run MegaLinter
Would such PR be accepted ?
If yes, where in dagger sources could I implement it ?
Why is this important to you?
It could allow dagger users to easily integrate MegaLinter within their dagger pipelines :)
How are you currently working around this?
I could just do docker run but i'd prefer to have a reusable item :)
Let's stick to png for illustration. Even if webp has benefit and is more and more popular, we are sure that png
cover almost every browser and get the best quality. Additionally, images size for getting started were too big.
- docker-compatible-runtime: 1619 ร 772 px -> 500 x 208 px
- dagger-planning_astronaute.webp: 798 ร 592 px -> 270 ร 200 px
Signed-off-by: jffarge
Instead of using --privileged with the default buildkit container, use a rootless one which makes it safer: https://github.com/moby/buildkit/blob/master/docs/rootless.md#docker
One reason to not remove remove privileged is that our pipelines will break, as well as our users'.
This is the first step towards attempting to start addressing https://github.com/dagger/dagger/issues/151.
While this does not solve the issue, it will inform us if this is a step in the right direction an...
Docs for the jreleaser package were missing "alpha" in import statements.
Signed-off-by: Andres Almiray
What are you trying to do?
Disclaimer: Since these proposals require code changes I did not file them as a "documentation" issue.
Background
Weeks ago, I decided to learn more about dagger and began exploring its documentation. Everything was fine until I got a little bit of difficulty when I tried to read the diagram under the Transfer of #FS via docker.#Copy section due to its size, which is wider tha...
What is the issue?
Using regexp.ReplaceAll is not working.
Log output
invalid interpolation: cannot call non-function regexp.ReplaceAll (type _|_)
Steps to reproduce
package main
import (
"regexp"
"dagger.io/dagger"
"universe.dagger.io/bash"
)
dagger.#Plan & {
actions: test: {
src: "# Something ---!"
regex: "# Something"
replaceStr: "# Updated!"
result: regexp.ReplaceAll(regex, src, replaceStr)
run: bash.#RunSimple...
Bumps github.com/rs/zerolog from 1.27.0 to 1.28.0.
Commits
d894f12 pass program counter to CallerMarshalFunc (#457)
4099072 Support extra arbitrary data at the end of console log (#416)
4c85986 Unixnano time format support (#454)
43be301 Bump actions/cache from 3.0.1 to 3.0.5 (#453)
afdf997 Revert "remove fields written into "PartsOrder" (#383)"
14d6629 hlog: adds ProtoHandler (#396)
dbdec88 Use everywhere InterfaceMarshalFunc (#414)
b307...
Dagger Cloud run URL
Can't visit Dagger Cloud
What happened? What did you expect to happen?
When I try the nodejs yarn example, I got some errors because we should use the mirror site for yarn registry in our area.
But I don't know how to config it globally.
Besides yarn, the other package management tools also need to config the mirror site url, such as pip, npm, maven, go etc. Could you give some example files for there configuration? Thanks.
root@acmcoder:/opt/examp...
Bumps sass from 1.54.5 to 1.54.6.
Release notes
Sourced from sass's releases.
Dart Sass 1.54.6
To install Sass 1.54.6, download one of the packages below and add it to your PATH, or see the Sass website for full installation instructions.
Changes
Fix a bug where a @media query could be incorrectly omitted from a stylesheet if it had multiple levels of nested @media queries within it and the inner queries were mergeable but the outer query was not.
See ...
Ansible deployment to a Virtual Machine or network devices would be cool including ansible-lint and molecule role tests.
What are you trying to do?
It would be nice to be able to have an action to fetch secrets from azure vault.
Why is this important to you?
Itcould be used on other steps where sensitive data is required.
How are you currently working around this?
Using a custom action.
Signed-off-by: Nico Braun
resolves: #2986
Add
- Curl based action to fetch secrets from azure vault
Fix
- azure auth base script scope and resource args
Bumps sass from 1.54.5 to 1.54.7.
Release notes
Sourced from sass's releases.
Dart Sass 1.54.7
To install Sass 1.54.7, download one of the packages below and add it to your PATH, or see the Sass website for full installation instructions.
Changes
Add support for 32-bit ARM releases on Linux.
See the full changelog for changes in earlier releases.
Dart Sass 1.54.6
To install Sass 1.54.6, download one of the packages below and add it to your PATH, or see...
What is the issue?
Following the tutorial, I clone the project and run dagger project update successfully. However I got FATAL error, when I run dagger do build.
dagger version: dagger 0.2.32 (624e5bb94) darwin/arm64
OS version: macOS 12.5.1
Docker Desktop version: 4.1.1 (Apple Chip)
On WSL Ubuntu 20.04, I could not reproduce the issue.
Log output
$ dagger do build
[โ] actions.build.container ...
What is the issue?
I have the following docker.#Copy:
docker.#Copy & {
contents: app
dest: "/app"
exclude: [
".gradle/",
".idea/"
]
}
Log output
`failed to execute plan: task failed: actions.build._build._dag."1"._copy: failed to copy file info: failed to chown /var/lib/buildkit/runc-overlayfs/cachemounts/buildkit3698781898/app/.gradle/7.4.2/checksums: lchown /var/lib/buildkit/runc-overlayfs/cachemounts/buildkit3698781898/app/.gradle/7.4.2...
Bumps @docusaurus/preset-classic from 2.0.1 to 2.1.0.
Release notes
Sourced from @โdocusaurus/preset-classic's releases.
2.1.0 (2022-09-01)
:rocket: New Feature
docusaurus-theme-classic, docusaurus-theme-common
#8008 feat(theme): ability to use <DocCardList> without items prop, on any doc page (@โslorber)
docusaurus-plugin-content-docs, docusaurus-theme-classic
#7963 feat(docs): allow to config...
Bumps sass from 1.54.7 to 1.54.8.
Release notes
Sourced from sass's releases.
Dart Sass 1.54.8
To install Sass 1.54.8, download one of the packages below and add it to your PATH, or see the Sass website for full installation instructions.
Changes
No user-visible changes.
See the full changelog for changes in earlier releases.
Changelog
Sourced from sass's changelog.
1.54.8
No user-visible changes.
Commits
5393754 Cut a release (#1793)
See ful...
Bumps amplitude-js from 8.20.0 to 8.20.1.
Release notes
Sourced from amplitude-js's releases.
v8.20.1
8.20.1 (2022-09-01)
Bug Fixes
upgrade @โamplitude/utils version (#553) (aa63d57)
Changelog
Sourced from amplitude-js's changelog.
8.20.1 (2022-09-01)
Bug Fixes
upgrade @โamplitude/utils version (#553) (aa63d57)
Commits
35e2dd3 chore(release): 8.20.1 [skip ci]
aa63d57 fix: upgrade @โamplitude/utils version (#553)
See full diff ...
Bumps @docusaurus/core from 2.0.1 to 2.1.0.
Release notes
Sourced from @โdocusaurus/core's releases.
2.1.0 (2022-09-01)
:rocket: New Feature
docusaurus-theme-classic, docusaurus-theme-common
#8008 feat(theme): ability to use <DocCardList> without items prop, on any doc page (@โslorber)
docusaurus-plugin-content-docs, docusaurus-theme-classic
#7963 feat(docs): allow to configure noIndex per doc version (@โslor...
As per discussed in #2981
The medium-zoom plugin could improve the user experience when reading diagrams that are wider than the page layout.
I was running dagger do test a few times and have hit the 429 Too Many Requests error:
I have confirmed that Docker Desktop is logged in via:
curl --head -H "Authorization: Bearer $TOKEN" https://registry-1.docker.io/v2/ratelimitpreview/test/manifests/latest
- FYI https://docs.docker.com/docker-hub/download-rate-limit/#how-can-i-check-my-current-rate
- FYI 2 https://docs.gitlab.com/ee/user/packages/container_registry/#authenticate-by-using-gitlab-cicd
Docker l...
Hmm good catch. I don't think there's much we can do here but to pass the registry credentials to the buildkit builder. A workaround that I can come up with in the meantime is creating the builder manually through docker run and pass a buildkit config with the corresponding registry access.
I wouldn't make any changes to the dagger code since it's very likely that we'll change it soon when working on cloak's embedded engine.
(:wave:)
Docker login is obviously not helpful, since the images are pulled by BuildKit, not Docker.
It's possible to load the Docker auth config from ~/.docker/config.json (client-side) and pass it to Buildkit via buildkit/client.SolveOpt.Session if we want this to magically work.
Some pseudocode:
import (
dockerconfig "github.com/docker/cli/cli/config"
kitdclient "github.com/moby/buildkit/client"
"github.com/moby/buildkit/session/auth/authprovider"
)
func ...
(:wave:)
Hey vito! good to see you here!
But it's nice that we can pass it along on a per-request basis rather than configuring it Buildkit-side. :)
definitely! it's nice to have a fine-grained way to pass this into the specific session. I guess coming up with the proper API / UX to configure it will be the "difficult" thing to do now. Do I sense a dagger.json conf coming?
Hey vito! good to see you here!
Thanks, happy to be here! :smile:
I guess coming up with the proper API / UX to configure it will be the "difficult" thing to do now. Do I sense a dagger.json conf coming?
Yup, that's what I'm thinking.
Another way to look at this could be integrating it with secret management. It looks like the docs already cover how to configure credentials for pulling images, which I presume uses something li...
Bumps github.com/spf13/viper from 1.12.0 to 1.13.0.
Release notes
Sourced from github.com/spf13/viper's releases.
v1.13.0
Important: This is the last release supporting Go 1.15.
What's Changed
Exciting New Features ๐
Add etcd3 to supported remote providers by @โfranklinkim in spf13/viper#1371
Enhancements ๐
Fix go-staticcheck failures (ST1005) by @โmjmaisey in spf13/viper#1373
Use jsonc in markdown codeblocks for better readability by @โHurSungYun in spf...
Bumps github.com/google/go-cmp from 0.5.8 to 0.5.9.
Release notes
Sourced from github.com/google/go-cmp's releases.
v0.5.9
Reporter changes:
(#299) Adjust heuristic for line-based versus byte-based diffing
(#306) Use value.TypeString in PathStep.String
Code cleanup changes:
(#297) Use reflect.Value.IsZero
(#304) Format with Go 1.19 formatter
(#300 )Fix typo in Result documentation
(#302) Pre-declare global type variables
(#309) Run tests on Go 1.19
...
Bumps amplitude-js from 8.20.1 to 8.21.0.
Release notes
Sourced from amplitude-js's releases.
v8.21.0
8.21.0 (2022-09-08)
Features
add ingestion_metadata field (#552) (14c590c)
Changelog
Sourced from amplitude-js's changelog.
8.21.0 (2022-09-08)
Features
add ingestion_metadata field (#552) (14c590c)
Commits
a590de7 chore(release): 8.21.0 [skip ci]
14c590c feat: add ingestion_metadata field (#552)
See full diff in compare view
...
Bumps sass from 1.54.8 to 1.54.9.
Release notes
Sourced from sass's releases.
Dart Sass 1.54.9
To install Sass 1.54.9, download one of the packages below and add it to your PATH, or see the Sass website for full installation instructions.
Changes
Fix an incorrect span in certain @media query deprecation warnings.
See the full changelog for changes in earlier releases.
Changelog
Sourced from sass's changelog.
1.54.9
Fix an incorrect span in certain...
Move core.#Pull's env var logic to registryauth.go's AddCredentials function.
Useful for:
- Easy Docker Hub registry
429 Too Many Requestsmanagement. Discussion #2997 - Enables user to easily push cache layers to Dockerhub registry
Context: some users have been facing 429 requests + users have been unable to push permanent cache layers to registries.
There is no easy way to pass the registry's info to Buildkit. This PR extends the env var retrieval logic from just `...
Hi, here is a PR that could be a temporary solution to that: https://github.com/dagger/dagger/pull/3002
Signed-off-by: Marcos Lilljedahl
What are you trying to do?
Add go vuln check to CI pipeline
Why is this important to you?
No response
How are you currently working around this?
No response
Docker build and push to container repository would be cool to have as an example
thx @rough birch 
[dagger/dagger] Issue opened: #3006 ๐ \`\-\-cache\-to\` to private registry authentication errors
What is the issue?
I want to export the build cache to a private gitlab container registry.
Looking into the buildkit documentation they seem to use the default ~/.docker/config.json files generated after running docker login to authenticate.
I tried creating a customized buildkit container that had the docker credential files mounted at /root/.docker/config.json
Using cache export using buildctl inside this container works fine.
buildctl build --frontend=dockerfile.v0...
I'd love to see CodeFresh support! I'm also curious if there's any documentation around how to contribute CI adapters ourselves.
What are you trying to do?
Using Dagger with Azure Pipelines. The documentation has a helpful example for Azure Pipelines. It starts with a script to install dagger:
- script: |
cd /usr/local
curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=$(DAGGER_VERSION) sh
displayName: Install Dagger $(DAGGER_VERSION)
then there is a different approach for Windows agents.
Azure Pipelines has the concept of 'tool installer' tasks that help to accompl...
What is the issue?
I was trying to modify packages installed inside universe go.#Image and override go.#Container image. By accident, I picked the local variable _img which conflicts with the internals of go.#Container. From what I tested in CUE Playground https://cuelang.org/play/?id=VTfqP3w-QJ3#cue@export@cue this should produce the error something like conflicting values x and y, which would probably be a bit more helpful. I assume that the presented playground problem is ex...
- fix .gitignore
- router: ability to handle custom routes
- core: add support for start with ttys over websocket
- cloak cli: attach support
- debugger extension
- service: expose a blocking exitCode field
This merge request removes usage of the deprecated field package from universe/go.
The package field is removed, besides in the tests to keep backward compatibility in check.
it would be great if we could have a diagram of Dagger today vs Dagger tomorrow. I think this will significantly help our new and current users. This will help a lot when we do our demos for the pilots too.
@Camille-Elairin is OOO until August 8th. If you give me a rough sketch, I can make one decent enough for the pilot convos.
I know this example isn't related, but the concept of the visual is what I am thinking about:

- We don't want that when we are formatting paths that refer to filesystems running inside a container (always linux, at least for t...
If you make a mistake in your core schema string, such as referencing a type that hasn't been defined yet, there is often not an actual error returned by the graphql-go-tools lib on this line: https://github.com/dagger/cloak/blob/63498e583021b15c2352574a8a7952221e1346a8/router/compile.go#L34
Instead, it just returns an executable schema where all types are missing, including basics like String, which then results in completely incomprehensible errors later like
Error: failed to s...
A very common reoccurring question is why we are using graphql in a space that it's not normally associated with. Documenting this will help users understand our design better and alleviate understandable initial skepticism
If docker isn't running and tries to spin up the automatic buildkitd, cloak just says exit status 1. We should be able to check this situation and give a better error.
Overview
Currently the cloak prototype is configured by a project file called cloak.yaml.
We propose replacing this file with dagger.gql. The file would be functionally equivalent, but with 3 important differences:
- It avoids encoding a temporary project codename into user's repositories. This assumes "cloak" is simply a future release of Dagger, like Europa was for Dagger 0.2.
- It uses the GrapqhQL query language instead of YAML. Since Cloak is decidedly a GraphQL-centri...
If two extensions have objects with the same name (e.g. they both declare type SiteURLs) then those types can clash in the graphql schema. This will be partially alleviated with presenting each extensions its own schema, but not entirely. In the past we've discussed a few possible solutions to this:
- Don't do anything, just tell users they should use unique names.
- Implement some form of automatic prefacing, probably with support for overri...
A user expressed the need to see how to integrate multiple makefiles and dockerfiles.
We should provide an example or documentation on how to do this.
If go.mod is missing for a go extension, then go generate will create the gen dir successfully but just skip making the generated go code. This should instead be an error case.
Can CSS or a mermaid plugin config change make this better?
Look at the cloak introduction page. Notice the whitespace around the diagrams. Why so much? Almost seems to increase as more diagrams rendered down the page.
@slumbering @crjm
Due to the fact that this repo is private and we haven't published to npm yet, we actually have to commit the built dist/ dir here: https://github.com/dagger/cloak/tree/main/sdk/nodejs/dagger/dist
Otherwise external repos like todoapp that have a dependency on us (i.e. here) won't be able to import any code.
The problem is that it's really easy to forget to re-run yarn build and u...
The Typescript SDK depends on the cloak engine executable. It should bundle its own version instead of requiring users to install it on their own. This is supported by npm.
I'm trying to step through the getting started guide and it looks like the volume mount logic is tripping up on Windows paths.
PS > .\cloak.exe -p "examples/alpine/cloak.yaml" do @"
{
alpine{
build(pkgs:["curl"]) {
exec(input: {args:["curl", "https://dagger.io"]}) {
stdout(lines: 1)
}
}
}
}
"@
`Error: failed to solve: input:5: cor...
A while back we had a util that dropped you into an shell with an arbitrary buildkit FS mounted, core of the implementation here: https://github.com/dagger/cloak/blob/561153a1f499948f9593fedf6a8b8603e1939d57/engine/engine.go#L126-L142
This was extremely useful at the time for debugging. Without it, you usually have to submit execops that operate essentially as println debug statements.
We should re-add this util. To start very simple, we can just support the ability to drop into a shell...
Right now if an exec fails the graphql error just says that it exited non-zero. This makes it hard to debug unless you go look at the buildkit progress output.
We should instead include the output of the execop in the graphql error to help debugging. The implementation is not incredibly straightforward. Buildkit has the ability to obtain the FS of a failed exec op (including changes made during the command): https://github.com/moby/buildkit/blob/c9a0f4d2de095591e742d7f411d9ed36a03a1c4e/cli...
https://github.com/dagger/cloak/pull/110#issuecomment-1235420141
Just to be aware: there's a flaw in dagger's buildkitd code; it adds start latency. That's because no matter what, it will docker inspect buildkitd and check if it's running the correct version (same as the vendored one). IIRC it'll add about half a second or so of extra start time to cloak.
I think it's probably fine to leave it so but we should log an issue
A possible workaround which we can do later would be, since we're...
Our loggers are currently fmt and panic. Dagger uses zerolog, so unless we have reason to not want to use it again (cc @aluzzardi), we should configure it in cloak too. At the very minimum it would be nice to start writing informational+debug logs.
Implement new Directory and File types to make the core API more complete and graphql-ey.
Design proposal and discussion: https://github.com/dagger/cloak/pull/163
npm init can be used to set up a new or existing npm package.
The init will ask you a bunch of questions, and then write a package.json for you.
Cloak can work the same way. The generate command can ask you some questions and generates everything for you.
Right now if cloak.yaml is a symlink that points out-of-tree (of the workdir), things will fail, most likely in a confusing way. This is true when specified explicitly by the user and when the default "findup" behavior is activated: https://github.com/dagger/cloak/blob/2894044664e76873c14b70e2197b35fb045548b6/engine/engine.go#L382
That will get us env var support for specifying flags out of the box: https://github.com/dagger/cloak/blob/2894044664e76873c14b70e2197b35fb045548b6/engine/engine.go#L88
Right now when the engine shutsdown it's easy for some remaining logs to get dropped. Hence this silly sleep hack in the nodejs engine wrapper: https://github.com/dagger/cloak/blob/2894044664e76873c14b70e2197b35fb045548b6/sdk/nodejs/dagger/engine.ts#L66-L69
Should be able to flush them when SIGTERM is received before shutdown.
There's some silly hardcoding in the Go sdk that enables the dagger/cloak repo to be pulled during builds: https://github.com/dagger/cloak/blob/2894044664e76873c14b70e2197b35fb045548b6/project/sdk.go#L33
This should be generalized into a way for configuring any private repos a user may have a dependency on in their go.mod.
I considered adding an arg to exec input that would mount in a known_hosts (and setup an env var to point to it) but this felt incredibly, overly specific to this exact use case and the right API wasn't totally obvious.
It would be nice to find a general solution to this problem. One random idea is if it could be modeled as an Exec extension (i.e. you import an extension that all...
Our ts sdk isn't actually specific to typescript AFAICT. I think its main assumptions are that you are using a node module and that you are using yarn.
It might make more sense for it to be a nodejs SDK, with configuration fields for whether yarn, npm, or whatever is used (or possibly autodetection based on lockfile if robust enough).
A slight variation would be to have separate yarn and npm sdks. They might share some common code, but that's fine if this ends up being a cleaner r...
Services:
- Run asynchronously (can be started and stopped)
- Aren't cached in their execution
- Can expose sockets (and similar concepts like TTYs).
One classic use case is an e2e test that needs to run against a live database. Also may include use cases like hot-reloading web dev servers, interactive containers hooked up to a user's terminal, etc.
This is a pretty broad issue, should be broken down into subtasks.
The autogenerated clients in go are just barely okay, but suffer from a number of problems:
- Chaining can't be used from them, you can only generate them from pre-declared operations
- The fields on the outputs are extremely hard to navigate. Even if the query only selects one field, you have to navigate a whole tree of objects leading to that field.
@aluzzardi started experimenting briefly a while back w/ a client that operated sort of like a "query builder", which let you chain and ...
From the DX perspective, waiting for all the extensions to be built when running cloak dev the first time might be not ideal, specifically since building all of them might not be required as it depends on the workflow that the user decides to execute.
I've brought up this idea to @sipsma and he mentioned that it should be straightforward to allow this as well as still keeping the "build at startup" time through a flag since it generally helps when developing extensions.
Right now you have to point to the actual cloak.yaml file when using the -p flag or adding a dependency in a yaml file, which is kind of annoying and creates more opportunities for typos like .yml vs .yaml.
You should instead be able to point to a directory, in which case it's assumed you mean the file cloak.yaml in that directory. You should still be able to provide a full path to the actual file too (in case you want to use a name besides cloak.yaml).
When running API queries, it's very common to receive error messages that contain extremely large base64-encoded values. These values correspond to filesystem "IDs" which in reality are base64-encoded LLB instructions. This is a temporary implementation, which @sipsma and @aluzzardi can explain better than me. In the meantime, though, the sheer size of these IDs make error messages difficult to consume by a human, which in turn makes the DX less pleasant. As we learned from Dagger 0.2, develo...
We need to figure out secrets for extensions since the to-do app requires a secret.
We have different users (Netlify owner, author of to-do app and user of to-do app), so we need to clarify who owns the secret management and what the flow is. For example, one way we can do this is to hard code the token as mentioned by Erik.
We should keep in mind the experience of the web developer.
We should be able to answer how we use GraphQL to GraphQL experts and let them know where we differentiate.
For example, dagger/cloak#50 and dagger/cloak#49
"it's not intuitive what requires a input field and what doesn't " - @shykes
Currently the setup instructions start with "make sure dagger-buildkit is running". We should remove this dependency on an external buildkit daemon, by embedding buildkit into the cloak binary.
@jpadams was wondering if there's a way to automate the setup of the environment we demo in, which will become especially helpful w/ demo v2 where you need to have node/go/etc. setup to show off workflows.
It's a bit meta, but it should be entirely possible for this demo environment to be defined with cloak and run directly in cloak. It has been lost to the sands of time (that is, a few weeks ago) but I had a util function previously that used Buildkit's NewContainer API to drop into a s...
We need to provide a way to run Dagger 0.2 plans, written in CUE, on cloak. Let's call this compatibility layer "Dagger Classic".
Goals:
- A way to run existing CUE plans without modifications
Non-goals:
- A way to write Cloak extensions in CUE
- Porting individual CUE packages to Cloak extensions
- Bindings to call any Cloak extension from CUE
User extensions should be able to add fields to Filesystem (and in general, any other types). E.g. this could enable something like
{
core {
git(remote:"github.com/foo/bar") {
yarn(script:"build") {
...
}
}
}
}
Basically, chains become even more powerful.
Based on a quick test this actually appears to work as of today with the exception that codegen for go doesn't generate methods for implementing the filesystem subfield resolvers. B...
Questions to be answered:
- How is cached configuration specified? Is it builtin to the core api, something that clients configure? Can it be configured through other actions (extensions)? Can runtimes declare cache sources themselves in addition to clients?
- Can/How do you configure "global" cache imports/exports for action execution (as in, cache that applies to the action being invoked and every transitive dependency)
- Can/How do you per-action cache imports/exports (as in, cache c...
A few questions to be answered:
- Can/How do you supply a non-default platform for action execution?
- Can/How do you supply multiple platforms for action execution?
We should have an SDK that supports at least authoring workflows (and possibly extensions too) w/ bash scripts.
It would be great if it turned out that this just meant using the same cloak CLI that you use already (possibly with some tweaks), but that's not a hard requirement necessarily.
Right now any env vars (like PATH) or other configuration provided as part of an image config w/ the FS for a package don't get set when invoking the action, resulting in hacks like this: https://github.com/dagger/cloak/blob/e60aede62917e4e2711cca499d019c857f0b14ed/examples/netlify/ts/index.ts#L17-L17
This lets you drop into a shell directly to a container in buildkit from an FS output by an action. Very useful for debugging, understanding cloak better, demoing, and many many other interesting possibilities.
The shell util already exists, it just can only be called from an embedded client right now: https://github.com/dagger/cloak/blob/e60aede62917e4e2711cca499d019c857f0b14ed/engine/engine.go#L217
If an action implementation does not change, but one of its dependencies does, we need to decide on what the behavior should be. Possibilities are
- The action's cache should be invalidated and it should re-run.
- This makes sense in many cases; i.e. you update
alpineand thereforeyarn(which usesalpineto run the yarn cli) should re-run.
- This makes sense in many cases; i.e. you update
- The action's cache is not invalidated; it doesn't re-run until its inputs or implementation changes
- This might be desireable in so...
Right now when an action fails, it writes the error to stdout and exits with code 1. A few improvments needed:
- [ ] The progress output is extremely hard to read, there are buildkit errors mixed in with the action stdout w/ the error.
- [ ] There's no way for errors to be returned to invokers and handled. Actions exiting non-zero just results in the whole build to end
I have not tested this yet, but we need to ensure that our implementation handles a few related cases:
- If an action is invoked with an optional arg unset, that should be cached the same as if it was invoked with the arg explicitly set to a "zero-value" (like
"") - If an action is invoked with an unset arg that has a default value in the graphql schema, that should be cached the same as if it was invoked with the arg explicitly set to the same default value
This can be achieved by h...
Right now there's just a global schema in cloak that gets presented to all the actions. The goal is for this to instead be per-action: the schema an action sees should consist of just its own direct dependencies. A few reasons this is desirable:
- The cloak server can handle more than one client at a time
- Less situations in which namespace conflicts arise; easier to add support for dealing with that
- Actions that rely on different implementations of the same schema can coexist in the...
There are use cases that call for always running a certain action. Examples include an action that checks to see if a remote resource has drifted from the last known cached state, in which case other actions may need to run in order to correct it.
This requires being able to specify that an action should always run. A few open questions:
- Who configures this: the action author? the action invoker? both?
- Do we use buildkit's
IgnoreCachemetadata to implement this (and accept the ba...
Any input to an action which is a Filesystem is automatically mounted into the action's execop, which enables lots of compelling use cases such using netlify third-party libs to directly upload contents provided as an input (here).
The current implementation is a bit hacky, needs some improvements:
- [ ] should be an easy way to programmatically get the mount point of a...
Right now if you author an action but then change your schema or update one of your dependencies' schema, it's a huge headache to generate code and then go plug your implementation from before back in. This should be better (in all supported languages).
The way this is approached in gqlgen's "per-schema" resolvergen may be one source of inspiration on how to tackle this: https://github.com/99designs/gqlgen/blob/0d91c893e285cc14330c80643b663cd2bebeb911/plugin/resolvergen/resolver.go#L90
There's currently at least 3 configuration files users need to create when authoring actions:
schema.graphqlcloak.yamloperations.graphql- this will become optional with https://github.com/dagger/cloak/issues/29
One idea is to merge cloak.yaml into schema.graphql by allowing the specification of dependencies via graphql directives on the query type. This needs more exploration and thought though. The overall goal is just to reduce boilerplate and the cognitive c...
- [ ] the returned objects have a complicated, unobvious structure (example)
- [ ] chaining isn't possible from the stubs, they are just based on the operations.graphql provided by the dependency
Highly related to the corresponding go issue, could be tackled together possibly: https://github.com/dagger/cloak/issues/26
TS authors still have to write implementation from scratch based on their schema. We should support generating the implementation skeleton similar to the go dx today.
Can add support for --sdk=ts to cloak generate as part of this.
- [ ] the returned objects have a complicated, unobvious structure (example)
- [ ] chaining isn't possible from the stubs, they are just based on the
operations.graphqlprovided by the dependency
Highly related to the corresponding ts issue, could be tackled together possibly: https://github.com/dagger/dagger/issues/3077
Right now when authoring actions it's assumed that all the ones in the current package are written in the same language.
There are many realistic scenarios in which users may want to write actions in several different languages. E.g. they start by adding some light automation in a scripting language, but then later need something more complicated for which Go is a better match. They shouldn't have to go rewrite all their simple automation scripts just because they need something more compl...
Right now, there are common use cases that call for running a chain of execs that have multiple mounts in static locations. For example, in yarn we want to run a series of yarn commands with the base image plus source code mounted at /src.
Right now, because you can only obtain one mount at a time, you can't really use chaining very well. This could be fixed by adding a resolver to Exec that obtains a type like Filesystems (note the plural), which has the same interface as `Filesys...
Right now you can't provide a list of strings using the --set flag to cloak, it doesn't get parsed correctly. It really only works for simple string input types at the moment. We need to use introspection to know what type to anticipate and enable the correct parsing.
This will also setup more nice potential features like possibly not having to explicitly provide --local-dir (instead it can just be inferred that the string you provide is path, maybe...)
We currently pass around the json serialization of LLB (wrapped w/ b64 to avoid confusion) as the FS type (or the ID of the new Filesystem type that will be replacing FS).
The problem is that this string can already grow to be quite large in simple cases (such as those involving dockerfiles). Once we have to deal with more complex cases, it may become too large and cause genuine performance problems in addition to unreadable output.
We probably need to switch to storing the fu...
We are currently using graphql-go for our server in cloak because it is a mostly functioning implementation that supports dynamic loading of schemas (as opposed to gqlgen which is a high-quality implementation that doesn't support dynamic loading of schemas).
However, we have found a few bugs already with graphql-go:
- aliases don't get resolved in parallel
- introspection results are not sorted, change order every query
More may easily be lurking. While it is maintained to so...
The current process of creating a new action is far too complicated: https://github.com/dagger/cloak#creating-a-new-go-package.
Goal: users start with an empty directory, fill in dagger.yaml/schema.graphql, run cloak generate --sdk and then end up with a directory where they just need to fill in some functions to implement their actions.
One hard part will be how to handle not overwriting existing code in the case where the user does the above and later changes dagger.yaml/`sch...
Right now cloak assumes that the dagger-buildkitd docker container created by dagger is running, which is an odd dependency. Should just copy-paste the code from dagger to here and setup cloak-buildkitd or something.
there isn't an easy way to see all of the extensions in one place atm as @ringods pointed out.
I was going to create a list, but realized that we might need @jpadams 's thoughts on how and when we add extensions to a list. Can we re-use any of this content for an extensions readme for Cloak repo?
-execResp, err := core.Exec(ctx, curled.Core.Filesystem.ID, core.ExecInput{
+execResp, err := core.Exec(ctx, curled.Core.Filesystem.Exec.Fs.ID, core.ExecInput{
Create a bad DX regarding what is the issue.
Here is a repro for this use case. I'm using the extension generated Go code as a simple Go app, without it being called as an extension.
https://github.com/dolanor/cloak-err-repro
simply run it
go run .
and it should fail the same.
panic: failed to solve: in final: input:5: core.filesystem.exec failed to unmarshal result: unexpected end of JSON input:
https://github.com/dolanor/cloak-err-repro/blob/main/generated.go#L62-L64
I'm trying to use my fork for the nodejs sdk like this:
"devDependencies": {
"@dagger.io/dagger": "git+ssh://git@github.com:slumbering/cloak.git#demov2-sdk-jf"
}
I get the following error:
dagger/dagger#3064 /_shim yarn install
dagger/dagger#3064 0.274 yarn install v1.22.17
dagger/dagger#3064 0.348 [1/4] Resolving packages...
dagger/dagger#3064 0.722 [2/4] Fetching packages...
dagger/dagger#3064 16.91 info Visit https://yarnpkg.com/en/docs/cli/install f...
https://github.com/dagger/cloak/blob/7ad211cc43862184c1af9af18464a98ab1850f0e/router/router.go#L93
Currently the API is being served at / and then we have some logic to redirect traffic to GraphiQL or the API depending on content type.
This is hackish and limiting (we won't be able to add other HTTP endpoints or versioning since / is taken). It won't be possible to change later since the SDKs point to /.
I suggest we serve the API under /query which is pretty standard.
We only have localdir export at the moment. Image export would also be fairly easy to add support for.
When crafting queries in the sandbox, it's common to reference FSIDs produced in other queries. Right now the options are 1) write "foobar" fake IDs which will trigger an error, or 2) manually copy-paste IDs between queries.
It would be nice to have an option 3: write "scratch" to produce a valid empty ("scratch") directory. This would make prototyping queries much nicer.
Related: dagger/dagger#3047
When I was trying to generate extension implementation stubs inside the separate todoapp repo, which had a go.mod+vendor/ dir at the time, gqlgen would consistently get this error:
reloading module info
Error: failed to solve: error generating code: modelgen: unable to find type: github.com/99designs/gqlgen/graphql.String
When I removed the vendor dir, the error went away.
Seems there may be a fix, but it's a lot to ask of our users, need to either automate it, fin...
cloak generate is still a remnant of early days right now in that it's code that just directly executes on the host. The goal is for it to run containerized, in an extension; idea being that you import your local dir, generation runs on it, the updated FS is spit back out to your local dir.
Now that support for both local import+exports exist it's time to make this switch.
Two approaches:
- Monorepo - we keep it in cloak. This may mean we need to move its package.json to the root of the repo (not sure though, this is a requirement when specifying a dep on it using
git+ssh, but maybe its not needed if we move to usenpm publish) - Own-repo - we move it to something like
dagger/cloak-nodejs-sdk
cc @slumbering @crjm
Sometimes, but not always, when running yarn upgrade dagger, trying to build your code afterwards will result in this error:
/home/sipsma/repo/github.com/sipsma/cloak/examples/todoapp/app/node_modules/@dagger.io/dagger/node_modules/cross-spawn/lib/util/resolveCommand.js:5
const getPathKey = require('path-key');
^
Error [ERR_REQUIRE_ESM]: require() of ES Module /home/sipsma/repo/github.com/sipsma/cloak/examples/todoapp/app/node_modules/@dagger.io/dagger/node_mod...
cc @slumbering @crjm
Need tsconfig.json and package.json to have settings that result in max compat for anyone else importing (esm vs cjs, target node version, etc.)
There should be a way to mount cache directories when executing a command in a container.
There should be a way to set environment variables when executing a process in a container.
type ExecInput {
# Env variables encoded as standard "KEY=VALUE" strings
env [String!]
}
When executing a command in a container, cloak inserts an entrypoint called _shim. This fact should be hidden from users, but it leaks through in error messages. For example this query:
{
core {
image(ref: "alpine") {
exec(input: {
args: ["/bin/ls", "does-not-exist"]
}) {
id
}
}
}
}
Returns this result:
{
"data": null,
"errors": [
{
"message": "process \"/_shim /bin/ls does-not-exist\" did not complete successfully: ...
This is a documentation low-hanging fruit.
Currently the docs piggyback on dagger docs by saying "make sure dagger-buildkit is installed". This should be replaced with standalone instructions for setting up buildkit (possibly copy-pasted from dagger docs) so that a cloak beginner can get started without requiring that they get started with dagger 0.2 first.
Problem
The cloak DX is currently very rough. One particularly rough area is the client stub generation, because it causes duplication of effort. For each action implemented in Go or Typescript, the developer must write 2 different but redundant graphql schemas: one for the server-side implementation (new field and its parameters), one for the client-side implementation (new query with same parameters).
For example see the netlify go extension:
Server-side (schema.graphql):
`...
We should specify a runnable format for an individual action. This is slightly different than a format for a package/extension because the latter may include multiple actions, whereas the former only includes one.
This ABI gives us more flexibility, as an extension format may be composed on top of the action format. For example an extension may:
- contain a static catalog of actions
- contain special actions meant to be called by the engine as hooks, rather than by the end user
*...
@jpadams mentioned that this can be confusing during the demo
We have a few old examples of the embedded use case, but they haven't been updated in a while and are ugly. Should quickly clean one up so we can comfortably point to it when asked about this use case.
In the current demo (v1), invoking an action from the CLI works like this:
cloak query --op FOO
This is not intuitive. The following syntax would be more intruitive:
cloak do FOO
Right now we build actions using Dockerfiles and require that each implementation include one. This was just a short-term convenience though and is unpleasant boilerplate for action authors.
Some possible fixes, in approx order of effort
- Very-short term: just auto-generate the Dockerfile for action authors (as part of
cloak generate). At least they don't have to write it then - Medium-short term: Add higher-level resolvers to
corethat implement support forgoandtsactions; t...
Right now you either use the cloak CLI or can call cloak from Go code. You should be able to call cloak from other languages like TS too.
This will require some re-architecting (as right now the cloak server literally runs in the process calling cloak).
TODO(sipsma) link to architecture diagrams once available, will clarify this more
Most of the time, operations.graphql is just boilerplate that could be derived from schema.graphql, so it should be autogenerated rather than written by the user.
We should still support additional custom operations if the author wants to provide them (i.e. some "artisanal" operations handwritten to simplify otherwise complex queries), but that should be optional.
All this code is autogenerated, ugly and confusing, should be in a different file from the stubs the user has to implement: https://github.com/dagger/cloak/blob/e60aede62917e4e2711cca499d019c857f0b14ed/examples/todoapp/go/main.go#L62-L106
- [x] remove local field or put it in a config file that we donโt show
- [x] Dagger.yaml should be cloak.yaml since it makes it clearer that this is a POC
- [x] Dockerfile field also causes more questions, so try to hide. Preference would be that we show the file, but just remove docker file and local files would be great. Maybe rename to source or directory?
- [x] Would still like to specify the directory if possible, but it is just the name of โDocker fileโ that causes confusion
- [...
To-do list to make new demo flow happen:
*In priority order, not demo flow order
- [ ] P1 dependencies can be loaded from "fake universe", actually a configurable local directory
- [ ] P1: Support embedding in typescript SDK
- [ ] P2: make package.json optional and make tsconfig.json optional
New Demo Flow based on working session with @shykes and @mircubed:
It can be found in this [file](https://github.com/dagger/cloak/blob/main/demos/v2/demo-v2.md
__________________...
The current caching behavior around resolvers is ill-defined and surprising in certain cases.
Ideal goal (IMO): resolver results should be cached based purely on the inputs to the resolver. In other words, running the same resolver with the same inputs should result in execution being de-duplicated.
Places where we currently diverge:
- Changing the selection set of a resolver results in the resolver running again.
- Changing the args of a subresolver results in any ancestor resolver...
https://github.com/wundergraph/graphql-go-tools is a Go implementation of an apollo federation router. Federation is an existing framework that enables multiple graphql servers to be stitched together behind one unified gateway, which takes care of routing each resolver request to the correct backend "subgraph".
This is one potential route to solving the problem of how to resolve chainable core types like Filesystem when returned by non-core user packages. Early prototype here: https...
Signed-off-by: Erik Sipsma
(still just testing migration)
Signed-off-by: Erik Sipsma
Signed-off-by: Solomon Hykes
dagger.io/dagger/core
#Exec#Source#Mkdir#ReadFile#WriteFile#Copy#Rm#Merge#Diff#Subdir#GitPull#HTTPFetch#Push#Pull#Dockerfile#Export#DecodeSecret#NewSecret#TrimSecret#Start#Stop#SendSignal
#Exec
Most of the things we call cloak should really be called dagger (e.g. the binary)
This PR adds support for services, specifically:
- Creating services (asynchronous containers)
- Service control (listing, retrieving, stopping, ...)
- tty streaming over WebSocket with CLI support (
cloak attach) - Experimental
debuggerextension
TODO:
- Improve error handling in the WebSocket handler
- Remove hardcoded endpoint in
cloak attach(e.g. ws://localhost:8080) - Find out if there's a well known protocol for tty over ws we could use instead of the homemade one I came up wit...
[NOTE: for discussion only, not meant to be merged]
This PR introduces the concept of "secret providers".
Example:
{
core {
image(ref: "alpine") {
exec(input: {
secretEnv: {name:"SECRET", id:"env://MY_SECRET"},
args: ["printenv", "SECRET"]}
) {
stdout
}
}
}
}
In this basic example, env://MY_VARIABLE can be passed in place of any SecretID.
How does it work?
- Secrets are retrieved just in time, when bui...
dogfood: Build cloak using cloak
This is the beginning of dogfood and eventually will encompass building, testing,
linting, etc for cloak, SDKs, universe, etc.
For the CLI "handling" of the workflows, I'm using magefiles. I didn't
want to bother writing my own CLI parsing and mage fits the bill just
fine.
$ mage
Targets:
build
$ mage build
not private anymore, probably isn't needed (though low level functionality should remain since someone someday is going to need to pull a dependency from a private repo).
Signed-off-by: Erik Sipsma
Marking as draft while I go re-run through all the guides and test all the links again
Signed-off-by: Andrea Luzzardi
In addition to supporting withArchitecture to set an "ambiant" architecture for the rest of the query... could we not also support withArchitectures (plural), to apply the rest of the query on each of the given architectures, resulting in an "architecture matrix" feature?
Schema spec:
extend type Query {
withArchitecture(arch: String!): Query!
withArchitectures(archs: [String!]): [Query!]
}
- initial commit
- doc: project name typo
- stub: improve stubbing
- add old experiment
- message passing
- go generate stubbing
- marshaling: add json struct tags
- merge new go dx with working frontend protocol
- switch to func-based call convention
- fix setting pointer value
- switch to sdk subpackage approach
- migrate netlify deploy over to new model
- fs marshalling; shell util; core package autogenerated
- switch from frontend->execop model
- small cleanups to apiServer
- seemingly wo...
This commit adds support to call the llb.Mkfile operation via the writeFile field in the Filesystme schema type. It expects a required content and path and an optional permissions argument which defaults to 0664 if not specified
Signed-off-by: Marcos Lilljedahl
Correct some syntax (e.g. missing colons), type names (e.g. Integer -> Int) to make things consistent.
Adds a root.gql with an empty Query (needed to be without {} like this https://stackoverflow.com/questions/54322029/graphqljs-query-root-type-must-be-provided).
Correct some syntax (e.g. missing colons), type names (e.g. Integer -> Int) to make things
consistent.
Adds a root.gql with an empty Query (needed to be without {} like this
https://stackoverflow.com/questions/54322029/graphqljs-query-root-type-must-be-provided).
yarn add graphql
yarn add docusaurus-graphql-plugin (for docs generation)
yarn add graphql-schema-linter
from website directory on cloak branch (after merge of https://github.com/dagger/dagger/pull/3135)
npx graphql-schema-linter ../api/*.gql
yields
/Users/jeremyadams/src/dagger-fork/api/container.gql
1:1 A `PageInfo` object type is required as per the Relay spec. ...
fixes #3066
supersedes https://github.com/dagger/cloak/pull/220 which had a totally different approach
Introduces a new intermediate type, filesystem.Image, which encodes to/from FSID. This type pairs the LLB definition with an OCI image config ({"Env":[...],"Dir":"...",...}). It can be converted to and from an llb.State via the Env/Dir fields stored within. llb.Image is now passed llb.WithMetaResolver in order to populate these fields.
I'm not sure if this is conside...
What are you trying to do?
I wanna push an image from a gitlab-ci to the gitlab container registry or to an artifactory.
Before you can push images you must authenticate.
First case -> GitLab Container Registry:
In GitLab to use CI/CD authenticate, you can use the CI_REGISTRY_USER CI/CD variable. This variable has read-write access to the Container Registry and is valid for one job only. Its password is also automatically created and assigned to CI_REGISTRY_PASSWORD.
When I...
I found the following documentation with TODO commented out. Therefore, we added a function to output Plans in the following format.
example: For a dagger.cue file like
success
input
package todoapp
import (
"dagger.io/dagger"
"dagger.io/dagger/core"
"universe.dagger.io/netlify"
"universe.dagger.io/yarn"
)
dagger.#Plan & {
actions: {
// Load the todoapp source code
...
Dagger Cloud run URL
What happened? What did you expect to happen?
There are multiple examples in the docs about running dagger using multiple CI's, but I want to run dagger in a Kubernetes pod.
I was wondering on how to run dagger inside a container? if possible without requiring access to docker sock, or using a privileged container.
thanks in advance
What are you trying to do?
I would like to have to allow an (sub-)action to fail without failing the whole execution.
For example sometimes you have optional linter steps in your pipeline which are allowed to fail.
It would be nice if we have the option that an action throws a warning instead of an error.
Like we have in GitLab CI with the allowFailure keyword.
Why is this important to you?
No response
How are you currently working around this?
IMO there is at the mome...
Signed-off-by: Jeremy Adams
We want to fail auto-releases on purpose if there have been no changes since the previous release. While this can happen, it is rare and we should take notice of it, hence the failure.
For more context, see this Discord thread:
#dev message
My intention has been to update this to Dagger for a long time now. It kept getting trumped by other priorities, and while now is the wrong time to do it, every time I have to...
Bumps amplitude-js from 8.21.0 to 8.21.1.
Release notes
Sourced from amplitude-js's releases.
v8.21.1
8.21.1 (2022-09-22)
Bug Fixes
update analytics connector for bugfix (#555) (3f37f18)
Changelog
Sourced from amplitude-js's changelog.
8.21.1 (2022-09-22)
Bug Fixes
update analytics connector for bugfix (#555) (3f37f18)
Commits
064b8d4 chore(release): 8.21.1 [skip ci]
3f37f18 fix: update analytics connector for bugfix (#555)
Se...
Bumps sass from 1.54.9 to 1.55.0.
Release notes
Sourced from sass's releases.
Dart Sass 1.55.0
To install Sass 1.55.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 bug fix: Sass numbers are now universally stored as 64-bit floating-point numbers, rather than sometimes being stored as integers. This will generally make arithmetic with very large numbe...
Bumps github.com/Microsoft/go-winio from 0.5.2 to 0.6.0.
Release notes
Sourced from github.com/Microsoft/go-winio's releases.
v0.6.0
What's Changed
fix typos by @โjohanvdw in microsoft/go-winio#237
backuptar: SecurityDescriptorFromTarHeader() don't decode twice by @โthaJeztah in microsoft/go-winio#233
Updating windows build constraints by @โhelsaawy in microsoft/go-winio#241
Bump go version to 1.17 in go.mod/CI by @โdcantah in microsoft/go-winio#230...
What is the issue?
autocomplete via ctrl-ENTER, TAB completion, (any other related) should be described.
- Make docs accessible only to users with cloak repo access
- remove unecessary class
- force api proxies
- undo headers referrer policy
What are you trying to do?
My use case is a conditional execution of an action depending on a branch name, or other arbitrary condition.
There is this example in azure devops pipelines
and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/staging'))
Conditions like this are used to perform some operations only on sele...
It's not hard getting it working in Codefresh but it requires granting root privileges to the job. Currently only the hybrid option where you run the Codefresh workload on your own k8s cluster will allow this.
before I accidentally commit it one day :)
context: Session.vim is the default filename used by vim-obsession, a tool for saving/restoring vim editor sessions (buffers, splits, etc.)
As discussed with @aluzzardi @sipsma @vito :
Container { withRoot }Container { root }(method rename to avoid capitalization nightmare)Container { build }
If two clients are connected to buildkit at the same time (currently most often happens during parallel tests) then if they use localdirs with the same name (most commonly the workdir, which currently always uses the same local dir name), their dirs will be deduplicated with one another. This happens whether the directories themselves are actually the same or not.
It's tempting to use SessionID in the local LLB to fix this, but that results in the session ID (which is always random) to end...
Signed-off-by: Marcos Lilljedahl
Pushing this first to make sure I'm interpreting the new API correctly before I go off and implement it.
Safe to merge. All new tests are skipped since the API isn't actually implemented.
I copied the current tests to a new file and then changed the original in-place so you can see a diff. We can do more dramatic restructuring later. For example it might make sense to rename the file to container.schema_test.go and move the git tests into git.schema_test.go.
Signed-off-by: Erik Sipsma
This is just a first batch of conversions; I will convert the rest of our resolvers once I've gotten confirmation everyone else is on board.
Found this approach during multiplatform (turned out to not be strictly necessary there so I separated it out). Basically lets us use actual types in our resolver methods and convert each of them to the graphql resolver type by just wrapping them in router.ToResolver. That ToResolver helper is an ugly generic functio...
Restructure documentation tree as per outline proposed on 13/9/22
[dagger/dagger] Issue opened: #3157 ๐ Unexpected execution of commands with explicit dependencies
What is the issue?
For subactions that use commands with explicit dependencies, it appears that all commands that use explicit dependencies are executed, instead of executing only up to and including the requested command. Discussed at [discord](#general message).
The original goal of this example was to have explicit dependencies between subactions, which execute shell commands.
The sleep1 and sleep2 subaction...
Multiplatform support is coming in cloak, but it will only support architecture emulation and help out users/extensions that want to perform cross-compilation.
There are many use cases where cross-compilation is not really a viable option, which means that building software for a non-Linux OS is not really viable on dagger today.
It's most likely an enormous undertaking, but opening this as a tracking issue for supporting execution on containers that are running windows or macos (or bsd...
This PR includes auto-generated API documentation as requested in #3048. See that PR for more information on the plugin and approach used.
Some notes:
- Existing guides have been recategorized and in some cases split into separate documents.
- Extension pages are manually added here. These would be auto-generated as well in the future.
- Extension categorization is TBD. This PR proposes a first approach.
- The index page might benefit from a different layout.
And where should it live?
Should it be a part of the new dagger binary? Or should it live in a separate binary and repo?
Note: This draft will change as the API changes.
- Name: once cloak is GA, the official name of the europa compat layer will be "Dagger Classic". This name should be used in docs, marketing material etc.
- If we do ship Dagger Classic as a separate binary, the natural name would be
dagger-classic. We can discuss variations but this should be the baseline (because it's the least surprising). - We may (TBD) ship cloak preview as an experimental feature flag in the current dagger binary. In that case, it may make sense to continue down the...
@shykes What about the possibility of a cue SDK, so that users can use other cloak extensions? Would that get wrapped into dagger-classic?
Part of my interest in naming it dagger-cue has to do with keeping the door open for that to happen down the road.
I think a CUE sdk would be a separate feature with a different scope. If and when we ship a CUE sdk we can reuse as much code as we want from classic. But Classic does not aim to be a complete cue sdk, and it's important IMO to make that clear so that there is no confusion or disappointment.
:wave: my two cents from our discord initial thoughts:
is the main argument to have a separate binary so we can iterate on both projects with different cadence? If that's the case kind of SGTM.
maybe an approach to simplify the user's life is that the dagger binary detects if the cue support is needed and handles the binary download / update for the platform of the user automatically?
we could even ship the dagger-cue thing as a Go plugin (https://pkg.go.dev/plugin) so we don't have t...
This has been reported twice in the last day. When importing @dagger.io/dagger the actual code directory is randomly missing sometimes (only package.json, README, etc. are there). It's not clear when or why as running the exact same commands on almost exactly equivalent versions of node+npm give different results.
User Ringo in discord noticed that if he remove the files section from our package.json then the problem disappears for him: https://github.com/ringods/dagger/commit/a1329163...
rather than using big ol' Go strings for Schema(), use go:embed so we can start treating the schema definitions as the source of truth.
this means we'll need to start making concessions here and there until the API is fully built out. as a concrete example, the git schema returns a Filesystem for now until Directory is implemented and a TODO has been added.
- renamed the files to .graphqls which is apparently more strictly appropriate.
- dropped .schema from code/test .go filenames now...
To supportbashuse, the binary should include jq support in a way similar to the GitHub gh cli: https://cli.github.com/manual/gh_help_formatting
example:
today, need jq binary on dev or ci machine and have to do echo and pipe:
BUILD=$(cloak -p ./cloak.yaml do<<EOF
query Build {
core {
git(remote: "https://github.com/dagger/todoapp", ref: "cloak") {
yarn(runArgs: "build") {
id
}
}
}
}
EOF
)
CONTENTS=$(echo -n $BUILD | jq -r '.cor...
Node 16.15.0 which use npm 8.5.5 seems to have trouble to import @dagger.io/dagger dependencies (related issue #3163)
Changing the absolute path should fixe this issue.
Signed-off-by: jffarge
[dagger/dagger] Issue opened: #3167 configuring file permissions for \`directory \{ withNewFile \}\`
What are you trying to do?
Create a new file with static content through the API with permissions set.
Why is this important to you?
Some tools are picky about file permissions and will fail if they're too permissive. For example, ~/.ssh/known_hosts.
How are you currently working around this?
No response
adds Directory, DirectoryID, and implements the following portions of the directory API:
directory {
id
contents(path: String)
withNewFile(path: String!, contents: String)
}
the rest of the spec is stubbed out to return errors, and I commented out parts of the spec that need other types that haven't been introduced yet (just File)
also introduces some utilities for encoding/decoding IDs and defining ID scalar types in the schema. I went a little ham w...
What are you trying to do?
Assume that I have built an application image with Dagger/Cloak and pushed this to a registry like Docker Hub. As part of my deployment process, I would like to deploy this image from the registry to a K8s cluster. This could be either a local minikube cluster for testing, or a cloud K8s provider like GKE.
Why is this important to you?
Being able to deploy to K8s should be supported in Dagger as many deployments now happen on K8s.
How are you curren...
What is the issue?
The default entrypoint/cmd of a base image is lost when that image is used in a Dagger image build process.
Log output
No response
Steps to reproduce
Running standard PHP image:
$ docker run php:8.1-apache
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.3. Set the 'ServerName' directive globally to suppress this message
AH00558: apache2: Could not reliably determine the server's fully qu...
Relates to https://github.com/dagger/dagger/issues/3159
Note: This draft will change as the API changes.
- No more early access
- Tweaked intro
The services API is incomplete.
Mainly:
- Convert to New Core API
- Restructure to be multi-process (just like buildkit)
- Support non-interactive mode (e.g. for launching a db etc, we don't want tty streaming etc)
- cloak attach is hardcoded to localhost
- Tests
We should either address this or remove the services API for release.
See #3123 for more details
Not a particularly beautiful solution, but gets the bug fixed for the moment and the better solution is coming soon with the new api work.
Signed-off-by: Erik Sipsma
Fixes #3170
cc @vito just want to squash that bug to unblock @vikram-dagger. Hopefully at least the test case code will be useful when we have the real solution, but I'm guessing the rest will be mostly throwaway.
The team is already working on automating testing for API endpoints, but we need automated testing for snippets in the guides as well.
There are a few routes that we can take to release Cloak for the preview launch. We should document the choice since items like our install instructions are dependent on it.
@jlongtine since it seems like we have an answer then should we transfer this discussion into an issue?
I'd like to get a ๐๐ป from @aluzzardi before we call it.
We need to implement the new Secret type in order to finish implementing Directory and File:
See core/file.go for reference.
Disclaimer: I'm writing this issue without having used Secrets in Dagger before. I think SecretID is just a simple string rather than a JSON->base64'd...
I implemented the first parts of this API in https://github.com/dagger/dagger/pull/3168 but left a few parts unimplemented:
secretwill need #3178 first.withoutFilemight be a simple application ofllb.Rmbut I've never used that before.withoutDirectorymight be the same assumingllb.Rmis just placing a tombstone over a path and doesn't need to be done recursively....
It's not clear where workdir is actually when you load it while running a script in a subdirectory, which can easily lead to incredibly confusing situations. We need to document this (and also simplify where possible)
The HTTP API can be implemented at any time now that File and Directory are implemented. Nothing depends on it.
See core/file.go for reference.
This can be implemented using llb.HTTP.
When an extension fails you only get a graphql error saying "exit code N" more or less. The actual useful error is located in buildkit progress output. It would be much easier to debug if the output was included in the graphql error.
This is very similar to this issue about execs, but now for extensions. Its slightly more tricky for extensions since we don't have a shim when invoking extensions, but maybe this indicates we should include the ...
a.k.a. "draw the rest of the owl"
This might be a good candidate for breaking up into sub-issues, but I'm not sure if that'll be needed yet (we've got a lot of prior art).
Look for refinements to make along the way, but make separate issues for them so it's easy to keep track of our decisions.
If we want users to be able to fully configure an image just as they would with a Dockerfile, I think we'll need to support CMD as well. Right now the spec only supports ENTRYPOINT.
I think this would mean the following changes to the spec (strawman proposal):
extend type Container {
"Configures a default command for the container to run."
withCmd(args: [String!]!): Container! # or withArgs?
"This container after executing the specified command inside it"
exec(args...
Got the error "exit status 1" when my docker daemon was not running, it took me longer than needed to figure out why I had this message...
Also minor code simplification in the if/else logic while walking through the error checking.
Fixes #3015
The new generic wrapper resulted in go types of FSID to sometimes end up as string (due to a marshal/unmarshal cycle). Unfortunately, there is some fragile code which relied on that in the project code, specifically for finding input mounts to include with extensions.
The root problem is that the code is too fragile and should be updated to be more robust by using the graphql schema information rather than go types. However, this issue is currently breaking the netlify extension (results i...
This is the first advanced draft regarding the bundling of buildkit into our own daemon. Almost ready to be merged with current state of cloak codebase.
2 new commands have been added
- cloak serve
- cloak stdio (for buildkit to be able to run)
Cloak stdio
Cloak stdio is the port of the stdio command that Buildkit relies on
Cloak serve
Cloak serve embeds Buildkit's main function, currently only implemented on linux architectures. It also contains all the dependenci...
cloak dev is a fun way to run the interactive GraphiQL playground against the dagger/cloak engine. But it doesn't have to be embedded in the core engine.
There are many graphql tools that could potentially be used in this way, and this can easily be done without embedding any of them in the core engine binary.
Meanwhile, the other use of cloak dev (spawn the engine for the purpose of embedding it in a script or tool) should remain in the core, but under its own sub-command (perhaps ...
Fixes #3019
A lot of this is going to change soon anyways, but getting the fix in now since it's pretty straightforward and quite annoying when hit. The test case should hopefully not be throwaway in the long term either.
cc @kralicky not 100% sure but this sounds like what you mentioned in the community call earlier today.
implements the beginnings of the new Container schema:
container {
from
rootfs
workdir
withWorkdir
variables
withVariable
exec
exitCode
stdout
stderr
}
also: tweak the handling of scratch directories so it can be re-used for scratch containers. previously marshaling llb.Scratch() and then unmarshaling it back into a st llb.State would cause an error when calling st.Marshal. now we'll just set the definition to nil in the ID DirectoryID p...
Signed-off-by: Erik Sipsma
As shown earlier in the community call. Needs a ton of cleanup and handling of more types (i.e. both pointer and non-pointer types), but so far all the gotchas+hurdles have been more surmountable than I initially expected.
We currently expose this API:
type Container {
exitCode: Int
}
...but the only possible value returned here is null or 0. If the command exits nonzero Buildkit will error instead.
We could have the shim mask the exit status, but we would probably only want to do that if the user is requesting exitCode, but then that changes the underlying LLB. ๐ค
Reference: dagger/cloak#159
Dagger is a tool that allows creating developer platforms composed of different elements like extensions, pipelines, workflows, scripts, etc. Sometimes myself and some Dagger users misuse or confuse this terms; the purpose of this discussion is lay out all the different concepts out there and map them to Dagger's counter-part.
Let's use the todoapp kick-the-tires example we have here: https://github.com/dagger/todoapp/blob/cloak/scripts/kick-the-tires/index.mjs
Pipeline:
It's a co...
Signed-off-by: Joel Longtine
There's an old (highly outdated at this point) attempt at defining all this here, just FYI that we should update that guide when we make new decisions here (e.g. delete it and replace it, probably somewhere else since I don't think the terminology is very discoverable from there): https://github.com/dagger/dagger/blob/cloak/docs/guides/bnzm7-writing_extensions.md#concepts
SDK:
I would say an SDK is all the tools needed to use dagger with a given language. That is a broad umbrella and ...
I would say an SDK is all the tools needed to use dagger with a given language. That is a broad umbrella and encompasses:
+1. Just updated my initial comment.
This issue is the source of truth for the universe search experience for preview.
You can see how the user will find the extensions in preview based on their entry point below:
User comes from website -
Clicks on docs and finds the extension tab
User comes from docs -
sees the extension tab and clicks on it
User comes from playground -
clicks on universe and is re-directed to extensions tab
User is asking in Discord -
We share the docs extension page
What needs ...
What are you trying to do?
Having two different clients taking to the same Dagger engine to have different views of the API depending on the extensions that each decided to include, currently the engine exposes a single global API for everyone.
Why is this important to you?
So we can provide multi-tenancy clients in the same engine
How are you currently working around this?
N/A
There should be a way to repeatedly run dagger pipelines with a set of extensions.
When extensions in dagger.gql are first pulled via git refs, we should record the sha in a dagger.lock file.
Useful because:
- Users sometimes want to prevent files from changing somewhere
- Performance benefits (buildkit doesn't need to create new layers)
- Better content-based caching (there are some really convoluted corner cases that cause the caching behavior to be slightly different when using a rw mount, I can look them up again if needed - suffice it to say there can be differences that a few users might care about someday)
Could model this as
- allowing a mount to be specified as re...
Thanks for starting this Marcos.
Pipeline:
It's a combination of different steps to produce an output. It's scope is a single graphql query.
Consensus: medium
There are 3 proposed uses of "pipeline":
- Strict definition (this one): one pipeline = one API call
- Less strict definition: one pipeline = one or more API calls chained together
- Example sentences:
- "This pipeline installs yarn in a container"
- "I refactored this pipeline to require only o...
I would rephrase this to focus on the things you can do, rather than the internal architecture of an SDK:
I like your phrasing of the bullet points a lot better, ship it, but I also do think that we will need to decide on names for what I listed. They aren't fully internal; they are the actual names of methods/commands/etc. that users will be calling and thus directly exposed to. Having consistent naming for them across the SDKs is important.
That's a next level of detail though. Hone...
I would rephrase this to focus on the things you can do, rather than the internal architecture of an SDK:
I like your phrasing of the bullet points a lot better, ship it, but I also do think that we will need to decide on names for what I listed. They aren't fully internal; they are the actual names of methods/commands/etc. that users will be calling and thus directly exposed to. Having consistent naming for them across the SDKs is important.
That's a next level of detail though. Hone...
Yes 100% agree. I think those โsemi-internalโ terms are the next level of detail and the natural next step IMO is to finalize the core API for them. That will force some terminology-intertwined-with DX debates. Then from there, glossary :)
@shykes @marcosnils @sipsma should we move this to a doc in the repo, so it is easier to see which things are finalized and which aren't since we can submit PRs to a specific definition?
Equivalent of {host { dir(id:...) { ... }}} in old API
- initial commit
- doc: project name typo
- stub: improve stubbing
- add old experiment
- message passing
- go generate stubbing
- marshaling: add json struct tags
- merge new go dx with working frontend protocol
- switch to func-based call convention
- fix setting pointer value
- switch to sdk subpackage approach
- migrate netlify deploy over to new model
- fs marshalling; shell util; core package autogenerated
- switch from frontend->execop model
- small cleanups to apiServer
- seemingly wo...
As agreed on #3188, we're discontinuing graphiql from cloak dev. This commit adds CORS support to the /query endpoint as well as instructions on how to setup graphiql separately in case it's required for development purposes.
Fixes #3199
Signed-off-by: Marcos Lilljedahl
- Track the exec metadata mount point (
/dagger) in a separate field withinContainerIDsince its lifecycle differs from regular mounts - Add
Container { withMountedDirectory }and propagate changes to mounts from parentContainerto child - Respect sub-directory configuration within source
DirectoryID - Make
Container { stdout, stderr }nullable (same reasonexitCodeis nullable)
Preview Goals
- Browse extensions in a website
- Easily use discovered extensions in projects thanks to basic prompts/snippets
- Submit community extensions for listing in Universe catalog
- Two simple categories: Dagger and community
- Public backlog of needed, coming soon extensions.
- Link to extensions page/site from docs, main website, Dagger Cloud, etc
Assumptions for Preview:
- Hosting Universe catalog in docs site is ok for preview
- Categories will start small and s...
Without some description, it requires some back and forth to get the
role of P, A and R types.
Bumps @svgr/webpack from 6.3.1 to 6.4.0.
Release notes
Sourced from @โsvgr/webpack's releases.
v6.4.0
Bug Fixes
deps: add babel-preset to core dependencies (#782) (464ec5f)
Features
a11y: add attribute role="img" to the svg element (#750) (8b9edc4)
support spaces in file names (#779) (6ee639a)
Changelog
Sourced from @โsvgr/webpack's changelog.
6.4.0 (2022-10-01)
Bug Fixes
deps: add babel-preset to core dependencies (#782) (464ec5f)
Fe...
Overview
In the upcoming cloak release (0.3) the primary use of Dagger will be to embed it in a script. In the case of shell scripts (bash, zsh, powershell etc) the mechanism for scripting will be invoking the dagger CLI directly.
Therefore it is crucially important that dagger be very easy to script. In particular it should be very easy to make multiple calls to dagger, and connect their inputs and outputs in a pipeline. Also known as "stitching".
Generally, all command-l...
"Extensions" in the next version of Dagger (codename Cloak) are how we add capabilities/integrations to Dagger.
Examples today beyond core capabilities include Netlify, Vercel, Yarn, Terraform, Rails, etc
- Which extensions should we prioritize first? Why?
- Given your experience, which ones could you help to create or improve?
- Which Dagger v0.2 extensions (CUE) should be ported over to multi-l...
based on #3205 - will rebase after it's merged to make this PR easier to review.
Implements the following APIs:
container {
withMountedFile
withMountedCache
withMountedTemp
mounts
withoutMount
directory
}
Problem
In cloak (0.3) the Dagger engine is embedded in a host program (script or tool), which instruments it to run pipelines.
Currently the dagger engine prints all its output to the standard output of the engine, which is inherited from the host program. The result is that dagger "takes over" the standard output of its host, which is not desirable.
Solution
When a program is run that embeds the dagger engine, the output of the dagger engine should not pollute the host pro...
based on #3217 which is based on #3205 - will rebase after both are merged
Implements the following APIs:
container {
user
withUser
entrypoint
withEntrypoint
variable
withoutVariable
}
note: this also means an image's USER and ENTRYPOINT are now respected.
- Implements FSID and SecretID types
- Fixes a typo in the logger
- Implements json serialization in case the resolver returns a custom type
There's a lot of tricky details to get right when starting dagger on macos: need to create buildkit running on a VM somewhere (w/ docker desktop by default for now), need to ensure LLB is using the right platform, etc.
It's very easy to miss issues when you don't have a macos machine readily available to test on.
While it's not trivial, we should find a way to run our CI on macos. GHA does have mac os runners, so that's an obvious possible option.
Signed-off-by: Erik Sipsma
Should fix the problems when running from macos.
Opened an issue for automating that: https://github.com/dagger/dagger/issues/3225
But for now verified by running directly from macos.
This will also be a little bit of setup for integration the multiplatform PR w/ the new API, so no throwaway here hopefully.
@vito the rebase w/ your PRs will be painful sadly. I had one important comment on your PR ([here](https://github.com/dagger/dagger/pull/3205#di...
What is the issue?
The Basic Node CI documentation claims:
The application we are building a dagger pipeline for has very simple build and publish steps.
However, there is no actual "publish" step or discussion.
Sub-issue of #3121
Sub-issue of #3121
Sub-issue of #3121
PR #3187 relies on a specific commit. Update our import to this release version
As we are bundling buildkit, we cannot rely on the go mod version to estimate buildkit's version. The current strategy is to rely on the vcs hash.
We already have a function for that: https://github.com/dagger/dagger/blob/584521e0b1bf477fe5adf70d3319b7aa91c771ad/version/version.go#L16-L30, but it doesn't contain the proper error return.
I had to copy and tweak it lightly: https://github.com/dagger/dagger/blob/0ee91518c60cd66a3e42d1646e516a1c045e0f20/internal/buildkitd/buildkitd.go#L199-...
Our current implementation of daggerd, dagger has only one builder: docker.
In order to build our engine, we make a quine -> we copy, at runtime, our statically embed source code and build daggerd. This artifact is then served using a provisioner (docker for the moment).
To build our artifact, we rely on docker build, using the Dockerfile.daggerd Dockerfile. However, another Dockerfile exists at the root of our project. In order to run the build, we need to rely on `docker b...
For https://github.com/dagger/dagger/issues/3206
Note: the three required fields to add an extension to your dagger project today are: repo, ref, and path.
- repo is the git repository where the extension lives
- ref is the git ref for the version of the extension you want to load
- path is the path to the
cloak.yaml, which is the root of the extension in a repo. For most extensions, this will be at the repo root
In all cases below, extension owner can be inferred from the gi...
What is the issue?
I'm trying to push 2 tags for a docker build. 1 is latest and 1 is the actual version. I've seen the examples that use a list to do this. However, in my use case one of the tags is based on a version passed into the plan. If necessary, I could write an action to find the version, but I think I would still have the same issue. I've tried 2 different ways so far:
Create a list and iterate over it. I have to assume that lists have to be literal values because I can't g...
We need to document how to write an extension.
Once it is created, we need to ensure that it is accessible from the new docs site and linked from the universe page
per https://github.com/dagger/dagger/pull/3219#discussion_r987337784
We generally use scalars for opaque values that pass through the client without ever being modified or constructed directly. ContainerAddress on the other hand is a user-provided string, and having to cast it to this special type is a little weird.
Also, we currently use regular strings for paths (e.g. withNewFile(path: String!)), so it seems a little inconsistent to opt for a scalar type for image addresses but not pa...
dependent on the decision in #3176
Reminder to merge branch and clean up old "core"
Expanding this comment out to its own issue: https://github.com/dagger/dagger/issues/3016#issuecomment-1261344900
Project loading + building has it's own schema: https://github.com/dagger/dagger/blob/9bbbf8459b8dec91be8e0cdb60f6a2f0770314eb/core/project.schema.go#L37-L94
It is only used internally (not meant to be used by users directly yet) but it nonetheless needs to be integrated with the new API (i.e. Directory/Container/etc.). At minimum, this is needed so we can delete the old...
โ ๏ธ This is a significant & disruptive change, please read this message with the care & attention so that the surprises are kept to a minimum โ ๏ธ
"Project Cloak" was the codename for what will become Dagger v0.3.x. As we start preparing to ship Dagger v0.3.x pre-releases, we need to use the same "dagger" name everywhere so that:
-
Users keep the same entrypoint: the
daggerbinary -
The tooling that installs
dagger(e.g. HomeBrew, install.sh, install.ps) largely continues working ...
Add option to export aws cli command as secret
Signed-off-by: Jeremy Adams
type Container {
withDirectory(path: String!, directory: DirectoryID!): Container!
}
Use case: copying the contents of a directory into a container's rootfs, rather than mounting it.
Some discussion in https://github.com/dagger/dagger/pull/3219#issuecomment-1267809318
Maven
On Wed, Oct 5, 2022, 9:18 AM Jffarge @.***> wrote:
nginx
โ
Reply to this email directly, view it on GitHub
https://github.com/dagger/dagger/discussions/3216#discussioncomment-3805740,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACYJ6FRMC4GSCICX6NRWPGLWBWE23ANCNFSM6AAAAAAQ4AOYIM
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>
- wrap github.com/Khan/genqlient into dagger/client so it doesn't leak to the user
- support for connections over stdio (both in the SDK and through
cloak dial-stdiocommand) - new "llb style" parameters
client.New()client.New(client.WithEngineCommand("cloak", "dial-stdio"))client.New(client.WithUnixSocket("/cloak.sock"))
Same as container.directory: returns a FileID while magically traversing mounts by path.
Signed-off-by: Erik Sipsma
"How to run tests" is a FAQ and also not immediately obvious (see this issue: https://github.com/dagger/dagger/pull/3261#issuecomment-1269226363) .
This is a port of the todoapp demo (build phase only) in bash. This is to show how to instrument dagger graphql calls from a bash script. This example does not use extension but any extension can be used like in the playground. It example assumes you have a valid package.json in your working directory.
It's a poc to bring data to #3213
(This needs to be verified, it should be true in theory but hasn't been tried yet)
When using the Container API, if a mount is placed under a path containing a symlink, it's possible to create situations where:
- a directory in the container during an exec op shows some contents
- use of the
directoryAPI to get the contents of that path returns something completely different
Described more here: https://github.com/dagger/dagger/pull/3217#discussion_r987479638
Possible soluti...
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"]
engine["Dagger Engine"]
py & go & ts & js --> engine
Since each SDK is developed independently, they should be versioned released independently as well.
part of #3178
closes #3183
Unlike the other core API PRs, this is a breaking change as it replaces the old secret schema.
Removed:
core {
secret(id: SecretID!): String!
addSecret(plaintext: String!): SecretID!
}
Added:
secret(id: SecretID!): Secret!
container {
withSecretVariable(name: String!, secret: SecretID!): Container!
withMountedSecret(path: String!, source: SecretID!): Container!
}
file {
secret: Secret!
}
```...
Found out there is a new dependency site linked from pkg.go.dev: https://deps.dev/go/go.dagger.io%2Fdagger/v0.2.35.
We can see: https://deps.dev/advisory/ghsa/GHSA-5ffw-gxpp-mxpf
I guess we need to update our dependency on containerd.
Sometimes you want to run dagger pipelines without loading extensions.
Overview
In the upcoming cloak release (0.3) the primary use of Dagger will be to embed it in a script. In the case of shell scripts (bash, zsh, powershell etc) the simplest approach is to invoke the dagger CLI directly.
Therefore it is crucially important that the dagger CLI be very easy to script. In particular it should be very easy to make multiple calls to dagger, and connect their inputs and outputs in a pipeline. Also known as "stitching".
Generally, all command-lin...
Challenges I see particularly in Dagger vs scripting any other tools:
- A single query can run multiple steps in parallel by leveraging graphql field aliases, it's important to document it so users can make the most while using it.
- Outputs usually require third party tools to parse like
jq, so it'd be great to help out here. - Writing queries in a bash script is error prone and clunky as 99% of the times it involves some heredoc + interpolation handling
- Capturing errors and exit...
- A single query can run multiple steps in parallel by leveraging graphql field aliases, it's important to document it so users can make the most while using it.
I agree, but is there something we should do about this that is specific to shell scripting?
- Outputs usually require third party tools to parse like
jq, so it'd be great to help out here.
I think dagger should offer common helpers for input and output formats, since it's a fundamental part of stitching queries toge...
@aluzzardi I'm worried about your bandwidth for this one? I will put it in stuck for now since I think this can be a blocker for release if you don't have someone to help you with it.
Please take a look at #3268. My experience so far:
- I like relying on
jqfor formatting the output. I prefer this than dagger trying to do any magic,jqis far more powerful and easy enough for simple selection. - The inlined queries does not have issues with escaping thanks to the
--setcli arg
There is room for improvement (like the session management for example) but it's totally usable with the current CLI and easy enough.
I would close this issue and instead open more sc...
- The inlined queries does not have issues with escaping thanks to the
--setcli arg
@marcosnils does this address the issues you saw?
Good point, since there's no clear action item yet, I converted this to a discussion. We can use it to compare different options to improve the shell scripting DX. Maybe some more scoped issues will come out of it.
Overview
In 0.3 (codename cloak) the CLI syntax will need to change, since the underlying engine is quite different.
The exact syntax has not been defined - the current syntax is an accident of implementation.
What to do
[ ] Initial proposal
[ ] Get feedback, discuss
[ ] Consensus
[ ] Implementation
Bumps google.golang.org/grpc from 1.49.0 to 1.50.0.
Release notes
Sourced from google.golang.org/grpc's releases.
Release 1.50.0
Behavior Changes
client: use proper "@" semantics for connecting to abstract unix sockets. (#5678)
This is technically a bug fix; the result is that the address was including a trailing NULL byte, which it should not have. This may break users creating the socket in Go by prefixing a NULL instead of an "@",...
@marcosnils does this address the issues you saw?
I wouldn't say it's an "issue" per-se but more like a UX / DX annoyance. We can't enforce that all users that write inlined queries will use the --set flag, specially for those coming with a long bash background since the "usual" way of performing similar things in bash is through heredocs and interpolations.
My point was that by separating queries into a new file, you basically have no choice. The only way to supply arguments to qu...
Option 2: graphql document
In this option, you still write raw graphql queries but keep them in a separate graphql document, then reference them by name in the bash script.
Example: FIXME.
example:
-- queries.gql --
query Build {
core {
git(remote: "https://github.com/dagger/todoapp", ref: "cloak") {
yarn(runArgs: "build") {
id
}
}
}
}
query Deploy($contents: String!, $token: SecretID!) {
netlify {
deploy...
TODO: actual outline
- Concerns here: https://github.com/dagger/dagger/pull/3187#issuecomment-1269320163
- Ideas around whether we can re-implement parts of the buildkit client/gateway api (filesync and gateway containers being big ones, but also many other assorted things) in each language and thus simplify things
- Or alternatively can we instead swap those implementations out for simpler services that are easy to re-implement in multiple languages
See latest commit only (others are from other PR):
TODO:
- [] currently based on top of code-first schema PR because that PR greatly simplifies both the code and number of cases we need to deal with here. If code-first ends up becoming a blocker on this PR being merged, it's not all that hard to disentangle and only grab one of the commits out of the other PR, just was fastest to get going like this.
- [] The format of extensions like
{"local": "path/to/local"}is weird, made sense in...
Thanks! I incorporated this.
Some really cool ideas! I'm going to try out converting the above demo to Option 2 and see how it feels, but it seems like it would be a massive improvement.
@marcosnils can you tell me more about how "A single query can run multiple steps in parallel by leveraging graphql field aliases" means in relation to the bash example at the top? Like I could have the FSID in fs: $workfs actually alias to the query that resolves that FSID?
Will update the title once it is defined....
We need to clarify if we will have users find the new release from a release announcement or if we want to update the homepage.
Since the playground will most likely not be ready at the exact same time as the engine release, we need a clarify when and if the website will need to be changed for the engine release. We already have separate plans to update the website for the playground preview.
Dagger 0.3.0alpha1 Release
Target date: Oct 19, 2022
Dagger 0.3.0alpha.1 is a planned release featuring the bare minimum to allow the community to try the new cloak engine and have a good experience.
This is the list that will help support our go/no go decision on as well.
Success Criteria:
- [ ] User can successfully install dagger 0.3.0alpha1 starting from release announcement or landing page, with no other context or information - #3282
- [ ] User can easily switch back a...
Idea from discord: retain the local binary but rearchitect it to just be a helper that is shelled out to for functionality we don't want to reimplement in each language.
Simplifies architecture a fair bit by getting rid of multiple daemons but doesn't force us to reimplement everything every time.
Also just copying my comment from here as one possible variation: https://github.com/dagger/dagger/pull/3187#issuecomment-1269366774
The general idea in my head has been that there's only one "daemon" component which includes both the router+buildkitd functionality. Let's say that's called dagger serve.
SDKs would continue to work the same as today in that they rely on invoking the dagger serve command to run (except Go which is a special case and can optionally just import this as a li...
unfortunately not, you canโt reference one field of a query from within another field. With aliases you can basically โbranch outโ a query to get more outputs (like exec N commands in parallel). But you still need to stitch the usual way.
Here's a commit converting the demo to Option 2 https://github.com/kpenfound/dagger-demos/commit/5b34a5f5918dd15dd68123d5beb171ca074fdd74
Much better DX imo
Currently, passing nil or empty arguments to those function reinit the values.
It's not that explicit and clear.
It will make more API endpoints, but it's gonna be clearer.
We want to fail if the "wrong" dagger is used. Versions prior to 0.3.x will not have commands that these SDKs depend on.
fixes #3270
Implements the following:
"A global cache volume identifier"
scalar CacheID
extend type Query {
"Construct a cache volume from its ID"
cache(id: CacheID!): CacheVolume!
"Create a new cache volume identified by an arbitrary set of tokens"
cacheFromTokens(tokens: [String!]!): CacheVolume!
}
"A directory whose contents persist across runs"
type CacheVolume {
id: CacheID!
}
extend type Container {
withMountedCache(path: String!, cach...
When using dagger in podman, it fails with the following error:
Error: short-name resolution enforced but cannot prompt without a TTY
This seems to be caused by the buildkit auto-install, which pulls an image from Docker Hub using its short name (eg foo instead of index.docker.io/foo). Podman has disabled support for short names for competitive reasons (Red Hat wants to prevent people from using Docker Hub which it considers to be a competitive threat).
The root cause i...
core/ is now for domain models only, reducing its dependency footprint and preventing import cycles.
this refactor is 95% just shifting code around, the only change is that I added (*core.Container).WithSecretVariable, since that was implemented inline in the schema and relied on (core.ContainerID.decode) which the schema no longer has access to.
@shykes @marcosnils just checking in to see if we should move this to a doc in the repo now, so we can start to track what is finalized or not?
There's no automated tests for starting the engine from the nodejs SDK. Instead, there should be tests.
The Go SDK has been updated with support for code-first schemas: no more hand-writing schema.graphql and then running cloak generate.
Now you can just write code and the SDK will figure out the schema for you when you run it. The goal is to reduce boilerplate and hard-requirements for graphql-specific knowledge. Writing a Go extension should feel a lot more like just writing Go now.
[The docs](https://github.com/dagger/dagger/blob/cloak/docs/guides/y0yh0-writing_extensions_go.md#imp...
Signed-off-by: Erik Sipsma
cc @gerhard
A few cases that probably could/should be handled are errors right now:
- Embedded structs
- Anonymous structs (
type Foo struct { Bar struct { Baz string } }) - Circular types
- Generics? Have not thought about this yet, I'm inclined to just not support them in object because I don't know how it would translate to graphql schemas, but worth another thought
still figuring out how to return envVariables as [EnvVariable!]!
Same as Go but now in TS.
It's worth looking to see if any existing framework can be leveraged (similar to Python+Strawberry) rather than a custom thing like what was needed in Go.
Also need to think about plain JS. Since it lacks types it's less clear what form this could/should take (maybe it just isn't supported for now, schema.graphql can remain a fallback for these cases).
Seems like we should be able to use Strawberry for this based on conversations with @helderco
Ideally once we have nice generated clients for all our languages, it should be only rare+advanced cases that require seeing the raw graphql schema. But it does feel important to expose that information anyways, for debugging if nothing else.
Right now the easiest way to view the schema derived by an SDK is to start dagger dev and look at the schema in the graphiql console.
This is fine in the immediate term but we probably shouldn't rely on that.
One alternative idea is to expose ...
We are trialing dagger and the builds are taking a long time.
According to our upstream Godot Engine Github workflow, we can cache the .scons_cache. https://github.com/godotengine/godot/blob/master/.github/actions/godot-cache/action.yml
Any ideas?
Here's our repository.
Fixes #3296
No more need for crafting a schema.graphql file nor manually generating before commit.
Python extensions can declare GraphQL schemas purely in code.
I'm working on two quick changes after this one:
- [ ] Move entrypoint code into library
- [ ] Add async support
Signed-off-by: Helder Correia
Resolvers should be able to use async code if needed (e.g., calling async libraries or running tasks concurrently).
We can also provide a client with an async transport so you can make async queries on an async resolver, or if you use a script in an async environment. To avoid having different AsyncClient and SyncClient sort of classes, I'm thinking about using a context manager in a proxy to instantiate the correct client so you'd use them like this:
# async
async with ...
Fixes #3300
:warning: Depends on #3299, merge it first.
- initial commit
- doc: project name typo
- stub: improve stubbing
- add old experiment
- message passing
- go generate stubbing
- marshaling: add json struct tags
- merge new go dx with working frontend protocol
- switch to func-based call convention
- fix setting pointer value
- switch to sdk subpackage approach
- migrate netlify deploy over to new model
- fs marshalling; shell util; core package autogenerated
- switch from frontend->execop model
- small cleanups to apiServer
- seemingly wo...
fixes #3266
Symmetrical to directory; retrieves a File by looking through all mount points.
fixes #3201
This implements the new Host core API, with added support for reading/writing to multiple local directories. See host.graphqls for the new schema.
This also updates the Project schema/code to use the new *core.Directory instead of the old *filesystem.Filesystem, with the following schema changes:
type Project {
# ...
"Code files generated by the SDKs in the project"
generatedCode: Directory!
}
extend type Directory {
"load a project's m...
Signed-off-by: Erik Sipsma
There are a few questions that come up from external users a lot around "why cloak", "why graphql", etc.
This is my first rough pass at trying to capture the main design goals of cloak specifically and why graphql ended up being a good fit for the API framework.
Please feel free to be brutally honest if something doesn't make sense, is too vague, is too wordy, is missing entirely, etc. These sort of high-level why questions are a bit tricky to get right, e...
Some libraries (no matter the language) may need OS packages as dependencies.
The way buildpacks (CNB) solve this is to have a big base image packed with dependencies that may be needed. It's better for reusability. It also has the ability for you to provide your own base image if you need to.
Have we thought about this? If a Python extension needs gettext for example, do we provide a config to add packages to the runtime?[^1] Or do we simply allow to replace the runtime image with a c...
What is the issue?
I am working on a project with a large amount of tasks to execute in order to deliver what needs to be delivered.
In short, I have subdirectories which correspond to different pieces of software (backend, frontend, etc etc), and I build linux packages out of them, in order to deliver a suite of packages.
Therefore, I have a "#Package" definition in each subdirectories. In another directory, I import all these directories and use their "#Package" definitions for a job...
For a really nice DX we want to use typed Python objects and primitives.
After code-only schemas in the Python SDK (#3299) we can attempt to generate these stubs from the Dagger API. There's 3 levels to this, from higher level to lower level, which users can adopt according to their needs:
- High level Python objects and primitives for GraphQL types โ
- Dynamic query builder (not autogenerated, just better than a query string) โ
- GraphQL query in a string โ
Considerations...
I generally donโt like to use Alpine images for running Python unless itโs for quick prototyping or something trivial because quite often you find some issues.
Problems
Standard PyPI wheels donโt usually work on Alpine which means the package manager has to compile binaries if needed, making the build time slower and the image bigger.
Also, in practice, the musl C library has some differences with glibc which can cause problems. This has happened to me in the beginning be...
We want to fail if the "wrong" dagger is used. Versions prior to 0.3.x will not have commands that these SDKs depend on.
Follow-up to https://github.com/dagger/dagger/pull/3285
Part of https://github.com/dagger/dagger/issues/3176
Enables filtering of unwanted files+dirs.
Also a good time to remove our hardcoded exclusion of node_modules leftover from ancient times :-)
Right now it's possible for any extension to write to the host workdir.
Ideally, that should be more controlled, with some way of only granting the ability to do so to "trusted" extensions. This requires figuring out what "trusted" even means.
It may also make sense to apply this to reading workdir and perhaps reading other host resources like env vars.
Bumps github.com/spf13/cobra from 1.5.0 to 1.6.0.
Release notes
Sourced from github.com/spf13/cobra's releases.
v1.6.0
Summer 2022 Release
Some exciting changes make their way to Cobra! Command completions continue to get better and better (including adding --help and --version automatic flags to the completions list). Grouping is now possible in your help output as well! And you can now use the OnFinalize method to cleanup things when all "work" ...
There were no changes that warranted a https://github.com/dagger/dagger/releases/tag/v0.2.36 release.
Our regular release process should have noticed this and not produced a release.
This implies a follow-up improvement to https://github.com/dagger/dagger/pull/3143.
I intend to pick this up after the 0.3.x release process is in place. https://github.com/dagger/dagger/issues/3176
cc @jpadams @aluzzardi
What is the issue?
Currently, 0.2 and 0.1 docs live in the same branch with unique file names and can be distinguished only by virtue of the displayed_sidebar metadata field in each file and the sidebars.js file, which lists the documents for each version via a sidebar navigation list. This creates a challenge for both internal and external authors, as they cannot easily identify which version of Dagger a specific document is associated with. They need to look into and understan...
Signed-off-by: Vikram Vaswani
What is the issue?
This is the parent issue for all issues related to documentation for 0.3.0-alpha.N
- [ ] #3318
- [ ] #3048
- [ ] #3156
- [ ] #3159
- [ ] #3052
- [ ] #3321
- [ ] #3256
- [ ] #3177
Buildkit's full SecretInfo struct is as follows:
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
We already support ID, Target, and IsEnv but maybe folks will have a use for Mode, UID, GUID, and/or Optional.
Use pytest.
- We can start with barebones integration test and hook it into CI like in https://github.com/dagger/dagger/pull/3292.
- Then keep iterating to add coverage for existing features.
- Add tests along with new features.
Some things come to mind that I usually do in my Python images:
- Proper virtual env activation
- Don't run as root
- #3309
- Set workdir in image metadata
I would also like to replace the bash entrypoint with the Python one since it's just a wrapper to launch socat in the background to expose the API via TCP.
Things I've considered in order of preference:
- Checkout new stdio connection and see if it makes things easier
- Connect to API via unix socket
- Use Python to...
Some of my usuals:
- poetry (reproducible builds, automatic virtual env management)
- mypy (for type checking, configure strawberry plugin, etc)
- black (for consistent code formatting)
- isort (integrated with black for sorting imports)
- document how to develop/contribute
I've discussed a bit with @aluzzardi on this. No clear winner but we settled on nr. 1, at least for now since there's other priorities.
๐ Just something to think about in the meantime.
โ ๏ธ I'm just brain dumping things, some of which I know shouldn't work, just because it can help fuel other ideas.
Use case
Imagine you have an extension with a resolver that depends on another resolver from the same extension. For example, in a company's abstraction for an app's deployment...
- add withoutFile
- add withoutDirectory
- add diff
- remove secret (redundant with directory.file.secret)
From @sipsma:
it would probably result in simpler code in the long run if we can just use vektah/gqlparser to construct these graphql operation strings. I used Formatter.FormatSchemaDocument in the code-first stuff, I think you can use Formatter.FormatQueryDocument for this. Even though we don't need a whole document, from what I can tell briefly glancing you can use that for individual queries too.
Signed-off-by: Joel Longtine
It's often helpful to provide examples alongside documentation. This is more challenging for extensions since we want to support generating documentation from one language for many other languages. E.g. The Alpine extension written in Go may want to provide an example of usage that is then converted into docs for Python clients.
One idea:
- Examples can be provided as "query builder snippets", which are single query builder chains written in the language of the extension.
- Then, ...
Didn't implement this in Go yet, should be pretty trivial though: https://pkg.go.dev/go/ast#Comment
Not sure if it works with strawberry @helderco (no need to support it immediately if not, this is just a tracking issue so we don't forget about it).
TS supports grabbing comments too: https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#using-the-type-checker
Just opening this issue to track an issue in upstream Buildkit, per https://github.com/dagger/dagger/pull/3330#discussion_r993825991
closes #3218
also adds StartAndDisplay for preserving the previous behavior and updates all existing call sites to use it instead.
by making this configurable, other projects can use their own progress UI by reading from the channel.
Would it make sense to move that stuff as optional arguments to exec, rather than wrapped in a ExecOpts input?
Otherwise it ends up double wrapped:
Exec(dagger.ContainerExecOpts{
Args: []string{"ls"},
Opts: dagger.ExecOpts {
Stdin: "foo",
}
}
vs:
Exec(dagger.ContainerExecOpts{
Args: []string{"ls"},
Stdin: "foo",
}
/cc @vito @shykes
follow-up to https://github.com/dagger/dagger/pull/3287 which has a lot of discussion that led to the following changes:
- tokens -> key; list doesn't help much since it's already a separate query
cacheFromTokens->cache { withKey }; we can use this to "chain" keys from an initial scope, currently global
Signed-off-by: Erik Sipsma
https://github.com/dagger/dagger/issues/3316
Need to update error message wrapper obviously once we decide exactly where we want to link to.
Did not just put this in engine.Start since we are planning on refactoring that out soon (cc @aluzzardi )
This removes all limits to codegen, will also generate old API bindings.
As discussed in https://github.com/dagger/dagger/issues/3287#issuecomment-1276822308_ :
Focusing on the hard part now...
I agree that we'll need scoping really soon if not on day 1. I wonder if it's closer to "project" than "user" though. I may be using the same machine/user to work on multiple projects that all use Dagger and it'd be awkward if they collided with one another.
You are right. I see two possible paths here:
- We introduce the smallest possible conce...
Overview
As part of the planned 0.3 release (codename cloak), the dagger CLI is getting a redesign. There are currently several concurrent designs:
- "Europa design": this is the current design of
dagger0.2.x. It is specific to CUE and is intended for direct human use only, not embedding in a host program. - "Cloak prototype design": this is the current design of the
cloakbinary in thecloakbranch. It is our de-facto design for 0.3, but it has not been explicitly design...
YOLOing this since it's one of the last things I'll need for a Dagger Bass runtime. :smile:
Adds the following schema:
extend type Container {
"Write the container image to the host directory as an OCI tarball"
export(to: HostDirectoryID!, path: String!): Boolean!
}
Bikeshedding welcome.
Side note: I thought about supporting export(address: ContainerAddress!) so you can set a name for the exported image, but supporting that isn't possible with the OCI...
In #3316, @sipsma is working on wrapping error messages with a basic message that includes a link to a help URL.
We need to have the following:
- short link and easy to remember and using an anchor like help/#go
- On this page, we just need a short message and links to ability to create github issues and discord help channel. We can change it later without having to re-release.
Reminder that we need to add the terms from #3345 once we figure out where all these terms are living
[dagger/dagger] Issue opened: #3351 Support for URI \(or similar\) approach when specifying projects
From here: https://github.com/dagger/dagger/issues/3275#issuecomment-1271983052
Or if we want to be really fancy, you could pass a uri to the engine cli as an arg:
local://path/to/dagger.jsonjson://{"literal":"json"}git://https://github.com/....
Also came up in a slightly different form here: https://github.com/dagger/dagger/pull/3281#issuecomment-1275522659
Point being that short ways of specifying the location of the project is desirable for CLI interfaces (or anyt...
Each runtime may need to support its own specific configs. See e.g.
We will need to find a way to allow runtimes to expose this and then to expose it via dagger.json
The nodeJS sdk is using mocha and only have one test so far.
It check if the server is starting correctly.
As @gerhard mentionned in the issue #3290, next step could be:
- check if the server respond
- check if the server exit correctly
What are you trying to do?
I need to access /dev/ttyUSB0 to be able to flash some stm32 microcontroller.
Once I built an app with tinygo, I need to use stm32flash on /dev/ttyUSB0 with it.
Why is this important to you?
We could simplify the whole flashing process by removing the dependencies on the host to be able to hack on those devices.
How are you currently working around this?
I do it directly on the host (and have a bunch of microcontroller tools on it)
This was one of the last functional uses of FSID (besides the existing extensions+examples). Also realized there was a bug with the codefirst schema parsing of these inputs, fixed that and the existing test we had for that.
This is the beginning of v0.3.x release automation. We start by producing pre-releases (a.k.a. technical preview releases), specifically v0.3.0-alpha.N.
I have setup a parallel AWS S3 & GitHub & Homebrew tap to test how this works together. This is the successful run that produced an unofficial v0.3.0-alpha.1 release in this parallel stack: https://github.com/gerhard/dagger/actions/runs/3244062096
This is what we end up in AWS S3:
Here is the unofficial GitHub pre-rel...
This topic came up with 10/13 community call. The main reason to do this is because some actions provide really nice features in Github like adding line, pr or issue comments. For example, the golangci-lint action (https://github.com/golangci/golangci-lint-action#golangci-lint-action) can add per-line feedback as how in the README.
Additionally, the act project (https://github.com/nektos/act) is already doing something to provide some workarounds to this.
There's a bunch of quirks on ...
To add from experience from 0.2 and 0.3 CI (i.e. dogfooding): Typically what I end up doing is:
- dagger plan has all the lint targets (can be invoked individually or all together): e.g. go, markdown, ...
- locally, I (and everyone else using the project) invokes them all at once (e.g.
mage lint:all,dagger do lint, ...) - however, on CI, we selectively run some of the linters on Dagger (e.g.
dagger do lint cue,mage lint:codegen) and use GitHub actions in parallel when available...
A great example of this is trunk.
I'm using it right now to simplify all my ci checks. In some ways it's similar to the goals of dagger in providing a single unified way to stop dealing with environment issues and instead run an entire toolchain with a single command.
For me that means trunk install in a repo and then just trunk check --ci to validate a pull request. When pushing, it adds annotations on failures. It's saved me a lot of ti...
This is a follow-up on a conversation I started in today's Community Call about caching. For those who weren't on the call, my general question is, "what's Dagger 0.3's caching story for CI?" There's a lot that Dagger could do to make caching better/easier for all users, but I'd at least like to see the ability to do --cache-from equivalent to a standard Docker build.
I'll lay out an example here of how I use --cache-from in my own CI builds at present. I think this makes the power-use...
Docs Title: Go SDK for Dagger
Note - it needs to have a tech preview banner
Sidebar plan:
- Introduction
- Install page
- Go Getting Started
- API Reference
- FAQ
URL plan and where it lives:
Build in the current site - @vikram-dagger I'll let you create an issue for this since I am not sure if we just need a PR instead of an issue.
What pages do we need for launch:
- [ ] Introduction - use this content and tweak to focus on SDK theme - https://github.com...
We need an intro page for the Go SDK docs #3360
We should use the content from the intro readme here, and alter it to focus on the Go SDK instead of extensions: https://github.com/dagger/dagger/tree/cloak
related to #3360
need a specific page for installation instructions
related to #3360
We need a getting started guide that focuses on the Go SDK. @kpenfound can help support with any Go questions
For now, we will just link to the Go generated docs and think about hosting it ourselves later.
At Go SDK launch, we are going to point to the Go generated docs, but we should probably think about hosting it ourselves.
This issue is a placeholder to make sure that we don't forget to review this before GA.
As mentioned in #3360, we aren't going to push the users to the new Go SDK docs automatically. Therefore, we just need some type of CTA within the old version docs that mentioned where they can find the Go SDK docs when needed.
This can be in the form of a banner or just a basic CTA on the main page that they see when they click on docs. I will let @slumbering and @vikram-dagger make the choice here.
What is the issue?
Using the Go sdk on:
go version
go version go1.19.1 darwin/arm64
When I upgrade to the latest version of the go sdk:
go get -u go.dagger.io/dagger@d988bac
go: downloading go.dagger.io/dagger v0.2.35-0.20221013212912-d988bac25577
go: downloading golang.org/x/sys v0.0.0-20221013171732-95e765b1cc43
go: downloading google.golang.org/genproto v0.0.0-20221013201013-33fc6f83cba4
go: added github.com/moby/patternmatcher v0.5.0
go: upgraded github....
https://github.com/dagger/dagger/issues/3367#issuecomment-1278441789
sugary cli command like:
dagger project init foo --sdk gothat would perform
go mod init foo go get go.dagger.io/dagger@ go mod edit -replace=github.com/docker/docker=github.com/docker/docker@v20.10.3-0.20220414164044-61404de7df1a+incompatible go mod tidy
Need to be careful whenever dealing with any existing go.mod (or package.json, or python equivalent), but ...
Connect to API via unix socket directly so we no longer need socat in the runtime.
- Async: connector for aiohttp
- Sync: adaptor for requests
I second that, having one more example with GCP Cloud Build and AWS Code Build would complete the collection of all usual CI plus all the hyperscaller's. one. This would create a nice "Wow" factor for any MSP that are revewing dagger since it would demonstrate all the CI of all their clients can leverage dagger and further demonstrate the joy dagger brings to the table.
As we prepare to merge the cloak branch into main, we want to preserve the current docs, otherwise https://docs.dagger.io will be replaced with 0.3, specifically https://cloak-docs.netlify.app
- feat: use the current version of dagger for code generation
- build: build dagger with mage
- initial commit
- doc: project name typo
- stub: improve stubbing
- add old experiment
- message passing
- go generate stubbing
- marshaling: add json struct tags
- merge new go dx with working frontend protocol
- switch to func-based call convention
- fix setting pointer value
- switch to sdk subpackage approach
- migrate netlify deploy over to new model
- fs marshalling; shell util; core package autogenerated
- switch from frontend->execop model
- small cleanups to apiServer
- seemingly wo...
Right now engine.Start implicitly sets workdir+configpath to defaults if they are not set. This creates complications for callers of it who sometimes don't want to load one or the other or both.
Instead engine Start should just use the values as set. If workdir is not set, don't load it; if configpath is not set, don't load it.
This allows higher levels to determine the right value.
Slight complication comes from the fact that all our SDKs probably do want some consistent behavior ...
Any automation which is not branch-specific (e.g. add-issues-to-backlog.yml) is now in the cloak branch which will soon be merged into main. See https://github.com/dagger/dagger/pull/3374 for more details.
We remove dependabot.yml since this branch is going into maintenance mode and we do not want to be dealing with dependency bumps.
The auto-release has now been disabled on this branch. It is now simpler since we only expect to run in manually & very rarely.
Bumps @lifeomic/axios-fetch from 3.0.0 to 3.0.1.
Commits
bd86ea0 3.0.1
c4a5e45 Merge pull request #119 from ecl1ps/fix-header-processing
6cb0b17 Fix header class detection
3532f5d Merge pull request #117 from lifeomic/dependabot/npm_and_yarn/ansi-regex-4.1.1
3dcaafc Bump ansi-regex from 4.1.0 to 4.1.1
7aac27c Merge pull request #115 from lifeomic/code-scanning-no-dependabot
dfa9a03 AUTOGENERATED: Add or Update code scanning workflow.
5cbb958 Merge ...
Bumps github.com/99designs/gqlgen from 0.17.19 to 0.17.20.
Release notes
Sourced from github.com/99designs/gqlgen's releases.
v0.17.20
What's Changed
Fix field merging behavior for fragments on interfaces by @โkxfang in 99designs/gqlgen#2380
Update diagram in documentation by @โbcspragu in 99designs/gqlgen#2381
Update go-colorable and x/tools. by @โtjni in 99designs/gqlgen#2382
New Contributors
@โkxfang made their first contribution in 99designs/gql...
Bumps typescript from 4.8.3 to 4.8.4.
Release notes
Sourced from typescript's releases.
TypeScript 4.8.4
For release notes, check out the release announcement.
For the complete list of fixed issues, check out the
fixed issues query for Typescript 4.8.0 (Beta).
fixed issues query for Typescript 4.8.1 (RC).
fixed issues query for Typescript 4.8.2 (Stable).
fixed issues query for Typescript 4.8.3 (Stable).
fixed issues query for Typescript 4.8.4 (Sta...
Bumps axios from 0.27.2 to 1.1.2.
Release notes
Sourced from axios's releases.
v1.1.2
[1.1.2] - 2022-10-07
Fixed
Fixed broken exports for UMD builds.
Contributors to this release
Jason Saayman
v1.1.1
[1.1.1] - 2022-10-07
Fixed
Fixed broken exports for common js. This fix breaks a prior fix, I will fix both issues ASAP but the commonJS use is more impactful.
Contributors to this release
Jason Saayman
v1.1.0
[1.1.0] - 2022-10-06
Fixed
Fixed missing e...
Bumps @mdx-js/react from 1.6.22 to 2.1.5.
Release notes
Sourced from @โmdx-js/react's releases.
2.1.5
90fa4935 Fix bug with (injected) custom elements and layouts
Full Changelog: https://github.com/mdx-js/mdx/compare/2.1.4...2.1.5
2.1.4
Patches
9d2aa80b Add file, positional info to crashes in webpack loader
by @โTwipped in mdx-js/mdx#2124
478c78b7 Fix support for Node loaders
Docs
56d70660 Add Astro to site generator docs
by @โb...
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...
Bumps @svgr/webpack from 6.4.0 to 6.5.0.
Release notes
Sourced from @โsvgr/webpack's releases.
v6.5.0
Bug Fixes
fix Yarn peer dependency warning from @โbabel/core (#786) (db35837), closes #785
Features
babel-preset: fix 'role' attribute on svg element for react native (#787) (35d85e0)
Changelog
Sourced from @โsvgr/webpack's changelog.
6.5.0 (2022-10-14)
Bug Fixes
fix Yarn peer dependency warning from @โbabel/core (#786) (db35837), closes #785
F...
With the release of the Go client SDK, use is as easy as importing a package, just like you would any other. In all likelihood, the other languages will start with a similar approach.
The problem is when we introduce extensions, in our current plans this will break and instead:
- Codegen (i.e. via go generate) will create the client SDKs
- dagger.json will manage dependencies+versions
The reason for this is that extensions need to be importable cross-language. It's obviously not pos...
Bumps github.com/go-openapi/runtime from 0.24.1 to 0.24.2.
Commits
c12369b Merge pull request #250 from Kunde21/custom_clientresponse
53ffffd Merge pull request #251 from xmac1/fix-produces-with-type-parameters
1c6d707 fix produces with type parameter
a7d5226 client: enable configuration of client response interface
5bcfe65 Merge pull request #248 from MakarandNsd/246-fix-optional-file-paramter
c677fec adds additional test cases for go-openapi#246
93...
- Add support in extension API to directly return a codegen'd type
- Convert alpine to the new SDK
from @marcosnils
query Build($file: FileID!, $ref: ContainerAddress!) {
container {
withMountedFile(path: "/mnt/dagger", source: $file) {
exec(args: ["cp", "/mnt/dagger", "/dagger"]) {
withEntrypoint(args: ["dagger"]) {
publish(address: $ref)
}
}
}
}
}
results in
{
"data": null,
"errors": [
{
"message": "build shim: failed to parse target platform unknown: \"unknown\": unknown operating system ...
Also has commit from @aluzzardi PR here just so that alpine (used by yarn) returns container type: https://github.com/dagger/dagger/pull/3392
Signed-off-by: Erik Sipsma
Both File and Directory have a contents field.
This can be confusing, for instance:
c.Directory().WithNewFile("/foo.txt").Contents(ctx)
WithNewFile() returns a Directory so here we're listing the directory rather than grabbing the contents of /foo.txt.
With the builder pattern, it's not obvious to the naked eye which object is being returned.
I suggest renaming directory.contents to files perhaps? e.g.
c.Directory().WithNewFile("/foo.txt").Fi...
NOTE!
This also includes a change to support a plaintext field on the secret object. Without this there's no reasonable way for an extension to get a plaintext secret value.
Unreasonable ways include having the extension mount the secret into an exec, cat the value and select the stdout. That defeats the purpose of secrets though.
The automated test is skipped because we don't have a shared netlify token; it can still be useful locally by filling in your netlify token if desired.
Signed-off-by: Erik Sipsma
Fixes: https://github.com/dagger/dagger/issues/3393
The problem wasn't actually with pushing the image, it was just that we use the dockerfile frontend to build the shim and when we did an exec on top of a non-platformed llb state (i.e. scratch) the platform got serialized as a string into "unknown" which upset the frontend.
Test case I added looks a little different than the one in the original issue but it fails w/ the same error if the fix is not presen...
This is a proposal for various improvements to the Graphql API.
- Env variable lookup
- Access env variables in a more consistent manner across host and container
- Other small consistency / simplicity tweaks
- Write to host filesystem
- Proposal for a simpler and more dev-friendly API
- Also allow writing a file to the host filesystem
- Export container to OCI archive
- Short-term implementation built on simpler host filesystem API
- Longer-term implementation to make ...
fixes #3340
I ended up needing this because I need to be able to pass Stdin but that results in setting RedirectStdout and RedirectStderr to an empty string because the ExecOpts struct wasn't a zero-value. Without this change I would get this from the shim:
15: [0.11s] panic: open : no such file or directory
15: [0.11s]
15: [0.11s] goroutine 1 [running]:
15: [0.11s] main.run()
15: [0.11s] /src/main.go:47 +0xad9
15: [0.11s] main.main()
15: [0.11s] /src/main.go:91 +0...
Today, when running the dagger and providing a graphql query, if
it's a fresh environment without buildkit running, a buildkit container
will be started and a message will be emitted to stdout telling you so
which pollutes the following json output from the graphql query.
This commit sends those startup messages to stderr instead of stdout,
so things work on the first run instead of failing.
Signed-off-by: Jeremy Adams
Problem
In cloak (0.3), SDKs will improve the DX when developing extensions / plans on Dagger.
As it eases the DX, it also adds challenges around the maintainability of the codebase.
We need to ensure that:
- SDKs don't break when updating our
coreapi - SDKs don't differ too much from each other
- a centralized test suite with all the expected behaviors is easily available to our community (to implement a new SDK, for example)
- The docs are up-to-date with SDKs/core API
...
Needed so we can deprecated the old one.
Note: Took the chance to give an example on using the query builder. We will replace these examples later with something more useful and using the forthcoming codegen api.
Signed-off-by: Helder Correia
These docs are added in the v0.3 directory.
After this change, the docs will contain:
- Introduction for Go SDK docs #3361
- Installation instructions #3362
- Get started guide #3363
- FAQ #3177
- Link to auto-generated SDK reference docs #3364
- CTA from main 0.2 docs index page to Go SDK docs #3366
Closes #3360
Closes #3361
Closes #3362
Closes #3363
Closes #3177
Closes #3364
Closes #3366
Signed-off-by: Vikram Vaswani
I build a Jenkins agent image for running Dagger on Jenkins.
I happened to put the dagger binary at /dagger on my image (and symlink to it from /usr/local/bin/dagger). That works okay because I'm running Dagger from my image, but if I run a cloak/Dagger query that uses my image, the fact that we mount to /dagger clobbers/shadows my content there.
Repro:
this works:
docker run -it --rm jeremyatdockerhub/cloak-jenkins-agent:15 /dagger/dagger
this doesn't:
...
Signed-off-by: Jeremy Adams
Bumps google.golang.org/grpc from 1.49.0 to 1.50.1.
Release notes
Sourced from google.golang.org/grpc's releases.
Release 1.50.1
New Features
gcp/observability: support new configuration defined in public preview user guide
Release 1.50.0
Behavior Changes
client: use proper "@" semantics for connecting to abstract unix sockets. (#5678)
This is technically a bug fix; the result is that the address was including a trailing NULL byte, which it s...
Bumps axios from 1.1.2 to 1.1.3.
Release notes
Sourced from axios's releases.
v1.1.3
Added
Added custom params serializer support #5113
Fixed
Fixed top-level export to keep them in-line with static properties #5109
Stopped including null values to query string. #5108
Restored proxy config backwards compatibility with 0.x #5097
Added back AxiosHeaders in AxiosHeaderValue #5103
Pin CDN install instructions to a specific version #5060
Handling of array values ...
