status
stringclasses 1
value | repo_name
stringclasses 31
values | repo_url
stringclasses 31
values | issue_id
int64 1
104k
| title
stringlengths 4
233
| body
stringlengths 0
186k
β | issue_url
stringlengths 38
56
| pull_url
stringlengths 37
54
| before_fix_sha
stringlengths 40
40
| after_fix_sha
stringlengths 40
40
| report_datetime
timestamp[us, tz=UTC] | language
stringclasses 5
values | commit_datetime
timestamp[us, tz=UTC] | updated_file
stringlengths 7
188
| chunk_content
stringlengths 1
1.03M
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,872 |
Bring back `dagger doc`
|
## Problem
Dagger 0.1 had a command called `dagger doc`, which was similar to `go doc`. Given the names of a CUE package and definition, it would print information about their API.
Unfortunately, this feature was not compatible with Dagger 0.2, because it relied on concepts such as `@dagger(input)` and `@dagger(output)` which no longer exist. This is also why we currently don't have an API reference in our docs: the generator has not been ported to 0.2.
As a result, there is no easy way to look up available packages and their APIs while developing a Dagger 0.2 plan.
## Solution
Bring back `dagger doc` in a simpler form. Instead of scanning the CUE code and generating documentation, just print the CUE code as is. The output can be refined later - but at least developers get the equivalent of looking up the source file on github, which is what they need to do anyway. It's a strictly better developer experience, achievable in the short term.
|
https://github.com/dagger/dagger/issues/1872
|
https://github.com/dagger/dagger/pull/2693
|
a7d453ea93610431d42ff9c8735e4befbbfdaea2
|
7f87e7bb34547fe814f60cbc09440fef0b4ec103
| 2022-03-27T06:23:01Z |
go
| 2022-07-05T17:17:40Z |
cmd/dagger/cmd/doc.go
|
for _, field := range p.Fields {
fieldLabel := fmt.Sprintf("%s.%s", p.ShortName, field.Name)
fmt.Fprintf(w, "\n## %s\n\n", fieldLabel)
if field.Description != "-" {
fmt.Fprintf(w, "%s\n\n", mdEscape(field.Description))
fmt.Fprintf(w, "### %s Inputs\n\n", mdEscape(fieldLabel))
if len(field.Inputs) == 0 {
fmt.Fprintf(w, "_No input._\n")
else {
printValuesMarkdown(field.Inputs)
fmt.Fprintf(w, "\n### %s Outputs\n\n", mdEscape(fieldLabel))
if len(field.Outputs) == 0 {
fmt.Fprintf(w, "_No output._\n")
else {
printValuesMarkdown(field.Outputs)
return w.String()
func mdEscape(s string) string {
escape := []string{"|", "<", ">"
for _, c := range escape {
s = strings.ReplaceAll(s, c, `\`+c)
return s
var docCmd = &cobra.Command{
//
Hidden: true,
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,872 |
Bring back `dagger doc`
|
## Problem
Dagger 0.1 had a command called `dagger doc`, which was similar to `go doc`. Given the names of a CUE package and definition, it would print information about their API.
Unfortunately, this feature was not compatible with Dagger 0.2, because it relied on concepts such as `@dagger(input)` and `@dagger(output)` which no longer exist. This is also why we currently don't have an API reference in our docs: the generator has not been ported to 0.2.
As a result, there is no easy way to look up available packages and their APIs while developing a Dagger 0.2 plan.
## Solution
Bring back `dagger doc` in a simpler form. Instead of scanning the CUE code and generating documentation, just print the CUE code as is. The output can be refined later - but at least developers get the equivalent of looking up the source file on github, which is what they need to do anyway. It's a strictly better developer experience, achievable in the short term.
|
https://github.com/dagger/dagger/issues/1872
|
https://github.com/dagger/dagger/pull/2693
|
a7d453ea93610431d42ff9c8735e4befbbfdaea2
|
7f87e7bb34547fe814f60cbc09440fef0b4ec103
| 2022-03-27T06:23:01Z |
go
| 2022-07-05T17:17:40Z |
cmd/dagger/cmd/doc.go
|
Use: "doc [PACKAGE | PATH]",
Short: "document a package",
Args: cobra.MaximumNArgs(1),
PreRun: func(cmd *cobra.Command, args []string) {
//
//
if err := viper.BindPFlags(cmd.Flags()); err != nil {
panic(err)
,
Run: func(cmd *cobra.Command, args []string) {
lg := logger.New()
ctx := lg.WithContext(cmd.Context())
doneCh := common.TrackCommand(ctx, cmd)
format := viper.GetString("format")
if format != textFormat &&
format != markdownFormat &&
format != jsonFormat {
lg.Fatal().Msg("format must be either `txt`, `md` or `json`")
output := viper.GetString("output")
if output != "" {
if len(args) > 0 {
lg.Warn().Str("packageName", args[0]).Msg("arg is ignored when --output is set")
walkStdlib(ctx, output, format)
return
if len(args) < 1 {
lg.Fatal().Msg("need to specify package name in command argument")
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,872 |
Bring back `dagger doc`
|
## Problem
Dagger 0.1 had a command called `dagger doc`, which was similar to `go doc`. Given the names of a CUE package and definition, it would print information about their API.
Unfortunately, this feature was not compatible with Dagger 0.2, because it relied on concepts such as `@dagger(input)` and `@dagger(output)` which no longer exist. This is also why we currently don't have an API reference in our docs: the generator has not been ported to 0.2.
As a result, there is no easy way to look up available packages and their APIs while developing a Dagger 0.2 plan.
## Solution
Bring back `dagger doc` in a simpler form. Instead of scanning the CUE code and generating documentation, just print the CUE code as is. The output can be refined later - but at least developers get the equivalent of looking up the source file on github, which is what they need to do anyway. It's a strictly better developer experience, achievable in the short term.
|
https://github.com/dagger/dagger/issues/1872
|
https://github.com/dagger/dagger/pull/2693
|
a7d453ea93610431d42ff9c8735e4befbbfdaea2
|
7f87e7bb34547fe814f60cbc09440fef0b4ec103
| 2022-03-27T06:23:01Z |
go
| 2022-07-05T17:17:40Z |
cmd/dagger/cmd/doc.go
|
packageName := args[0]
val, err := loadCode(packageName)
lg.Fatal().Err(err).Msg("cannot compile code")
p := Parse(ctx, packageName, val)
fmt.Printf("%s", p.Format(format))
<-doneCh
,
func init() {
docCmd.Flags().StringP("format", "f", textFormat, "Output format (txt|md)")
docCmd.Flags().StringP("output", "o", "", "Output directory")
if err := viper.BindPFlags(docCmd.Flags()); err != nil {
panic(err)
func loadCode(packageName string) (*compiler.Value, error) {
sources := map[string]fs.FS{
path.Join("cue.mod", "pkg"): pkg.FS,
src, err := compiler.Build(context.TODO(), "/config", sources, packageName)
, err
return src, nil
// walkStdlib generate whole docs from stdlib walk
func walkStdlib(ctx context.Context, output, format string) {
lg := log.Ctx(ctx)
lg.Info().Str("output", output).Msg("generating stdlib")
packages := map[string]*Package{
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,872 |
Bring back `dagger doc`
|
## Problem
Dagger 0.1 had a command called `dagger doc`, which was similar to `go doc`. Given the names of a CUE package and definition, it would print information about their API.
Unfortunately, this feature was not compatible with Dagger 0.2, because it relied on concepts such as `@dagger(input)` and `@dagger(output)` which no longer exist. This is also why we currently don't have an API reference in our docs: the generator has not been ported to 0.2.
As a result, there is no easy way to look up available packages and their APIs while developing a Dagger 0.2 plan.
## Solution
Bring back `dagger doc` in a simpler form. Instead of scanning the CUE code and generating documentation, just print the CUE code as is. The output can be refined later - but at least developers get the equivalent of looking up the source file on github, which is what they need to do anyway. It's a strictly better developer experience, achievable in the short term.
|
https://github.com/dagger/dagger/issues/1872
|
https://github.com/dagger/dagger/pull/2693
|
a7d453ea93610431d42ff9c8735e4befbbfdaea2
|
7f87e7bb34547fe814f60cbc09440fef0b4ec103
| 2022-03-27T06:23:01Z |
go
| 2022-07-05T17:17:40Z |
cmd/dagger/cmd/doc.go
|
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,872 |
Bring back `dagger doc`
|
## Problem
Dagger 0.1 had a command called `dagger doc`, which was similar to `go doc`. Given the names of a CUE package and definition, it would print information about their API.
Unfortunately, this feature was not compatible with Dagger 0.2, because it relied on concepts such as `@dagger(input)` and `@dagger(output)` which no longer exist. This is also why we currently don't have an API reference in our docs: the generator has not been ported to 0.2.
As a result, there is no easy way to look up available packages and their APIs while developing a Dagger 0.2 plan.
## Solution
Bring back `dagger doc` in a simpler form. Instead of scanning the CUE code and generating documentation, just print the CUE code as is. The output can be refined later - but at least developers get the equivalent of looking up the source file on github, which is what they need to do anyway. It's a strictly better developer experience, achievable in the short term.
|
https://github.com/dagger/dagger/issues/1872
|
https://github.com/dagger/dagger/pull/2693
|
a7d453ea93610431d42ff9c8735e4befbbfdaea2
|
7f87e7bb34547fe814f60cbc09440fef0b4ec103
| 2022-03-27T06:23:01Z |
go
| 2022-07-05T17:17:40Z |
cmd/dagger/cmd/doc.go
|
//
//
// )
//
//
//
hasSubPackages := func(name string) bool {
for p := range packages {
if strings.HasPrefix(p, name+"/") {
return true
return false
//
getFileName := func(p string) string {
filename := fmt.Sprintf("%s.%s", p, format)
//
//
if hasSubPackages(p) {
filename = fmt.Sprintf("%s/README.%s", p, format)
return filename
//
index, err := os.Create(path.Join(output, "README.md"))
lg.Fatal().Err(err).Msg("cannot generate stdlib doc index")
defer index.Close()
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,872 |
Bring back `dagger doc`
|
## Problem
Dagger 0.1 had a command called `dagger doc`, which was similar to `go doc`. Given the names of a CUE package and definition, it would print information about their API.
Unfortunately, this feature was not compatible with Dagger 0.2, because it relied on concepts such as `@dagger(input)` and `@dagger(output)` which no longer exist. This is also why we currently don't have an API reference in our docs: the generator has not been ported to 0.2.
As a result, there is no easy way to look up available packages and their APIs while developing a Dagger 0.2 plan.
## Solution
Bring back `dagger doc` in a simpler form. Instead of scanning the CUE code and generating documentation, just print the CUE code as is. The output can be refined later - but at least developers get the equivalent of looking up the source file on github, which is what they need to do anyway. It's a strictly better developer experience, achievable in the short term.
|
https://github.com/dagger/dagger/issues/1872
|
https://github.com/dagger/dagger/pull/2693
|
a7d453ea93610431d42ff9c8735e4befbbfdaea2
|
7f87e7bb34547fe814f60cbc09440fef0b4ec103
| 2022-03-27T06:23:01Z |
go
| 2022-07-05T17:17:40Z |
cmd/dagger/cmd/doc.go
|
//
//
fmt.Fprintf(index, "# Index\n")
indexKeys := []string{
for p, pkg := range packages {
filename := getFileName(p)
filepath := path.Join(output, filename)
if err := os.MkdirAll(path.Dir(filepath), 0755); err != nil {
lg.Fatal().Err(err).Msg("cannot create directory")
f, err := os.Create(filepath)
lg.Fatal().Err(err).Msg("cannot create file")
defer f.Close()
indexKeys = append(indexKeys, p)
fmt.Fprintf(f, "%s", pkg.Format(format))
//
sort.Strings(indexKeys)
//
//
if len(indexKeys) > 0 {
fmt.Fprintf(index, "\n")
for _, p := range indexKeys {
description := mdEscape(packages[p].Description)
fmt.Fprintf(index, "- [%s](./%s) - %s\n", p, getFileName(p), description)
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,053 |
β¨ Dagger: set buildkit network proxy
|
### What are you trying to do?
I have problem with access github and some domain with my network, when I do some plans it required that resource, It got network error.
### Why is this important to you?
_No response_
### How are you currently working around this?
set global proxy for my PC.
|
https://github.com/dagger/dagger/issues/2053
|
https://github.com/dagger/dagger/pull/2748
|
0fffdc223bb9d6c103538ef2fbbf5ed6fb5f3950
|
a12e9f2d5300c0dce379fc327a3e103cea6a01cf
| 2022-04-06T05:40:55Z |
go
| 2022-07-07T01:40:57Z |
plan/task/exec.go
|
package task
import (
"context"
"errors"
"fmt"
"io/fs"
"net"
"strings"
"syscall"
"time"
"cuelang.org/go/cue"
"github.com/moby/buildkit/client/llb"
"github.com/moby/buildkit/frontend/gateway/client"
"github.com/moby/buildkit/solver/pb"
"github.com/rs/zerolog/log"
"go.dagger.io/dagger/compiler"
"go.dagger.io/dagger/pkg"
"go.dagger.io/dagger/plancontext"
"go.dagger.io/dagger/solver"
)
func init() {
Register("Exec", func() Task { return &execTask{} })
Register("Start", func() Task { return &asyncExecTask{} })
Register("Stop", func() Task { return &stopAsyncExecTask{} })
Register("SendSignal", func() Task { return &sendSignalTask{} })
}
type execTask struct {
}
func (t *execTask) Run(ctx context.Context, pctx *plancontext.Context, s *solver.Solver, v *compiler.Value) (*compiler.Value, error) {
common, err := parseCommon(pctx, v)
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,053 |
β¨ Dagger: set buildkit network proxy
|
### What are you trying to do?
I have problem with access github and some domain with my network, when I do some plans it required that resource, It got network error.
### Why is this important to you?
_No response_
### How are you currently working around this?
set global proxy for my PC.
|
https://github.com/dagger/dagger/issues/2053
|
https://github.com/dagger/dagger/pull/2748
|
0fffdc223bb9d6c103538ef2fbbf5ed6fb5f3950
|
a12e9f2d5300c0dce379fc327a3e103cea6a01cf
| 2022-04-06T05:40:55Z |
go
| 2022-07-07T01:40:57Z |
plan/task/exec.go
|
if err != nil {
return nil, err
}
opts, err := common.runOpts()
if err != nil {
return nil, err
}
envs, err := v.Lookup("env").Fields()
if err != nil {
return nil, err
}
for _, env := range envs {
if plancontext.IsSecretValue(env.Value) {
secret, err := pctx.Secrets.FromValue(env.Value)
if err != nil {
return nil, err
}
opts = append(opts, llb.AddSecret(env.Label(), llb.SecretID(secret.ID()), llb.SecretAsEnv(true)))
} else {
s, err := env.Value.String()
if err != nil {
return nil, err
}
opts = append(opts, llb.AddEnv(env.Label(), s))
}
}
always, err := v.Lookup("always").Bool()
if err != nil {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,053 |
β¨ Dagger: set buildkit network proxy
|
### What are you trying to do?
I have problem with access github and some domain with my network, when I do some plans it required that resource, It got network error.
### Why is this important to you?
_No response_
### How are you currently working around this?
set global proxy for my PC.
|
https://github.com/dagger/dagger/issues/2053
|
https://github.com/dagger/dagger/pull/2748
|
0fffdc223bb9d6c103538ef2fbbf5ed6fb5f3950
|
a12e9f2d5300c0dce379fc327a3e103cea6a01cf
| 2022-04-06T05:40:55Z |
go
| 2022-07-07T01:40:57Z |
plan/task/exec.go
|
return nil, err
}
if always {
opts = append(opts, llb.IgnoreCache)
}
args := make([]string, 0, len(common.args))
for _, a := range common.args {
args = append(args, fmt.Sprintf("%q", a))
}
opts = append(opts, withCustomName(v, "Exec [%s]", strings.Join(args, ", ")))
st, err := common.root.State()
if err != nil {
return nil, err
}
st = st.Run(opts...).Root()
result, err := s.Solve(ctx, st, pctx.Platform.Get())
if err != nil {
return nil, err
}
resultFS := pctx.FS.New(result)
return compiler.NewValue().FillFields(map[string]interface{}{
"output": resultFS.MarshalCUE(),
"exit": 0,
})
}
type asyncExecTask struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,053 |
β¨ Dagger: set buildkit network proxy
|
### What are you trying to do?
I have problem with access github and some domain with my network, when I do some plans it required that resource, It got network error.
### Why is this important to you?
_No response_
### How are you currently working around this?
set global proxy for my PC.
|
https://github.com/dagger/dagger/issues/2053
|
https://github.com/dagger/dagger/pull/2748
|
0fffdc223bb9d6c103538ef2fbbf5ed6fb5f3950
|
a12e9f2d5300c0dce379fc327a3e103cea6a01cf
| 2022-04-06T05:40:55Z |
go
| 2022-07-07T01:40:57Z |
plan/task/exec.go
|
}
func (t *asyncExecTask) Run(ctx context.Context, pctx *plancontext.Context, s *solver.Solver, v *compiler.Value) (*compiler.Value, error) {
common, err := parseCommon(pctx, v)
if err != nil {
return nil, err
}
req, err := common.containerRequest()
if err != nil {
return nil, err
}
envVal, err := v.Lookup("env").Fields()
if err != nil {
return nil, err
}
for _, env := range envVal {
s, err := env.Value.String()
if err != nil {
return nil, err
}
req.Proc.Env = append(req.Proc.Env, fmt.Sprintf("%s=%s", env.Label(), s))
}
platform := pb.PlatformFromSpec(pctx.Platform.Get())
req.Container.Platform = &platform
ctrID, err := s.StartContainer(ctx, req)
if err != nil {
return nil, err
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,053 |
β¨ Dagger: set buildkit network proxy
|
### What are you trying to do?
I have problem with access github and some domain with my network, when I do some plans it required that resource, It got network error.
### Why is this important to you?
_No response_
### How are you currently working around this?
set global proxy for my PC.
|
https://github.com/dagger/dagger/issues/2053
|
https://github.com/dagger/dagger/pull/2748
|
0fffdc223bb9d6c103538ef2fbbf5ed6fb5f3950
|
a12e9f2d5300c0dce379fc327a3e103cea6a01cf
| 2022-04-06T05:40:55Z |
go
| 2022-07-07T01:40:57Z |
plan/task/exec.go
|
lg := log.Ctx(ctx)
lg.Debug().Msgf("started async exec %s", ctrID)
if err := v.FillPath(cue.MakePath(cue.Hid("_id", pkg.DaggerPackage)), ctrID); err != nil {
return nil, err
}
return v, nil
}
type stopAsyncExecTask struct {
}
func (t *stopAsyncExecTask) Run(ctx context.Context, _ *plancontext.Context, s *solver.Solver, v *compiler.Value) (*compiler.Value, error) {
ctrID, err := v.LookupPath(cue.MakePath(cue.Str("input"), cue.Hid("_id", pkg.DaggerPackage))).String()
if err != nil {
return nil, err
}
timeout, err := v.Lookup("timeout").Int64()
if err != nil {
return nil, err
}
lg := log.Ctx(ctx)
exitCode, err := s.StopContainer(ctx, ctrID, time.Duration(timeout))
if err != nil {
return nil, fmt.Errorf("failed to stop exec %s: %w", ctrID, err)
}
lg.Debug().Msgf("exec %s stopped with exit code %d", ctrID, exitCode)
return compiler.NewValue().FillFields(map[string]interface{}{
"exit": exitCode,
})
}
type sendSignalTask struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,053 |
β¨ Dagger: set buildkit network proxy
|
### What are you trying to do?
I have problem with access github and some domain with my network, when I do some plans it required that resource, It got network error.
### Why is this important to you?
_No response_
### How are you currently working around this?
set global proxy for my PC.
|
https://github.com/dagger/dagger/issues/2053
|
https://github.com/dagger/dagger/pull/2748
|
0fffdc223bb9d6c103538ef2fbbf5ed6fb5f3950
|
a12e9f2d5300c0dce379fc327a3e103cea6a01cf
| 2022-04-06T05:40:55Z |
go
| 2022-07-07T01:40:57Z |
plan/task/exec.go
|
}
func (t *sendSignalTask) Run(ctx context.Context, pctx *plancontext.Context, s *solver.Solver, v *compiler.Value) (*compiler.Value, error) {
ctrID, err := v.LookupPath(cue.MakePath(cue.Str("input"), cue.Hid("_id", pkg.DaggerPackage))).String()
if err != nil {
return nil, err
}
sigVal, err := v.Lookup("signal").Int64()
if err != nil {
return nil, err
}
sig := syscall.Signal(sigVal)
if err := s.SignalContainer(ctx, ctrID, sig); err != nil {
return nil, fmt.Errorf("failed to send signal %d to exec %s: %w", sig, ctrID, err)
}
return compiler.NewValue(), nil
}
func parseCommon(pctx *plancontext.Context, v *compiler.Value) (*execCommon, error) {
e := &execCommon{
hosts: make(map[string]string),
}
input, err := pctx.FS.FromValue(v.Lookup("input"))
if err != nil {
return nil, err
}
e.root = input
var cmd struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,053 |
β¨ Dagger: set buildkit network proxy
|
### What are you trying to do?
I have problem with access github and some domain with my network, when I do some plans it required that resource, It got network error.
### Why is this important to you?
_No response_
### How are you currently working around this?
set global proxy for my PC.
|
https://github.com/dagger/dagger/issues/2053
|
https://github.com/dagger/dagger/pull/2748
|
0fffdc223bb9d6c103538ef2fbbf5ed6fb5f3950
|
a12e9f2d5300c0dce379fc327a3e103cea6a01cf
| 2022-04-06T05:40:55Z |
go
| 2022-07-07T01:40:57Z |
plan/task/exec.go
|
Args []string
}
if err := v.Decode(&cmd); err != nil {
return nil, err
}
e.args = cmd.Args
workdir, err := v.Lookup("workdir").String()
if err != nil {
return nil, err
}
e.workdir = workdir
user, err := v.Lookup("user").String()
if err != nil {
return nil, err
}
e.user = user
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,053 |
β¨ Dagger: set buildkit network proxy
|
### What are you trying to do?
I have problem with access github and some domain with my network, when I do some plans it required that resource, It got network error.
### Why is this important to you?
_No response_
### How are you currently working around this?
set global proxy for my PC.
|
https://github.com/dagger/dagger/issues/2053
|
https://github.com/dagger/dagger/pull/2748
|
0fffdc223bb9d6c103538ef2fbbf5ed6fb5f3950
|
a12e9f2d5300c0dce379fc327a3e103cea6a01cf
| 2022-04-06T05:40:55Z |
go
| 2022-07-07T01:40:57Z |
plan/task/exec.go
|
hosts, err := v.Lookup("hosts").Fields()
if err != nil {
return nil, err
}
for _, host := range hosts {
ip, err := host.Value.String()
if err != nil {
return nil, err
}
e.hosts[host.Label()] = ip
}
mounts, err := v.Lookup("mounts").Fields()
if err != nil {
return nil, err
}
for _, mntField := range mounts {
if mntField.Value.Lookup("dest").IsConcreteR() != nil {
return nil, fmt.Errorf("mount %q is not concrete", mntField.Selector.String())
}
mnt, err := parseMount(pctx, mntField.Value)
if err != nil {
return nil, err
}
e.mounts = append(e.mounts, mnt)
}
return e, nil
}
type execCommon struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,053 |
β¨ Dagger: set buildkit network proxy
|
### What are you trying to do?
I have problem with access github and some domain with my network, when I do some plans it required that resource, It got network error.
### Why is this important to you?
_No response_
### How are you currently working around this?
set global proxy for my PC.
|
https://github.com/dagger/dagger/issues/2053
|
https://github.com/dagger/dagger/pull/2748
|
0fffdc223bb9d6c103538ef2fbbf5ed6fb5f3950
|
a12e9f2d5300c0dce379fc327a3e103cea6a01cf
| 2022-04-06T05:40:55Z |
go
| 2022-07-07T01:40:57Z |
plan/task/exec.go
|
root *plancontext.FS
args []string
workdir string
user string
hosts map[string]string
mounts []mount
}
func (e execCommon) runOpts() ([]llb.RunOption, error) {
opts := []llb.RunOption{
llb.Args(e.args),
llb.Dir(e.workdir),
llb.User(e.user),
}
for k, v := range e.hosts {
opts = append(opts, llb.AddExtraHost(k, net.ParseIP(v)))
}
for _, mnt := range e.mounts {
opt, err := mnt.runOpt()
if err != nil {
return nil, err
}
opts = append(opts, opt)
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,053 |
β¨ Dagger: set buildkit network proxy
|
### What are you trying to do?
I have problem with access github and some domain with my network, when I do some plans it required that resource, It got network error.
### Why is this important to you?
_No response_
### How are you currently working around this?
set global proxy for my PC.
|
https://github.com/dagger/dagger/issues/2053
|
https://github.com/dagger/dagger/pull/2748
|
0fffdc223bb9d6c103538ef2fbbf5ed6fb5f3950
|
a12e9f2d5300c0dce379fc327a3e103cea6a01cf
| 2022-04-06T05:40:55Z |
go
| 2022-07-07T01:40:57Z |
plan/task/exec.go
|
return opts, nil
}
func (e execCommon) containerRequest() (solver.StartContainerRequest, error) {
req := solver.StartContainerRequest{
Container: client.NewContainerRequest{
Mounts: []client.Mount{{
Dest: "/",
MountType: pb.MountType_BIND,
Ref: e.root.Result(),
}},
},
Proc: client.StartRequest{
Args: e.args,
User: e.user,
Cwd: e.workdir,
},
}
for _, mnt := range e.mounts {
m, err := mnt.containerMount()
if err != nil {
return req, err
}
req.Container.Mounts = append(req.Container.Mounts, m)
}
for k, v := range e.hosts {
req.Container.ExtraHosts = append(req.Container.ExtraHosts, &pb.HostIP{Host: k, IP: v})
}
return req, nil
}
func parseMount(pctx *plancontext.Context, v *compiler.Value) (mount, error) {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,053 |
β¨ Dagger: set buildkit network proxy
|
### What are you trying to do?
I have problem with access github and some domain with my network, when I do some plans it required that resource, It got network error.
### Why is this important to you?
_No response_
### How are you currently working around this?
set global proxy for my PC.
|
https://github.com/dagger/dagger/issues/2053
|
https://github.com/dagger/dagger/pull/2748
|
0fffdc223bb9d6c103538ef2fbbf5ed6fb5f3950
|
a12e9f2d5300c0dce379fc327a3e103cea6a01cf
| 2022-04-06T05:40:55Z |
go
| 2022-07-07T01:40:57Z |
plan/task/exec.go
|
dest, err := v.Lookup("dest").String()
if err != nil {
return mount{}, err
}
typ, err := v.Lookup("type").String()
if err != nil {
return mount{}, err
}
switch typ {
case "cache":
contents := v.Lookup("contents")
idValue := contents.Lookup("id")
if !idValue.IsConcrete() {
return mount{}, fmt.Errorf("cache %q is not set", v.Path().String())
}
id, err := idValue.String()
if err != nil {
return mount{}, err
}
concurrency, err := contents.Lookup("concurrency").String()
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,053 |
β¨ Dagger: set buildkit network proxy
|
### What are you trying to do?
I have problem with access github and some domain with my network, when I do some plans it required that resource, It got network error.
### Why is this important to you?
_No response_
### How are you currently working around this?
set global proxy for my PC.
|
https://github.com/dagger/dagger/issues/2053
|
https://github.com/dagger/dagger/pull/2748
|
0fffdc223bb9d6c103538ef2fbbf5ed6fb5f3950
|
a12e9f2d5300c0dce379fc327a3e103cea6a01cf
| 2022-04-06T05:40:55Z |
go
| 2022-07-07T01:40:57Z |
plan/task/exec.go
|
if err != nil {
return mount{}, err
}
var mode llb.CacheMountSharingMode
switch concurrency {
case "shared":
mode = llb.CacheMountShared
case "private":
mode = llb.CacheMountPrivate
case "locked":
mode = llb.CacheMountLocked
default:
return mount{}, fmt.Errorf("unknown concurrency mode %q", concurrency)
}
return mount{
dest: dest,
cacheMount: &cacheMount{
id: id,
concurrency: mode,
},
}, nil
case "tmp":
return mount{dest: dest, tmpMount: &tmpMount{}}, nil
case "socket":
socket, err := pctx.Sockets.FromValue(v.Lookup("contents"))
if err != nil {
return mount{}, err
}
return mount{dest: dest, socketMount: &socketMount{id: socket.ID()}}, nil
case "fs":
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,053 |
β¨ Dagger: set buildkit network proxy
|
### What are you trying to do?
I have problem with access github and some domain with my network, when I do some plans it required that resource, It got network error.
### Why is this important to you?
_No response_
### How are you currently working around this?
set global proxy for my PC.
|
https://github.com/dagger/dagger/issues/2053
|
https://github.com/dagger/dagger/pull/2748
|
0fffdc223bb9d6c103538ef2fbbf5ed6fb5f3950
|
a12e9f2d5300c0dce379fc327a3e103cea6a01cf
| 2022-04-06T05:40:55Z |
go
| 2022-07-07T01:40:57Z |
plan/task/exec.go
|
mnt := mount{
dest: dest,
fsMount: &fsMount{},
}
contents, err := pctx.FS.FromValue(v.Lookup("contents"))
if err != nil {
return mount{}, err
}
mnt.fsMount.contents = contents
if source := v.Lookup("source"); source.Exists() {
src, err := source.String()
if err != nil {
return mount{}, err
}
mnt.fsMount.source = src
}
if ro := v.Lookup("ro"); ro.Exists() {
readonly, err := ro.Bool()
if err != nil {
return mount{}, err
}
mnt.fsMount.readonly = readonly
}
return mnt, nil
case "secret":
contents, err := pctx.Secrets.FromValue(v.Lookup("contents"))
if err != nil {
return mount{}, err
}
opts := struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,053 |
β¨ Dagger: set buildkit network proxy
|
### What are you trying to do?
I have problem with access github and some domain with my network, when I do some plans it required that resource, It got network error.
### Why is this important to you?
_No response_
### How are you currently working around this?
set global proxy for my PC.
|
https://github.com/dagger/dagger/issues/2053
|
https://github.com/dagger/dagger/pull/2748
|
0fffdc223bb9d6c103538ef2fbbf5ed6fb5f3950
|
a12e9f2d5300c0dce379fc327a3e103cea6a01cf
| 2022-04-06T05:40:55Z |
go
| 2022-07-07T01:40:57Z |
plan/task/exec.go
|
UID uint32
GID uint32
Mask uint32
}{}
if err := v.Decode(&opts); err != nil {
return mount{}, err
}
return mount{
dest: dest,
secretMount: &secretMount{
id: contents.ID(),
uid: opts.UID,
gid: opts.GID,
mask: opts.Mask,
},
}, nil
case "file":
contents, err := v.Lookup("contents").String()
if err != nil {
return mount{}, err
}
opts := struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,053 |
β¨ Dagger: set buildkit network proxy
|
### What are you trying to do?
I have problem with access github and some domain with my network, when I do some plans it required that resource, It got network error.
### Why is this important to you?
_No response_
### How are you currently working around this?
set global proxy for my PC.
|
https://github.com/dagger/dagger/issues/2053
|
https://github.com/dagger/dagger/pull/2748
|
0fffdc223bb9d6c103538ef2fbbf5ed6fb5f3950
|
a12e9f2d5300c0dce379fc327a3e103cea6a01cf
| 2022-04-06T05:40:55Z |
go
| 2022-07-07T01:40:57Z |
plan/task/exec.go
|
Permissions uint32
}{}
if err := v.Decode(&opts); err != nil {
return mount{}, err
}
return mount{
dest: dest,
fileMount: &fileMount{
contents: contents,
permissions: opts.Permissions,
},
}, nil
case "":
return mount{}, errors.New("no mount type specified")
default:
return mount{}, fmt.Errorf("unsupported mount type %q", typ)
}
}
type mount struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,053 |
β¨ Dagger: set buildkit network proxy
|
### What are you trying to do?
I have problem with access github and some domain with my network, when I do some plans it required that resource, It got network error.
### Why is this important to you?
_No response_
### How are you currently working around this?
set global proxy for my PC.
|
https://github.com/dagger/dagger/issues/2053
|
https://github.com/dagger/dagger/pull/2748
|
0fffdc223bb9d6c103538ef2fbbf5ed6fb5f3950
|
a12e9f2d5300c0dce379fc327a3e103cea6a01cf
| 2022-04-06T05:40:55Z |
go
| 2022-07-07T01:40:57Z |
plan/task/exec.go
|
dest string
cacheMount *cacheMount
tmpMount *tmpMount
socketMount *socketMount
fsMount *fsMount
secretMount *secretMount
fileMount *fileMount
}
func (m mount) runOpt() (llb.RunOption, error) {
switch {
case m.cacheMount != nil:
return llb.AddMount(
m.dest,
llb.Scratch(),
llb.AsPersistentCacheDir(m.cacheMount.id, m.cacheMount.concurrency),
), nil
case m.tmpMount != nil:
return llb.AddMount(
m.dest,
llb.Scratch(),
llb.Tmpfs(),
), nil
case m.socketMount != nil:
return llb.AddSSHSocket(
llb.SSHID(m.socketMount.id),
llb.SSHSocketTarget(m.dest),
), nil
case m.fsMount != nil:
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,053 |
β¨ Dagger: set buildkit network proxy
|
### What are you trying to do?
I have problem with access github and some domain with my network, when I do some plans it required that resource, It got network error.
### Why is this important to you?
_No response_
### How are you currently working around this?
set global proxy for my PC.
|
https://github.com/dagger/dagger/issues/2053
|
https://github.com/dagger/dagger/pull/2748
|
0fffdc223bb9d6c103538ef2fbbf5ed6fb5f3950
|
a12e9f2d5300c0dce379fc327a3e103cea6a01cf
| 2022-04-06T05:40:55Z |
go
| 2022-07-07T01:40:57Z |
plan/task/exec.go
|
st, err := m.fsMount.contents.State()
if err != nil {
return nil, err
}
var opts []llb.MountOption
if m.fsMount.source != "" {
opts = append(opts, llb.SourcePath(m.fsMount.source))
}
if m.fsMount.readonly {
opts = append(opts, llb.Readonly)
}
return llb.AddMount(
m.dest,
st,
opts...,
), nil
case m.secretMount != nil:
return llb.AddSecret(
m.dest,
llb.SecretID(m.secretMount.id),
llb.SecretFileOpt(int(m.secretMount.uid), int(m.secretMount.gid), int(m.secretMount.mask)),
), nil
case m.fileMount != nil:
return llb.AddMount(
m.dest,
llb.Scratch().File(llb.Mkfile(
"/file",
fs.FileMode(m.fileMount.permissions),
[]byte(m.fileMount.contents))),
llb.SourcePath("/file"),
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,053 |
β¨ Dagger: set buildkit network proxy
|
### What are you trying to do?
I have problem with access github and some domain with my network, when I do some plans it required that resource, It got network error.
### Why is this important to you?
_No response_
### How are you currently working around this?
set global proxy for my PC.
|
https://github.com/dagger/dagger/issues/2053
|
https://github.com/dagger/dagger/pull/2748
|
0fffdc223bb9d6c103538ef2fbbf5ed6fb5f3950
|
a12e9f2d5300c0dce379fc327a3e103cea6a01cf
| 2022-04-06T05:40:55Z |
go
| 2022-07-07T01:40:57Z |
plan/task/exec.go
|
), nil
}
return nil, fmt.Errorf("no mount type set")
}
func (m mount) containerMount() (client.Mount, error) {
switch {
case m.cacheMount != nil:
mnt := client.Mount{
Dest: m.dest,
MountType: pb.MountType_CACHE,
CacheOpt: &pb.CacheOpt{
ID: m.cacheMount.id,
},
}
switch m.cacheMount.concurrency {
case llb.CacheMountShared:
mnt.CacheOpt.Sharing = pb.CacheSharingOpt_SHARED
case llb.CacheMountPrivate:
mnt.CacheOpt.Sharing = pb.CacheSharingOpt_PRIVATE
case llb.CacheMountLocked:
mnt.CacheOpt.Sharing = pb.CacheSharingOpt_LOCKED
}
return mnt, nil
case m.tmpMount != nil:
return client.Mount{
Dest: m.dest,
MountType: pb.MountType_TMPFS,
}, nil
case m.socketMount != nil:
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,053 |
β¨ Dagger: set buildkit network proxy
|
### What are you trying to do?
I have problem with access github and some domain with my network, when I do some plans it required that resource, It got network error.
### Why is this important to you?
_No response_
### How are you currently working around this?
set global proxy for my PC.
|
https://github.com/dagger/dagger/issues/2053
|
https://github.com/dagger/dagger/pull/2748
|
0fffdc223bb9d6c103538ef2fbbf5ed6fb5f3950
|
a12e9f2d5300c0dce379fc327a3e103cea6a01cf
| 2022-04-06T05:40:55Z |
go
| 2022-07-07T01:40:57Z |
plan/task/exec.go
|
return client.Mount{
Dest: m.dest,
MountType: pb.MountType_SSH,
SSHOpt: &pb.SSHOpt{
ID: m.socketMount.id,
},
}, nil
case m.fsMount != nil:
return client.Mount{
Dest: m.dest,
MountType: pb.MountType_BIND,
Ref: m.fsMount.contents.Result(),
Selector: m.fsMount.source,
Readonly: m.fsMount.readonly,
}, nil
case m.secretMount != nil:
return client.Mount{
Dest: m.dest,
MountType: pb.MountType_SECRET,
SecretOpt: &pb.SecretOpt{
ID: m.secretMount.id,
Uid: m.secretMount.uid,
Gid: m.secretMount.gid,
Mode: m.secretMount.mask,
},
}, nil
}
return client.Mount{}, fmt.Errorf("no mount type set")
}
type cacheMount struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,053 |
β¨ Dagger: set buildkit network proxy
|
### What are you trying to do?
I have problem with access github and some domain with my network, when I do some plans it required that resource, It got network error.
### Why is this important to you?
_No response_
### How are you currently working around this?
set global proxy for my PC.
|
https://github.com/dagger/dagger/issues/2053
|
https://github.com/dagger/dagger/pull/2748
|
0fffdc223bb9d6c103538ef2fbbf5ed6fb5f3950
|
a12e9f2d5300c0dce379fc327a3e103cea6a01cf
| 2022-04-06T05:40:55Z |
go
| 2022-07-07T01:40:57Z |
plan/task/exec.go
|
id string
concurrency llb.CacheMountSharingMode
}
type tmpMount struct {
}
type socketMount struct {
id string
}
type fsMount struct {
contents *plancontext.FS
source string
readonly bool
}
type secretMount struct {
id string
uid uint32
gid uint32
mask uint32
}
type fileMount struct {
contents string
permissions uint32
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,369 |
Dagger doesn't work behind a corporate proxy
|
dagger up return error behind a http proxy
Test with :
* dagger 0.1.0-alpha.31 (374f1ba) linux/amd64 and dagger devel (7d965942) linux/amd64
* Ubuntu 20.04.3 LTS
* Docker 20
All docker command work with my proxy (configure into ~/.docker/config.json and /etc/systemd/system/docker.service.d/http-proxy.conf)
But with dagger I got this error.
```
[β] wait 10.3s
[β] app.source 0.0s
[β] registry.run 10.3s
#5 0.160 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz
#5 5.164 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/community/x86_64/APKINDEX.tar.gz
#5 5.164 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/main: temporary error (try again later)
#5 10.17 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/community: temporary error (try again later)
#5 10.17 ERROR: unable to select packages:
#5 10.17 bash (no such package):
#5 10.17 required by: world[bash]
[β] app.ctr 10.2s
8:45PM FTL failed to up environment: task failed: process "apk add -U --no-cache bash" did not complete successfully: exit code: 1
```
If I remove my VPN and proxy, first step of dagger are ok, but not the docker image download part :
```
8:47PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:47PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:47PM DBG failed to check universe version: universe not installed
8:47PM DBG spawning buildkit job attrs=null localdirs={
"/home/me/examples/todoapp": "/home/me/examples/todoapp"
}
[β] wait 35.7s
[β] app.source 0.1s
[β] registry.run 11.5s
[β] app.ctr 48.1s
[β] app.build 0.1s
[β] image 10.0s
dependency detected dependency=app.build
executing operation do=load pipeline=image
executing operation do=fetch-container pipeline=image.#up[0].from
#17 load metadata for docker.io/library/nginx:latest
#17 sha256:06c466a4eb6821b81bd3e48610e5f38dab858b1e9acb01d6e2f6b11c8fabe6bc
#17 ERROR: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": proxyconnect tcp: dial tcp: lookup proxy on 127.0.0.53:53: server misbehaving
------
> @image.#up[0].from@ load metadata for docker.io/library/nginx:latest:
------
8:48PM FTL failed to up environment: task failed: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": proxyconnect tcp: dial tcp: lookup proxy on 127.0.0.53:53: server misbehaving
```
After I reconnect my VPN and proxy and all end :)
```
8:49PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:49PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:49PM DBG failed to check universe version: universe not installed
8:49PM DBG spawning buildkit job attrs=null localdirs={
"/home/me/examples/todoapp": "/home/me/examples/todoapp"
}
[β] wait 0.2s
[β] app.source 0.1s
[β] registry.run 1.1s
[β] app.ctr 0.0s
[β] app.build 0.1s
[β] image 39.1s
[β] push.source 1.0s
[β] push.push 1.3s
4.6s
[β] push.digest 0.6s
[β] push.ref 0.5s
[β] run.ref 0.5s
[β] run.run 2.5s
Output Value Description
app.build struct Build output directory
push.ref "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image ref
push.digest "sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image digest
run.ref "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image reference (e.g: nginx:alpine)
run.run.env.IMAGE_REF "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" -
appURL "http://localhost:8080/"
```
It's look like one part support proxy but not other one...
|
https://github.com/dagger/dagger/issues/1369
|
https://github.com/dagger/dagger/pull/2748
|
0fffdc223bb9d6c103538ef2fbbf5ed6fb5f3950
|
a12e9f2d5300c0dce379fc327a3e103cea6a01cf
| 2022-01-07T19:59:45Z |
go
| 2022-07-07T01:40:57Z |
plan/task/exec.go
|
package task
import (
"context"
"errors"
"fmt"
"io/fs"
"net"
"strings"
"syscall"
"time"
"cuelang.org/go/cue"
"github.com/moby/buildkit/client/llb"
"github.com/moby/buildkit/frontend/gateway/client"
"github.com/moby/buildkit/solver/pb"
"github.com/rs/zerolog/log"
"go.dagger.io/dagger/compiler"
"go.dagger.io/dagger/pkg"
"go.dagger.io/dagger/plancontext"
"go.dagger.io/dagger/solver"
)
func init() {
Register("Exec", func() Task { return &execTask{} })
Register("Start", func() Task { return &asyncExecTask{} })
Register("Stop", func() Task { return &stopAsyncExecTask{} })
Register("SendSignal", func() Task { return &sendSignalTask{} })
}
type execTask struct {
}
func (t *execTask) Run(ctx context.Context, pctx *plancontext.Context, s *solver.Solver, v *compiler.Value) (*compiler.Value, error) {
common, err := parseCommon(pctx, v)
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,369 |
Dagger doesn't work behind a corporate proxy
|
dagger up return error behind a http proxy
Test with :
* dagger 0.1.0-alpha.31 (374f1ba) linux/amd64 and dagger devel (7d965942) linux/amd64
* Ubuntu 20.04.3 LTS
* Docker 20
All docker command work with my proxy (configure into ~/.docker/config.json and /etc/systemd/system/docker.service.d/http-proxy.conf)
But with dagger I got this error.
```
[β] wait 10.3s
[β] app.source 0.0s
[β] registry.run 10.3s
#5 0.160 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz
#5 5.164 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/community/x86_64/APKINDEX.tar.gz
#5 5.164 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/main: temporary error (try again later)
#5 10.17 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/community: temporary error (try again later)
#5 10.17 ERROR: unable to select packages:
#5 10.17 bash (no such package):
#5 10.17 required by: world[bash]
[β] app.ctr 10.2s
8:45PM FTL failed to up environment: task failed: process "apk add -U --no-cache bash" did not complete successfully: exit code: 1
```
If I remove my VPN and proxy, first step of dagger are ok, but not the docker image download part :
```
8:47PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:47PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:47PM DBG failed to check universe version: universe not installed
8:47PM DBG spawning buildkit job attrs=null localdirs={
"/home/me/examples/todoapp": "/home/me/examples/todoapp"
}
[β] wait 35.7s
[β] app.source 0.1s
[β] registry.run 11.5s
[β] app.ctr 48.1s
[β] app.build 0.1s
[β] image 10.0s
dependency detected dependency=app.build
executing operation do=load pipeline=image
executing operation do=fetch-container pipeline=image.#up[0].from
#17 load metadata for docker.io/library/nginx:latest
#17 sha256:06c466a4eb6821b81bd3e48610e5f38dab858b1e9acb01d6e2f6b11c8fabe6bc
#17 ERROR: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": proxyconnect tcp: dial tcp: lookup proxy on 127.0.0.53:53: server misbehaving
------
> @image.#up[0].from@ load metadata for docker.io/library/nginx:latest:
------
8:48PM FTL failed to up environment: task failed: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": proxyconnect tcp: dial tcp: lookup proxy on 127.0.0.53:53: server misbehaving
```
After I reconnect my VPN and proxy and all end :)
```
8:49PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:49PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:49PM DBG failed to check universe version: universe not installed
8:49PM DBG spawning buildkit job attrs=null localdirs={
"/home/me/examples/todoapp": "/home/me/examples/todoapp"
}
[β] wait 0.2s
[β] app.source 0.1s
[β] registry.run 1.1s
[β] app.ctr 0.0s
[β] app.build 0.1s
[β] image 39.1s
[β] push.source 1.0s
[β] push.push 1.3s
4.6s
[β] push.digest 0.6s
[β] push.ref 0.5s
[β] run.ref 0.5s
[β] run.run 2.5s
Output Value Description
app.build struct Build output directory
push.ref "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image ref
push.digest "sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image digest
run.ref "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image reference (e.g: nginx:alpine)
run.run.env.IMAGE_REF "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" -
appURL "http://localhost:8080/"
```
It's look like one part support proxy but not other one...
|
https://github.com/dagger/dagger/issues/1369
|
https://github.com/dagger/dagger/pull/2748
|
0fffdc223bb9d6c103538ef2fbbf5ed6fb5f3950
|
a12e9f2d5300c0dce379fc327a3e103cea6a01cf
| 2022-01-07T19:59:45Z |
go
| 2022-07-07T01:40:57Z |
plan/task/exec.go
|
if err != nil {
return nil, err
}
opts, err := common.runOpts()
if err != nil {
return nil, err
}
envs, err := v.Lookup("env").Fields()
if err != nil {
return nil, err
}
for _, env := range envs {
if plancontext.IsSecretValue(env.Value) {
secret, err := pctx.Secrets.FromValue(env.Value)
if err != nil {
return nil, err
}
opts = append(opts, llb.AddSecret(env.Label(), llb.SecretID(secret.ID()), llb.SecretAsEnv(true)))
} else {
s, err := env.Value.String()
if err != nil {
return nil, err
}
opts = append(opts, llb.AddEnv(env.Label(), s))
}
}
always, err := v.Lookup("always").Bool()
if err != nil {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,369 |
Dagger doesn't work behind a corporate proxy
|
dagger up return error behind a http proxy
Test with :
* dagger 0.1.0-alpha.31 (374f1ba) linux/amd64 and dagger devel (7d965942) linux/amd64
* Ubuntu 20.04.3 LTS
* Docker 20
All docker command work with my proxy (configure into ~/.docker/config.json and /etc/systemd/system/docker.service.d/http-proxy.conf)
But with dagger I got this error.
```
[β] wait 10.3s
[β] app.source 0.0s
[β] registry.run 10.3s
#5 0.160 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz
#5 5.164 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/community/x86_64/APKINDEX.tar.gz
#5 5.164 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/main: temporary error (try again later)
#5 10.17 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/community: temporary error (try again later)
#5 10.17 ERROR: unable to select packages:
#5 10.17 bash (no such package):
#5 10.17 required by: world[bash]
[β] app.ctr 10.2s
8:45PM FTL failed to up environment: task failed: process "apk add -U --no-cache bash" did not complete successfully: exit code: 1
```
If I remove my VPN and proxy, first step of dagger are ok, but not the docker image download part :
```
8:47PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:47PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:47PM DBG failed to check universe version: universe not installed
8:47PM DBG spawning buildkit job attrs=null localdirs={
"/home/me/examples/todoapp": "/home/me/examples/todoapp"
}
[β] wait 35.7s
[β] app.source 0.1s
[β] registry.run 11.5s
[β] app.ctr 48.1s
[β] app.build 0.1s
[β] image 10.0s
dependency detected dependency=app.build
executing operation do=load pipeline=image
executing operation do=fetch-container pipeline=image.#up[0].from
#17 load metadata for docker.io/library/nginx:latest
#17 sha256:06c466a4eb6821b81bd3e48610e5f38dab858b1e9acb01d6e2f6b11c8fabe6bc
#17 ERROR: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": proxyconnect tcp: dial tcp: lookup proxy on 127.0.0.53:53: server misbehaving
------
> @image.#up[0].from@ load metadata for docker.io/library/nginx:latest:
------
8:48PM FTL failed to up environment: task failed: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": proxyconnect tcp: dial tcp: lookup proxy on 127.0.0.53:53: server misbehaving
```
After I reconnect my VPN and proxy and all end :)
```
8:49PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:49PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:49PM DBG failed to check universe version: universe not installed
8:49PM DBG spawning buildkit job attrs=null localdirs={
"/home/me/examples/todoapp": "/home/me/examples/todoapp"
}
[β] wait 0.2s
[β] app.source 0.1s
[β] registry.run 1.1s
[β] app.ctr 0.0s
[β] app.build 0.1s
[β] image 39.1s
[β] push.source 1.0s
[β] push.push 1.3s
4.6s
[β] push.digest 0.6s
[β] push.ref 0.5s
[β] run.ref 0.5s
[β] run.run 2.5s
Output Value Description
app.build struct Build output directory
push.ref "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image ref
push.digest "sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image digest
run.ref "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image reference (e.g: nginx:alpine)
run.run.env.IMAGE_REF "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" -
appURL "http://localhost:8080/"
```
It's look like one part support proxy but not other one...
|
https://github.com/dagger/dagger/issues/1369
|
https://github.com/dagger/dagger/pull/2748
|
0fffdc223bb9d6c103538ef2fbbf5ed6fb5f3950
|
a12e9f2d5300c0dce379fc327a3e103cea6a01cf
| 2022-01-07T19:59:45Z |
go
| 2022-07-07T01:40:57Z |
plan/task/exec.go
|
return nil, err
}
if always {
opts = append(opts, llb.IgnoreCache)
}
args := make([]string, 0, len(common.args))
for _, a := range common.args {
args = append(args, fmt.Sprintf("%q", a))
}
opts = append(opts, withCustomName(v, "Exec [%s]", strings.Join(args, ", ")))
st, err := common.root.State()
if err != nil {
return nil, err
}
st = st.Run(opts...).Root()
result, err := s.Solve(ctx, st, pctx.Platform.Get())
if err != nil {
return nil, err
}
resultFS := pctx.FS.New(result)
return compiler.NewValue().FillFields(map[string]interface{}{
"output": resultFS.MarshalCUE(),
"exit": 0,
})
}
type asyncExecTask struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,369 |
Dagger doesn't work behind a corporate proxy
|
dagger up return error behind a http proxy
Test with :
* dagger 0.1.0-alpha.31 (374f1ba) linux/amd64 and dagger devel (7d965942) linux/amd64
* Ubuntu 20.04.3 LTS
* Docker 20
All docker command work with my proxy (configure into ~/.docker/config.json and /etc/systemd/system/docker.service.d/http-proxy.conf)
But with dagger I got this error.
```
[β] wait 10.3s
[β] app.source 0.0s
[β] registry.run 10.3s
#5 0.160 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz
#5 5.164 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/community/x86_64/APKINDEX.tar.gz
#5 5.164 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/main: temporary error (try again later)
#5 10.17 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/community: temporary error (try again later)
#5 10.17 ERROR: unable to select packages:
#5 10.17 bash (no such package):
#5 10.17 required by: world[bash]
[β] app.ctr 10.2s
8:45PM FTL failed to up environment: task failed: process "apk add -U --no-cache bash" did not complete successfully: exit code: 1
```
If I remove my VPN and proxy, first step of dagger are ok, but not the docker image download part :
```
8:47PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:47PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:47PM DBG failed to check universe version: universe not installed
8:47PM DBG spawning buildkit job attrs=null localdirs={
"/home/me/examples/todoapp": "/home/me/examples/todoapp"
}
[β] wait 35.7s
[β] app.source 0.1s
[β] registry.run 11.5s
[β] app.ctr 48.1s
[β] app.build 0.1s
[β] image 10.0s
dependency detected dependency=app.build
executing operation do=load pipeline=image
executing operation do=fetch-container pipeline=image.#up[0].from
#17 load metadata for docker.io/library/nginx:latest
#17 sha256:06c466a4eb6821b81bd3e48610e5f38dab858b1e9acb01d6e2f6b11c8fabe6bc
#17 ERROR: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": proxyconnect tcp: dial tcp: lookup proxy on 127.0.0.53:53: server misbehaving
------
> @image.#up[0].from@ load metadata for docker.io/library/nginx:latest:
------
8:48PM FTL failed to up environment: task failed: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": proxyconnect tcp: dial tcp: lookup proxy on 127.0.0.53:53: server misbehaving
```
After I reconnect my VPN and proxy and all end :)
```
8:49PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:49PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:49PM DBG failed to check universe version: universe not installed
8:49PM DBG spawning buildkit job attrs=null localdirs={
"/home/me/examples/todoapp": "/home/me/examples/todoapp"
}
[β] wait 0.2s
[β] app.source 0.1s
[β] registry.run 1.1s
[β] app.ctr 0.0s
[β] app.build 0.1s
[β] image 39.1s
[β] push.source 1.0s
[β] push.push 1.3s
4.6s
[β] push.digest 0.6s
[β] push.ref 0.5s
[β] run.ref 0.5s
[β] run.run 2.5s
Output Value Description
app.build struct Build output directory
push.ref "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image ref
push.digest "sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image digest
run.ref "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image reference (e.g: nginx:alpine)
run.run.env.IMAGE_REF "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" -
appURL "http://localhost:8080/"
```
It's look like one part support proxy but not other one...
|
https://github.com/dagger/dagger/issues/1369
|
https://github.com/dagger/dagger/pull/2748
|
0fffdc223bb9d6c103538ef2fbbf5ed6fb5f3950
|
a12e9f2d5300c0dce379fc327a3e103cea6a01cf
| 2022-01-07T19:59:45Z |
go
| 2022-07-07T01:40:57Z |
plan/task/exec.go
|
}
func (t *asyncExecTask) Run(ctx context.Context, pctx *plancontext.Context, s *solver.Solver, v *compiler.Value) (*compiler.Value, error) {
common, err := parseCommon(pctx, v)
if err != nil {
return nil, err
}
req, err := common.containerRequest()
if err != nil {
return nil, err
}
envVal, err := v.Lookup("env").Fields()
if err != nil {
return nil, err
}
for _, env := range envVal {
s, err := env.Value.String()
if err != nil {
return nil, err
}
req.Proc.Env = append(req.Proc.Env, fmt.Sprintf("%s=%s", env.Label(), s))
}
platform := pb.PlatformFromSpec(pctx.Platform.Get())
req.Container.Platform = &platform
ctrID, err := s.StartContainer(ctx, req)
if err != nil {
return nil, err
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,369 |
Dagger doesn't work behind a corporate proxy
|
dagger up return error behind a http proxy
Test with :
* dagger 0.1.0-alpha.31 (374f1ba) linux/amd64 and dagger devel (7d965942) linux/amd64
* Ubuntu 20.04.3 LTS
* Docker 20
All docker command work with my proxy (configure into ~/.docker/config.json and /etc/systemd/system/docker.service.d/http-proxy.conf)
But with dagger I got this error.
```
[β] wait 10.3s
[β] app.source 0.0s
[β] registry.run 10.3s
#5 0.160 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz
#5 5.164 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/community/x86_64/APKINDEX.tar.gz
#5 5.164 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/main: temporary error (try again later)
#5 10.17 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/community: temporary error (try again later)
#5 10.17 ERROR: unable to select packages:
#5 10.17 bash (no such package):
#5 10.17 required by: world[bash]
[β] app.ctr 10.2s
8:45PM FTL failed to up environment: task failed: process "apk add -U --no-cache bash" did not complete successfully: exit code: 1
```
If I remove my VPN and proxy, first step of dagger are ok, but not the docker image download part :
```
8:47PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:47PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:47PM DBG failed to check universe version: universe not installed
8:47PM DBG spawning buildkit job attrs=null localdirs={
"/home/me/examples/todoapp": "/home/me/examples/todoapp"
}
[β] wait 35.7s
[β] app.source 0.1s
[β] registry.run 11.5s
[β] app.ctr 48.1s
[β] app.build 0.1s
[β] image 10.0s
dependency detected dependency=app.build
executing operation do=load pipeline=image
executing operation do=fetch-container pipeline=image.#up[0].from
#17 load metadata for docker.io/library/nginx:latest
#17 sha256:06c466a4eb6821b81bd3e48610e5f38dab858b1e9acb01d6e2f6b11c8fabe6bc
#17 ERROR: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": proxyconnect tcp: dial tcp: lookup proxy on 127.0.0.53:53: server misbehaving
------
> @image.#up[0].from@ load metadata for docker.io/library/nginx:latest:
------
8:48PM FTL failed to up environment: task failed: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": proxyconnect tcp: dial tcp: lookup proxy on 127.0.0.53:53: server misbehaving
```
After I reconnect my VPN and proxy and all end :)
```
8:49PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:49PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:49PM DBG failed to check universe version: universe not installed
8:49PM DBG spawning buildkit job attrs=null localdirs={
"/home/me/examples/todoapp": "/home/me/examples/todoapp"
}
[β] wait 0.2s
[β] app.source 0.1s
[β] registry.run 1.1s
[β] app.ctr 0.0s
[β] app.build 0.1s
[β] image 39.1s
[β] push.source 1.0s
[β] push.push 1.3s
4.6s
[β] push.digest 0.6s
[β] push.ref 0.5s
[β] run.ref 0.5s
[β] run.run 2.5s
Output Value Description
app.build struct Build output directory
push.ref "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image ref
push.digest "sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image digest
run.ref "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image reference (e.g: nginx:alpine)
run.run.env.IMAGE_REF "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" -
appURL "http://localhost:8080/"
```
It's look like one part support proxy but not other one...
|
https://github.com/dagger/dagger/issues/1369
|
https://github.com/dagger/dagger/pull/2748
|
0fffdc223bb9d6c103538ef2fbbf5ed6fb5f3950
|
a12e9f2d5300c0dce379fc327a3e103cea6a01cf
| 2022-01-07T19:59:45Z |
go
| 2022-07-07T01:40:57Z |
plan/task/exec.go
|
lg := log.Ctx(ctx)
lg.Debug().Msgf("started async exec %s", ctrID)
if err := v.FillPath(cue.MakePath(cue.Hid("_id", pkg.DaggerPackage)), ctrID); err != nil {
return nil, err
}
return v, nil
}
type stopAsyncExecTask struct {
}
func (t *stopAsyncExecTask) Run(ctx context.Context, _ *plancontext.Context, s *solver.Solver, v *compiler.Value) (*compiler.Value, error) {
ctrID, err := v.LookupPath(cue.MakePath(cue.Str("input"), cue.Hid("_id", pkg.DaggerPackage))).String()
if err != nil {
return nil, err
}
timeout, err := v.Lookup("timeout").Int64()
if err != nil {
return nil, err
}
lg := log.Ctx(ctx)
exitCode, err := s.StopContainer(ctx, ctrID, time.Duration(timeout))
if err != nil {
return nil, fmt.Errorf("failed to stop exec %s: %w", ctrID, err)
}
lg.Debug().Msgf("exec %s stopped with exit code %d", ctrID, exitCode)
return compiler.NewValue().FillFields(map[string]interface{}{
"exit": exitCode,
})
}
type sendSignalTask struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,369 |
Dagger doesn't work behind a corporate proxy
|
dagger up return error behind a http proxy
Test with :
* dagger 0.1.0-alpha.31 (374f1ba) linux/amd64 and dagger devel (7d965942) linux/amd64
* Ubuntu 20.04.3 LTS
* Docker 20
All docker command work with my proxy (configure into ~/.docker/config.json and /etc/systemd/system/docker.service.d/http-proxy.conf)
But with dagger I got this error.
```
[β] wait 10.3s
[β] app.source 0.0s
[β] registry.run 10.3s
#5 0.160 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz
#5 5.164 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/community/x86_64/APKINDEX.tar.gz
#5 5.164 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/main: temporary error (try again later)
#5 10.17 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/community: temporary error (try again later)
#5 10.17 ERROR: unable to select packages:
#5 10.17 bash (no such package):
#5 10.17 required by: world[bash]
[β] app.ctr 10.2s
8:45PM FTL failed to up environment: task failed: process "apk add -U --no-cache bash" did not complete successfully: exit code: 1
```
If I remove my VPN and proxy, first step of dagger are ok, but not the docker image download part :
```
8:47PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:47PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:47PM DBG failed to check universe version: universe not installed
8:47PM DBG spawning buildkit job attrs=null localdirs={
"/home/me/examples/todoapp": "/home/me/examples/todoapp"
}
[β] wait 35.7s
[β] app.source 0.1s
[β] registry.run 11.5s
[β] app.ctr 48.1s
[β] app.build 0.1s
[β] image 10.0s
dependency detected dependency=app.build
executing operation do=load pipeline=image
executing operation do=fetch-container pipeline=image.#up[0].from
#17 load metadata for docker.io/library/nginx:latest
#17 sha256:06c466a4eb6821b81bd3e48610e5f38dab858b1e9acb01d6e2f6b11c8fabe6bc
#17 ERROR: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": proxyconnect tcp: dial tcp: lookup proxy on 127.0.0.53:53: server misbehaving
------
> @image.#up[0].from@ load metadata for docker.io/library/nginx:latest:
------
8:48PM FTL failed to up environment: task failed: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": proxyconnect tcp: dial tcp: lookup proxy on 127.0.0.53:53: server misbehaving
```
After I reconnect my VPN and proxy and all end :)
```
8:49PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:49PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:49PM DBG failed to check universe version: universe not installed
8:49PM DBG spawning buildkit job attrs=null localdirs={
"/home/me/examples/todoapp": "/home/me/examples/todoapp"
}
[β] wait 0.2s
[β] app.source 0.1s
[β] registry.run 1.1s
[β] app.ctr 0.0s
[β] app.build 0.1s
[β] image 39.1s
[β] push.source 1.0s
[β] push.push 1.3s
4.6s
[β] push.digest 0.6s
[β] push.ref 0.5s
[β] run.ref 0.5s
[β] run.run 2.5s
Output Value Description
app.build struct Build output directory
push.ref "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image ref
push.digest "sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image digest
run.ref "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image reference (e.g: nginx:alpine)
run.run.env.IMAGE_REF "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" -
appURL "http://localhost:8080/"
```
It's look like one part support proxy but not other one...
|
https://github.com/dagger/dagger/issues/1369
|
https://github.com/dagger/dagger/pull/2748
|
0fffdc223bb9d6c103538ef2fbbf5ed6fb5f3950
|
a12e9f2d5300c0dce379fc327a3e103cea6a01cf
| 2022-01-07T19:59:45Z |
go
| 2022-07-07T01:40:57Z |
plan/task/exec.go
|
}
func (t *sendSignalTask) Run(ctx context.Context, pctx *plancontext.Context, s *solver.Solver, v *compiler.Value) (*compiler.Value, error) {
ctrID, err := v.LookupPath(cue.MakePath(cue.Str("input"), cue.Hid("_id", pkg.DaggerPackage))).String()
if err != nil {
return nil, err
}
sigVal, err := v.Lookup("signal").Int64()
if err != nil {
return nil, err
}
sig := syscall.Signal(sigVal)
if err := s.SignalContainer(ctx, ctrID, sig); err != nil {
return nil, fmt.Errorf("failed to send signal %d to exec %s: %w", sig, ctrID, err)
}
return compiler.NewValue(), nil
}
func parseCommon(pctx *plancontext.Context, v *compiler.Value) (*execCommon, error) {
e := &execCommon{
hosts: make(map[string]string),
}
input, err := pctx.FS.FromValue(v.Lookup("input"))
if err != nil {
return nil, err
}
e.root = input
var cmd struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,369 |
Dagger doesn't work behind a corporate proxy
|
dagger up return error behind a http proxy
Test with :
* dagger 0.1.0-alpha.31 (374f1ba) linux/amd64 and dagger devel (7d965942) linux/amd64
* Ubuntu 20.04.3 LTS
* Docker 20
All docker command work with my proxy (configure into ~/.docker/config.json and /etc/systemd/system/docker.service.d/http-proxy.conf)
But with dagger I got this error.
```
[β] wait 10.3s
[β] app.source 0.0s
[β] registry.run 10.3s
#5 0.160 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz
#5 5.164 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/community/x86_64/APKINDEX.tar.gz
#5 5.164 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/main: temporary error (try again later)
#5 10.17 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/community: temporary error (try again later)
#5 10.17 ERROR: unable to select packages:
#5 10.17 bash (no such package):
#5 10.17 required by: world[bash]
[β] app.ctr 10.2s
8:45PM FTL failed to up environment: task failed: process "apk add -U --no-cache bash" did not complete successfully: exit code: 1
```
If I remove my VPN and proxy, first step of dagger are ok, but not the docker image download part :
```
8:47PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:47PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:47PM DBG failed to check universe version: universe not installed
8:47PM DBG spawning buildkit job attrs=null localdirs={
"/home/me/examples/todoapp": "/home/me/examples/todoapp"
}
[β] wait 35.7s
[β] app.source 0.1s
[β] registry.run 11.5s
[β] app.ctr 48.1s
[β] app.build 0.1s
[β] image 10.0s
dependency detected dependency=app.build
executing operation do=load pipeline=image
executing operation do=fetch-container pipeline=image.#up[0].from
#17 load metadata for docker.io/library/nginx:latest
#17 sha256:06c466a4eb6821b81bd3e48610e5f38dab858b1e9acb01d6e2f6b11c8fabe6bc
#17 ERROR: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": proxyconnect tcp: dial tcp: lookup proxy on 127.0.0.53:53: server misbehaving
------
> @image.#up[0].from@ load metadata for docker.io/library/nginx:latest:
------
8:48PM FTL failed to up environment: task failed: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": proxyconnect tcp: dial tcp: lookup proxy on 127.0.0.53:53: server misbehaving
```
After I reconnect my VPN and proxy and all end :)
```
8:49PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:49PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:49PM DBG failed to check universe version: universe not installed
8:49PM DBG spawning buildkit job attrs=null localdirs={
"/home/me/examples/todoapp": "/home/me/examples/todoapp"
}
[β] wait 0.2s
[β] app.source 0.1s
[β] registry.run 1.1s
[β] app.ctr 0.0s
[β] app.build 0.1s
[β] image 39.1s
[β] push.source 1.0s
[β] push.push 1.3s
4.6s
[β] push.digest 0.6s
[β] push.ref 0.5s
[β] run.ref 0.5s
[β] run.run 2.5s
Output Value Description
app.build struct Build output directory
push.ref "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image ref
push.digest "sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image digest
run.ref "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image reference (e.g: nginx:alpine)
run.run.env.IMAGE_REF "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" -
appURL "http://localhost:8080/"
```
It's look like one part support proxy but not other one...
|
https://github.com/dagger/dagger/issues/1369
|
https://github.com/dagger/dagger/pull/2748
|
0fffdc223bb9d6c103538ef2fbbf5ed6fb5f3950
|
a12e9f2d5300c0dce379fc327a3e103cea6a01cf
| 2022-01-07T19:59:45Z |
go
| 2022-07-07T01:40:57Z |
plan/task/exec.go
|
Args []string
}
if err := v.Decode(&cmd); err != nil {
return nil, err
}
e.args = cmd.Args
workdir, err := v.Lookup("workdir").String()
if err != nil {
return nil, err
}
e.workdir = workdir
user, err := v.Lookup("user").String()
if err != nil {
return nil, err
}
e.user = user
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,369 |
Dagger doesn't work behind a corporate proxy
|
dagger up return error behind a http proxy
Test with :
* dagger 0.1.0-alpha.31 (374f1ba) linux/amd64 and dagger devel (7d965942) linux/amd64
* Ubuntu 20.04.3 LTS
* Docker 20
All docker command work with my proxy (configure into ~/.docker/config.json and /etc/systemd/system/docker.service.d/http-proxy.conf)
But with dagger I got this error.
```
[β] wait 10.3s
[β] app.source 0.0s
[β] registry.run 10.3s
#5 0.160 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz
#5 5.164 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/community/x86_64/APKINDEX.tar.gz
#5 5.164 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/main: temporary error (try again later)
#5 10.17 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/community: temporary error (try again later)
#5 10.17 ERROR: unable to select packages:
#5 10.17 bash (no such package):
#5 10.17 required by: world[bash]
[β] app.ctr 10.2s
8:45PM FTL failed to up environment: task failed: process "apk add -U --no-cache bash" did not complete successfully: exit code: 1
```
If I remove my VPN and proxy, first step of dagger are ok, but not the docker image download part :
```
8:47PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:47PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:47PM DBG failed to check universe version: universe not installed
8:47PM DBG spawning buildkit job attrs=null localdirs={
"/home/me/examples/todoapp": "/home/me/examples/todoapp"
}
[β] wait 35.7s
[β] app.source 0.1s
[β] registry.run 11.5s
[β] app.ctr 48.1s
[β] app.build 0.1s
[β] image 10.0s
dependency detected dependency=app.build
executing operation do=load pipeline=image
executing operation do=fetch-container pipeline=image.#up[0].from
#17 load metadata for docker.io/library/nginx:latest
#17 sha256:06c466a4eb6821b81bd3e48610e5f38dab858b1e9acb01d6e2f6b11c8fabe6bc
#17 ERROR: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": proxyconnect tcp: dial tcp: lookup proxy on 127.0.0.53:53: server misbehaving
------
> @image.#up[0].from@ load metadata for docker.io/library/nginx:latest:
------
8:48PM FTL failed to up environment: task failed: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": proxyconnect tcp: dial tcp: lookup proxy on 127.0.0.53:53: server misbehaving
```
After I reconnect my VPN and proxy and all end :)
```
8:49PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:49PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:49PM DBG failed to check universe version: universe not installed
8:49PM DBG spawning buildkit job attrs=null localdirs={
"/home/me/examples/todoapp": "/home/me/examples/todoapp"
}
[β] wait 0.2s
[β] app.source 0.1s
[β] registry.run 1.1s
[β] app.ctr 0.0s
[β] app.build 0.1s
[β] image 39.1s
[β] push.source 1.0s
[β] push.push 1.3s
4.6s
[β] push.digest 0.6s
[β] push.ref 0.5s
[β] run.ref 0.5s
[β] run.run 2.5s
Output Value Description
app.build struct Build output directory
push.ref "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image ref
push.digest "sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image digest
run.ref "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image reference (e.g: nginx:alpine)
run.run.env.IMAGE_REF "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" -
appURL "http://localhost:8080/"
```
It's look like one part support proxy but not other one...
|
https://github.com/dagger/dagger/issues/1369
|
https://github.com/dagger/dagger/pull/2748
|
0fffdc223bb9d6c103538ef2fbbf5ed6fb5f3950
|
a12e9f2d5300c0dce379fc327a3e103cea6a01cf
| 2022-01-07T19:59:45Z |
go
| 2022-07-07T01:40:57Z |
plan/task/exec.go
|
hosts, err := v.Lookup("hosts").Fields()
if err != nil {
return nil, err
}
for _, host := range hosts {
ip, err := host.Value.String()
if err != nil {
return nil, err
}
e.hosts[host.Label()] = ip
}
mounts, err := v.Lookup("mounts").Fields()
if err != nil {
return nil, err
}
for _, mntField := range mounts {
if mntField.Value.Lookup("dest").IsConcreteR() != nil {
return nil, fmt.Errorf("mount %q is not concrete", mntField.Selector.String())
}
mnt, err := parseMount(pctx, mntField.Value)
if err != nil {
return nil, err
}
e.mounts = append(e.mounts, mnt)
}
return e, nil
}
type execCommon struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,369 |
Dagger doesn't work behind a corporate proxy
|
dagger up return error behind a http proxy
Test with :
* dagger 0.1.0-alpha.31 (374f1ba) linux/amd64 and dagger devel (7d965942) linux/amd64
* Ubuntu 20.04.3 LTS
* Docker 20
All docker command work with my proxy (configure into ~/.docker/config.json and /etc/systemd/system/docker.service.d/http-proxy.conf)
But with dagger I got this error.
```
[β] wait 10.3s
[β] app.source 0.0s
[β] registry.run 10.3s
#5 0.160 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz
#5 5.164 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/community/x86_64/APKINDEX.tar.gz
#5 5.164 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/main: temporary error (try again later)
#5 10.17 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/community: temporary error (try again later)
#5 10.17 ERROR: unable to select packages:
#5 10.17 bash (no such package):
#5 10.17 required by: world[bash]
[β] app.ctr 10.2s
8:45PM FTL failed to up environment: task failed: process "apk add -U --no-cache bash" did not complete successfully: exit code: 1
```
If I remove my VPN and proxy, first step of dagger are ok, but not the docker image download part :
```
8:47PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:47PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:47PM DBG failed to check universe version: universe not installed
8:47PM DBG spawning buildkit job attrs=null localdirs={
"/home/me/examples/todoapp": "/home/me/examples/todoapp"
}
[β] wait 35.7s
[β] app.source 0.1s
[β] registry.run 11.5s
[β] app.ctr 48.1s
[β] app.build 0.1s
[β] image 10.0s
dependency detected dependency=app.build
executing operation do=load pipeline=image
executing operation do=fetch-container pipeline=image.#up[0].from
#17 load metadata for docker.io/library/nginx:latest
#17 sha256:06c466a4eb6821b81bd3e48610e5f38dab858b1e9acb01d6e2f6b11c8fabe6bc
#17 ERROR: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": proxyconnect tcp: dial tcp: lookup proxy on 127.0.0.53:53: server misbehaving
------
> @image.#up[0].from@ load metadata for docker.io/library/nginx:latest:
------
8:48PM FTL failed to up environment: task failed: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": proxyconnect tcp: dial tcp: lookup proxy on 127.0.0.53:53: server misbehaving
```
After I reconnect my VPN and proxy and all end :)
```
8:49PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:49PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:49PM DBG failed to check universe version: universe not installed
8:49PM DBG spawning buildkit job attrs=null localdirs={
"/home/me/examples/todoapp": "/home/me/examples/todoapp"
}
[β] wait 0.2s
[β] app.source 0.1s
[β] registry.run 1.1s
[β] app.ctr 0.0s
[β] app.build 0.1s
[β] image 39.1s
[β] push.source 1.0s
[β] push.push 1.3s
4.6s
[β] push.digest 0.6s
[β] push.ref 0.5s
[β] run.ref 0.5s
[β] run.run 2.5s
Output Value Description
app.build struct Build output directory
push.ref "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image ref
push.digest "sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image digest
run.ref "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image reference (e.g: nginx:alpine)
run.run.env.IMAGE_REF "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" -
appURL "http://localhost:8080/"
```
It's look like one part support proxy but not other one...
|
https://github.com/dagger/dagger/issues/1369
|
https://github.com/dagger/dagger/pull/2748
|
0fffdc223bb9d6c103538ef2fbbf5ed6fb5f3950
|
a12e9f2d5300c0dce379fc327a3e103cea6a01cf
| 2022-01-07T19:59:45Z |
go
| 2022-07-07T01:40:57Z |
plan/task/exec.go
|
root *plancontext.FS
args []string
workdir string
user string
hosts map[string]string
mounts []mount
}
func (e execCommon) runOpts() ([]llb.RunOption, error) {
opts := []llb.RunOption{
llb.Args(e.args),
llb.Dir(e.workdir),
llb.User(e.user),
}
for k, v := range e.hosts {
opts = append(opts, llb.AddExtraHost(k, net.ParseIP(v)))
}
for _, mnt := range e.mounts {
opt, err := mnt.runOpt()
if err != nil {
return nil, err
}
opts = append(opts, opt)
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,369 |
Dagger doesn't work behind a corporate proxy
|
dagger up return error behind a http proxy
Test with :
* dagger 0.1.0-alpha.31 (374f1ba) linux/amd64 and dagger devel (7d965942) linux/amd64
* Ubuntu 20.04.3 LTS
* Docker 20
All docker command work with my proxy (configure into ~/.docker/config.json and /etc/systemd/system/docker.service.d/http-proxy.conf)
But with dagger I got this error.
```
[β] wait 10.3s
[β] app.source 0.0s
[β] registry.run 10.3s
#5 0.160 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz
#5 5.164 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/community/x86_64/APKINDEX.tar.gz
#5 5.164 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/main: temporary error (try again later)
#5 10.17 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/community: temporary error (try again later)
#5 10.17 ERROR: unable to select packages:
#5 10.17 bash (no such package):
#5 10.17 required by: world[bash]
[β] app.ctr 10.2s
8:45PM FTL failed to up environment: task failed: process "apk add -U --no-cache bash" did not complete successfully: exit code: 1
```
If I remove my VPN and proxy, first step of dagger are ok, but not the docker image download part :
```
8:47PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:47PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:47PM DBG failed to check universe version: universe not installed
8:47PM DBG spawning buildkit job attrs=null localdirs={
"/home/me/examples/todoapp": "/home/me/examples/todoapp"
}
[β] wait 35.7s
[β] app.source 0.1s
[β] registry.run 11.5s
[β] app.ctr 48.1s
[β] app.build 0.1s
[β] image 10.0s
dependency detected dependency=app.build
executing operation do=load pipeline=image
executing operation do=fetch-container pipeline=image.#up[0].from
#17 load metadata for docker.io/library/nginx:latest
#17 sha256:06c466a4eb6821b81bd3e48610e5f38dab858b1e9acb01d6e2f6b11c8fabe6bc
#17 ERROR: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": proxyconnect tcp: dial tcp: lookup proxy on 127.0.0.53:53: server misbehaving
------
> @image.#up[0].from@ load metadata for docker.io/library/nginx:latest:
------
8:48PM FTL failed to up environment: task failed: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": proxyconnect tcp: dial tcp: lookup proxy on 127.0.0.53:53: server misbehaving
```
After I reconnect my VPN and proxy and all end :)
```
8:49PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:49PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:49PM DBG failed to check universe version: universe not installed
8:49PM DBG spawning buildkit job attrs=null localdirs={
"/home/me/examples/todoapp": "/home/me/examples/todoapp"
}
[β] wait 0.2s
[β] app.source 0.1s
[β] registry.run 1.1s
[β] app.ctr 0.0s
[β] app.build 0.1s
[β] image 39.1s
[β] push.source 1.0s
[β] push.push 1.3s
4.6s
[β] push.digest 0.6s
[β] push.ref 0.5s
[β] run.ref 0.5s
[β] run.run 2.5s
Output Value Description
app.build struct Build output directory
push.ref "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image ref
push.digest "sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image digest
run.ref "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image reference (e.g: nginx:alpine)
run.run.env.IMAGE_REF "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" -
appURL "http://localhost:8080/"
```
It's look like one part support proxy but not other one...
|
https://github.com/dagger/dagger/issues/1369
|
https://github.com/dagger/dagger/pull/2748
|
0fffdc223bb9d6c103538ef2fbbf5ed6fb5f3950
|
a12e9f2d5300c0dce379fc327a3e103cea6a01cf
| 2022-01-07T19:59:45Z |
go
| 2022-07-07T01:40:57Z |
plan/task/exec.go
|
return opts, nil
}
func (e execCommon) containerRequest() (solver.StartContainerRequest, error) {
req := solver.StartContainerRequest{
Container: client.NewContainerRequest{
Mounts: []client.Mount{{
Dest: "/",
MountType: pb.MountType_BIND,
Ref: e.root.Result(),
}},
},
Proc: client.StartRequest{
Args: e.args,
User: e.user,
Cwd: e.workdir,
},
}
for _, mnt := range e.mounts {
m, err := mnt.containerMount()
if err != nil {
return req, err
}
req.Container.Mounts = append(req.Container.Mounts, m)
}
for k, v := range e.hosts {
req.Container.ExtraHosts = append(req.Container.ExtraHosts, &pb.HostIP{Host: k, IP: v})
}
return req, nil
}
func parseMount(pctx *plancontext.Context, v *compiler.Value) (mount, error) {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,369 |
Dagger doesn't work behind a corporate proxy
|
dagger up return error behind a http proxy
Test with :
* dagger 0.1.0-alpha.31 (374f1ba) linux/amd64 and dagger devel (7d965942) linux/amd64
* Ubuntu 20.04.3 LTS
* Docker 20
All docker command work with my proxy (configure into ~/.docker/config.json and /etc/systemd/system/docker.service.d/http-proxy.conf)
But with dagger I got this error.
```
[β] wait 10.3s
[β] app.source 0.0s
[β] registry.run 10.3s
#5 0.160 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz
#5 5.164 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/community/x86_64/APKINDEX.tar.gz
#5 5.164 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/main: temporary error (try again later)
#5 10.17 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/community: temporary error (try again later)
#5 10.17 ERROR: unable to select packages:
#5 10.17 bash (no such package):
#5 10.17 required by: world[bash]
[β] app.ctr 10.2s
8:45PM FTL failed to up environment: task failed: process "apk add -U --no-cache bash" did not complete successfully: exit code: 1
```
If I remove my VPN and proxy, first step of dagger are ok, but not the docker image download part :
```
8:47PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:47PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:47PM DBG failed to check universe version: universe not installed
8:47PM DBG spawning buildkit job attrs=null localdirs={
"/home/me/examples/todoapp": "/home/me/examples/todoapp"
}
[β] wait 35.7s
[β] app.source 0.1s
[β] registry.run 11.5s
[β] app.ctr 48.1s
[β] app.build 0.1s
[β] image 10.0s
dependency detected dependency=app.build
executing operation do=load pipeline=image
executing operation do=fetch-container pipeline=image.#up[0].from
#17 load metadata for docker.io/library/nginx:latest
#17 sha256:06c466a4eb6821b81bd3e48610e5f38dab858b1e9acb01d6e2f6b11c8fabe6bc
#17 ERROR: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": proxyconnect tcp: dial tcp: lookup proxy on 127.0.0.53:53: server misbehaving
------
> @image.#up[0].from@ load metadata for docker.io/library/nginx:latest:
------
8:48PM FTL failed to up environment: task failed: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": proxyconnect tcp: dial tcp: lookup proxy on 127.0.0.53:53: server misbehaving
```
After I reconnect my VPN and proxy and all end :)
```
8:49PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:49PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:49PM DBG failed to check universe version: universe not installed
8:49PM DBG spawning buildkit job attrs=null localdirs={
"/home/me/examples/todoapp": "/home/me/examples/todoapp"
}
[β] wait 0.2s
[β] app.source 0.1s
[β] registry.run 1.1s
[β] app.ctr 0.0s
[β] app.build 0.1s
[β] image 39.1s
[β] push.source 1.0s
[β] push.push 1.3s
4.6s
[β] push.digest 0.6s
[β] push.ref 0.5s
[β] run.ref 0.5s
[β] run.run 2.5s
Output Value Description
app.build struct Build output directory
push.ref "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image ref
push.digest "sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image digest
run.ref "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image reference (e.g: nginx:alpine)
run.run.env.IMAGE_REF "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" -
appURL "http://localhost:8080/"
```
It's look like one part support proxy but not other one...
|
https://github.com/dagger/dagger/issues/1369
|
https://github.com/dagger/dagger/pull/2748
|
0fffdc223bb9d6c103538ef2fbbf5ed6fb5f3950
|
a12e9f2d5300c0dce379fc327a3e103cea6a01cf
| 2022-01-07T19:59:45Z |
go
| 2022-07-07T01:40:57Z |
plan/task/exec.go
|
dest, err := v.Lookup("dest").String()
if err != nil {
return mount{}, err
}
typ, err := v.Lookup("type").String()
if err != nil {
return mount{}, err
}
switch typ {
case "cache":
contents := v.Lookup("contents")
idValue := contents.Lookup("id")
if !idValue.IsConcrete() {
return mount{}, fmt.Errorf("cache %q is not set", v.Path().String())
}
id, err := idValue.String()
if err != nil {
return mount{}, err
}
concurrency, err := contents.Lookup("concurrency").String()
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,369 |
Dagger doesn't work behind a corporate proxy
|
dagger up return error behind a http proxy
Test with :
* dagger 0.1.0-alpha.31 (374f1ba) linux/amd64 and dagger devel (7d965942) linux/amd64
* Ubuntu 20.04.3 LTS
* Docker 20
All docker command work with my proxy (configure into ~/.docker/config.json and /etc/systemd/system/docker.service.d/http-proxy.conf)
But with dagger I got this error.
```
[β] wait 10.3s
[β] app.source 0.0s
[β] registry.run 10.3s
#5 0.160 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz
#5 5.164 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/community/x86_64/APKINDEX.tar.gz
#5 5.164 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/main: temporary error (try again later)
#5 10.17 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/community: temporary error (try again later)
#5 10.17 ERROR: unable to select packages:
#5 10.17 bash (no such package):
#5 10.17 required by: world[bash]
[β] app.ctr 10.2s
8:45PM FTL failed to up environment: task failed: process "apk add -U --no-cache bash" did not complete successfully: exit code: 1
```
If I remove my VPN and proxy, first step of dagger are ok, but not the docker image download part :
```
8:47PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:47PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:47PM DBG failed to check universe version: universe not installed
8:47PM DBG spawning buildkit job attrs=null localdirs={
"/home/me/examples/todoapp": "/home/me/examples/todoapp"
}
[β] wait 35.7s
[β] app.source 0.1s
[β] registry.run 11.5s
[β] app.ctr 48.1s
[β] app.build 0.1s
[β] image 10.0s
dependency detected dependency=app.build
executing operation do=load pipeline=image
executing operation do=fetch-container pipeline=image.#up[0].from
#17 load metadata for docker.io/library/nginx:latest
#17 sha256:06c466a4eb6821b81bd3e48610e5f38dab858b1e9acb01d6e2f6b11c8fabe6bc
#17 ERROR: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": proxyconnect tcp: dial tcp: lookup proxy on 127.0.0.53:53: server misbehaving
------
> @image.#up[0].from@ load metadata for docker.io/library/nginx:latest:
------
8:48PM FTL failed to up environment: task failed: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": proxyconnect tcp: dial tcp: lookup proxy on 127.0.0.53:53: server misbehaving
```
After I reconnect my VPN and proxy and all end :)
```
8:49PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:49PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:49PM DBG failed to check universe version: universe not installed
8:49PM DBG spawning buildkit job attrs=null localdirs={
"/home/me/examples/todoapp": "/home/me/examples/todoapp"
}
[β] wait 0.2s
[β] app.source 0.1s
[β] registry.run 1.1s
[β] app.ctr 0.0s
[β] app.build 0.1s
[β] image 39.1s
[β] push.source 1.0s
[β] push.push 1.3s
4.6s
[β] push.digest 0.6s
[β] push.ref 0.5s
[β] run.ref 0.5s
[β] run.run 2.5s
Output Value Description
app.build struct Build output directory
push.ref "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image ref
push.digest "sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image digest
run.ref "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image reference (e.g: nginx:alpine)
run.run.env.IMAGE_REF "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" -
appURL "http://localhost:8080/"
```
It's look like one part support proxy but not other one...
|
https://github.com/dagger/dagger/issues/1369
|
https://github.com/dagger/dagger/pull/2748
|
0fffdc223bb9d6c103538ef2fbbf5ed6fb5f3950
|
a12e9f2d5300c0dce379fc327a3e103cea6a01cf
| 2022-01-07T19:59:45Z |
go
| 2022-07-07T01:40:57Z |
plan/task/exec.go
|
if err != nil {
return mount{}, err
}
var mode llb.CacheMountSharingMode
switch concurrency {
case "shared":
mode = llb.CacheMountShared
case "private":
mode = llb.CacheMountPrivate
case "locked":
mode = llb.CacheMountLocked
default:
return mount{}, fmt.Errorf("unknown concurrency mode %q", concurrency)
}
return mount{
dest: dest,
cacheMount: &cacheMount{
id: id,
concurrency: mode,
},
}, nil
case "tmp":
return mount{dest: dest, tmpMount: &tmpMount{}}, nil
case "socket":
socket, err := pctx.Sockets.FromValue(v.Lookup("contents"))
if err != nil {
return mount{}, err
}
return mount{dest: dest, socketMount: &socketMount{id: socket.ID()}}, nil
case "fs":
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,369 |
Dagger doesn't work behind a corporate proxy
|
dagger up return error behind a http proxy
Test with :
* dagger 0.1.0-alpha.31 (374f1ba) linux/amd64 and dagger devel (7d965942) linux/amd64
* Ubuntu 20.04.3 LTS
* Docker 20
All docker command work with my proxy (configure into ~/.docker/config.json and /etc/systemd/system/docker.service.d/http-proxy.conf)
But with dagger I got this error.
```
[β] wait 10.3s
[β] app.source 0.0s
[β] registry.run 10.3s
#5 0.160 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz
#5 5.164 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/community/x86_64/APKINDEX.tar.gz
#5 5.164 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/main: temporary error (try again later)
#5 10.17 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/community: temporary error (try again later)
#5 10.17 ERROR: unable to select packages:
#5 10.17 bash (no such package):
#5 10.17 required by: world[bash]
[β] app.ctr 10.2s
8:45PM FTL failed to up environment: task failed: process "apk add -U --no-cache bash" did not complete successfully: exit code: 1
```
If I remove my VPN and proxy, first step of dagger are ok, but not the docker image download part :
```
8:47PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:47PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:47PM DBG failed to check universe version: universe not installed
8:47PM DBG spawning buildkit job attrs=null localdirs={
"/home/me/examples/todoapp": "/home/me/examples/todoapp"
}
[β] wait 35.7s
[β] app.source 0.1s
[β] registry.run 11.5s
[β] app.ctr 48.1s
[β] app.build 0.1s
[β] image 10.0s
dependency detected dependency=app.build
executing operation do=load pipeline=image
executing operation do=fetch-container pipeline=image.#up[0].from
#17 load metadata for docker.io/library/nginx:latest
#17 sha256:06c466a4eb6821b81bd3e48610e5f38dab858b1e9acb01d6e2f6b11c8fabe6bc
#17 ERROR: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": proxyconnect tcp: dial tcp: lookup proxy on 127.0.0.53:53: server misbehaving
------
> @image.#up[0].from@ load metadata for docker.io/library/nginx:latest:
------
8:48PM FTL failed to up environment: task failed: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": proxyconnect tcp: dial tcp: lookup proxy on 127.0.0.53:53: server misbehaving
```
After I reconnect my VPN and proxy and all end :)
```
8:49PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:49PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:49PM DBG failed to check universe version: universe not installed
8:49PM DBG spawning buildkit job attrs=null localdirs={
"/home/me/examples/todoapp": "/home/me/examples/todoapp"
}
[β] wait 0.2s
[β] app.source 0.1s
[β] registry.run 1.1s
[β] app.ctr 0.0s
[β] app.build 0.1s
[β] image 39.1s
[β] push.source 1.0s
[β] push.push 1.3s
4.6s
[β] push.digest 0.6s
[β] push.ref 0.5s
[β] run.ref 0.5s
[β] run.run 2.5s
Output Value Description
app.build struct Build output directory
push.ref "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image ref
push.digest "sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image digest
run.ref "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image reference (e.g: nginx:alpine)
run.run.env.IMAGE_REF "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" -
appURL "http://localhost:8080/"
```
It's look like one part support proxy but not other one...
|
https://github.com/dagger/dagger/issues/1369
|
https://github.com/dagger/dagger/pull/2748
|
0fffdc223bb9d6c103538ef2fbbf5ed6fb5f3950
|
a12e9f2d5300c0dce379fc327a3e103cea6a01cf
| 2022-01-07T19:59:45Z |
go
| 2022-07-07T01:40:57Z |
plan/task/exec.go
|
mnt := mount{
dest: dest,
fsMount: &fsMount{},
}
contents, err := pctx.FS.FromValue(v.Lookup("contents"))
if err != nil {
return mount{}, err
}
mnt.fsMount.contents = contents
if source := v.Lookup("source"); source.Exists() {
src, err := source.String()
if err != nil {
return mount{}, err
}
mnt.fsMount.source = src
}
if ro := v.Lookup("ro"); ro.Exists() {
readonly, err := ro.Bool()
if err != nil {
return mount{}, err
}
mnt.fsMount.readonly = readonly
}
return mnt, nil
case "secret":
contents, err := pctx.Secrets.FromValue(v.Lookup("contents"))
if err != nil {
return mount{}, err
}
opts := struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,369 |
Dagger doesn't work behind a corporate proxy
|
dagger up return error behind a http proxy
Test with :
* dagger 0.1.0-alpha.31 (374f1ba) linux/amd64 and dagger devel (7d965942) linux/amd64
* Ubuntu 20.04.3 LTS
* Docker 20
All docker command work with my proxy (configure into ~/.docker/config.json and /etc/systemd/system/docker.service.d/http-proxy.conf)
But with dagger I got this error.
```
[β] wait 10.3s
[β] app.source 0.0s
[β] registry.run 10.3s
#5 0.160 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz
#5 5.164 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/community/x86_64/APKINDEX.tar.gz
#5 5.164 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/main: temporary error (try again later)
#5 10.17 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/community: temporary error (try again later)
#5 10.17 ERROR: unable to select packages:
#5 10.17 bash (no such package):
#5 10.17 required by: world[bash]
[β] app.ctr 10.2s
8:45PM FTL failed to up environment: task failed: process "apk add -U --no-cache bash" did not complete successfully: exit code: 1
```
If I remove my VPN and proxy, first step of dagger are ok, but not the docker image download part :
```
8:47PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:47PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:47PM DBG failed to check universe version: universe not installed
8:47PM DBG spawning buildkit job attrs=null localdirs={
"/home/me/examples/todoapp": "/home/me/examples/todoapp"
}
[β] wait 35.7s
[β] app.source 0.1s
[β] registry.run 11.5s
[β] app.ctr 48.1s
[β] app.build 0.1s
[β] image 10.0s
dependency detected dependency=app.build
executing operation do=load pipeline=image
executing operation do=fetch-container pipeline=image.#up[0].from
#17 load metadata for docker.io/library/nginx:latest
#17 sha256:06c466a4eb6821b81bd3e48610e5f38dab858b1e9acb01d6e2f6b11c8fabe6bc
#17 ERROR: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": proxyconnect tcp: dial tcp: lookup proxy on 127.0.0.53:53: server misbehaving
------
> @image.#up[0].from@ load metadata for docker.io/library/nginx:latest:
------
8:48PM FTL failed to up environment: task failed: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": proxyconnect tcp: dial tcp: lookup proxy on 127.0.0.53:53: server misbehaving
```
After I reconnect my VPN and proxy and all end :)
```
8:49PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:49PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:49PM DBG failed to check universe version: universe not installed
8:49PM DBG spawning buildkit job attrs=null localdirs={
"/home/me/examples/todoapp": "/home/me/examples/todoapp"
}
[β] wait 0.2s
[β] app.source 0.1s
[β] registry.run 1.1s
[β] app.ctr 0.0s
[β] app.build 0.1s
[β] image 39.1s
[β] push.source 1.0s
[β] push.push 1.3s
4.6s
[β] push.digest 0.6s
[β] push.ref 0.5s
[β] run.ref 0.5s
[β] run.run 2.5s
Output Value Description
app.build struct Build output directory
push.ref "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image ref
push.digest "sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image digest
run.ref "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image reference (e.g: nginx:alpine)
run.run.env.IMAGE_REF "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" -
appURL "http://localhost:8080/"
```
It's look like one part support proxy but not other one...
|
https://github.com/dagger/dagger/issues/1369
|
https://github.com/dagger/dagger/pull/2748
|
0fffdc223bb9d6c103538ef2fbbf5ed6fb5f3950
|
a12e9f2d5300c0dce379fc327a3e103cea6a01cf
| 2022-01-07T19:59:45Z |
go
| 2022-07-07T01:40:57Z |
plan/task/exec.go
|
UID uint32
GID uint32
Mask uint32
}{}
if err := v.Decode(&opts); err != nil {
return mount{}, err
}
return mount{
dest: dest,
secretMount: &secretMount{
id: contents.ID(),
uid: opts.UID,
gid: opts.GID,
mask: opts.Mask,
},
}, nil
case "file":
contents, err := v.Lookup("contents").String()
if err != nil {
return mount{}, err
}
opts := struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,369 |
Dagger doesn't work behind a corporate proxy
|
dagger up return error behind a http proxy
Test with :
* dagger 0.1.0-alpha.31 (374f1ba) linux/amd64 and dagger devel (7d965942) linux/amd64
* Ubuntu 20.04.3 LTS
* Docker 20
All docker command work with my proxy (configure into ~/.docker/config.json and /etc/systemd/system/docker.service.d/http-proxy.conf)
But with dagger I got this error.
```
[β] wait 10.3s
[β] app.source 0.0s
[β] registry.run 10.3s
#5 0.160 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz
#5 5.164 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/community/x86_64/APKINDEX.tar.gz
#5 5.164 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/main: temporary error (try again later)
#5 10.17 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/community: temporary error (try again later)
#5 10.17 ERROR: unable to select packages:
#5 10.17 bash (no such package):
#5 10.17 required by: world[bash]
[β] app.ctr 10.2s
8:45PM FTL failed to up environment: task failed: process "apk add -U --no-cache bash" did not complete successfully: exit code: 1
```
If I remove my VPN and proxy, first step of dagger are ok, but not the docker image download part :
```
8:47PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:47PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:47PM DBG failed to check universe version: universe not installed
8:47PM DBG spawning buildkit job attrs=null localdirs={
"/home/me/examples/todoapp": "/home/me/examples/todoapp"
}
[β] wait 35.7s
[β] app.source 0.1s
[β] registry.run 11.5s
[β] app.ctr 48.1s
[β] app.build 0.1s
[β] image 10.0s
dependency detected dependency=app.build
executing operation do=load pipeline=image
executing operation do=fetch-container pipeline=image.#up[0].from
#17 load metadata for docker.io/library/nginx:latest
#17 sha256:06c466a4eb6821b81bd3e48610e5f38dab858b1e9acb01d6e2f6b11c8fabe6bc
#17 ERROR: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": proxyconnect tcp: dial tcp: lookup proxy on 127.0.0.53:53: server misbehaving
------
> @image.#up[0].from@ load metadata for docker.io/library/nginx:latest:
------
8:48PM FTL failed to up environment: task failed: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": proxyconnect tcp: dial tcp: lookup proxy on 127.0.0.53:53: server misbehaving
```
After I reconnect my VPN and proxy and all end :)
```
8:49PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:49PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:49PM DBG failed to check universe version: universe not installed
8:49PM DBG spawning buildkit job attrs=null localdirs={
"/home/me/examples/todoapp": "/home/me/examples/todoapp"
}
[β] wait 0.2s
[β] app.source 0.1s
[β] registry.run 1.1s
[β] app.ctr 0.0s
[β] app.build 0.1s
[β] image 39.1s
[β] push.source 1.0s
[β] push.push 1.3s
4.6s
[β] push.digest 0.6s
[β] push.ref 0.5s
[β] run.ref 0.5s
[β] run.run 2.5s
Output Value Description
app.build struct Build output directory
push.ref "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image ref
push.digest "sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image digest
run.ref "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image reference (e.g: nginx:alpine)
run.run.env.IMAGE_REF "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" -
appURL "http://localhost:8080/"
```
It's look like one part support proxy but not other one...
|
https://github.com/dagger/dagger/issues/1369
|
https://github.com/dagger/dagger/pull/2748
|
0fffdc223bb9d6c103538ef2fbbf5ed6fb5f3950
|
a12e9f2d5300c0dce379fc327a3e103cea6a01cf
| 2022-01-07T19:59:45Z |
go
| 2022-07-07T01:40:57Z |
plan/task/exec.go
|
Permissions uint32
}{}
if err := v.Decode(&opts); err != nil {
return mount{}, err
}
return mount{
dest: dest,
fileMount: &fileMount{
contents: contents,
permissions: opts.Permissions,
},
}, nil
case "":
return mount{}, errors.New("no mount type specified")
default:
return mount{}, fmt.Errorf("unsupported mount type %q", typ)
}
}
type mount struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,369 |
Dagger doesn't work behind a corporate proxy
|
dagger up return error behind a http proxy
Test with :
* dagger 0.1.0-alpha.31 (374f1ba) linux/amd64 and dagger devel (7d965942) linux/amd64
* Ubuntu 20.04.3 LTS
* Docker 20
All docker command work with my proxy (configure into ~/.docker/config.json and /etc/systemd/system/docker.service.d/http-proxy.conf)
But with dagger I got this error.
```
[β] wait 10.3s
[β] app.source 0.0s
[β] registry.run 10.3s
#5 0.160 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz
#5 5.164 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/community/x86_64/APKINDEX.tar.gz
#5 5.164 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/main: temporary error (try again later)
#5 10.17 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/community: temporary error (try again later)
#5 10.17 ERROR: unable to select packages:
#5 10.17 bash (no such package):
#5 10.17 required by: world[bash]
[β] app.ctr 10.2s
8:45PM FTL failed to up environment: task failed: process "apk add -U --no-cache bash" did not complete successfully: exit code: 1
```
If I remove my VPN and proxy, first step of dagger are ok, but not the docker image download part :
```
8:47PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:47PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:47PM DBG failed to check universe version: universe not installed
8:47PM DBG spawning buildkit job attrs=null localdirs={
"/home/me/examples/todoapp": "/home/me/examples/todoapp"
}
[β] wait 35.7s
[β] app.source 0.1s
[β] registry.run 11.5s
[β] app.ctr 48.1s
[β] app.build 0.1s
[β] image 10.0s
dependency detected dependency=app.build
executing operation do=load pipeline=image
executing operation do=fetch-container pipeline=image.#up[0].from
#17 load metadata for docker.io/library/nginx:latest
#17 sha256:06c466a4eb6821b81bd3e48610e5f38dab858b1e9acb01d6e2f6b11c8fabe6bc
#17 ERROR: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": proxyconnect tcp: dial tcp: lookup proxy on 127.0.0.53:53: server misbehaving
------
> @image.#up[0].from@ load metadata for docker.io/library/nginx:latest:
------
8:48PM FTL failed to up environment: task failed: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": proxyconnect tcp: dial tcp: lookup proxy on 127.0.0.53:53: server misbehaving
```
After I reconnect my VPN and proxy and all end :)
```
8:49PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:49PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:49PM DBG failed to check universe version: universe not installed
8:49PM DBG spawning buildkit job attrs=null localdirs={
"/home/me/examples/todoapp": "/home/me/examples/todoapp"
}
[β] wait 0.2s
[β] app.source 0.1s
[β] registry.run 1.1s
[β] app.ctr 0.0s
[β] app.build 0.1s
[β] image 39.1s
[β] push.source 1.0s
[β] push.push 1.3s
4.6s
[β] push.digest 0.6s
[β] push.ref 0.5s
[β] run.ref 0.5s
[β] run.run 2.5s
Output Value Description
app.build struct Build output directory
push.ref "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image ref
push.digest "sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image digest
run.ref "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image reference (e.g: nginx:alpine)
run.run.env.IMAGE_REF "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" -
appURL "http://localhost:8080/"
```
It's look like one part support proxy but not other one...
|
https://github.com/dagger/dagger/issues/1369
|
https://github.com/dagger/dagger/pull/2748
|
0fffdc223bb9d6c103538ef2fbbf5ed6fb5f3950
|
a12e9f2d5300c0dce379fc327a3e103cea6a01cf
| 2022-01-07T19:59:45Z |
go
| 2022-07-07T01:40:57Z |
plan/task/exec.go
|
dest string
cacheMount *cacheMount
tmpMount *tmpMount
socketMount *socketMount
fsMount *fsMount
secretMount *secretMount
fileMount *fileMount
}
func (m mount) runOpt() (llb.RunOption, error) {
switch {
case m.cacheMount != nil:
return llb.AddMount(
m.dest,
llb.Scratch(),
llb.AsPersistentCacheDir(m.cacheMount.id, m.cacheMount.concurrency),
), nil
case m.tmpMount != nil:
return llb.AddMount(
m.dest,
llb.Scratch(),
llb.Tmpfs(),
), nil
case m.socketMount != nil:
return llb.AddSSHSocket(
llb.SSHID(m.socketMount.id),
llb.SSHSocketTarget(m.dest),
), nil
case m.fsMount != nil:
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,369 |
Dagger doesn't work behind a corporate proxy
|
dagger up return error behind a http proxy
Test with :
* dagger 0.1.0-alpha.31 (374f1ba) linux/amd64 and dagger devel (7d965942) linux/amd64
* Ubuntu 20.04.3 LTS
* Docker 20
All docker command work with my proxy (configure into ~/.docker/config.json and /etc/systemd/system/docker.service.d/http-proxy.conf)
But with dagger I got this error.
```
[β] wait 10.3s
[β] app.source 0.0s
[β] registry.run 10.3s
#5 0.160 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz
#5 5.164 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/community/x86_64/APKINDEX.tar.gz
#5 5.164 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/main: temporary error (try again later)
#5 10.17 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/community: temporary error (try again later)
#5 10.17 ERROR: unable to select packages:
#5 10.17 bash (no such package):
#5 10.17 required by: world[bash]
[β] app.ctr 10.2s
8:45PM FTL failed to up environment: task failed: process "apk add -U --no-cache bash" did not complete successfully: exit code: 1
```
If I remove my VPN and proxy, first step of dagger are ok, but not the docker image download part :
```
8:47PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:47PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:47PM DBG failed to check universe version: universe not installed
8:47PM DBG spawning buildkit job attrs=null localdirs={
"/home/me/examples/todoapp": "/home/me/examples/todoapp"
}
[β] wait 35.7s
[β] app.source 0.1s
[β] registry.run 11.5s
[β] app.ctr 48.1s
[β] app.build 0.1s
[β] image 10.0s
dependency detected dependency=app.build
executing operation do=load pipeline=image
executing operation do=fetch-container pipeline=image.#up[0].from
#17 load metadata for docker.io/library/nginx:latest
#17 sha256:06c466a4eb6821b81bd3e48610e5f38dab858b1e9acb01d6e2f6b11c8fabe6bc
#17 ERROR: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": proxyconnect tcp: dial tcp: lookup proxy on 127.0.0.53:53: server misbehaving
------
> @image.#up[0].from@ load metadata for docker.io/library/nginx:latest:
------
8:48PM FTL failed to up environment: task failed: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": proxyconnect tcp: dial tcp: lookup proxy on 127.0.0.53:53: server misbehaving
```
After I reconnect my VPN and proxy and all end :)
```
8:49PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:49PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:49PM DBG failed to check universe version: universe not installed
8:49PM DBG spawning buildkit job attrs=null localdirs={
"/home/me/examples/todoapp": "/home/me/examples/todoapp"
}
[β] wait 0.2s
[β] app.source 0.1s
[β] registry.run 1.1s
[β] app.ctr 0.0s
[β] app.build 0.1s
[β] image 39.1s
[β] push.source 1.0s
[β] push.push 1.3s
4.6s
[β] push.digest 0.6s
[β] push.ref 0.5s
[β] run.ref 0.5s
[β] run.run 2.5s
Output Value Description
app.build struct Build output directory
push.ref "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image ref
push.digest "sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image digest
run.ref "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image reference (e.g: nginx:alpine)
run.run.env.IMAGE_REF "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" -
appURL "http://localhost:8080/"
```
It's look like one part support proxy but not other one...
|
https://github.com/dagger/dagger/issues/1369
|
https://github.com/dagger/dagger/pull/2748
|
0fffdc223bb9d6c103538ef2fbbf5ed6fb5f3950
|
a12e9f2d5300c0dce379fc327a3e103cea6a01cf
| 2022-01-07T19:59:45Z |
go
| 2022-07-07T01:40:57Z |
plan/task/exec.go
|
st, err := m.fsMount.contents.State()
if err != nil {
return nil, err
}
var opts []llb.MountOption
if m.fsMount.source != "" {
opts = append(opts, llb.SourcePath(m.fsMount.source))
}
if m.fsMount.readonly {
opts = append(opts, llb.Readonly)
}
return llb.AddMount(
m.dest,
st,
opts...,
), nil
case m.secretMount != nil:
return llb.AddSecret(
m.dest,
llb.SecretID(m.secretMount.id),
llb.SecretFileOpt(int(m.secretMount.uid), int(m.secretMount.gid), int(m.secretMount.mask)),
), nil
case m.fileMount != nil:
return llb.AddMount(
m.dest,
llb.Scratch().File(llb.Mkfile(
"/file",
fs.FileMode(m.fileMount.permissions),
[]byte(m.fileMount.contents))),
llb.SourcePath("/file"),
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,369 |
Dagger doesn't work behind a corporate proxy
|
dagger up return error behind a http proxy
Test with :
* dagger 0.1.0-alpha.31 (374f1ba) linux/amd64 and dagger devel (7d965942) linux/amd64
* Ubuntu 20.04.3 LTS
* Docker 20
All docker command work with my proxy (configure into ~/.docker/config.json and /etc/systemd/system/docker.service.d/http-proxy.conf)
But with dagger I got this error.
```
[β] wait 10.3s
[β] app.source 0.0s
[β] registry.run 10.3s
#5 0.160 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz
#5 5.164 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/community/x86_64/APKINDEX.tar.gz
#5 5.164 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/main: temporary error (try again later)
#5 10.17 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/community: temporary error (try again later)
#5 10.17 ERROR: unable to select packages:
#5 10.17 bash (no such package):
#5 10.17 required by: world[bash]
[β] app.ctr 10.2s
8:45PM FTL failed to up environment: task failed: process "apk add -U --no-cache bash" did not complete successfully: exit code: 1
```
If I remove my VPN and proxy, first step of dagger are ok, but not the docker image download part :
```
8:47PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:47PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:47PM DBG failed to check universe version: universe not installed
8:47PM DBG spawning buildkit job attrs=null localdirs={
"/home/me/examples/todoapp": "/home/me/examples/todoapp"
}
[β] wait 35.7s
[β] app.source 0.1s
[β] registry.run 11.5s
[β] app.ctr 48.1s
[β] app.build 0.1s
[β] image 10.0s
dependency detected dependency=app.build
executing operation do=load pipeline=image
executing operation do=fetch-container pipeline=image.#up[0].from
#17 load metadata for docker.io/library/nginx:latest
#17 sha256:06c466a4eb6821b81bd3e48610e5f38dab858b1e9acb01d6e2f6b11c8fabe6bc
#17 ERROR: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": proxyconnect tcp: dial tcp: lookup proxy on 127.0.0.53:53: server misbehaving
------
> @image.#up[0].from@ load metadata for docker.io/library/nginx:latest:
------
8:48PM FTL failed to up environment: task failed: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": proxyconnect tcp: dial tcp: lookup proxy on 127.0.0.53:53: server misbehaving
```
After I reconnect my VPN and proxy and all end :)
```
8:49PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:49PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:49PM DBG failed to check universe version: universe not installed
8:49PM DBG spawning buildkit job attrs=null localdirs={
"/home/me/examples/todoapp": "/home/me/examples/todoapp"
}
[β] wait 0.2s
[β] app.source 0.1s
[β] registry.run 1.1s
[β] app.ctr 0.0s
[β] app.build 0.1s
[β] image 39.1s
[β] push.source 1.0s
[β] push.push 1.3s
4.6s
[β] push.digest 0.6s
[β] push.ref 0.5s
[β] run.ref 0.5s
[β] run.run 2.5s
Output Value Description
app.build struct Build output directory
push.ref "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image ref
push.digest "sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image digest
run.ref "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image reference (e.g: nginx:alpine)
run.run.env.IMAGE_REF "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" -
appURL "http://localhost:8080/"
```
It's look like one part support proxy but not other one...
|
https://github.com/dagger/dagger/issues/1369
|
https://github.com/dagger/dagger/pull/2748
|
0fffdc223bb9d6c103538ef2fbbf5ed6fb5f3950
|
a12e9f2d5300c0dce379fc327a3e103cea6a01cf
| 2022-01-07T19:59:45Z |
go
| 2022-07-07T01:40:57Z |
plan/task/exec.go
|
), nil
}
return nil, fmt.Errorf("no mount type set")
}
func (m mount) containerMount() (client.Mount, error) {
switch {
case m.cacheMount != nil:
mnt := client.Mount{
Dest: m.dest,
MountType: pb.MountType_CACHE,
CacheOpt: &pb.CacheOpt{
ID: m.cacheMount.id,
},
}
switch m.cacheMount.concurrency {
case llb.CacheMountShared:
mnt.CacheOpt.Sharing = pb.CacheSharingOpt_SHARED
case llb.CacheMountPrivate:
mnt.CacheOpt.Sharing = pb.CacheSharingOpt_PRIVATE
case llb.CacheMountLocked:
mnt.CacheOpt.Sharing = pb.CacheSharingOpt_LOCKED
}
return mnt, nil
case m.tmpMount != nil:
return client.Mount{
Dest: m.dest,
MountType: pb.MountType_TMPFS,
}, nil
case m.socketMount != nil:
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,369 |
Dagger doesn't work behind a corporate proxy
|
dagger up return error behind a http proxy
Test with :
* dagger 0.1.0-alpha.31 (374f1ba) linux/amd64 and dagger devel (7d965942) linux/amd64
* Ubuntu 20.04.3 LTS
* Docker 20
All docker command work with my proxy (configure into ~/.docker/config.json and /etc/systemd/system/docker.service.d/http-proxy.conf)
But with dagger I got this error.
```
[β] wait 10.3s
[β] app.source 0.0s
[β] registry.run 10.3s
#5 0.160 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz
#5 5.164 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/community/x86_64/APKINDEX.tar.gz
#5 5.164 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/main: temporary error (try again later)
#5 10.17 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/community: temporary error (try again later)
#5 10.17 ERROR: unable to select packages:
#5 10.17 bash (no such package):
#5 10.17 required by: world[bash]
[β] app.ctr 10.2s
8:45PM FTL failed to up environment: task failed: process "apk add -U --no-cache bash" did not complete successfully: exit code: 1
```
If I remove my VPN and proxy, first step of dagger are ok, but not the docker image download part :
```
8:47PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:47PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:47PM DBG failed to check universe version: universe not installed
8:47PM DBG spawning buildkit job attrs=null localdirs={
"/home/me/examples/todoapp": "/home/me/examples/todoapp"
}
[β] wait 35.7s
[β] app.source 0.1s
[β] registry.run 11.5s
[β] app.ctr 48.1s
[β] app.build 0.1s
[β] image 10.0s
dependency detected dependency=app.build
executing operation do=load pipeline=image
executing operation do=fetch-container pipeline=image.#up[0].from
#17 load metadata for docker.io/library/nginx:latest
#17 sha256:06c466a4eb6821b81bd3e48610e5f38dab858b1e9acb01d6e2f6b11c8fabe6bc
#17 ERROR: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": proxyconnect tcp: dial tcp: lookup proxy on 127.0.0.53:53: server misbehaving
------
> @image.#up[0].from@ load metadata for docker.io/library/nginx:latest:
------
8:48PM FTL failed to up environment: task failed: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": proxyconnect tcp: dial tcp: lookup proxy on 127.0.0.53:53: server misbehaving
```
After I reconnect my VPN and proxy and all end :)
```
8:49PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:49PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:49PM DBG failed to check universe version: universe not installed
8:49PM DBG spawning buildkit job attrs=null localdirs={
"/home/me/examples/todoapp": "/home/me/examples/todoapp"
}
[β] wait 0.2s
[β] app.source 0.1s
[β] registry.run 1.1s
[β] app.ctr 0.0s
[β] app.build 0.1s
[β] image 39.1s
[β] push.source 1.0s
[β] push.push 1.3s
4.6s
[β] push.digest 0.6s
[β] push.ref 0.5s
[β] run.ref 0.5s
[β] run.run 2.5s
Output Value Description
app.build struct Build output directory
push.ref "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image ref
push.digest "sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image digest
run.ref "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image reference (e.g: nginx:alpine)
run.run.env.IMAGE_REF "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" -
appURL "http://localhost:8080/"
```
It's look like one part support proxy but not other one...
|
https://github.com/dagger/dagger/issues/1369
|
https://github.com/dagger/dagger/pull/2748
|
0fffdc223bb9d6c103538ef2fbbf5ed6fb5f3950
|
a12e9f2d5300c0dce379fc327a3e103cea6a01cf
| 2022-01-07T19:59:45Z |
go
| 2022-07-07T01:40:57Z |
plan/task/exec.go
|
return client.Mount{
Dest: m.dest,
MountType: pb.MountType_SSH,
SSHOpt: &pb.SSHOpt{
ID: m.socketMount.id,
},
}, nil
case m.fsMount != nil:
return client.Mount{
Dest: m.dest,
MountType: pb.MountType_BIND,
Ref: m.fsMount.contents.Result(),
Selector: m.fsMount.source,
Readonly: m.fsMount.readonly,
}, nil
case m.secretMount != nil:
return client.Mount{
Dest: m.dest,
MountType: pb.MountType_SECRET,
SecretOpt: &pb.SecretOpt{
ID: m.secretMount.id,
Uid: m.secretMount.uid,
Gid: m.secretMount.gid,
Mode: m.secretMount.mask,
},
}, nil
}
return client.Mount{}, fmt.Errorf("no mount type set")
}
type cacheMount struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,369 |
Dagger doesn't work behind a corporate proxy
|
dagger up return error behind a http proxy
Test with :
* dagger 0.1.0-alpha.31 (374f1ba) linux/amd64 and dagger devel (7d965942) linux/amd64
* Ubuntu 20.04.3 LTS
* Docker 20
All docker command work with my proxy (configure into ~/.docker/config.json and /etc/systemd/system/docker.service.d/http-proxy.conf)
But with dagger I got this error.
```
[β] wait 10.3s
[β] app.source 0.0s
[β] registry.run 10.3s
#5 0.160 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz
#5 5.164 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/community/x86_64/APKINDEX.tar.gz
#5 5.164 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/main: temporary error (try again later)
#5 10.17 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/community: temporary error (try again later)
#5 10.17 ERROR: unable to select packages:
#5 10.17 bash (no such package):
#5 10.17 required by: world[bash]
[β] app.ctr 10.2s
8:45PM FTL failed to up environment: task failed: process "apk add -U --no-cache bash" did not complete successfully: exit code: 1
```
If I remove my VPN and proxy, first step of dagger are ok, but not the docker image download part :
```
8:47PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:47PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:47PM DBG failed to check universe version: universe not installed
8:47PM DBG spawning buildkit job attrs=null localdirs={
"/home/me/examples/todoapp": "/home/me/examples/todoapp"
}
[β] wait 35.7s
[β] app.source 0.1s
[β] registry.run 11.5s
[β] app.ctr 48.1s
[β] app.build 0.1s
[β] image 10.0s
dependency detected dependency=app.build
executing operation do=load pipeline=image
executing operation do=fetch-container pipeline=image.#up[0].from
#17 load metadata for docker.io/library/nginx:latest
#17 sha256:06c466a4eb6821b81bd3e48610e5f38dab858b1e9acb01d6e2f6b11c8fabe6bc
#17 ERROR: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": proxyconnect tcp: dial tcp: lookup proxy on 127.0.0.53:53: server misbehaving
------
> @image.#up[0].from@ load metadata for docker.io/library/nginx:latest:
------
8:48PM FTL failed to up environment: task failed: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": proxyconnect tcp: dial tcp: lookup proxy on 127.0.0.53:53: server misbehaving
```
After I reconnect my VPN and proxy and all end :)
```
8:49PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:49PM DBG detected buildkit config haveHostNetwork=true isActive=true version=v0.9.3
8:49PM DBG failed to check universe version: universe not installed
8:49PM DBG spawning buildkit job attrs=null localdirs={
"/home/me/examples/todoapp": "/home/me/examples/todoapp"
}
[β] wait 0.2s
[β] app.source 0.1s
[β] registry.run 1.1s
[β] app.ctr 0.0s
[β] app.build 0.1s
[β] image 39.1s
[β] push.source 1.0s
[β] push.push 1.3s
4.6s
[β] push.digest 0.6s
[β] push.ref 0.5s
[β] run.ref 0.5s
[β] run.run 2.5s
Output Value Description
app.build struct Build output directory
push.ref "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image ref
push.digest "sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image digest
run.ref "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" Image reference (e.g: nginx:alpine)
run.run.env.IMAGE_REF "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed" -
appURL "http://localhost:8080/"
```
It's look like one part support proxy but not other one...
|
https://github.com/dagger/dagger/issues/1369
|
https://github.com/dagger/dagger/pull/2748
|
0fffdc223bb9d6c103538ef2fbbf5ed6fb5f3950
|
a12e9f2d5300c0dce379fc327a3e103cea6a01cf
| 2022-01-07T19:59:45Z |
go
| 2022-07-07T01:40:57Z |
plan/task/exec.go
|
id string
concurrency llb.CacheMountSharingMode
}
type tmpMount struct {
}
type socketMount struct {
id string
}
type fsMount struct {
contents *plancontext.FS
source string
readonly bool
}
type secretMount struct {
id string
uid uint32
gid uint32
mask uint32
}
type fileMount struct {
contents string
permissions uint32
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,469 |
Include #Start exec output in progress logs
|
Right now the stdout/stderr of an exec created with `core.#Start` is completely ignored. It needs to at minimum be included in the progress output by default, same as the output of normal `core.#Exec`s, to enable basic debuggability.
Subtask of #2398
|
https://github.com/dagger/dagger/issues/2469
|
https://github.com/dagger/dagger/pull/2561
|
60813f516a3369d6790e837b209a6da9749853db
|
df189147a4395654e611d04c2ce47a9975b4b2c8
| 2022-05-17T23:37:30Z |
go
| 2022-07-12T19:05:57Z |
plan/task/exec.go
|
package task
import (
"context"
"errors"
"fmt"
"io/fs"
"net"
"os"
"strings"
"syscall"
"time"
"cuelang.org/go/cue"
"github.com/moby/buildkit/client/llb"
"github.com/moby/buildkit/frontend/gateway/client"
"github.com/moby/buildkit/solver/pb"
"github.com/rs/zerolog/log"
"go.dagger.io/dagger/compiler"
"go.dagger.io/dagger/pkg"
"go.dagger.io/dagger/plancontext"
"go.dagger.io/dagger/solver"
)
func init() {
Register("Exec", func() Task { return &execTask{} })
Register("Start", func() Task { return &asyncExecTask{} })
Register("Stop", func() Task { return &stopAsyncExecTask{} })
Register("SendSignal", func() Task { return &sendSignalTask{} })
}
type execTask struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,469 |
Include #Start exec output in progress logs
|
Right now the stdout/stderr of an exec created with `core.#Start` is completely ignored. It needs to at minimum be included in the progress output by default, same as the output of normal `core.#Exec`s, to enable basic debuggability.
Subtask of #2398
|
https://github.com/dagger/dagger/issues/2469
|
https://github.com/dagger/dagger/pull/2561
|
60813f516a3369d6790e837b209a6da9749853db
|
df189147a4395654e611d04c2ce47a9975b4b2c8
| 2022-05-17T23:37:30Z |
go
| 2022-07-12T19:05:57Z |
plan/task/exec.go
|
}
func (t *execTask) Run(ctx context.Context, pctx *plancontext.Context, s *solver.Solver, v *compiler.Value) (*compiler.Value, error) {
common, err := parseCommon(pctx, v)
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,469 |
Include #Start exec output in progress logs
|
Right now the stdout/stderr of an exec created with `core.#Start` is completely ignored. It needs to at minimum be included in the progress output by default, same as the output of normal `core.#Exec`s, to enable basic debuggability.
Subtask of #2398
|
https://github.com/dagger/dagger/issues/2469
|
https://github.com/dagger/dagger/pull/2561
|
60813f516a3369d6790e837b209a6da9749853db
|
df189147a4395654e611d04c2ce47a9975b4b2c8
| 2022-05-17T23:37:30Z |
go
| 2022-07-12T19:05:57Z |
plan/task/exec.go
|
if err != nil {
return nil, err
}
opts, err := common.runOpts()
if err != nil {
return nil, err
}
envs, err := v.Lookup("env").Fields()
if err != nil {
return nil, err
}
for _, env := range envs {
if plancontext.IsSecretValue(env.Value) {
secret, err := pctx.Secrets.FromValue(env.Value)
if err != nil {
return nil, err
}
opts = append(opts, llb.AddSecret(env.Label(), llb.SecretID(secret.ID()), llb.SecretAsEnv(true)))
} else {
s, err := env.Value.String()
if err != nil {
return nil, err
}
opts = append(opts, llb.AddEnv(env.Label(), s))
}
}
always, err := v.Lookup("always").Bool()
if err != nil {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,469 |
Include #Start exec output in progress logs
|
Right now the stdout/stderr of an exec created with `core.#Start` is completely ignored. It needs to at minimum be included in the progress output by default, same as the output of normal `core.#Exec`s, to enable basic debuggability.
Subtask of #2398
|
https://github.com/dagger/dagger/issues/2469
|
https://github.com/dagger/dagger/pull/2561
|
60813f516a3369d6790e837b209a6da9749853db
|
df189147a4395654e611d04c2ce47a9975b4b2c8
| 2022-05-17T23:37:30Z |
go
| 2022-07-12T19:05:57Z |
plan/task/exec.go
|
return nil, err
}
if always {
opts = append(opts, llb.IgnoreCache)
}
args := make([]string, 0, len(common.args))
for _, a := range common.args {
args = append(args, fmt.Sprintf("%q", a))
}
opts = append(opts, withCustomName(v, "Exec [%s]", strings.Join(args, ", ")))
st, err := common.root.State()
if err != nil {
return nil, err
}
st = st.Run(opts...).Root()
result, err := s.Solve(ctx, st, pctx.Platform.Get())
if err != nil {
return nil, err
}
resultFS := pctx.FS.New(result)
return compiler.NewValue().FillFields(map[string]interface{}{
"output": resultFS.MarshalCUE(),
"exit": 0,
})
}
type asyncExecTask struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,469 |
Include #Start exec output in progress logs
|
Right now the stdout/stderr of an exec created with `core.#Start` is completely ignored. It needs to at minimum be included in the progress output by default, same as the output of normal `core.#Exec`s, to enable basic debuggability.
Subtask of #2398
|
https://github.com/dagger/dagger/issues/2469
|
https://github.com/dagger/dagger/pull/2561
|
60813f516a3369d6790e837b209a6da9749853db
|
df189147a4395654e611d04c2ce47a9975b4b2c8
| 2022-05-17T23:37:30Z |
go
| 2022-07-12T19:05:57Z |
plan/task/exec.go
|
}
func (t *asyncExecTask) Run(ctx context.Context, pctx *plancontext.Context, s *solver.Solver, v *compiler.Value) (*compiler.Value, error) {
common, err := parseCommon(pctx, v)
if err != nil {
return nil, err
}
req, err := common.containerRequest()
if err != nil {
return nil, err
}
envVal, err := v.Lookup("env").Fields()
if err != nil {
return nil, err
}
for _, env := range envVal {
s, err := env.Value.String()
if err != nil {
return nil, err
}
req.Proc.Env = append(req.Proc.Env, fmt.Sprintf("%s=%s", env.Label(), s))
}
platform := pb.PlatformFromSpec(pctx.Platform.Get())
req.Container.Platform = &platform
ctrID, err := s.StartContainer(ctx, req)
if err != nil {
return nil, err
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,469 |
Include #Start exec output in progress logs
|
Right now the stdout/stderr of an exec created with `core.#Start` is completely ignored. It needs to at minimum be included in the progress output by default, same as the output of normal `core.#Exec`s, to enable basic debuggability.
Subtask of #2398
|
https://github.com/dagger/dagger/issues/2469
|
https://github.com/dagger/dagger/pull/2561
|
60813f516a3369d6790e837b209a6da9749853db
|
df189147a4395654e611d04c2ce47a9975b4b2c8
| 2022-05-17T23:37:30Z |
go
| 2022-07-12T19:05:57Z |
plan/task/exec.go
|
lg := log.Ctx(ctx)
lg.Debug().Msgf("started async exec %s", ctrID)
if err := v.FillPath(cue.MakePath(cue.Hid("_id", pkg.DaggerPackage)), ctrID); err != nil {
return nil, err
}
return v, nil
}
type stopAsyncExecTask struct {
}
func (t *stopAsyncExecTask) Run(ctx context.Context, _ *plancontext.Context, s *solver.Solver, v *compiler.Value) (*compiler.Value, error) {
ctrID, err := v.LookupPath(cue.MakePath(cue.Str("input"), cue.Hid("_id", pkg.DaggerPackage))).String()
if err != nil {
return nil, err
}
timeout, err := v.Lookup("timeout").Int64()
if err != nil {
return nil, err
}
lg := log.Ctx(ctx)
exitCode, err := s.StopContainer(ctx, ctrID, time.Duration(timeout))
if err != nil {
return nil, fmt.Errorf("failed to stop exec %s: %w", ctrID, err)
}
lg.Debug().Msgf("exec %s stopped with exit code %d", ctrID, exitCode)
return compiler.NewValue().FillFields(map[string]interface{}{
"exit": exitCode,
})
}
type sendSignalTask struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,469 |
Include #Start exec output in progress logs
|
Right now the stdout/stderr of an exec created with `core.#Start` is completely ignored. It needs to at minimum be included in the progress output by default, same as the output of normal `core.#Exec`s, to enable basic debuggability.
Subtask of #2398
|
https://github.com/dagger/dagger/issues/2469
|
https://github.com/dagger/dagger/pull/2561
|
60813f516a3369d6790e837b209a6da9749853db
|
df189147a4395654e611d04c2ce47a9975b4b2c8
| 2022-05-17T23:37:30Z |
go
| 2022-07-12T19:05:57Z |
plan/task/exec.go
|
}
func (t *sendSignalTask) Run(ctx context.Context, pctx *plancontext.Context, s *solver.Solver, v *compiler.Value) (*compiler.Value, error) {
ctrID, err := v.LookupPath(cue.MakePath(cue.Str("input"), cue.Hid("_id", pkg.DaggerPackage))).String()
if err != nil {
return nil, err
}
sigVal, err := v.Lookup("signal").Int64()
if err != nil {
return nil, err
}
sig := syscall.Signal(sigVal)
if err := s.SignalContainer(ctx, ctrID, sig); err != nil {
return nil, fmt.Errorf("failed to send signal %d to exec %s: %w", sig, ctrID, err)
}
return compiler.NewValue(), nil
}
func parseCommon(pctx *plancontext.Context, v *compiler.Value) (*execCommon, error) {
e := &execCommon{
hosts: make(map[string]string),
}
input, err := pctx.FS.FromValue(v.Lookup("input"))
if err != nil {
return nil, err
}
e.root = input
var cmd struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,469 |
Include #Start exec output in progress logs
|
Right now the stdout/stderr of an exec created with `core.#Start` is completely ignored. It needs to at minimum be included in the progress output by default, same as the output of normal `core.#Exec`s, to enable basic debuggability.
Subtask of #2398
|
https://github.com/dagger/dagger/issues/2469
|
https://github.com/dagger/dagger/pull/2561
|
60813f516a3369d6790e837b209a6da9749853db
|
df189147a4395654e611d04c2ce47a9975b4b2c8
| 2022-05-17T23:37:30Z |
go
| 2022-07-12T19:05:57Z |
plan/task/exec.go
|
Args []string
}
if err := v.Decode(&cmd); err != nil {
return nil, err
}
e.args = cmd.Args
workdir, err := v.Lookup("workdir").String()
if err != nil {
return nil, err
}
e.workdir = workdir
user, err := v.Lookup("user").String()
if err != nil {
return nil, err
}
e.user = user
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,469 |
Include #Start exec output in progress logs
|
Right now the stdout/stderr of an exec created with `core.#Start` is completely ignored. It needs to at minimum be included in the progress output by default, same as the output of normal `core.#Exec`s, to enable basic debuggability.
Subtask of #2398
|
https://github.com/dagger/dagger/issues/2469
|
https://github.com/dagger/dagger/pull/2561
|
60813f516a3369d6790e837b209a6da9749853db
|
df189147a4395654e611d04c2ce47a9975b4b2c8
| 2022-05-17T23:37:30Z |
go
| 2022-07-12T19:05:57Z |
plan/task/exec.go
|
hosts, err := v.Lookup("hosts").Fields()
if err != nil {
return nil, err
}
for _, host := range hosts {
ip, err := host.Value.String()
if err != nil {
return nil, err
}
e.hosts[host.Label()] = ip
}
mounts, err := v.Lookup("mounts").Fields()
if err != nil {
return nil, err
}
for _, mntField := range mounts {
if mntField.Value.Lookup("dest").IsConcreteR() != nil {
return nil, fmt.Errorf("mount %q is not concrete", mntField.Selector.String())
}
mnt, err := parseMount(pctx, mntField.Value)
if err != nil {
return nil, err
}
e.mounts = append(e.mounts, mnt)
}
return e, nil
}
type execCommon struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,469 |
Include #Start exec output in progress logs
|
Right now the stdout/stderr of an exec created with `core.#Start` is completely ignored. It needs to at minimum be included in the progress output by default, same as the output of normal `core.#Exec`s, to enable basic debuggability.
Subtask of #2398
|
https://github.com/dagger/dagger/issues/2469
|
https://github.com/dagger/dagger/pull/2561
|
60813f516a3369d6790e837b209a6da9749853db
|
df189147a4395654e611d04c2ce47a9975b4b2c8
| 2022-05-17T23:37:30Z |
go
| 2022-07-12T19:05:57Z |
plan/task/exec.go
|
root *plancontext.FS
args []string
workdir string
user string
hosts map[string]string
mounts []mount
}
func (e execCommon) runOpts() ([]llb.RunOption, error) {
opts := []llb.RunOption{
llb.Args(e.args),
llb.Dir(e.workdir),
llb.User(e.user),
}
for k, v := range e.hosts {
opts = append(opts, llb.AddExtraHost(k, net.ParseIP(v)))
}
for _, mnt := range e.mounts {
opt, err := mnt.runOpt()
if err != nil {
return nil, err
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,469 |
Include #Start exec output in progress logs
|
Right now the stdout/stderr of an exec created with `core.#Start` is completely ignored. It needs to at minimum be included in the progress output by default, same as the output of normal `core.#Exec`s, to enable basic debuggability.
Subtask of #2398
|
https://github.com/dagger/dagger/issues/2469
|
https://github.com/dagger/dagger/pull/2561
|
60813f516a3369d6790e837b209a6da9749853db
|
df189147a4395654e611d04c2ce47a9975b4b2c8
| 2022-05-17T23:37:30Z |
go
| 2022-07-12T19:05:57Z |
plan/task/exec.go
|
}
opts = append(opts, opt)
}
proxyEnv := llb.ProxyEnv{}
for _, envVar := range os.Environ() {
split := strings.SplitN(envVar, "=", 2)
if len(split) != 2 {
continue
}
key, val := split[0], split[1]
if strings.EqualFold(key, "no_proxy") {
proxyEnv.NoProxy = val
}
if strings.EqualFold(key, "all_proxy") {
proxyEnv.AllProxy = val
}
if strings.EqualFold(key, "http_proxy") {
proxyEnv.HTTPProxy = val
}
if strings.EqualFold(key, "https_proxy") {
proxyEnv.HTTPSProxy = val
}
if strings.EqualFold(key, "ftp_proxy") {
proxyEnv.FTPProxy = val
}
}
if proxyEnv != (llb.ProxyEnv{}) {
opts = append(opts, llb.WithProxy(proxyEnv))
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,469 |
Include #Start exec output in progress logs
|
Right now the stdout/stderr of an exec created with `core.#Start` is completely ignored. It needs to at minimum be included in the progress output by default, same as the output of normal `core.#Exec`s, to enable basic debuggability.
Subtask of #2398
|
https://github.com/dagger/dagger/issues/2469
|
https://github.com/dagger/dagger/pull/2561
|
60813f516a3369d6790e837b209a6da9749853db
|
df189147a4395654e611d04c2ce47a9975b4b2c8
| 2022-05-17T23:37:30Z |
go
| 2022-07-12T19:05:57Z |
plan/task/exec.go
|
return opts, nil
}
func (e execCommon) containerRequest() (solver.StartContainerRequest, error) {
req := solver.StartContainerRequest{
Container: client.NewContainerRequest{
Mounts: []client.Mount{{
Dest: "/",
MountType: pb.MountType_BIND,
Ref: e.root.Result(),
}},
},
Proc: client.StartRequest{
Args: e.args,
User: e.user,
Cwd: e.workdir,
},
}
for _, mnt := range e.mounts {
m, err := mnt.containerMount()
if err != nil {
return req, err
}
req.Container.Mounts = append(req.Container.Mounts, m)
}
for k, v := range e.hosts {
req.Container.ExtraHosts = append(req.Container.ExtraHosts, &pb.HostIP{Host: k, IP: v})
}
return req, nil
}
func parseMount(pctx *plancontext.Context, v *compiler.Value) (mount, error) {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,469 |
Include #Start exec output in progress logs
|
Right now the stdout/stderr of an exec created with `core.#Start` is completely ignored. It needs to at minimum be included in the progress output by default, same as the output of normal `core.#Exec`s, to enable basic debuggability.
Subtask of #2398
|
https://github.com/dagger/dagger/issues/2469
|
https://github.com/dagger/dagger/pull/2561
|
60813f516a3369d6790e837b209a6da9749853db
|
df189147a4395654e611d04c2ce47a9975b4b2c8
| 2022-05-17T23:37:30Z |
go
| 2022-07-12T19:05:57Z |
plan/task/exec.go
|
dest, err := v.Lookup("dest").String()
if err != nil {
return mount{}, err
}
typ, err := v.Lookup("type").String()
if err != nil {
return mount{}, err
}
switch typ {
case "cache":
contents := v.Lookup("contents")
idValue := contents.Lookup("id")
if !idValue.IsConcrete() {
return mount{}, fmt.Errorf("cache %q is not set", v.Path().String())
}
id, err := idValue.String()
if err != nil {
return mount{}, err
}
concurrency, err := contents.Lookup("concurrency").String()
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,469 |
Include #Start exec output in progress logs
|
Right now the stdout/stderr of an exec created with `core.#Start` is completely ignored. It needs to at minimum be included in the progress output by default, same as the output of normal `core.#Exec`s, to enable basic debuggability.
Subtask of #2398
|
https://github.com/dagger/dagger/issues/2469
|
https://github.com/dagger/dagger/pull/2561
|
60813f516a3369d6790e837b209a6da9749853db
|
df189147a4395654e611d04c2ce47a9975b4b2c8
| 2022-05-17T23:37:30Z |
go
| 2022-07-12T19:05:57Z |
plan/task/exec.go
|
if err != nil {
return mount{}, err
}
var mode llb.CacheMountSharingMode
switch concurrency {
case "shared":
mode = llb.CacheMountShared
case "private":
mode = llb.CacheMountPrivate
case "locked":
mode = llb.CacheMountLocked
default:
return mount{}, fmt.Errorf("unknown concurrency mode %q", concurrency)
}
return mount{
dest: dest,
cacheMount: &cacheMount{
id: id,
concurrency: mode,
},
}, nil
case "tmp":
return mount{dest: dest, tmpMount: &tmpMount{}}, nil
case "socket":
socket, err := pctx.Sockets.FromValue(v.Lookup("contents"))
if err != nil {
return mount{}, err
}
return mount{dest: dest, socketMount: &socketMount{id: socket.ID()}}, nil
case "fs":
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,469 |
Include #Start exec output in progress logs
|
Right now the stdout/stderr of an exec created with `core.#Start` is completely ignored. It needs to at minimum be included in the progress output by default, same as the output of normal `core.#Exec`s, to enable basic debuggability.
Subtask of #2398
|
https://github.com/dagger/dagger/issues/2469
|
https://github.com/dagger/dagger/pull/2561
|
60813f516a3369d6790e837b209a6da9749853db
|
df189147a4395654e611d04c2ce47a9975b4b2c8
| 2022-05-17T23:37:30Z |
go
| 2022-07-12T19:05:57Z |
plan/task/exec.go
|
mnt := mount{
dest: dest,
fsMount: &fsMount{},
}
contents, err := pctx.FS.FromValue(v.Lookup("contents"))
if err != nil {
return mount{}, err
}
mnt.fsMount.contents = contents
if source := v.Lookup("source"); source.Exists() {
src, err := source.String()
if err != nil {
return mount{}, err
}
mnt.fsMount.source = src
}
if ro := v.Lookup("ro"); ro.Exists() {
readonly, err := ro.Bool()
if err != nil {
return mount{}, err
}
mnt.fsMount.readonly = readonly
}
return mnt, nil
case "secret":
contents, err := pctx.Secrets.FromValue(v.Lookup("contents"))
if err != nil {
return mount{}, err
}
opts := struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,469 |
Include #Start exec output in progress logs
|
Right now the stdout/stderr of an exec created with `core.#Start` is completely ignored. It needs to at minimum be included in the progress output by default, same as the output of normal `core.#Exec`s, to enable basic debuggability.
Subtask of #2398
|
https://github.com/dagger/dagger/issues/2469
|
https://github.com/dagger/dagger/pull/2561
|
60813f516a3369d6790e837b209a6da9749853db
|
df189147a4395654e611d04c2ce47a9975b4b2c8
| 2022-05-17T23:37:30Z |
go
| 2022-07-12T19:05:57Z |
plan/task/exec.go
|
UID uint32
GID uint32
Mask uint32
}{}
if err := v.Decode(&opts); err != nil {
return mount{}, err
}
return mount{
dest: dest,
secretMount: &secretMount{
id: contents.ID(),
uid: opts.UID,
gid: opts.GID,
mask: opts.Mask,
},
}, nil
case "file":
contents, err := v.Lookup("contents").String()
if err != nil {
return mount{}, err
}
opts := struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,469 |
Include #Start exec output in progress logs
|
Right now the stdout/stderr of an exec created with `core.#Start` is completely ignored. It needs to at minimum be included in the progress output by default, same as the output of normal `core.#Exec`s, to enable basic debuggability.
Subtask of #2398
|
https://github.com/dagger/dagger/issues/2469
|
https://github.com/dagger/dagger/pull/2561
|
60813f516a3369d6790e837b209a6da9749853db
|
df189147a4395654e611d04c2ce47a9975b4b2c8
| 2022-05-17T23:37:30Z |
go
| 2022-07-12T19:05:57Z |
plan/task/exec.go
|
Permissions uint32
}{}
if err := v.Decode(&opts); err != nil {
return mount{}, err
}
return mount{
dest: dest,
fileMount: &fileMount{
contents: contents,
permissions: opts.Permissions,
},
}, nil
case "":
return mount{}, errors.New("no mount type specified")
default:
return mount{}, fmt.Errorf("unsupported mount type %q", typ)
}
}
type mount struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,469 |
Include #Start exec output in progress logs
|
Right now the stdout/stderr of an exec created with `core.#Start` is completely ignored. It needs to at minimum be included in the progress output by default, same as the output of normal `core.#Exec`s, to enable basic debuggability.
Subtask of #2398
|
https://github.com/dagger/dagger/issues/2469
|
https://github.com/dagger/dagger/pull/2561
|
60813f516a3369d6790e837b209a6da9749853db
|
df189147a4395654e611d04c2ce47a9975b4b2c8
| 2022-05-17T23:37:30Z |
go
| 2022-07-12T19:05:57Z |
plan/task/exec.go
|
dest string
cacheMount *cacheMount
tmpMount *tmpMount
socketMount *socketMount
fsMount *fsMount
secretMount *secretMount
fileMount *fileMount
}
func (m mount) runOpt() (llb.RunOption, error) {
switch {
case m.cacheMount != nil:
return llb.AddMount(
m.dest,
llb.Scratch(),
llb.AsPersistentCacheDir(m.cacheMount.id, m.cacheMount.concurrency),
), nil
case m.tmpMount != nil:
return llb.AddMount(
m.dest,
llb.Scratch(),
llb.Tmpfs(),
), nil
case m.socketMount != nil:
return llb.AddSSHSocket(
llb.SSHID(m.socketMount.id),
llb.SSHSocketTarget(m.dest),
), nil
case m.fsMount != nil:
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,469 |
Include #Start exec output in progress logs
|
Right now the stdout/stderr of an exec created with `core.#Start` is completely ignored. It needs to at minimum be included in the progress output by default, same as the output of normal `core.#Exec`s, to enable basic debuggability.
Subtask of #2398
|
https://github.com/dagger/dagger/issues/2469
|
https://github.com/dagger/dagger/pull/2561
|
60813f516a3369d6790e837b209a6da9749853db
|
df189147a4395654e611d04c2ce47a9975b4b2c8
| 2022-05-17T23:37:30Z |
go
| 2022-07-12T19:05:57Z |
plan/task/exec.go
|
st, err := m.fsMount.contents.State()
if err != nil {
return nil, err
}
var opts []llb.MountOption
if m.fsMount.source != "" {
opts = append(opts, llb.SourcePath(m.fsMount.source))
}
if m.fsMount.readonly {
opts = append(opts, llb.Readonly)
}
return llb.AddMount(
m.dest,
st,
opts...,
), nil
case m.secretMount != nil:
return llb.AddSecret(
m.dest,
llb.SecretID(m.secretMount.id),
llb.SecretFileOpt(int(m.secretMount.uid), int(m.secretMount.gid), int(m.secretMount.mask)),
), nil
case m.fileMount != nil:
return llb.AddMount(
m.dest,
llb.Scratch().File(llb.Mkfile(
"/file",
fs.FileMode(m.fileMount.permissions),
[]byte(m.fileMount.contents))),
llb.SourcePath("/file"),
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,469 |
Include #Start exec output in progress logs
|
Right now the stdout/stderr of an exec created with `core.#Start` is completely ignored. It needs to at minimum be included in the progress output by default, same as the output of normal `core.#Exec`s, to enable basic debuggability.
Subtask of #2398
|
https://github.com/dagger/dagger/issues/2469
|
https://github.com/dagger/dagger/pull/2561
|
60813f516a3369d6790e837b209a6da9749853db
|
df189147a4395654e611d04c2ce47a9975b4b2c8
| 2022-05-17T23:37:30Z |
go
| 2022-07-12T19:05:57Z |
plan/task/exec.go
|
), nil
}
return nil, fmt.Errorf("no mount type set")
}
func (m mount) containerMount() (client.Mount, error) {
switch {
case m.cacheMount != nil:
mnt := client.Mount{
Dest: m.dest,
MountType: pb.MountType_CACHE,
CacheOpt: &pb.CacheOpt{
ID: m.cacheMount.id,
},
}
switch m.cacheMount.concurrency {
case llb.CacheMountShared:
mnt.CacheOpt.Sharing = pb.CacheSharingOpt_SHARED
case llb.CacheMountPrivate:
mnt.CacheOpt.Sharing = pb.CacheSharingOpt_PRIVATE
case llb.CacheMountLocked:
mnt.CacheOpt.Sharing = pb.CacheSharingOpt_LOCKED
}
return mnt, nil
case m.tmpMount != nil:
return client.Mount{
Dest: m.dest,
MountType: pb.MountType_TMPFS,
}, nil
case m.socketMount != nil:
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,469 |
Include #Start exec output in progress logs
|
Right now the stdout/stderr of an exec created with `core.#Start` is completely ignored. It needs to at minimum be included in the progress output by default, same as the output of normal `core.#Exec`s, to enable basic debuggability.
Subtask of #2398
|
https://github.com/dagger/dagger/issues/2469
|
https://github.com/dagger/dagger/pull/2561
|
60813f516a3369d6790e837b209a6da9749853db
|
df189147a4395654e611d04c2ce47a9975b4b2c8
| 2022-05-17T23:37:30Z |
go
| 2022-07-12T19:05:57Z |
plan/task/exec.go
|
return client.Mount{
Dest: m.dest,
MountType: pb.MountType_SSH,
SSHOpt: &pb.SSHOpt{
ID: m.socketMount.id,
},
}, nil
case m.fsMount != nil:
return client.Mount{
Dest: m.dest,
MountType: pb.MountType_BIND,
Ref: m.fsMount.contents.Result(),
Selector: m.fsMount.source,
Readonly: m.fsMount.readonly,
}, nil
case m.secretMount != nil:
return client.Mount{
Dest: m.dest,
MountType: pb.MountType_SECRET,
SecretOpt: &pb.SecretOpt{
ID: m.secretMount.id,
Uid: m.secretMount.uid,
Gid: m.secretMount.gid,
Mode: m.secretMount.mask,
},
}, nil
}
return client.Mount{}, fmt.Errorf("no mount type set")
}
type cacheMount struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,469 |
Include #Start exec output in progress logs
|
Right now the stdout/stderr of an exec created with `core.#Start` is completely ignored. It needs to at minimum be included in the progress output by default, same as the output of normal `core.#Exec`s, to enable basic debuggability.
Subtask of #2398
|
https://github.com/dagger/dagger/issues/2469
|
https://github.com/dagger/dagger/pull/2561
|
60813f516a3369d6790e837b209a6da9749853db
|
df189147a4395654e611d04c2ce47a9975b4b2c8
| 2022-05-17T23:37:30Z |
go
| 2022-07-12T19:05:57Z |
plan/task/exec.go
|
id string
concurrency llb.CacheMountSharingMode
}
type tmpMount struct {
}
type socketMount struct {
id string
}
type fsMount struct {
contents *plancontext.FS
source string
readonly bool
}
type secretMount struct {
id string
uid uint32
gid uint32
mask uint32
}
type fileMount struct {
contents string
permissions uint32
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,469 |
Include #Start exec output in progress logs
|
Right now the stdout/stderr of an exec created with `core.#Start` is completely ignored. It needs to at minimum be included in the progress output by default, same as the output of normal `core.#Exec`s, to enable basic debuggability.
Subtask of #2398
|
https://github.com/dagger/dagger/issues/2469
|
https://github.com/dagger/dagger/pull/2561
|
60813f516a3369d6790e837b209a6da9749853db
|
df189147a4395654e611d04c2ce47a9975b4b2c8
| 2022-05-17T23:37:30Z |
go
| 2022-07-12T19:05:57Z |
solver/container.go
|
package solver
import (
"context"
"errors"
"fmt"
"sync"
"syscall"
"time"
"github.com/moby/buildkit/frontend/gateway/client"
gatewayapi "github.com/moby/buildkit/frontend/gateway/pb"
"github.com/moby/buildkit/identity"
)
type container struct {
id string
ctr client.Container
proc client.ContainerProcess
mu sync.Mutex
stopped bool
exitCode uint8
exitErr error
}
type StartContainerRequest struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,469 |
Include #Start exec output in progress logs
|
Right now the stdout/stderr of an exec created with `core.#Start` is completely ignored. It needs to at minimum be included in the progress output by default, same as the output of normal `core.#Exec`s, to enable basic debuggability.
Subtask of #2398
|
https://github.com/dagger/dagger/issues/2469
|
https://github.com/dagger/dagger/pull/2561
|
60813f516a3369d6790e837b209a6da9749853db
|
df189147a4395654e611d04c2ce47a9975b4b2c8
| 2022-05-17T23:37:30Z |
go
| 2022-07-12T19:05:57Z |
solver/container.go
|
Container client.NewContainerRequest
Proc client.StartRequest
}
func (s *Solver) StartContainer(ctx context.Context, req StartContainerRequest) (string, error) {
ctr, err := s.opts.Gateway.NewContainer(ctx, req.Container)
if err != nil {
return "", fmt.Errorf("failed to create container: %w", err)
}
proc, err := ctr.Start(ctx, req.Proc)
if err != nil {
return "", fmt.Errorf("failed to start container: %w", err)
}
id := identity.NewID()
s.containersMu.Lock()
s.containers[id] = &container{
id: id,
ctr: ctr,
proc: proc,
}
s.containersMu.Unlock()
return id, nil
}
func (s *Solver) SignalContainer(ctx context.Context, ctrID string, sig syscall.Signal) error {
s.containersMu.Lock()
c, ok := s.containers[ctrID]
s.containersMu.Unlock()
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,469 |
Include #Start exec output in progress logs
|
Right now the stdout/stderr of an exec created with `core.#Start` is completely ignored. It needs to at minimum be included in the progress output by default, same as the output of normal `core.#Exec`s, to enable basic debuggability.
Subtask of #2398
|
https://github.com/dagger/dagger/issues/2469
|
https://github.com/dagger/dagger/pull/2561
|
60813f516a3369d6790e837b209a6da9749853db
|
df189147a4395654e611d04c2ce47a9975b4b2c8
| 2022-05-17T23:37:30Z |
go
| 2022-07-12T19:05:57Z |
solver/container.go
|
if !ok {
return ContainerNotFoundError{ID: ctrID}
}
c.mu.Lock()
defer c.mu.Unlock()
if c.stopped {
return ContainerAlreadyStoppedError{ID: ctrID}
}
return c.proc.Signal(ctx, sig)
}
func (s *Solver) StopContainer(ctx context.Context, ctrID string, timeout time.Duration) (uint8, error) {
s.containersMu.Lock()
c, ok := s.containers[ctrID]
s.containersMu.Unlock()
if !ok {
return 0, ContainerNotFoundError{ID: ctrID}
}
c.mu.Lock()
defer c.mu.Unlock()
if c.stopped {
return c.exitCode, c.exitErr
}
c.stopped = true
if timeout > 0 {
waitCh := make(chan struct{})
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,469 |
Include #Start exec output in progress logs
|
Right now the stdout/stderr of an exec created with `core.#Start` is completely ignored. It needs to at minimum be included in the progress output by default, same as the output of normal `core.#Exec`s, to enable basic debuggability.
Subtask of #2398
|
https://github.com/dagger/dagger/issues/2469
|
https://github.com/dagger/dagger/pull/2561
|
60813f516a3369d6790e837b209a6da9749853db
|
df189147a4395654e611d04c2ce47a9975b4b2c8
| 2022-05-17T23:37:30Z |
go
| 2022-07-12T19:05:57Z |
solver/container.go
|
go func() {
defer close(waitCh)
c.proc.Wait()
}()
select {
case <-waitCh:
case <-time.After(timeout):
}
}
c.exitCode, c.exitErr = getExitCode(c.ctr.Release(ctx))
return c.exitCode, c.exitErr
}
func getExitCode(err error) (uint8, error) {
if err == nil {
return 0, nil
}
exitError := &gatewayapi.ExitError{}
if errors.As(err, &exitError) {
if exitError.ExitCode != gatewayapi.UnknownExitStatus {
return uint8(exitError.ExitCode), nil
}
}
return 0, err
}
type ContainerNotFoundError struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,469 |
Include #Start exec output in progress logs
|
Right now the stdout/stderr of an exec created with `core.#Start` is completely ignored. It needs to at minimum be included in the progress output by default, same as the output of normal `core.#Exec`s, to enable basic debuggability.
Subtask of #2398
|
https://github.com/dagger/dagger/issues/2469
|
https://github.com/dagger/dagger/pull/2561
|
60813f516a3369d6790e837b209a6da9749853db
|
df189147a4395654e611d04c2ce47a9975b4b2c8
| 2022-05-17T23:37:30Z |
go
| 2022-07-12T19:05:57Z |
solver/container.go
|
ID string
}
func (e ContainerNotFoundError) Error() string {
return fmt.Sprintf("container %s not found", e.ID)
}
type ContainerAlreadyStoppedError struct {
ID string
}
func (e ContainerAlreadyStoppedError) Error() string {
return fmt.Sprintf("container %s already stopped", e.ID)
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,469 |
Include #Start exec output in progress logs
|
Right now the stdout/stderr of an exec created with `core.#Start` is completely ignored. It needs to at minimum be included in the progress output by default, same as the output of normal `core.#Exec`s, to enable basic debuggability.
Subtask of #2398
|
https://github.com/dagger/dagger/issues/2469
|
https://github.com/dagger/dagger/pull/2561
|
60813f516a3369d6790e837b209a6da9749853db
|
df189147a4395654e611d04c2ce47a9975b4b2c8
| 2022-05-17T23:37:30Z |
go
| 2022-07-12T19:05:57Z |
solver/solver.go
|
package solver
import (
"context"
"encoding/json"
"errors"
"fmt"
"strings"
"sync"
bk "github.com/moby/buildkit/client"
"github.com/moby/buildkit/client/llb"
"github.com/moby/buildkit/exporter/containerimage/exptypes"
"github.com/moby/buildkit/frontend/dockerfile/dockerfile2llb"
bkgw "github.com/moby/buildkit/frontend/gateway/client"
"github.com/moby/buildkit/session"
bkpb "github.com/moby/buildkit/solver/pb"
"github.com/opencontainers/go-digest"
specs "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/rs/zerolog/log"
"go.dagger.io/dagger/plancontext"
)
type Solver struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,469 |
Include #Start exec output in progress logs
|
Right now the stdout/stderr of an exec created with `core.#Start` is completely ignored. It needs to at minimum be included in the progress output by default, same as the output of normal `core.#Exec`s, to enable basic debuggability.
Subtask of #2398
|
https://github.com/dagger/dagger/issues/2469
|
https://github.com/dagger/dagger/pull/2561
|
60813f516a3369d6790e837b209a6da9749853db
|
df189147a4395654e611d04c2ce47a9975b4b2c8
| 2022-05-17T23:37:30Z |
go
| 2022-07-12T19:05:57Z |
solver/solver.go
|
opts Opts
eventsWg *sync.WaitGroup
closeCh chan *bk.SolveStatus
refs []bkgw.Reference
l sync.RWMutex
containers map[string]*container
containersMu sync.Mutex
}
type Opts struct {
Control *bk.Client
Gateway bkgw.Client
Events chan *bk.SolveStatus
Context *plancontext.Context
Auth *RegistryAuthProvider
NoCache bool
CacheImports []bkgw.CacheOptionsEntry
}
func New(opts Opts) *Solver {
return &Solver{
eventsWg: &sync.WaitGroup{},
closeCh: make(chan *bk.SolveStatus),
opts: opts,
containers: make(map[string]*container),
}
}
func invalidateCache(def *llb.Definition) error {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,469 |
Include #Start exec output in progress logs
|
Right now the stdout/stderr of an exec created with `core.#Start` is completely ignored. It needs to at minimum be included in the progress output by default, same as the output of normal `core.#Exec`s, to enable basic debuggability.
Subtask of #2398
|
https://github.com/dagger/dagger/issues/2469
|
https://github.com/dagger/dagger/pull/2561
|
60813f516a3369d6790e837b209a6da9749853db
|
df189147a4395654e611d04c2ce47a9975b4b2c8
| 2022-05-17T23:37:30Z |
go
| 2022-07-12T19:05:57Z |
solver/solver.go
|
for _, dt := range def.Def {
var op bkpb.Op
if err := (&op).Unmarshal(dt); err != nil {
return err
}
dgst := digest.FromBytes(dt)
opMetadata, ok := def.Metadata[dgst]
if !ok {
opMetadata = bkpb.OpMetadata{}
}
c := llb.Constraints{Metadata: opMetadata}
llb.IgnoreCache(&c)
def.Metadata[dgst] = c.Metadata
}
return nil
}
func (s *Solver) GetOptions() Opts {
return s.opts
}
func (s *Solver) NoCache() bool {
return s.opts.NoCache
}
func (s *Solver) Stop(ctx context.Context) {
lg := log.Ctx(ctx)
for ctrID := range s.containers {
if _, err := s.StopContainer(ctx, ctrID, 0); err != nil {
lg.Error().Err(err).Str("container", ctrID).Msg("failed to stop container")
}
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,469 |
Include #Start exec output in progress logs
|
Right now the stdout/stderr of an exec created with `core.#Start` is completely ignored. It needs to at minimum be included in the progress output by default, same as the output of normal `core.#Exec`s, to enable basic debuggability.
Subtask of #2398
|
https://github.com/dagger/dagger/issues/2469
|
https://github.com/dagger/dagger/pull/2561
|
60813f516a3369d6790e837b209a6da9749853db
|
df189147a4395654e611d04c2ce47a9975b4b2c8
| 2022-05-17T23:37:30Z |
go
| 2022-07-12T19:05:57Z |
solver/solver.go
|
close(s.closeCh)
s.eventsWg.Wait()
close(s.opts.Events)
}
func (s *Solver) AddCredentials(target, username, secret string) {
s.opts.Auth.AddCredentials(target, username, secret)
}
func (s *Solver) Marshal(ctx context.Context, st llb.State, co ...llb.ConstraintsOpt) (*bkpb.Definition, error) {
def, err := st.Marshal(ctx, co...)
if err != nil {
return nil, err
}
if s.opts.NoCache {
if err := invalidateCache(def); err != nil {
return nil, err
}
}
return def.ToPB(), nil
}
func (s *Solver) SessionID() string {
return s.opts.Gateway.BuildOpts().SessionID
}
func (s *Solver) ResolveImageConfig(ctx context.Context, ref string, opts llb.ResolveImageConfigOpt) (dockerfile2llb.Image, digest.Digest, error) {
var image dockerfile2llb.Image
dg, meta, err := s.opts.Gateway.ResolveImageConfig(ctx, ref, opts)
if err != nil {
return image, "", err
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,469 |
Include #Start exec output in progress logs
|
Right now the stdout/stderr of an exec created with `core.#Start` is completely ignored. It needs to at minimum be included in the progress output by default, same as the output of normal `core.#Exec`s, to enable basic debuggability.
Subtask of #2398
|
https://github.com/dagger/dagger/issues/2469
|
https://github.com/dagger/dagger/pull/2561
|
60813f516a3369d6790e837b209a6da9749853db
|
df189147a4395654e611d04c2ce47a9975b4b2c8
| 2022-05-17T23:37:30Z |
go
| 2022-07-12T19:05:57Z |
solver/solver.go
|
}
if err := json.Unmarshal(meta, &image); err != nil {
return image, "", err
}
return image, dg, nil
}
func (s *Solver) SolveRequest(ctx context.Context, req bkgw.SolveRequest) (*bkgw.Result, error) {
req.Evaluate = true
res, err := s.opts.Gateway.Solve(ctx, req)
if err != nil {
return nil, CleanError(err)
}
return res, nil
}
func (s *Solver) References() []bkgw.Reference {
s.l.RLock()
defer s.l.RUnlock()
return s.refs
}
func (s *Solver) Solve(ctx context.Context, st llb.State, platform specs.Platform) (bkgw.Reference, error) {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,469 |
Include #Start exec output in progress logs
|
Right now the stdout/stderr of an exec created with `core.#Start` is completely ignored. It needs to at minimum be included in the progress output by default, same as the output of normal `core.#Exec`s, to enable basic debuggability.
Subtask of #2398
|
https://github.com/dagger/dagger/issues/2469
|
https://github.com/dagger/dagger/pull/2561
|
60813f516a3369d6790e837b209a6da9749853db
|
df189147a4395654e611d04c2ce47a9975b4b2c8
| 2022-05-17T23:37:30Z |
go
| 2022-07-12T19:05:57Z |
solver/solver.go
|
def, err := s.Marshal(ctx, st, llb.Platform(platform))
if err != nil {
return nil, err
}
jsonLLB, err := dumpLLB(def)
if err != nil {
return nil, err
}
log.
Ctx(ctx).
Trace().
RawJSON("llb", jsonLLB).
Msg("solving")
res, err := s.SolveRequest(ctx, bkgw.SolveRequest{
Definition: def,
CacheImports: s.opts.CacheImports,
})
if err != nil {
return nil, err
}
ref, err := res.SingleRef()
if err != nil {
return nil, err
}
s.l.Lock()
defer s.l.Unlock()
s.refs = append(s.refs, ref)
return ref, nil
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,469 |
Include #Start exec output in progress logs
|
Right now the stdout/stderr of an exec created with `core.#Start` is completely ignored. It needs to at minimum be included in the progress output by default, same as the output of normal `core.#Exec`s, to enable basic debuggability.
Subtask of #2398
|
https://github.com/dagger/dagger/issues/2469
|
https://github.com/dagger/dagger/pull/2561
|
60813f516a3369d6790e837b209a6da9749853db
|
df189147a4395654e611d04c2ce47a9975b4b2c8
| 2022-05-17T23:37:30Z |
go
| 2022-07-12T19:05:57Z |
solver/solver.go
|
func (s *Solver) forwardEvents(ch chan *bk.SolveStatus, ignoreLogs bool) {
s.eventsWg.Add(1)
defer s.eventsWg.Done()
for event := range ch {
if ignoreLogs {
event.Logs = nil
}
s.opts.Events <- event
}
}
func (s *Solver) Export(ctx context.Context, st llb.State, img *dockerfile2llb.Image, output bk.ExportEntry, platform specs.Platform) (*bk.SolveResponse, error) {
select {
case <-s.closeCh:
return nil, context.Canceled
default:
}
def, err := s.Marshal(ctx, st, llb.Platform(platform))
if err != nil {
return nil, err
}
opts := bk.SolveOpt{
Exports: []bk.ExportEntry{output},
Session: []session.Attachable{
s.opts.Auth,
NewSecretsStoreProvider(s.opts.Context),
NewDockerSocketProvider(s.opts.Context),
},
}
ch := make(chan *bk.SolveStatus)
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,469 |
Include #Start exec output in progress logs
|
Right now the stdout/stderr of an exec created with `core.#Start` is completely ignored. It needs to at minimum be included in the progress output by default, same as the output of normal `core.#Exec`s, to enable basic debuggability.
Subtask of #2398
|
https://github.com/dagger/dagger/issues/2469
|
https://github.com/dagger/dagger/pull/2561
|
60813f516a3369d6790e837b209a6da9749853db
|
df189147a4395654e611d04c2ce47a9975b4b2c8
| 2022-05-17T23:37:30Z |
go
| 2022-07-12T19:05:57Z |
solver/solver.go
|
ignoreLogs := true
go s.forwardEvents(ch, ignoreLogs)
return s.opts.Control.Build(ctx, opts, "", func(ctx context.Context, c bkgw.Client) (*bkgw.Result, error) {
res, err := c.Solve(ctx, bkgw.SolveRequest{
Definition: def,
})
if err != nil {
return nil, err
}
if img != nil {
config, err := json.Marshal(img)
if err != nil {
return nil, fmt.Errorf("failed to marshal image config: %w", err)
}
res.AddMeta(exptypes.ExporterImageConfigKey, config)
}
return res, nil
}, ch)
}
type llbOp struct {
Op bkpb.Op
Digest digest.Digest
OpMetadata bkpb.OpMetadata
}
func dumpLLB(def *bkpb.Definition) ([]byte, error) {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,469 |
Include #Start exec output in progress logs
|
Right now the stdout/stderr of an exec created with `core.#Start` is completely ignored. It needs to at minimum be included in the progress output by default, same as the output of normal `core.#Exec`s, to enable basic debuggability.
Subtask of #2398
|
https://github.com/dagger/dagger/issues/2469
|
https://github.com/dagger/dagger/pull/2561
|
60813f516a3369d6790e837b209a6da9749853db
|
df189147a4395654e611d04c2ce47a9975b4b2c8
| 2022-05-17T23:37:30Z |
go
| 2022-07-12T19:05:57Z |
solver/solver.go
|
ops := make([]llbOp, 0, len(def.Def))
for _, dt := range def.Def {
var op bkpb.Op
if err := (&op).Unmarshal(dt); err != nil {
return nil, fmt.Errorf("failed to parse op: %w", err)
}
dgst := digest.FromBytes(dt)
ent := llbOp{Op: op, Digest: dgst, OpMetadata: def.Metadata[dgst]}
ops = append(ops, ent)
}
return json.Marshal(ops)
}
func CleanError(err error) error {
noise := []string{
"executor failed running ",
"buildkit-runc did not terminate successfully",
"rpc error: code = Unknown desc = ",
"failed to solve: ",
}
msg := err.Error()
for _, s := range noise {
msg = strings.ReplaceAll(msg, s, "")
}
return errors.New(msg)
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,582 |
π `dagger do` help should indicate where to insert action name
|
### What is the issue? & Log output
Today if you run `dagger do` or `dagger do --help` you are returned something like
<img width="400" alt="image" src="https://user-images.githubusercontent.com/3187222/172227384-3d9200c2-c2a8-4079-87d5-c1db9293c597.png">
It looks like the proper command syntax is `dagger do [flags]`, but it should be something like:
```
dagger do [action] [flags]
```
Note: `[action]` here could be something like `hello` or something like `hello foo bar` to reference a sub-action.
We should probably note that in the CLI help as well.
```
// Hello world
hello: foo: bar: bash.#Run & {
...
```
<img width="300" alt="image" src="https://user-images.githubusercontent.com/3187222/172233677-3fb84aa8-77e6-4c36-86a2-091488812806.png">
Note: A lot of folks [use conventions for which CLI args are required or optional](https://stackoverflow.com/questions/21503865/how-to-denote-that-a-command-line-argument-is-optional-when-printing-usage). If `[]` means optional, then it's true that it's valid to run `dagger do` _without_ an action name or any flags (i.e. action is optional), but we should show where you'd put those in a valid command by making them both optional, but including them both like suggested above.
### Steps to reproduce
`dagger do`
or
`dagger do -h`
or
`dagger do --help`
### Dagger version
0.2.16
### OS version
macOS 12.3.1[](url)
|
https://github.com/dagger/dagger/issues/2582
|
https://github.com/dagger/dagger/pull/2941
|
8dfbd1956c211ea57d5341b0a12ffb2e8e067c41
|
aca2bf927d93ababb22385c1d594e5e204c9d751
| 2022-06-06T18:54:24Z |
go
| 2022-08-15T20:47:27Z |
cmd/dagger/cmd/do.go
|
package cmd
import (
"context"
"encoding/json"
"errors"
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"
"strings"
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,582 |
π `dagger do` help should indicate where to insert action name
|
### What is the issue? & Log output
Today if you run `dagger do` or `dagger do --help` you are returned something like
<img width="400" alt="image" src="https://user-images.githubusercontent.com/3187222/172227384-3d9200c2-c2a8-4079-87d5-c1db9293c597.png">
It looks like the proper command syntax is `dagger do [flags]`, but it should be something like:
```
dagger do [action] [flags]
```
Note: `[action]` here could be something like `hello` or something like `hello foo bar` to reference a sub-action.
We should probably note that in the CLI help as well.
```
// Hello world
hello: foo: bar: bash.#Run & {
...
```
<img width="300" alt="image" src="https://user-images.githubusercontent.com/3187222/172233677-3fb84aa8-77e6-4c36-86a2-091488812806.png">
Note: A lot of folks [use conventions for which CLI args are required or optional](https://stackoverflow.com/questions/21503865/how-to-denote-that-a-command-line-argument-is-optional-when-printing-usage). If `[]` means optional, then it's true that it's valid to run `dagger do` _without_ an action name or any flags (i.e. action is optional), but we should show where you'd put those in a valid command by making them both optional, but including them both like suggested above.
### Steps to reproduce
`dagger do`
or
`dagger do -h`
or
`dagger do --help`
### Dagger version
0.2.16
### OS version
macOS 12.3.1[](url)
|
https://github.com/dagger/dagger/issues/2582
|
https://github.com/dagger/dagger/pull/2941
|
8dfbd1956c211ea57d5341b0a12ffb2e8e067c41
|
aca2bf927d93ababb22385c1d594e5e204c9d751
| 2022-06-06T18:54:24Z |
go
| 2022-08-15T20:47:27Z |
cmd/dagger/cmd/do.go
|
"text/tabwriter"
"cuelang.org/go/cue"
"cuelang.org/go/cue/format"
"github.com/containerd/console"
"github.com/mitchellh/go-homedir"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"github.com/spf13/viper"
"go.dagger.io/dagger/analytics"
"go.dagger.io/dagger/cmd/dagger/cmd/common"
"go.dagger.io/dagger/cmd/dagger/logger"
"go.dagger.io/dagger/compiler"
"go.dagger.io/dagger/plan"
"go.dagger.io/dagger/solver"
"go.dagger.io/dagger/telemetry"
"go.dagger.io/dagger/telemetry/event"
"golang.org/x/term"
)
var experimentalFlags = []string{
"platform",
"dry-run",
"telemetry-log",
}
var doCmd = &cobra.Command{
Use: "do ACTION [SUBACTION...]",
PreRun: func(cmd *cobra.Command, args []string) {
if err := viper.BindPFlags(cmd.Flags()); err != nil {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,582 |
π `dagger do` help should indicate where to insert action name
|
### What is the issue? & Log output
Today if you run `dagger do` or `dagger do --help` you are returned something like
<img width="400" alt="image" src="https://user-images.githubusercontent.com/3187222/172227384-3d9200c2-c2a8-4079-87d5-c1db9293c597.png">
It looks like the proper command syntax is `dagger do [flags]`, but it should be something like:
```
dagger do [action] [flags]
```
Note: `[action]` here could be something like `hello` or something like `hello foo bar` to reference a sub-action.
We should probably note that in the CLI help as well.
```
// Hello world
hello: foo: bar: bash.#Run & {
...
```
<img width="300" alt="image" src="https://user-images.githubusercontent.com/3187222/172233677-3fb84aa8-77e6-4c36-86a2-091488812806.png">
Note: A lot of folks [use conventions for which CLI args are required or optional](https://stackoverflow.com/questions/21503865/how-to-denote-that-a-command-line-argument-is-optional-when-printing-usage). If `[]` means optional, then it's true that it's valid to run `dagger do` _without_ an action name or any flags (i.e. action is optional), but we should show where you'd put those in a valid command by making them both optional, but including them both like suggested above.
### Steps to reproduce
`dagger do`
or
`dagger do -h`
or
`dagger do --help`
### Dagger version
0.2.16
### OS version
macOS 12.3.1[](url)
|
https://github.com/dagger/dagger/issues/2582
|
https://github.com/dagger/dagger/pull/2941
|
8dfbd1956c211ea57d5341b0a12ffb2e8e067c41
|
aca2bf927d93ababb22385c1d594e5e204c9d751
| 2022-06-06T18:54:24Z |
go
| 2022-08-15T20:47:27Z |
cmd/dagger/cmd/do.go
|
panic(err)
}
},
FParseErrWhitelist: cobra.FParseErrWhitelist{
UnknownFlags: true,
},
DisableFlagParsing: true,
Run: func(cmd *cobra.Command, args []string) {
cmd.Flags().Parse(args)
if err := viper.BindPFlags(cmd.Flags()); err != nil {
panic(err)
}
var (
tm = telemetry.New()
lg = logger.NewWithCloud(tm)
ctx = lg.WithContext(cmd.Context())
tty *logger.TTYOutput
tty2 *logger.TTYOutputV2
)
if !viper.GetBool("experimental") {
for _, f := range experimentalFlags {
if viper.IsSet(f) {
lg.Fatal().Msg(fmt.Sprintf("--%s requires --experimental flag", f))
}
}
}
if viper.GetBool("telemetry-log") {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,582 |
π `dagger do` help should indicate where to insert action name
|
### What is the issue? & Log output
Today if you run `dagger do` or `dagger do --help` you are returned something like
<img width="400" alt="image" src="https://user-images.githubusercontent.com/3187222/172227384-3d9200c2-c2a8-4079-87d5-c1db9293c597.png">
It looks like the proper command syntax is `dagger do [flags]`, but it should be something like:
```
dagger do [action] [flags]
```
Note: `[action]` here could be something like `hello` or something like `hello foo bar` to reference a sub-action.
We should probably note that in the CLI help as well.
```
// Hello world
hello: foo: bar: bash.#Run & {
...
```
<img width="300" alt="image" src="https://user-images.githubusercontent.com/3187222/172233677-3fb84aa8-77e6-4c36-86a2-091488812806.png">
Note: A lot of folks [use conventions for which CLI args are required or optional](https://stackoverflow.com/questions/21503865/how-to-denote-that-a-command-line-argument-is-optional-when-printing-usage). If `[]` means optional, then it's true that it's valid to run `dagger do` _without_ an action name or any flags (i.e. action is optional), but we should show where you'd put those in a valid command by making them both optional, but including them both like suggested above.
### Steps to reproduce
`dagger do`
or
`dagger do -h`
or
`dagger do --help`
### Dagger version
0.2.16
### OS version
macOS 12.3.1[](url)
|
https://github.com/dagger/dagger/issues/2582
|
https://github.com/dagger/dagger/pull/2941
|
8dfbd1956c211ea57d5341b0a12ffb2e8e067c41
|
aca2bf927d93ababb22385c1d594e5e204c9d751
| 2022-06-06T18:54:24Z |
go
| 2022-08-15T20:47:27Z |
cmd/dagger/cmd/do.go
|
tm.EnableLogToFile()
}
targetPath := getTargetPath(cmd.Flags().Args())
daggerPlan, err := loadPlan(ctx, viper.GetString("plan"))
targetAction := cue.MakePath(targetPath.Selectors()[1:]...).String()
if !viper.GetBool("help") && (err != nil || len(targetAction) > 0) {
var p string
var validationErr *plan.ErrorValidation
if daggerPlan != nil {
p = fmt.Sprintf("%#v", daggerPlan.Source().Cue())
} else if errors.As(err, &validationErr) {
p = fmt.Sprintf("%#v", validationErr.Plan.Source().Cue())
}
tm.Push(ctx, event.RunStarted{
Action: targetAction,
Args: os.Args[1:],
Plan: p,
})
tm.Flush()
rid := tm.RunID()
tm = telemetry.New()
tm.SetRunID(rid)
ctx = tm.WithContext(ctx)
if viper.GetBool("telemetry-log") {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,582 |
π `dagger do` help should indicate where to insert action name
|
### What is the issue? & Log output
Today if you run `dagger do` or `dagger do --help` you are returned something like
<img width="400" alt="image" src="https://user-images.githubusercontent.com/3187222/172227384-3d9200c2-c2a8-4079-87d5-c1db9293c597.png">
It looks like the proper command syntax is `dagger do [flags]`, but it should be something like:
```
dagger do [action] [flags]
```
Note: `[action]` here could be something like `hello` or something like `hello foo bar` to reference a sub-action.
We should probably note that in the CLI help as well.
```
// Hello world
hello: foo: bar: bash.#Run & {
...
```
<img width="300" alt="image" src="https://user-images.githubusercontent.com/3187222/172233677-3fb84aa8-77e6-4c36-86a2-091488812806.png">
Note: A lot of folks [use conventions for which CLI args are required or optional](https://stackoverflow.com/questions/21503865/how-to-denote-that-a-command-line-argument-is-optional-when-printing-usage). If `[]` means optional, then it's true that it's valid to run `dagger do` _without_ an action name or any flags (i.e. action is optional), but we should show where you'd put those in a valid command by making them both optional, but including them both like suggested above.
### Steps to reproduce
`dagger do`
or
`dagger do -h`
or
`dagger do --help`
### Dagger version
0.2.16
### OS version
macOS 12.3.1[](url)
|
https://github.com/dagger/dagger/issues/2582
|
https://github.com/dagger/dagger/pull/2941
|
8dfbd1956c211ea57d5341b0a12ffb2e8e067c41
|
aca2bf927d93ababb22385c1d594e5e204c9d751
| 2022-06-06T18:54:24Z |
go
| 2022-08-15T20:47:27Z |
cmd/dagger/cmd/do.go
|
tm.EnableLogToFile()
}
}
defer tm.Flush()
if err != nil {
lg.Error().Err(err).Msgf("failed to load plan")
if viper.GetBool("help") {
doHelpCmd(cmd, nil, nil, nil, targetPath, []string{err.Error()})
os.Exit(0)
} else {
captureRunCompletedFailed(ctx, tm, err)
}
doHelpCmd(cmd, nil, nil, nil, targetPath, []string{err.Error()})
os.Exit(1)
}
action := daggerPlan.Action().FindByPath(targetPath)
if action == nil {
selectorStrs := []string{}
for _, selector := range targetPath.Selectors()[1:] {
selectorStrs = append(selectorStrs, selector.String())
}
targetStr := strings.Join(selectorStrs, " ")
err = fmt.Errorf("action not found: %s", targetStr)
captureRunCompletedFailed(ctx, tm, err)
action = daggerPlan.Action().FindClosest(targetPath)
if action == nil {
err = fmt.Errorf("no action found")
doHelpCmd(cmd, nil, nil, nil, targetPath, []string{err.Error()})
os.Exit(1)
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,582 |
π `dagger do` help should indicate where to insert action name
|
### What is the issue? & Log output
Today if you run `dagger do` or `dagger do --help` you are returned something like
<img width="400" alt="image" src="https://user-images.githubusercontent.com/3187222/172227384-3d9200c2-c2a8-4079-87d5-c1db9293c597.png">
It looks like the proper command syntax is `dagger do [flags]`, but it should be something like:
```
dagger do [action] [flags]
```
Note: `[action]` here could be something like `hello` or something like `hello foo bar` to reference a sub-action.
We should probably note that in the CLI help as well.
```
// Hello world
hello: foo: bar: bash.#Run & {
...
```
<img width="300" alt="image" src="https://user-images.githubusercontent.com/3187222/172233677-3fb84aa8-77e6-4c36-86a2-091488812806.png">
Note: A lot of folks [use conventions for which CLI args are required or optional](https://stackoverflow.com/questions/21503865/how-to-denote-that-a-command-line-argument-is-optional-when-printing-usage). If `[]` means optional, then it's true that it's valid to run `dagger do` _without_ an action name or any flags (i.e. action is optional), but we should show where you'd put those in a valid command by making them both optional, but including them both like suggested above.
### Steps to reproduce
`dagger do`
or
`dagger do -h`
or
`dagger do --help`
### Dagger version
0.2.16
### OS version
macOS 12.3.1[](url)
|
https://github.com/dagger/dagger/issues/2582
|
https://github.com/dagger/dagger/pull/2941
|
8dfbd1956c211ea57d5341b0a12ffb2e8e067c41
|
aca2bf927d93ababb22385c1d594e5e204c9d751
| 2022-06-06T18:54:24Z |
go
| 2022-08-15T20:47:27Z |
cmd/dagger/cmd/do.go
|
}
targetPath = action.Path
doHelpCmd(cmd, daggerPlan, action, nil, action.Path, []string{err.Error()})
os.Exit(1)
}
actionFlags := getActionFlags(action)
cmd.Flags().AddFlagSet(actionFlags)
cmd.Flags().VisitAll(func(f *pflag.Flag) {
if v, ok := f.Value.(pflag.SliceValue); ok {
v.Replace([]string{})
}
})
err = cmd.Flags().Parse(args)
if err != nil {
captureRunCompletedFailed(ctx, tm, err)
doHelpCmd(cmd, daggerPlan, action, actionFlags, targetPath, []string{err.Error()})
os.Exit(1)
}
if err := viper.BindPFlags(cmd.Flags()); err != nil {
panic(err)
}
if len(cmd.Flags().Args()) < 1 || viper.GetBool("help") {
doHelpCmd(cmd, daggerPlan, action, actionFlags, targetPath, []string{})
os.Exit(0)
}
f := viper.GetString("log-format")
switch {
case f == "tty" || f == "auto" && term.IsTerminal(int(os.Stdout.Fd())):
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,582 |
π `dagger do` help should indicate where to insert action name
|
### What is the issue? & Log output
Today if you run `dagger do` or `dagger do --help` you are returned something like
<img width="400" alt="image" src="https://user-images.githubusercontent.com/3187222/172227384-3d9200c2-c2a8-4079-87d5-c1db9293c597.png">
It looks like the proper command syntax is `dagger do [flags]`, but it should be something like:
```
dagger do [action] [flags]
```
Note: `[action]` here could be something like `hello` or something like `hello foo bar` to reference a sub-action.
We should probably note that in the CLI help as well.
```
// Hello world
hello: foo: bar: bash.#Run & {
...
```
<img width="300" alt="image" src="https://user-images.githubusercontent.com/3187222/172233677-3fb84aa8-77e6-4c36-86a2-091488812806.png">
Note: A lot of folks [use conventions for which CLI args are required or optional](https://stackoverflow.com/questions/21503865/how-to-denote-that-a-command-line-argument-is-optional-when-printing-usage). If `[]` means optional, then it's true that it's valid to run `dagger do` _without_ an action name or any flags (i.e. action is optional), but we should show where you'd put those in a valid command by making them both optional, but including them both like suggested above.
### Steps to reproduce
`dagger do`
or
`dagger do -h`
or
`dagger do --help`
### Dagger version
0.2.16
### OS version
macOS 12.3.1[](url)
|
https://github.com/dagger/dagger/issues/2582
|
https://github.com/dagger/dagger/pull/2941
|
8dfbd1956c211ea57d5341b0a12ffb2e8e067c41
|
aca2bf927d93ababb22385c1d594e5e204c9d751
| 2022-06-06T18:54:24Z |
go
| 2022-08-15T20:47:27Z |
cmd/dagger/cmd/do.go
|
tty, err = logger.NewTTYOutput(os.Stderr)
if err != nil {
captureRunCompletedFailed(ctx, tm, err)
lg.Fatal().Err(err).Msg("failed to initialize TTY logger")
}
tty.Start()
defer tty.Stop()
lg = lg.Output(logger.TeeCloud(tm, tty))
ctx = lg.WithContext(ctx)
case f == "tty2":
f, err := ioutil.TempFile("/tmp", "dagger-console-*.log")
if err != nil {
lg.Fatal().Err(err).Msg("failed to create TTY file logger")
}
defer func() {
err := f.Close()
if err != nil {
lg.Fatal().Err(err).Msg("failed to close TTY file logger")
}
}()
cons, err := console.ConsoleFromFile(os.Stderr)
if err != nil {
lg.Fatal().Err(err).Msg("failed to create TTY console")
}
c := logger.ConsoleAdapter{Cons: cons, F: f}
tty2, err = logger.NewTTYOutputConsole(&c)
if err != nil {
lg.Fatal().Err(err).Msg("failed to initialize TTYv2 logger")
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,582 |
π `dagger do` help should indicate where to insert action name
|
### What is the issue? & Log output
Today if you run `dagger do` or `dagger do --help` you are returned something like
<img width="400" alt="image" src="https://user-images.githubusercontent.com/3187222/172227384-3d9200c2-c2a8-4079-87d5-c1db9293c597.png">
It looks like the proper command syntax is `dagger do [flags]`, but it should be something like:
```
dagger do [action] [flags]
```
Note: `[action]` here could be something like `hello` or something like `hello foo bar` to reference a sub-action.
We should probably note that in the CLI help as well.
```
// Hello world
hello: foo: bar: bash.#Run & {
...
```
<img width="300" alt="image" src="https://user-images.githubusercontent.com/3187222/172233677-3fb84aa8-77e6-4c36-86a2-091488812806.png">
Note: A lot of folks [use conventions for which CLI args are required or optional](https://stackoverflow.com/questions/21503865/how-to-denote-that-a-command-line-argument-is-optional-when-printing-usage). If `[]` means optional, then it's true that it's valid to run `dagger do` _without_ an action name or any flags (i.e. action is optional), but we should show where you'd put those in a valid command by making them both optional, but including them both like suggested above.
### Steps to reproduce
`dagger do`
or
`dagger do -h`
or
`dagger do --help`
### Dagger version
0.2.16
### OS version
macOS 12.3.1[](url)
|
https://github.com/dagger/dagger/issues/2582
|
https://github.com/dagger/dagger/pull/2941
|
8dfbd1956c211ea57d5341b0a12ffb2e8e067c41
|
aca2bf927d93ababb22385c1d594e5e204c9d751
| 2022-06-06T18:54:24Z |
go
| 2022-08-15T20:47:27Z |
cmd/dagger/cmd/do.go
|
tty2.Start()
defer tty2.Stop()
lg = lg.Output(logger.TeeCloud(tm, tty2))
ctx = lg.WithContext(ctx)
}
cl := common.NewClient(ctx)
actionFlags.VisitAll(func(flag *pflag.Flag) {
if cmd.Flags().Changed(flag.Name) {
fmt.Printf("Changed: %s: %s\n", flag.Name, cmd.Flags().Lookup(flag.Name).Value.String())
flagPath := []cue.Selector{}
flagPath = append(flagPath, targetPath.Selectors()...)
flagPath = append(flagPath, cue.Str(flag.Name))
daggerPlan.Source().FillPath(cue.MakePath(flagPath...), viper.Get(flag.Name))
}
})
doneCh := common.TrackCommand(ctx, cmd, &analytics.Property{
Name: "action",
Value: cue.MakePath(targetPath.Selectors()[1:]...).String(),
})
err = cl.Do(ctx, daggerPlan.Context(), func(ctx context.Context, s *solver.Solver) error {
return daggerPlan.Do(ctx, targetPath, s)
})
<-doneCh
daggerPlan.Context().TempDirs.Clean()
if err != nil {
captureRunCompletedFailed(ctx, tm, err)
lg.Fatal().Err(err).Msg("failed to execute plan")
}
format := viper.GetString("output-format")
file := viper.GetString("output")
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,582 |
π `dagger do` help should indicate where to insert action name
|
### What is the issue? & Log output
Today if you run `dagger do` or `dagger do --help` you are returned something like
<img width="400" alt="image" src="https://user-images.githubusercontent.com/3187222/172227384-3d9200c2-c2a8-4079-87d5-c1db9293c597.png">
It looks like the proper command syntax is `dagger do [flags]`, but it should be something like:
```
dagger do [action] [flags]
```
Note: `[action]` here could be something like `hello` or something like `hello foo bar` to reference a sub-action.
We should probably note that in the CLI help as well.
```
// Hello world
hello: foo: bar: bash.#Run & {
...
```
<img width="300" alt="image" src="https://user-images.githubusercontent.com/3187222/172233677-3fb84aa8-77e6-4c36-86a2-091488812806.png">
Note: A lot of folks [use conventions for which CLI args are required or optional](https://stackoverflow.com/questions/21503865/how-to-denote-that-a-command-line-argument-is-optional-when-printing-usage). If `[]` means optional, then it's true that it's valid to run `dagger do` _without_ an action name or any flags (i.e. action is optional), but we should show where you'd put those in a valid command by making them both optional, but including them both like suggested above.
### Steps to reproduce
`dagger do`
or
`dagger do -h`
or
`dagger do --help`
### Dagger version
0.2.16
### OS version
macOS 12.3.1[](url)
|
https://github.com/dagger/dagger/issues/2582
|
https://github.com/dagger/dagger/pull/2941
|
8dfbd1956c211ea57d5341b0a12ffb2e8e067c41
|
aca2bf927d93ababb22385c1d594e5e204c9d751
| 2022-06-06T18:54:24Z |
go
| 2022-08-15T20:47:27Z |
cmd/dagger/cmd/do.go
|
if format == "" && !term.IsTerminal(int(os.Stdout.Fd())) {
format = "json"
}
if file == "" && tty != nil {
tty.Stop()
lg = logger.NewWithCloud(tm)
}
action.UpdateFinal(daggerPlan.Final())
outputs := map[string]string{}
for _, f := range action.Outputs() {
key := f.Selector.String()
var value interface{}
if err := json.Unmarshal([]byte(f.Value.JSON().String()), &value); err != nil {
lg.Error().Err(err).Msg("failed to marshal output")
continue
}
outputs[key] = fmt.Sprintf("%v", value)
}
if err := plan.PrintOutputs(action.Outputs(), format, file); err != nil {
captureRunCompletedFailed(ctx, tm, err)
lg.Fatal().Err(err).Msg("failed to print action outputs")
}
tm.Push(ctx, event.RunCompleted{
State: event.RunCompletedStateSuccess,
Outputs: outputs,
})
},
}
func loadPlan(ctx context.Context, planPath string) (*plan.Plan, error) {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,582 |
π `dagger do` help should indicate where to insert action name
|
### What is the issue? & Log output
Today if you run `dagger do` or `dagger do --help` you are returned something like
<img width="400" alt="image" src="https://user-images.githubusercontent.com/3187222/172227384-3d9200c2-c2a8-4079-87d5-c1db9293c597.png">
It looks like the proper command syntax is `dagger do [flags]`, but it should be something like:
```
dagger do [action] [flags]
```
Note: `[action]` here could be something like `hello` or something like `hello foo bar` to reference a sub-action.
We should probably note that in the CLI help as well.
```
// Hello world
hello: foo: bar: bash.#Run & {
...
```
<img width="300" alt="image" src="https://user-images.githubusercontent.com/3187222/172233677-3fb84aa8-77e6-4c36-86a2-091488812806.png">
Note: A lot of folks [use conventions for which CLI args are required or optional](https://stackoverflow.com/questions/21503865/how-to-denote-that-a-command-line-argument-is-optional-when-printing-usage). If `[]` means optional, then it's true that it's valid to run `dagger do` _without_ an action name or any flags (i.e. action is optional), but we should show where you'd put those in a valid command by making them both optional, but including them both like suggested above.
### Steps to reproduce
`dagger do`
or
`dagger do -h`
or
`dagger do --help`
### Dagger version
0.2.16
### OS version
macOS 12.3.1[](url)
|
https://github.com/dagger/dagger/issues/2582
|
https://github.com/dagger/dagger/pull/2941
|
8dfbd1956c211ea57d5341b0a12ffb2e8e067c41
|
aca2bf927d93ababb22385c1d594e5e204c9d751
| 2022-06-06T18:54:24Z |
go
| 2022-08-15T20:47:27Z |
cmd/dagger/cmd/do.go
|
homedirPlanPathExpanded, err := homedir.Expand(planPath)
if err != nil {
return nil, err
}
absPlanPath, err := filepath.Abs(homedirPlanPathExpanded)
if err != nil {
return nil, err
}
_, err = os.Stat(absPlanPath)
if err != nil {
return nil, err
}
return plan.Load(ctx, plan.Config{
Args: []string{planPath},
With: viper.GetStringSlice("with"),
DryRun: viper.GetBool("dry-run"),
})
}
func getTargetPath(args []string) cue.Path {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,582 |
π `dagger do` help should indicate where to insert action name
|
### What is the issue? & Log output
Today if you run `dagger do` or `dagger do --help` you are returned something like
<img width="400" alt="image" src="https://user-images.githubusercontent.com/3187222/172227384-3d9200c2-c2a8-4079-87d5-c1db9293c597.png">
It looks like the proper command syntax is `dagger do [flags]`, but it should be something like:
```
dagger do [action] [flags]
```
Note: `[action]` here could be something like `hello` or something like `hello foo bar` to reference a sub-action.
We should probably note that in the CLI help as well.
```
// Hello world
hello: foo: bar: bash.#Run & {
...
```
<img width="300" alt="image" src="https://user-images.githubusercontent.com/3187222/172233677-3fb84aa8-77e6-4c36-86a2-091488812806.png">
Note: A lot of folks [use conventions for which CLI args are required or optional](https://stackoverflow.com/questions/21503865/how-to-denote-that-a-command-line-argument-is-optional-when-printing-usage). If `[]` means optional, then it's true that it's valid to run `dagger do` _without_ an action name or any flags (i.e. action is optional), but we should show where you'd put those in a valid command by making them both optional, but including them both like suggested above.
### Steps to reproduce
`dagger do`
or
`dagger do -h`
or
`dagger do --help`
### Dagger version
0.2.16
### OS version
macOS 12.3.1[](url)
|
https://github.com/dagger/dagger/issues/2582
|
https://github.com/dagger/dagger/pull/2941
|
8dfbd1956c211ea57d5341b0a12ffb2e8e067c41
|
aca2bf927d93ababb22385c1d594e5e204c9d751
| 2022-06-06T18:54:24Z |
go
| 2022-08-15T20:47:27Z |
cmd/dagger/cmd/do.go
|
selectors := []cue.Selector{plan.ActionSelector}
for _, arg := range args {
selectors = append(selectors, cue.Str(arg))
}
return cue.MakePath(selectors...)
}
func doHelpCmd(cmd *cobra.Command, daggerPlan *plan.Plan, action *plan.Action, actionFlags *pflag.FlagSet, target cue.Path, preamble []string) {
lg := logger.New()
if len(preamble) > 0 {
fmt.Println(strings.Join(preamble, "\n"))
fmt.Println()
}
target = cue.MakePath(target.Selectors()[1:]...)
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,582 |
π `dagger do` help should indicate where to insert action name
|
### What is the issue? & Log output
Today if you run `dagger do` or `dagger do --help` you are returned something like
<img width="400" alt="image" src="https://user-images.githubusercontent.com/3187222/172227384-3d9200c2-c2a8-4079-87d5-c1db9293c597.png">
It looks like the proper command syntax is `dagger do [flags]`, but it should be something like:
```
dagger do [action] [flags]
```
Note: `[action]` here could be something like `hello` or something like `hello foo bar` to reference a sub-action.
We should probably note that in the CLI help as well.
```
// Hello world
hello: foo: bar: bash.#Run & {
...
```
<img width="300" alt="image" src="https://user-images.githubusercontent.com/3187222/172233677-3fb84aa8-77e6-4c36-86a2-091488812806.png">
Note: A lot of folks [use conventions for which CLI args are required or optional](https://stackoverflow.com/questions/21503865/how-to-denote-that-a-command-line-argument-is-optional-when-printing-usage). If `[]` means optional, then it's true that it's valid to run `dagger do` _without_ an action name or any flags (i.e. action is optional), but we should show where you'd put those in a valid command by making them both optional, but including them both like suggested above.
### Steps to reproduce
`dagger do`
or
`dagger do -h`
or
`dagger do --help`
### Dagger version
0.2.16
### OS version
macOS 12.3.1[](url)
|
https://github.com/dagger/dagger/issues/2582
|
https://github.com/dagger/dagger/pull/2941
|
8dfbd1956c211ea57d5341b0a12ffb2e8e067c41
|
aca2bf927d93ababb22385c1d594e5e204c9d751
| 2022-06-06T18:54:24Z |
go
| 2022-08-15T20:47:27Z |
cmd/dagger/cmd/do.go
|
if action != nil {
selectorStrs := []string{}
for _, selector := range target.Selectors() {
selectorStrs = append(selectorStrs, selector.String())
}
targetStr := strings.Join(selectorStrs, " ")
fmt.Printf("Usage: \n dagger do %s [flags]\n\n", targetStr)
if actionFlags != nil {
fmt.Println("Options")
actionFlags.VisitAll(func(flag *pflag.Flag) {
flag.Hidden = false
})
fmt.Println(actionFlags.FlagUsages())
actionFlags.VisitAll(func(flag *pflag.Flag) {
flag.Hidden = true
})
}
} else {
fmt.Println("Usage: \n dagger do [flags]")
}
var err error
if daggerPlan != nil {
err = printActions(daggerPlan, action, os.Stdout, target)
}
fmt.Printf("\n%s", cmd.UsageString())
if err == nil {
lg.Fatal().Err(err)
}
}
func getActionFlags(action *plan.Action) *pflag.FlagSet {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,582 |
π `dagger do` help should indicate where to insert action name
|
### What is the issue? & Log output
Today if you run `dagger do` or `dagger do --help` you are returned something like
<img width="400" alt="image" src="https://user-images.githubusercontent.com/3187222/172227384-3d9200c2-c2a8-4079-87d5-c1db9293c597.png">
It looks like the proper command syntax is `dagger do [flags]`, but it should be something like:
```
dagger do [action] [flags]
```
Note: `[action]` here could be something like `hello` or something like `hello foo bar` to reference a sub-action.
We should probably note that in the CLI help as well.
```
// Hello world
hello: foo: bar: bash.#Run & {
...
```
<img width="300" alt="image" src="https://user-images.githubusercontent.com/3187222/172233677-3fb84aa8-77e6-4c36-86a2-091488812806.png">
Note: A lot of folks [use conventions for which CLI args are required or optional](https://stackoverflow.com/questions/21503865/how-to-denote-that-a-command-line-argument-is-optional-when-printing-usage). If `[]` means optional, then it's true that it's valid to run `dagger do` _without_ an action name or any flags (i.e. action is optional), but we should show where you'd put those in a valid command by making them both optional, but including them both like suggested above.
### Steps to reproduce
`dagger do`
or
`dagger do -h`
or
`dagger do --help`
### Dagger version
0.2.16
### OS version
macOS 12.3.1[](url)
|
https://github.com/dagger/dagger/issues/2582
|
https://github.com/dagger/dagger/pull/2941
|
8dfbd1956c211ea57d5341b0a12ffb2e8e067c41
|
aca2bf927d93ababb22385c1d594e5e204c9d751
| 2022-06-06T18:54:24Z |
go
| 2022-08-15T20:47:27Z |
cmd/dagger/cmd/do.go
|
flags := pflag.NewFlagSet("action inputs", pflag.ContinueOnError)
flags.ParseErrorsWhitelist = pflag.ParseErrorsWhitelist{
UnknownFlags: true,
}
flags.Usage = func() {}
if action == nil {
panic("action is nil")
}
if action.Inputs() == nil {
panic("action inputs is nil")
}
for _, input := range action.Inputs() {
switch input.Type {
case "string":
flags.String(input.Name, "", input.Documentation)
case "int":
flags.Int(input.Name, 0, input.Documentation)
case "bool":
flags.Bool(input.Name, false, input.Documentation)
case "float":
flags.Float64(input.Name, 0, input.Documentation)
case "number":
flags.Float64(input.Name, 0, input.Documentation)
default:
}
flags.MarkHidden(input.Name)
}
return flags
}
func printActions(p *plan.Plan, action *plan.Action, w io.Writer, target cue.Path) error {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,582 |
π `dagger do` help should indicate where to insert action name
|
### What is the issue? & Log output
Today if you run `dagger do` or `dagger do --help` you are returned something like
<img width="400" alt="image" src="https://user-images.githubusercontent.com/3187222/172227384-3d9200c2-c2a8-4079-87d5-c1db9293c597.png">
It looks like the proper command syntax is `dagger do [flags]`, but it should be something like:
```
dagger do [action] [flags]
```
Note: `[action]` here could be something like `hello` or something like `hello foo bar` to reference a sub-action.
We should probably note that in the CLI help as well.
```
// Hello world
hello: foo: bar: bash.#Run & {
...
```
<img width="300" alt="image" src="https://user-images.githubusercontent.com/3187222/172233677-3fb84aa8-77e6-4c36-86a2-091488812806.png">
Note: A lot of folks [use conventions for which CLI args are required or optional](https://stackoverflow.com/questions/21503865/how-to-denote-that-a-command-line-argument-is-optional-when-printing-usage). If `[]` means optional, then it's true that it's valid to run `dagger do` _without_ an action name or any flags (i.e. action is optional), but we should show where you'd put those in a valid command by making them both optional, but including them both like suggested above.
### Steps to reproduce
`dagger do`
or
`dagger do -h`
or
`dagger do --help`
### Dagger version
0.2.16
### OS version
macOS 12.3.1[](url)
|
https://github.com/dagger/dagger/issues/2582
|
https://github.com/dagger/dagger/pull/2941
|
8dfbd1956c211ea57d5341b0a12ffb2e8e067c41
|
aca2bf927d93ababb22385c1d594e5e204c9d751
| 2022-06-06T18:54:24Z |
go
| 2022-08-15T20:47:27Z |
cmd/dagger/cmd/do.go
|
if p == nil {
return nil
}
if action == nil {
return fmt.Errorf("action %s not found", target.String())
}
if len(action.Name) < 1 {
return nil
}
fmt.Printf("\nAvailable Actions:\n")
tw := tabwriter.NewWriter(w, 0, 0, 1, ' ', tabwriter.StripEscape)
defer tw.Flush()
for _, a := range action.Children {
if !a.Hidden {
lineParts := []string{"", a.Name, a.Documentation}
fmt.Fprintln(tw, strings.Join(lineParts, "\t"))
}
}
return nil
}
func captureRunCompletedFailed(ctx context.Context, tm *telemetry.Telemetry, err error) {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,582 |
π `dagger do` help should indicate where to insert action name
|
### What is the issue? & Log output
Today if you run `dagger do` or `dagger do --help` you are returned something like
<img width="400" alt="image" src="https://user-images.githubusercontent.com/3187222/172227384-3d9200c2-c2a8-4079-87d5-c1db9293c597.png">
It looks like the proper command syntax is `dagger do [flags]`, but it should be something like:
```
dagger do [action] [flags]
```
Note: `[action]` here could be something like `hello` or something like `hello foo bar` to reference a sub-action.
We should probably note that in the CLI help as well.
```
// Hello world
hello: foo: bar: bash.#Run & {
...
```
<img width="300" alt="image" src="https://user-images.githubusercontent.com/3187222/172233677-3fb84aa8-77e6-4c36-86a2-091488812806.png">
Note: A lot of folks [use conventions for which CLI args are required or optional](https://stackoverflow.com/questions/21503865/how-to-denote-that-a-command-line-argument-is-optional-when-printing-usage). If `[]` means optional, then it's true that it's valid to run `dagger do` _without_ an action name or any flags (i.e. action is optional), but we should show where you'd put those in a valid command by making them both optional, but including them both like suggested above.
### Steps to reproduce
`dagger do`
or
`dagger do -h`
or
`dagger do --help`
### Dagger version
0.2.16
### OS version
macOS 12.3.1[](url)
|
https://github.com/dagger/dagger/issues/2582
|
https://github.com/dagger/dagger/pull/2941
|
8dfbd1956c211ea57d5341b0a12ffb2e8e067c41
|
aca2bf927d93ababb22385c1d594e5e204c9d751
| 2022-06-06T18:54:24Z |
go
| 2022-08-15T20:47:27Z |
cmd/dagger/cmd/do.go
|
var instanceErr *compiler.ErrorInstance
rce := event.RunCompleted{
State: event.RunCompletedStateFailed,
Err: &event.RunError{Message: err.Error()},
Error: err.Error(),
}
if errors.As(err, &instanceErr) {
planFiles := map[string]string{}
for _, f := range instanceErr.Instance.Files {
bfile, _ := format.Node(f)
planFiles[filepath.Base(f.Filename)] = string(bfile)
}
rce.Err.PlanFiles = planFiles
}
tm.Push(ctx, rce)
tm.Flush()
}
func init() {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 2,582 |
π `dagger do` help should indicate where to insert action name
|
### What is the issue? & Log output
Today if you run `dagger do` or `dagger do --help` you are returned something like
<img width="400" alt="image" src="https://user-images.githubusercontent.com/3187222/172227384-3d9200c2-c2a8-4079-87d5-c1db9293c597.png">
It looks like the proper command syntax is `dagger do [flags]`, but it should be something like:
```
dagger do [action] [flags]
```
Note: `[action]` here could be something like `hello` or something like `hello foo bar` to reference a sub-action.
We should probably note that in the CLI help as well.
```
// Hello world
hello: foo: bar: bash.#Run & {
...
```
<img width="300" alt="image" src="https://user-images.githubusercontent.com/3187222/172233677-3fb84aa8-77e6-4c36-86a2-091488812806.png">
Note: A lot of folks [use conventions for which CLI args are required or optional](https://stackoverflow.com/questions/21503865/how-to-denote-that-a-command-line-argument-is-optional-when-printing-usage). If `[]` means optional, then it's true that it's valid to run `dagger do` _without_ an action name or any flags (i.e. action is optional), but we should show where you'd put those in a valid command by making them both optional, but including them both like suggested above.
### Steps to reproduce
`dagger do`
or
`dagger do -h`
or
`dagger do --help`
### Dagger version
0.2.16
### OS version
macOS 12.3.1[](url)
|
https://github.com/dagger/dagger/issues/2582
|
https://github.com/dagger/dagger/pull/2941
|
8dfbd1956c211ea57d5341b0a12ffb2e8e067c41
|
aca2bf927d93ababb22385c1d594e5e204c9d751
| 2022-06-06T18:54:24Z |
go
| 2022-08-15T20:47:27Z |
cmd/dagger/cmd/do.go
|
doCmd.Flags().StringArrayP("with", "w", []string{}, "")
doCmd.Flags().StringP("plan", "p", ".", "Path to plan (defaults to current directory)")
doCmd.Flags().Bool("dry-run", false, "Dry run mode")
doCmd.Flags().Bool("no-cache", false, "Disable caching")
doCmd.Flags().Bool("telemetry-log", false, "Send telemetry logs to file (requires experimental)")
doCmd.Flags().String("platform", "", "Set target build platform (requires experimental)")
doCmd.Flags().String("output", "", "File path to write the action's output values. Prints to stdout if empty")
doCmd.Flags().String("output-format", "", "Format for output values (plain, json, yaml)")
doCmd.Flags().StringArray("cache-to", []string{},
"Cache export destinations (eg. user/app:cache, type=local,dest=path/to/dir)")
doCmd.Flags().StringArray("cache-from", []string{},
"External cache sources (eg. user/app:cache, type=local,src=path/to/dir)")
doCmd.SetUsageTemplate(`{{if .HasAvailableSubCommands}}
{{.CommandPath}} [command]{{end}}{{if gt (len .Aliases) 0}}
Aliases:
{{.NameAndAliases}}{{end}}{{if .HasExample}}
Examples:
{{.Example}}{{end}}{{if .HasAvailableSubCommands}}
Available Commands:{{range .Commands}}{{if (or .IsAvailableCommand (eq .Name "help"))}}
{{rpad .Name .NamePadding }} {{.Short}}{{end}}{{end}}{{end}}{{if .HasAvailableLocalFlags}}
Flags:
{{.LocalFlags.FlagUsages | trimTrailingWhitespaces}}{{end}}{{if .HasAvailableInheritedFlags}}
Global Flags:
{{.InheritedFlags.FlagUsages | trimTrailingWhitespaces}}{{end}}{{if .HasHelpSubCommands}}
Additional help topics:{{range .Commands}}{{if .IsAdditionalHelpTopicCommand}}
{{rpad .CommandPath .CommandPathPadding}} {{.Short}}{{end}}{{end}}{{end}}{{if .HasAvailableSubCommands}}
Use "{{.CommandPath}} [command] --help" for more information about a command.{{end}}
`)
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 3,066 |
Use image config to configure action ExecOps
|
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
|
https://github.com/dagger/dagger/issues/3066
|
https://github.com/dagger/dagger/pull/3137
|
b7f3f4fece8cf49da229f395e5914a1c4d01512b
|
a1308896202d85adb6077c002ff819c07a2d392f
| 2022-08-05T21:42:33Z |
go
| 2022-09-27T16:38:56Z |
core/core.go
|
package core
import (
"context"
bkclient "github.com/moby/buildkit/client"
"github.com/moby/buildkit/client/llb"
bkgw "github.com/moby/buildkit/frontend/gateway/client"
specs "github.com/opencontainers/image-spec/specs-go/v1"
"go.dagger.io/dagger/core/filesystem"
"go.dagger.io/dagger/project"
"go.dagger.io/dagger/router"
"go.dagger.io/dagger/secret"
)
type InitializeArgs struct {
Router *router.Router
SecretStore *secret.Store
SSHAuthSockID string
WorkdirID string
Gateway bkgw.Client
BKClient *bkclient.Client
SolveOpts bkclient.SolveOpt
SolveCh chan *bkclient.SolveStatus
Platform specs.Platform
}
func New(params InitializeArgs) (router.ExecutableSchema, error) {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 3,066 |
Use image config to configure action ExecOps
|
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
|
https://github.com/dagger/dagger/issues/3066
|
https://github.com/dagger/dagger/pull/3137
|
b7f3f4fece8cf49da229f395e5914a1c4d01512b
|
a1308896202d85adb6077c002ff819c07a2d392f
| 2022-08-05T21:42:33Z |
go
| 2022-09-27T16:38:56Z |
core/core.go
|
base := &baseSchema{
router: params.Router,
secretStore: params.SecretStore,
gw: params.Gateway,
bkClient: params.BKClient,
solveOpts: params.SolveOpts,
solveCh: params.SolveCh,
platform: params.Platform,
}
return router.MergeExecutableSchemas("core",
&coreSchema{base, params.SSHAuthSockID, params.WorkdirID},
&filesystemSchema{base},
&projectSchema{
baseSchema: base,
compiledSchemas: make(map[string]*project.CompiledRemoteSchema),
sshAuthSockID: params.SSHAuthSockID,
},
&execSchema{base, params.SSHAuthSockID},
&dockerBuildSchema{base},
&secretSchema{base},
)
}
type baseSchema struct {
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.