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
| 699 |
Default plan directory to `.`
|
To complete #631: #648 introduced a `--module` and `--package` flag to `dagger new`.
By default, we use `.dagger/env/XXX/plan` as the cue module. Instead, we should default to `.`.
|
https://github.com/dagger/dagger/issues/699
|
https://github.com/dagger/dagger/pull/772
|
21bed8aee69fd4d9547c0c67777eeae7bddcb94d
|
f8531fdb0b7df9eacf05a52b24dd78e169ca353b
| 2021-06-21T15:50:52Z |
go
| 2021-07-07T15:34:23Z |
environment/environment.go
|
e := &Environment{
state: st,
plan: compiler.NewValue(),
input: compiler.NewValue(),
computed: compiler.NewValue(),
}
for key, input := range st.Inputs {
v, err := input.Compile(key, st)
if err != nil {
return nil, err
}
if key == "" {
err = e.input.FillPath(cue.MakePath(), v)
} else {
err = e.input.FillPath(cue.ParsePath(key), v)
}
if err != nil {
return nil, err
}
}
return e, nil
}
func (e *Environment) Name() string {
return e.state.Name
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 699 |
Default plan directory to `.`
|
To complete #631: #648 introduced a `--module` and `--package` flag to `dagger new`.
By default, we use `.dagger/env/XXX/plan` as the cue module. Instead, we should default to `.`.
|
https://github.com/dagger/dagger/issues/699
|
https://github.com/dagger/dagger/pull/772
|
21bed8aee69fd4d9547c0c67777eeae7bddcb94d
|
f8531fdb0b7df9eacf05a52b24dd78e169ca353b
| 2021-06-21T15:50:52Z |
go
| 2021-07-07T15:34:23Z |
environment/environment.go
|
}
func (e *Environment) Plan() *compiler.Value {
return e.plan
}
func (e *Environment) Input() *compiler.Value {
return e.input
}
func (e *Environment) Computed() *compiler.Value {
return e.computed
}
func (e *Environment) LoadPlan(ctx context.Context, s solver.Solver) error {
span, ctx := opentracing.StartSpanFromContext(ctx, "environment.LoadPlan")
defer span.Finish()
planSource, err := e.state.Plan.Source().Compile("", e.state)
if err != nil {
return err
}
p := NewPipeline(planSource, s).WithCustomName("[internal] source")
if err := p.Run(ctx); err != nil {
return err
}
sources := map[string]fs.FS{
stdlib.Path: stdlib.FS,
"/": p.FS(),
}
args := []string{}
if pkg := e.state.Plan.Package; pkg != "" {
args = append(args, pkg)
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 699 |
Default plan directory to `.`
|
To complete #631: #648 introduced a `--module` and `--package` flag to `dagger new`.
By default, we use `.dagger/env/XXX/plan` as the cue module. Instead, we should default to `.`.
|
https://github.com/dagger/dagger/issues/699
|
https://github.com/dagger/dagger/pull/772
|
21bed8aee69fd4d9547c0c67777eeae7bddcb94d
|
f8531fdb0b7df9eacf05a52b24dd78e169ca353b
| 2021-06-21T15:50:52Z |
go
| 2021-07-07T15:34:23Z |
environment/environment.go
|
}
plan, err := compiler.Build(sources, args...)
if err != nil {
return fmt.Errorf("plan config: %w", compiler.Err(err))
}
e.plan = plan
return nil
}
func (e *Environment) LocalDirs() map[string]string {
dirs := map[string]string{}
localdirs := func(code *compiler.Value) {
Analyze(
func(op *compiler.Value) error {
do, err := op.Lookup("do").String()
if err != nil {
return err
}
if do != "local" {
return nil
}
dir, err := op.Lookup("dir").String()
if err != nil {
return err
}
dirs[dir] = dir
return nil
},
code,
)
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 699 |
Default plan directory to `.`
|
To complete #631: #648 introduced a `--module` and `--package` flag to `dagger new`.
By default, we use `.dagger/env/XXX/plan` as the cue module. Instead, we should default to `.`.
|
https://github.com/dagger/dagger/issues/699
|
https://github.com/dagger/dagger/pull/772
|
21bed8aee69fd4d9547c0c67777eeae7bddcb94d
|
f8531fdb0b7df9eacf05a52b24dd78e169ca353b
| 2021-06-21T15:50:52Z |
go
| 2021-07-07T15:34:23Z |
environment/environment.go
|
src := compiler.NewValue()
if err := src.FillPath(cue.MakePath(), e.plan); err != nil {
return nil
}
if err := src.FillPath(cue.MakePath(), e.input); err != nil {
return nil
}
flow := cueflow.New(
&cueflow.Config{},
src.Cue(),
newTaskFunc(noOpRunner),
)
for _, t := range flow.Tasks() {
v := compiler.Wrap(t.Value())
localdirs(v.Lookup("#up"))
}
plan, err := e.state.Plan.Source().Compile("", e.state)
if err != nil {
panic(err)
}
localdirs(plan)
return dirs
}
func (e *Environment) prepare(ctx context.Context) (*compiler.Value, error) {
span, _ := opentracing.StartSpanFromContext(ctx, "environment.Prepare")
defer span.Finish()
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 699 |
Default plan directory to `.`
|
To complete #631: #648 introduced a `--module` and `--package` flag to `dagger new`.
By default, we use `.dagger/env/XXX/plan` as the cue module. Instead, we should default to `.`.
|
https://github.com/dagger/dagger/issues/699
|
https://github.com/dagger/dagger/pull/772
|
21bed8aee69fd4d9547c0c67777eeae7bddcb94d
|
f8531fdb0b7df9eacf05a52b24dd78e169ca353b
| 2021-06-21T15:50:52Z |
go
| 2021-07-07T15:34:23Z |
environment/environment.go
|
e.computed = compiler.NewValue()
src := compiler.NewValue()
if err := src.FillPath(cue.MakePath(), e.plan); err != nil {
return nil, err
}
if err := src.FillPath(cue.MakePath(), e.input); err != nil {
return nil, err
}
return src, nil
}
func (e *Environment) Up(ctx context.Context, s solver.Solver) error {
span, ctx := opentracing.StartSpanFromContext(ctx, "environment.Up")
defer span.Finish()
src, err := e.prepare(ctx)
if err != nil {
return err
}
flow := cueflow.New(
&cueflow.Config{},
src.Cue(),
newTaskFunc(newPipelineRunner(e.computed, s)),
)
if err := flow.Run(ctx); err != nil {
return err
}
return nil
}
type DownOpts struct{}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 699 |
Default plan directory to `.`
|
To complete #631: #648 introduced a `--module` and `--package` flag to `dagger new`.
By default, we use `.dagger/env/XXX/plan` as the cue module. Instead, we should default to `.`.
|
https://github.com/dagger/dagger/issues/699
|
https://github.com/dagger/dagger/pull/772
|
21bed8aee69fd4d9547c0c67777eeae7bddcb94d
|
f8531fdb0b7df9eacf05a52b24dd78e169ca353b
| 2021-06-21T15:50:52Z |
go
| 2021-07-07T15:34:23Z |
environment/environment.go
|
func (e *Environment) Down(ctx context.Context, _ *DownOpts) error {
panic("NOT IMPLEMENTED")
}
type QueryOpts struct{}
func newTaskFunc(runner cueflow.RunnerFunc) cueflow.TaskFunc {
return func(flowVal cue.Value) (cueflow.Runner, error) {
v := compiler.Wrap(flowVal)
if !isComponent(v) {
return nil, nil
}
return runner, nil
}
}
func noOpRunner(t *cueflow.Task) error {
return nil
}
func newPipelineRunner(computed *compiler.Value, s solver.Solver) cueflow.RunnerFunc {
return cueflow.RunnerFunc(func(t *cueflow.Task) error {
ctx := t.Context()
lg := log.
Ctx(ctx).
With().
Str("component", t.Path().String()).
Logger()
ctx = lg.WithContext(ctx)
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 699 |
Default plan directory to `.`
|
To complete #631: #648 introduced a `--module` and `--package` flag to `dagger new`.
By default, we use `.dagger/env/XXX/plan` as the cue module. Instead, we should default to `.`.
|
https://github.com/dagger/dagger/issues/699
|
https://github.com/dagger/dagger/pull/772
|
21bed8aee69fd4d9547c0c67777eeae7bddcb94d
|
f8531fdb0b7df9eacf05a52b24dd78e169ca353b
| 2021-06-21T15:50:52Z |
go
| 2021-07-07T15:34:23Z |
environment/environment.go
|
span, ctx := opentracing.StartSpanFromContext(ctx,
fmt.Sprintf("compute: %s", t.Path().String()),
)
defer span.Finish()
start := time.Now()
lg.
Info().
Msg("computing")
for _, dep := range t.Dependencies() {
lg.
Debug().
Str("dependency", dep.Path().String()).
Msg("dependency detected")
}
v := compiler.Wrap(t.Value())
p := NewPipeline(v, s)
err := p.Run(ctx)
if err != nil {
span.LogFields(otlog.String("error", err.Error()))
ext.Error.Set(span, true)
if strings.Contains(err.Error(), "context canceled") {
lg.
Error().
Dur("duration", time.Since(start)).
Msg("canceled")
return err
}
lg.
Error().
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 699 |
Default plan directory to `.`
|
To complete #631: #648 introduced a `--module` and `--package` flag to `dagger new`.
By default, we use `.dagger/env/XXX/plan` as the cue module. Instead, we should default to `.`.
|
https://github.com/dagger/dagger/issues/699
|
https://github.com/dagger/dagger/pull/772
|
21bed8aee69fd4d9547c0c67777eeae7bddcb94d
|
f8531fdb0b7df9eacf05a52b24dd78e169ca353b
| 2021-06-21T15:50:52Z |
go
| 2021-07-07T15:34:23Z |
environment/environment.go
|
Dur("duration", time.Since(start)).
Err(err).
Msg("failed")
return err
}
if p.Computed().IsEmptyStruct() {
return nil
}
if err := t.Fill(p.Computed().Cue()); err != nil {
lg.
Error().
Err(err).
Msg("failed to fill task")
return err
}
if err := computed.FillPath(t.Path(), p.Computed()); err != nil {
lg.
Error().
Err(err).
Msg("failed to fill task result")
return err
}
lg.
Info().
Dur("duration", time.Since(start)).
Msg("completed")
return nil
})
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 699 |
Default plan directory to `.`
|
To complete #631: #648 introduced a `--module` and `--package` flag to `dagger new`.
By default, we use `.dagger/env/XXX/plan` as the cue module. Instead, we should default to `.`.
|
https://github.com/dagger/dagger/issues/699
|
https://github.com/dagger/dagger/pull/772
|
21bed8aee69fd4d9547c0c67777eeae7bddcb94d
|
f8531fdb0b7df9eacf05a52b24dd78e169ca353b
| 2021-06-21T15:50:52Z |
go
| 2021-07-07T15:34:23Z |
environment/environment.go
|
}
func (e *Environment) ScanInputs(ctx context.Context, mergeUserInputs bool) ([]*compiler.Value, error) {
src := e.plan
if mergeUserInputs {
var err error
src, err = e.prepare(ctx)
if err != nil {
return nil, err
}
}
return ScanInputs(ctx, src), nil
}
func (e *Environment) ScanOutputs(ctx context.Context) ([]*compiler.Value, error) {
src, err := e.prepare(ctx)
if err != nil {
return nil, err
}
if e.state.Computed != "" {
computed, err := compiler.DecodeJSON("", []byte(e.state.Computed))
if err != nil {
return nil, err
}
if err := src.FillPath(cue.MakePath(), computed); err != nil {
return nil, err
}
}
return ScanOutputs(ctx, src), nil
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 699 |
Default plan directory to `.`
|
To complete #631: #648 introduced a `--module` and `--package` flag to `dagger new`.
By default, we use `.dagger/env/XXX/plan` as the cue module. Instead, we should default to `.`.
|
https://github.com/dagger/dagger/issues/699
|
https://github.com/dagger/dagger/pull/772
|
21bed8aee69fd4d9547c0c67777eeae7bddcb94d
|
f8531fdb0b7df9eacf05a52b24dd78e169ca353b
| 2021-06-21T15:50:52Z |
go
| 2021-07-07T15:34:23Z |
state/state.go
|
package state
type State struct {
Path string `yaml:"-"`
Workspace string `yaml:"-"`
Plan Plan `yaml:"plan"`
Name string `yaml:"name,omitempty"`
Inputs map[string]Input `yaml:"inputs,omitempty"`
Computed string `yaml:"-"`
}
type Plan struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 699 |
Default plan directory to `.`
|
To complete #631: #648 introduced a `--module` and `--package` flag to `dagger new`.
By default, we use `.dagger/env/XXX/plan` as the cue module. Instead, we should default to `.`.
|
https://github.com/dagger/dagger/issues/699
|
https://github.com/dagger/dagger/pull/772
|
21bed8aee69fd4d9547c0c67777eeae7bddcb94d
|
f8531fdb0b7df9eacf05a52b24dd78e169ca353b
| 2021-06-21T15:50:52Z |
go
| 2021-07-07T15:34:23Z |
state/state.go
|
Module string `yaml:"module,omitempty"`
Package string `yaml:"package,omitempty"`
}
func (p *Plan) Source() Input {
return DirInput(p.Module, []string{}, []string{})
}
func (s *State) SetInput(key string, value Input) error {
if s.Inputs == nil {
s.Inputs = make(map[string]Input)
}
s.Inputs[key] = value
return nil
}
func (s *State) RemoveInputs(key string) error {
delete(s.Inputs, key)
return nil
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 699 |
Default plan directory to `.`
|
To complete #631: #648 introduced a `--module` and `--package` flag to `dagger new`.
By default, we use `.dagger/env/XXX/plan` as the cue module. Instead, we should default to `.`.
|
https://github.com/dagger/dagger/issues/699
|
https://github.com/dagger/dagger/pull/772
|
21bed8aee69fd4d9547c0c67777eeae7bddcb94d
|
f8531fdb0b7df9eacf05a52b24dd78e169ca353b
| 2021-06-21T15:50:52Z |
go
| 2021-07-07T15:34:23Z |
state/workspace.go
|
package state
import (
"bytes"
"context"
"errors"
"fmt"
"os"
"path"
"path/filepath"
"github.com/rs/zerolog/log"
"go.dagger.io/dagger/keychain"
"gopkg.in/yaml.v3"
)
var (
ErrNotInit = errors.New("not initialized")
ErrAlreadyInit = errors.New("already initialized")
ErrNotExist = errors.New("environment doesn't exist")
ErrExist = errors.New("environment already exists")
)
const (
daggerDir = ".dagger"
envDir = "env"
stateDir = "state"
planDir = "plan"
manifestFile = "values.yaml"
computedFile = "computed.json"
)
type Workspace struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 699 |
Default plan directory to `.`
|
To complete #631: #648 introduced a `--module` and `--package` flag to `dagger new`.
By default, we use `.dagger/env/XXX/plan` as the cue module. Instead, we should default to `.`.
|
https://github.com/dagger/dagger/issues/699
|
https://github.com/dagger/dagger/pull/772
|
21bed8aee69fd4d9547c0c67777eeae7bddcb94d
|
f8531fdb0b7df9eacf05a52b24dd78e169ca353b
| 2021-06-21T15:50:52Z |
go
| 2021-07-07T15:34:23Z |
state/workspace.go
|
Path string
}
func Init(ctx context.Context, dir string) (*Workspace, error) {
root, err := filepath.Abs(dir)
if err != nil {
return nil, err
}
daggerRoot := path.Join(root, daggerDir)
if err := os.Mkdir(daggerRoot, 0755); err != nil {
if errors.Is(err, os.ErrExist) {
return nil, ErrAlreadyInit
}
return nil, err
}
if err := os.Mkdir(path.Join(daggerRoot, envDir), 0755); err != nil {
return nil, err
}
return &Workspace{
Path: root,
}, nil
}
func Open(ctx context.Context, dir string) (*Workspace, error) {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 699 |
Default plan directory to `.`
|
To complete #631: #648 introduced a `--module` and `--package` flag to `dagger new`.
By default, we use `.dagger/env/XXX/plan` as the cue module. Instead, we should default to `.`.
|
https://github.com/dagger/dagger/issues/699
|
https://github.com/dagger/dagger/pull/772
|
21bed8aee69fd4d9547c0c67777eeae7bddcb94d
|
f8531fdb0b7df9eacf05a52b24dd78e169ca353b
| 2021-06-21T15:50:52Z |
go
| 2021-07-07T15:34:23Z |
state/workspace.go
|
_, err := os.Stat(path.Join(dir, daggerDir))
if err != nil {
if errors.Is(err, os.ErrNotExist) {
return nil, ErrNotInit
}
return nil, err
}
root, err := filepath.Abs(dir)
if err != nil {
return nil, err
}
return &Workspace{
Path: root,
}, nil
}
func Current(ctx context.Context) (*Workspace, error) {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 699 |
Default plan directory to `.`
|
To complete #631: #648 introduced a `--module` and `--package` flag to `dagger new`.
By default, we use `.dagger/env/XXX/plan` as the cue module. Instead, we should default to `.`.
|
https://github.com/dagger/dagger/issues/699
|
https://github.com/dagger/dagger/pull/772
|
21bed8aee69fd4d9547c0c67777eeae7bddcb94d
|
f8531fdb0b7df9eacf05a52b24dd78e169ca353b
| 2021-06-21T15:50:52Z |
go
| 2021-07-07T15:34:23Z |
state/workspace.go
|
current, err := os.Getwd()
if err != nil {
return nil, err
}
for {
_, err := os.Stat(path.Join(current, daggerDir, envDir))
if err == nil {
return Open(ctx, current)
}
parent := filepath.Dir(current)
if parent == current {
break
}
current = parent
}
return nil, ErrNotInit
}
func (w *Workspace) envPath(name string) string {
return path.Join(w.Path, daggerDir, envDir, name)
}
func (w *Workspace) List(ctx context.Context) ([]*State, error) {
var (
environments = []*State{}
err error
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 699 |
Default plan directory to `.`
|
To complete #631: #648 introduced a `--module` and `--package` flag to `dagger new`.
By default, we use `.dagger/env/XXX/plan` as the cue module. Instead, we should default to `.`.
|
https://github.com/dagger/dagger/issues/699
|
https://github.com/dagger/dagger/pull/772
|
21bed8aee69fd4d9547c0c67777eeae7bddcb94d
|
f8531fdb0b7df9eacf05a52b24dd78e169ca353b
| 2021-06-21T15:50:52Z |
go
| 2021-07-07T15:34:23Z |
state/workspace.go
|
)
files, err := os.ReadDir(path.Join(w.Path, daggerDir, envDir))
if err != nil {
return nil, err
}
for _, f := range files {
if !f.IsDir() {
continue
}
st, err := w.Get(ctx, f.Name())
if err != nil {
if !errors.Is(err, ErrNotExist) {
log.
Ctx(ctx).
Err(err).
Str("name", f.Name()).
Msg("failed to load environment")
}
continue
}
environments = append(environments, st)
}
return environments, nil
}
func (w *Workspace) Get(ctx context.Context, name string) (*State, error) {
envPath, err := filepath.Abs(w.envPath(name))
if err != nil {
return nil, err
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 699 |
Default plan directory to `.`
|
To complete #631: #648 introduced a `--module` and `--package` flag to `dagger new`.
By default, we use `.dagger/env/XXX/plan` as the cue module. Instead, we should default to `.`.
|
https://github.com/dagger/dagger/issues/699
|
https://github.com/dagger/dagger/pull/772
|
21bed8aee69fd4d9547c0c67777eeae7bddcb94d
|
f8531fdb0b7df9eacf05a52b24dd78e169ca353b
| 2021-06-21T15:50:52Z |
go
| 2021-07-07T15:34:23Z |
state/workspace.go
|
if _, err := os.Stat(envPath); err != nil {
if errors.Is(err, os.ErrNotExist) {
return nil, ErrNotExist
}
return nil, err
}
manifest, err := os.ReadFile(path.Join(envPath, manifestFile))
if err != nil {
if errors.Is(err, os.ErrNotExist) {
return nil, ErrNotExist
}
return nil, err
}
manifest, err = keychain.Decrypt(ctx, manifest)
if err != nil {
return nil, fmt.Errorf("unable to decrypt state: %w", err)
}
var st State
if err := yaml.Unmarshal(manifest, &st); err != nil {
return nil, err
}
st.Path = envPath
if st.Plan.Module == "" {
planPath := path.Join(envPath, planDir)
if _, err := os.Stat(planPath); err != nil {
return nil, fmt.Errorf("missing plan information for %q", name)
}
planRelPath, err := filepath.Rel(w.Path, planPath)
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 699 |
Default plan directory to `.`
|
To complete #631: #648 introduced a `--module` and `--package` flag to `dagger new`.
By default, we use `.dagger/env/XXX/plan` as the cue module. Instead, we should default to `.`.
|
https://github.com/dagger/dagger/issues/699
|
https://github.com/dagger/dagger/pull/772
|
21bed8aee69fd4d9547c0c67777eeae7bddcb94d
|
f8531fdb0b7df9eacf05a52b24dd78e169ca353b
| 2021-06-21T15:50:52Z |
go
| 2021-07-07T15:34:23Z |
state/workspace.go
|
if err != nil {
return nil, err
}
st.Plan.Module = planRelPath
}
st.Workspace = w.Path
computed, err := os.ReadFile(path.Join(envPath, stateDir, computedFile))
if err == nil {
st.Computed = string(computed)
}
return &st, nil
}
func (w *Workspace) Save(ctx context.Context, st *State) error {
data, err := yaml.Marshal(st)
if err != nil {
return err
}
manifestPath := path.Join(st.Path, manifestFile)
currentEncrypted, err := os.ReadFile(manifestPath)
if err != nil {
return err
}
currentPlain, err := keychain.Decrypt(ctx, currentEncrypted)
if err != nil {
return fmt.Errorf("unable to decrypt state: %w", err)
}
if !bytes.Equal(data, currentPlain) {
encrypted, err := keychain.Reencrypt(ctx, manifestPath, data)
if err != nil {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 699 |
Default plan directory to `.`
|
To complete #631: #648 introduced a `--module` and `--package` flag to `dagger new`.
By default, we use `.dagger/env/XXX/plan` as the cue module. Instead, we should default to `.`.
|
https://github.com/dagger/dagger/issues/699
|
https://github.com/dagger/dagger/pull/772
|
21bed8aee69fd4d9547c0c67777eeae7bddcb94d
|
f8531fdb0b7df9eacf05a52b24dd78e169ca353b
| 2021-06-21T15:50:52Z |
go
| 2021-07-07T15:34:23Z |
state/workspace.go
|
return err
}
if err := os.WriteFile(manifestPath, encrypted, 0600); err != nil {
return err
}
}
if st.Computed != "" {
state := path.Join(st.Path, stateDir)
if err := os.MkdirAll(state, 0755); err != nil {
return err
}
err := os.WriteFile(
path.Join(state, "computed.json"),
[]byte(st.Computed),
0600)
if err != nil {
return err
}
}
return nil
}
type CreateOpts struct {
Module string
Package string
}
func (w *Workspace) Create(ctx context.Context, name string, opts CreateOpts) (*State, error) {
envPath, err := filepath.Abs(w.envPath(name))
if err != nil {
return nil, err
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 699 |
Default plan directory to `.`
|
To complete #631: #648 introduced a `--module` and `--package` flag to `dagger new`.
By default, we use `.dagger/env/XXX/plan` as the cue module. Instead, we should default to `.`.
|
https://github.com/dagger/dagger/issues/699
|
https://github.com/dagger/dagger/pull/772
|
21bed8aee69fd4d9547c0c67777eeae7bddcb94d
|
f8531fdb0b7df9eacf05a52b24dd78e169ca353b
| 2021-06-21T15:50:52Z |
go
| 2021-07-07T15:34:23Z |
state/workspace.go
|
if err := os.MkdirAll(envPath, 0755); err != nil {
if errors.Is(err, os.ErrExist) {
return nil, ErrExist
}
return nil, err
}
manifestPath := path.Join(envPath, manifestFile)
module := opts.Module
if module == "" {
planPath := path.Join(envPath, planDir)
if err := os.Mkdir(planPath, 0755); err != nil {
return nil, err
}
planRelPath, err := filepath.Rel(w.Path, planPath)
if err != nil {
return nil, err
}
module = planRelPath
}
st := &State{
Path: envPath,
Workspace: w.Path,
Plan: Plan{
Module: module,
Package: opts.Package,
},
Name: name,
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 699 |
Default plan directory to `.`
|
To complete #631: #648 introduced a `--module` and `--package` flag to `dagger new`.
By default, we use `.dagger/env/XXX/plan` as the cue module. Instead, we should default to `.`.
|
https://github.com/dagger/dagger/issues/699
|
https://github.com/dagger/dagger/pull/772
|
21bed8aee69fd4d9547c0c67777eeae7bddcb94d
|
f8531fdb0b7df9eacf05a52b24dd78e169ca353b
| 2021-06-21T15:50:52Z |
go
| 2021-07-07T15:34:23Z |
state/workspace.go
|
}
data, err := yaml.Marshal(st)
if err != nil {
return nil, err
}
key, err := keychain.Default(ctx)
if err != nil {
return nil, err
}
encrypted, err := keychain.Encrypt(ctx, manifestPath, data, key)
if err != nil {
return nil, err
}
if err := os.WriteFile(manifestPath, encrypted, 0600); err != nil {
return nil, err
}
err = os.WriteFile(
path.Join(envPath, ".gitignore"),
[]byte("# dagger state\nstate/**\n"),
0600,
)
if err != nil {
return nil, err
}
return st, nil
}
func (w *Workspace) DaggerDir() string {
return path.Join(w.Path, daggerDir)
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 699 |
Default plan directory to `.`
|
To complete #631: #648 introduced a `--module` and `--package` flag to `dagger new`.
By default, we use `.dagger/env/XXX/plan` as the cue module. Instead, we should default to `.`.
|
https://github.com/dagger/dagger/issues/699
|
https://github.com/dagger/dagger/pull/772
|
21bed8aee69fd4d9547c0c67777eeae7bddcb94d
|
f8531fdb0b7df9eacf05a52b24dd78e169ca353b
| 2021-06-21T15:50:52Z |
go
| 2021-07-07T15:34:23Z |
state/workspace_test.go
|
package state
import (
"context"
"os"
"path"
"strings"
"testing"
"github.com/stretchr/testify/require"
"go.dagger.io/dagger/keychain"
"gopkg.in/yaml.v3"
)
func TestWorkspace(t *testing.T) {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 699 |
Default plan directory to `.`
|
To complete #631: #648 introduced a `--module` and `--package` flag to `dagger new`.
By default, we use `.dagger/env/XXX/plan` as the cue module. Instead, we should default to `.`.
|
https://github.com/dagger/dagger/issues/699
|
https://github.com/dagger/dagger/pull/772
|
21bed8aee69fd4d9547c0c67777eeae7bddcb94d
|
f8531fdb0b7df9eacf05a52b24dd78e169ca353b
| 2021-06-21T15:50:52Z |
go
| 2021-07-07T15:34:23Z |
state/workspace_test.go
|
ctx := context.TODO()
keychain.EnsureDefaultKey(ctx)
root, err := os.MkdirTemp(os.TempDir(), "dagger-*")
require.NoError(t, err)
_, err = Open(ctx, root)
require.ErrorIs(t, ErrNotInit, err)
workspace, err := Init(ctx, root)
require.NoError(t, err)
require.Equal(t, root, workspace.Path)
st, err := workspace.Create(ctx, "test", CreateOpts{})
require.NoError(t, err)
require.Equal(t, "test", st.Name)
workspace, err = Open(ctx, root)
require.NoError(t, err)
require.Equal(t, root, workspace.Path)
envs, err := workspace.List(ctx)
require.NoError(t, err)
require.Len(t, envs, 1)
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 699 |
Default plan directory to `.`
|
To complete #631: #648 introduced a `--module` and `--package` flag to `dagger new`.
By default, we use `.dagger/env/XXX/plan` as the cue module. Instead, we should default to `.`.
|
https://github.com/dagger/dagger/issues/699
|
https://github.com/dagger/dagger/pull/772
|
21bed8aee69fd4d9547c0c67777eeae7bddcb94d
|
f8531fdb0b7df9eacf05a52b24dd78e169ca353b
| 2021-06-21T15:50:52Z |
go
| 2021-07-07T15:34:23Z |
state/workspace_test.go
|
require.Equal(t, "test", envs[0].Name)
env, err := workspace.Get(ctx, "test")
require.NoError(t, err)
require.Equal(t, "test", env.Name)
require.NoError(t, env.SetInput("foo", TextInput("bar")))
require.NoError(t, workspace.Save(ctx, env))
workspace, err = Open(ctx, root)
require.NoError(t, err)
env, err = workspace.Get(ctx, "test")
require.NoError(t, err)
require.Contains(t, env.Inputs, "foo")
}
func TestEncryption(t *testing.T) {
ctx := context.TODO()
keychain.EnsureDefaultKey(ctx)
readManifest := func(st *State) *State {
data, err := os.ReadFile(path.Join(st.Path, manifestFile))
require.NoError(t, err)
m := State{}
require.NoError(t, yaml.Unmarshal(data, &m))
return &m
}
root, err := os.MkdirTemp(os.TempDir(), "dagger-*")
require.NoError(t, err)
workspace, err := Init(ctx, root)
require.NoError(t, err)
_, err = workspace.Create(ctx, "test", CreateOpts{})
require.NoError(t, err)
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 699 |
Default plan directory to `.`
|
To complete #631: #648 introduced a `--module` and `--package` flag to `dagger new`.
By default, we use `.dagger/env/XXX/plan` as the cue module. Instead, we should default to `.`.
|
https://github.com/dagger/dagger/issues/699
|
https://github.com/dagger/dagger/pull/772
|
21bed8aee69fd4d9547c0c67777eeae7bddcb94d
|
f8531fdb0b7df9eacf05a52b24dd78e169ca353b
| 2021-06-21T15:50:52Z |
go
| 2021-07-07T15:34:23Z |
state/workspace_test.go
|
st, err := workspace.Get(ctx, "test")
require.NoError(t, err)
require.NoError(t, st.SetInput("plain", TextInput("plain")))
require.NoError(t, workspace.Save(ctx, st))
o := readManifest(st)
require.Contains(t, o.Inputs, "plain")
require.Equal(t, "plain", string(*o.Inputs["plain"].Text))
st, err = workspace.Get(ctx, "test")
require.NoError(t, err)
require.NoError(t, st.SetInput("secret", SecretInput("secret")))
require.NoError(t, workspace.Save(ctx, st))
o = readManifest(st)
require.Contains(t, o.Inputs, "secret")
secretValue := string(*o.Inputs["secret"].Secret)
require.NotEqual(t, "secret", secretValue)
require.True(t, strings.HasPrefix(secretValue, "ENC["))
st, err = workspace.Get(ctx, "test")
require.NoError(t, err)
require.NoError(t, st.SetInput("plain", TextInput("different")))
require.NoError(t, workspace.Save(ctx, st))
o = readManifest(st)
require.Contains(t, o.Inputs, "plain")
require.Equal(t, "different", string(*o.Inputs["plain"].Text))
require.Contains(t, o.Inputs, "secret")
require.Equal(t, secretValue, string(*o.Inputs["secret"].Secret))
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 888 |
Bool input type integration (CLI option)
|
Currently, dagger's CLI doesn't accept a bool type as input:
```shell
➜ universe git:(docs-test) ✗ dagger input
Manage an environment's inputs
Usage:
dagger input [command]
Available Commands:
container Add a container image as input artifact
dir Add a local directory as input artifact
git Add a git repository as input artifact
json Add a JSON input
list List the inputs of an environment
secret Add an encrypted input secret
text Add a text input
unset Remove input of an environment
yaml Add a YAML input
Flags:
-h, --help help for input
Global Flags:
-w, --workspace string Specify a workspace (defaults to current git repository)
Use "dagger input [command] --help" for more information about a command.
```
It led me to write hacky configs to bypass it, however, it's not sustainable:
```shell
localMode: dagger.#Input & { string | *null }
```
Having a bool type as input is important because it's a good way to leverage environments to its fullest: I use it to have a local testing behavior on previously implement code.
Having a bool as input makes it backward compatible on all the configs without changing the code: I just have 2 environments, one with the bool as null, the other as a string (should be true/ a bool), the code remains exactly the same.
|
https://github.com/dagger/dagger/issues/888
|
https://github.com/dagger/dagger/pull/916
|
9d7b40253dc500b1508c741a06bff71384e06f39
|
a8b3d9325d5bf794d2928ad0133a9442bd730102
| 2021-08-17T00:48:22Z |
go
| 2021-08-24T17:51:18Z |
cmd/dagger/cmd/input/root.go
|
package input
import (
"context"
"io"
"os"
"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"go.dagger.io/dagger/cmd/dagger/cmd/common"
"go.dagger.io/dagger/environment"
"go.dagger.io/dagger/solver"
"go.dagger.io/dagger/state"
"go.dagger.io/dagger/telemetry"
)
var Cmd = &cobra.Command{
Use: "input",
Short: "Manage an environment's inputs",
}
func init() {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 888 |
Bool input type integration (CLI option)
|
Currently, dagger's CLI doesn't accept a bool type as input:
```shell
➜ universe git:(docs-test) ✗ dagger input
Manage an environment's inputs
Usage:
dagger input [command]
Available Commands:
container Add a container image as input artifact
dir Add a local directory as input artifact
git Add a git repository as input artifact
json Add a JSON input
list List the inputs of an environment
secret Add an encrypted input secret
text Add a text input
unset Remove input of an environment
yaml Add a YAML input
Flags:
-h, --help help for input
Global Flags:
-w, --workspace string Specify a workspace (defaults to current git repository)
Use "dagger input [command] --help" for more information about a command.
```
It led me to write hacky configs to bypass it, however, it's not sustainable:
```shell
localMode: dagger.#Input & { string | *null }
```
Having a bool type as input is important because it's a good way to leverage environments to its fullest: I use it to have a local testing behavior on previously implement code.
Having a bool as input makes it backward compatible on all the configs without changing the code: I just have 2 environments, one with the bool as null, the other as a string (should be true/ a bool), the code remains exactly the same.
|
https://github.com/dagger/dagger/issues/888
|
https://github.com/dagger/dagger/pull/916
|
9d7b40253dc500b1508c741a06bff71384e06f39
|
a8b3d9325d5bf794d2928ad0133a9442bd730102
| 2021-08-17T00:48:22Z |
go
| 2021-08-24T17:51:18Z |
cmd/dagger/cmd/input/root.go
|
Cmd.AddCommand(
dirCmd,
gitCmd,
containerCmd,
secretCmd,
textCmd,
jsonCmd,
yamlCmd,
listCmd,
unsetCmd,
)
}
func updateEnvironmentInput(ctx context.Context, cmd *cobra.Command, target string, input state.Input) {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 888 |
Bool input type integration (CLI option)
|
Currently, dagger's CLI doesn't accept a bool type as input:
```shell
➜ universe git:(docs-test) ✗ dagger input
Manage an environment's inputs
Usage:
dagger input [command]
Available Commands:
container Add a container image as input artifact
dir Add a local directory as input artifact
git Add a git repository as input artifact
json Add a JSON input
list List the inputs of an environment
secret Add an encrypted input secret
text Add a text input
unset Remove input of an environment
yaml Add a YAML input
Flags:
-h, --help help for input
Global Flags:
-w, --workspace string Specify a workspace (defaults to current git repository)
Use "dagger input [command] --help" for more information about a command.
```
It led me to write hacky configs to bypass it, however, it's not sustainable:
```shell
localMode: dagger.#Input & { string | *null }
```
Having a bool type as input is important because it's a good way to leverage environments to its fullest: I use it to have a local testing behavior on previously implement code.
Having a bool as input makes it backward compatible on all the configs without changing the code: I just have 2 environments, one with the bool as null, the other as a string (should be true/ a bool), the code remains exactly the same.
|
https://github.com/dagger/dagger/issues/888
|
https://github.com/dagger/dagger/pull/916
|
9d7b40253dc500b1508c741a06bff71384e06f39
|
a8b3d9325d5bf794d2928ad0133a9442bd730102
| 2021-08-17T00:48:22Z |
go
| 2021-08-24T17:51:18Z |
cmd/dagger/cmd/input/root.go
|
lg := *log.Ctx(ctx)
workspace := common.CurrentWorkspace(ctx)
st := common.CurrentEnvironmentState(ctx, workspace)
lg = lg.With().
Str("environment", st.Name).
Logger()
doneCh := common.TrackWorkspaceCommand(ctx, cmd, workspace, st, &telemetry.Property{
Name: "input_target",
Value: target,
})
cl := common.NewClient(ctx)
st.SetInput(target, input)
err := cl.Do(ctx, st, func(ctx context.Context, env *environment.Environment, s solver.Solver) error {
_, err := env.ScanInputs(ctx, true)
if err != nil {
return err
}
return nil
})
<-doneCh
if err != nil {
lg.Fatal().Err(err).Msg("invalid input")
}
if err := workspace.Save(ctx, st); err != nil {
lg.Fatal().Err(err).Msg("cannot update environment")
}
}
func readInput(ctx context.Context, source string) string {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 888 |
Bool input type integration (CLI option)
|
Currently, dagger's CLI doesn't accept a bool type as input:
```shell
➜ universe git:(docs-test) ✗ dagger input
Manage an environment's inputs
Usage:
dagger input [command]
Available Commands:
container Add a container image as input artifact
dir Add a local directory as input artifact
git Add a git repository as input artifact
json Add a JSON input
list List the inputs of an environment
secret Add an encrypted input secret
text Add a text input
unset Remove input of an environment
yaml Add a YAML input
Flags:
-h, --help help for input
Global Flags:
-w, --workspace string Specify a workspace (defaults to current git repository)
Use "dagger input [command] --help" for more information about a command.
```
It led me to write hacky configs to bypass it, however, it's not sustainable:
```shell
localMode: dagger.#Input & { string | *null }
```
Having a bool type as input is important because it's a good way to leverage environments to its fullest: I use it to have a local testing behavior on previously implement code.
Having a bool as input makes it backward compatible on all the configs without changing the code: I just have 2 environments, one with the bool as null, the other as a string (should be true/ a bool), the code remains exactly the same.
|
https://github.com/dagger/dagger/issues/888
|
https://github.com/dagger/dagger/pull/916
|
9d7b40253dc500b1508c741a06bff71384e06f39
|
a8b3d9325d5bf794d2928ad0133a9442bd730102
| 2021-08-17T00:48:22Z |
go
| 2021-08-24T17:51:18Z |
cmd/dagger/cmd/input/root.go
|
lg := log.Ctx(ctx)
if !viper.GetBool("file") {
return source
}
if source == "-" {
data, err := io.ReadAll(os.Stdin)
if err != nil {
lg.
Fatal().
Err(err).
Msg("failed to read input from stdin")
}
return string(data)
}
data, err := os.ReadFile(source)
if err != nil {
lg.
Fatal().
Err(err).
Str("path", source).
Msg("failed to read input from file")
}
return string(data)
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 888 |
Bool input type integration (CLI option)
|
Currently, dagger's CLI doesn't accept a bool type as input:
```shell
➜ universe git:(docs-test) ✗ dagger input
Manage an environment's inputs
Usage:
dagger input [command]
Available Commands:
container Add a container image as input artifact
dir Add a local directory as input artifact
git Add a git repository as input artifact
json Add a JSON input
list List the inputs of an environment
secret Add an encrypted input secret
text Add a text input
unset Remove input of an environment
yaml Add a YAML input
Flags:
-h, --help help for input
Global Flags:
-w, --workspace string Specify a workspace (defaults to current git repository)
Use "dagger input [command] --help" for more information about a command.
```
It led me to write hacky configs to bypass it, however, it's not sustainable:
```shell
localMode: dagger.#Input & { string | *null }
```
Having a bool type as input is important because it's a good way to leverage environments to its fullest: I use it to have a local testing behavior on previously implement code.
Having a bool as input makes it backward compatible on all the configs without changing the code: I just have 2 environments, one with the bool as null, the other as a string (should be true/ a bool), the code remains exactly the same.
|
https://github.com/dagger/dagger/issues/888
|
https://github.com/dagger/dagger/pull/916
|
9d7b40253dc500b1508c741a06bff71384e06f39
|
a8b3d9325d5bf794d2928ad0133a9442bd730102
| 2021-08-17T00:48:22Z |
go
| 2021-08-24T17:51:18Z |
state/input.go
|
package state
import (
"encoding/json"
"fmt"
"io/ioutil"
"path"
"path/filepath"
"strings"
"cuelang.org/go/cue"
"go.dagger.io/dagger/compiler"
)
type Input struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 888 |
Bool input type integration (CLI option)
|
Currently, dagger's CLI doesn't accept a bool type as input:
```shell
➜ universe git:(docs-test) ✗ dagger input
Manage an environment's inputs
Usage:
dagger input [command]
Available Commands:
container Add a container image as input artifact
dir Add a local directory as input artifact
git Add a git repository as input artifact
json Add a JSON input
list List the inputs of an environment
secret Add an encrypted input secret
text Add a text input
unset Remove input of an environment
yaml Add a YAML input
Flags:
-h, --help help for input
Global Flags:
-w, --workspace string Specify a workspace (defaults to current git repository)
Use "dagger input [command] --help" for more information about a command.
```
It led me to write hacky configs to bypass it, however, it's not sustainable:
```shell
localMode: dagger.#Input & { string | *null }
```
Having a bool type as input is important because it's a good way to leverage environments to its fullest: I use it to have a local testing behavior on previously implement code.
Having a bool as input makes it backward compatible on all the configs without changing the code: I just have 2 environments, one with the bool as null, the other as a string (should be true/ a bool), the code remains exactly the same.
|
https://github.com/dagger/dagger/issues/888
|
https://github.com/dagger/dagger/pull/916
|
9d7b40253dc500b1508c741a06bff71384e06f39
|
a8b3d9325d5bf794d2928ad0133a9442bd730102
| 2021-08-17T00:48:22Z |
go
| 2021-08-24T17:51:18Z |
state/input.go
|
Dir *dirInput `yaml:"dir,omitempty"`
Git *gitInput `yaml:"git,omitempty"`
Docker *dockerInput `yaml:"docker,omitempty"`
Secret *secretInput `yaml:"secret,omitempty"`
Text *textInput `yaml:"text,omitempty"`
JSON *jsonInput `yaml:"json,omitempty"`
YAML *yamlInput `yaml:"yaml,omitempty"`
File *fileInput `yaml:"file,omitempty"`
}
func (i Input) Compile(key string, state *State) (*compiler.Value, error) {
switch {
case i.Dir != nil:
return i.Dir.Compile(key, state)
case i.Git != nil:
return i.Git.Compile(key, state)
case i.Docker != nil:
return i.Docker.Compile(key, state)
case i.Text != nil:
return i.Text.Compile(key, state)
case i.Secret != nil:
return i.Secret.Compile(key, state)
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 888 |
Bool input type integration (CLI option)
|
Currently, dagger's CLI doesn't accept a bool type as input:
```shell
➜ universe git:(docs-test) ✗ dagger input
Manage an environment's inputs
Usage:
dagger input [command]
Available Commands:
container Add a container image as input artifact
dir Add a local directory as input artifact
git Add a git repository as input artifact
json Add a JSON input
list List the inputs of an environment
secret Add an encrypted input secret
text Add a text input
unset Remove input of an environment
yaml Add a YAML input
Flags:
-h, --help help for input
Global Flags:
-w, --workspace string Specify a workspace (defaults to current git repository)
Use "dagger input [command] --help" for more information about a command.
```
It led me to write hacky configs to bypass it, however, it's not sustainable:
```shell
localMode: dagger.#Input & { string | *null }
```
Having a bool type as input is important because it's a good way to leverage environments to its fullest: I use it to have a local testing behavior on previously implement code.
Having a bool as input makes it backward compatible on all the configs without changing the code: I just have 2 environments, one with the bool as null, the other as a string (should be true/ a bool), the code remains exactly the same.
|
https://github.com/dagger/dagger/issues/888
|
https://github.com/dagger/dagger/pull/916
|
9d7b40253dc500b1508c741a06bff71384e06f39
|
a8b3d9325d5bf794d2928ad0133a9442bd730102
| 2021-08-17T00:48:22Z |
go
| 2021-08-24T17:51:18Z |
state/input.go
|
case i.JSON != nil:
return i.JSON.Compile(key, state)
case i.YAML != nil:
return i.YAML.Compile(key, state)
case i.File != nil:
return i.File.Compile(key, state)
default:
return nil, fmt.Errorf("input has not been set")
}
}
func DirInput(path string, include []string, exclude []string) Input {
return Input{
Dir: &dirInput{
Path: path,
Include: include,
Exclude: exclude,
},
}
}
type dirInput struct {
Path string `yaml:"path,omitempty"`
Include []string `yaml:"include,omitempty"`
Exclude []string `yaml:"exclude,omitempty"`
}
func (dir dirInput) Compile(_ string, state *State) (*compiler.Value, error) {
includeLLB := []byte("[]")
if len(dir.Include) > 0 {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 888 |
Bool input type integration (CLI option)
|
Currently, dagger's CLI doesn't accept a bool type as input:
```shell
➜ universe git:(docs-test) ✗ dagger input
Manage an environment's inputs
Usage:
dagger input [command]
Available Commands:
container Add a container image as input artifact
dir Add a local directory as input artifact
git Add a git repository as input artifact
json Add a JSON input
list List the inputs of an environment
secret Add an encrypted input secret
text Add a text input
unset Remove input of an environment
yaml Add a YAML input
Flags:
-h, --help help for input
Global Flags:
-w, --workspace string Specify a workspace (defaults to current git repository)
Use "dagger input [command] --help" for more information about a command.
```
It led me to write hacky configs to bypass it, however, it's not sustainable:
```shell
localMode: dagger.#Input & { string | *null }
```
Having a bool type as input is important because it's a good way to leverage environments to its fullest: I use it to have a local testing behavior on previously implement code.
Having a bool as input makes it backward compatible on all the configs without changing the code: I just have 2 environments, one with the bool as null, the other as a string (should be true/ a bool), the code remains exactly the same.
|
https://github.com/dagger/dagger/issues/888
|
https://github.com/dagger/dagger/pull/916
|
9d7b40253dc500b1508c741a06bff71384e06f39
|
a8b3d9325d5bf794d2928ad0133a9442bd730102
| 2021-08-17T00:48:22Z |
go
| 2021-08-24T17:51:18Z |
state/input.go
|
var err error
includeLLB, err = json.Marshal(dir.Include)
if err != nil {
return nil, err
}
}
excludeLLB := []byte("[]")
if len(dir.Exclude) > 0 {
var err error
excludeLLB, err = json.Marshal(dir.Exclude)
if err != nil {
return nil, err
}
}
p := dir.Path
if !filepath.IsAbs(p) {
p = filepath.Clean(path.Join(state.Workspace, dir.Path))
}
if !strings.HasPrefix(p, state.Workspace) {
return nil, fmt.Errorf("%q is outside the workspace", dir.Path)
}
llb := fmt.Sprintf(
`#up: [{do:"local",dir:"%s", include:%s, exclude:%s}]`,
p,
includeLLB,
excludeLLB,
)
return compiler.Compile("", llb)
}
type gitInput struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 888 |
Bool input type integration (CLI option)
|
Currently, dagger's CLI doesn't accept a bool type as input:
```shell
➜ universe git:(docs-test) ✗ dagger input
Manage an environment's inputs
Usage:
dagger input [command]
Available Commands:
container Add a container image as input artifact
dir Add a local directory as input artifact
git Add a git repository as input artifact
json Add a JSON input
list List the inputs of an environment
secret Add an encrypted input secret
text Add a text input
unset Remove input of an environment
yaml Add a YAML input
Flags:
-h, --help help for input
Global Flags:
-w, --workspace string Specify a workspace (defaults to current git repository)
Use "dagger input [command] --help" for more information about a command.
```
It led me to write hacky configs to bypass it, however, it's not sustainable:
```shell
localMode: dagger.#Input & { string | *null }
```
Having a bool type as input is important because it's a good way to leverage environments to its fullest: I use it to have a local testing behavior on previously implement code.
Having a bool as input makes it backward compatible on all the configs without changing the code: I just have 2 environments, one with the bool as null, the other as a string (should be true/ a bool), the code remains exactly the same.
|
https://github.com/dagger/dagger/issues/888
|
https://github.com/dagger/dagger/pull/916
|
9d7b40253dc500b1508c741a06bff71384e06f39
|
a8b3d9325d5bf794d2928ad0133a9442bd730102
| 2021-08-17T00:48:22Z |
go
| 2021-08-24T17:51:18Z |
state/input.go
|
Remote string `yaml:"remote,omitempty"`
Ref string `yaml:"ref,omitempty"`
Dir string `yaml:"dir,omitempty"`
}
func GitInput(remote, ref, dir string) Input {
return Input{
Git: &gitInput{
Remote: remote,
Ref: ref,
Dir: dir,
},
}
}
func (git gitInput) Compile(_ string, _ *State) (*compiler.Value, error) {
ref := "HEAD"
if git.Ref != "" {
ref = git.Ref
}
dir := ""
if git.Dir != "" {
dir = fmt.Sprintf(`,{do:"subdir", dir:"%s"}`, git.Dir)
}
return compiler.Compile("", fmt.Sprintf(
`#up: [{do:"fetch-git", remote:"%s", ref:"%s"}%s]`,
git.Remote,
ref,
dir,
))
}
func DockerInput(ref string) Input {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 888 |
Bool input type integration (CLI option)
|
Currently, dagger's CLI doesn't accept a bool type as input:
```shell
➜ universe git:(docs-test) ✗ dagger input
Manage an environment's inputs
Usage:
dagger input [command]
Available Commands:
container Add a container image as input artifact
dir Add a local directory as input artifact
git Add a git repository as input artifact
json Add a JSON input
list List the inputs of an environment
secret Add an encrypted input secret
text Add a text input
unset Remove input of an environment
yaml Add a YAML input
Flags:
-h, --help help for input
Global Flags:
-w, --workspace string Specify a workspace (defaults to current git repository)
Use "dagger input [command] --help" for more information about a command.
```
It led me to write hacky configs to bypass it, however, it's not sustainable:
```shell
localMode: dagger.#Input & { string | *null }
```
Having a bool type as input is important because it's a good way to leverage environments to its fullest: I use it to have a local testing behavior on previously implement code.
Having a bool as input makes it backward compatible on all the configs without changing the code: I just have 2 environments, one with the bool as null, the other as a string (should be true/ a bool), the code remains exactly the same.
|
https://github.com/dagger/dagger/issues/888
|
https://github.com/dagger/dagger/pull/916
|
9d7b40253dc500b1508c741a06bff71384e06f39
|
a8b3d9325d5bf794d2928ad0133a9442bd730102
| 2021-08-17T00:48:22Z |
go
| 2021-08-24T17:51:18Z |
state/input.go
|
return Input{
Docker: &dockerInput{
Ref: ref,
},
}
}
type dockerInput struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 888 |
Bool input type integration (CLI option)
|
Currently, dagger's CLI doesn't accept a bool type as input:
```shell
➜ universe git:(docs-test) ✗ dagger input
Manage an environment's inputs
Usage:
dagger input [command]
Available Commands:
container Add a container image as input artifact
dir Add a local directory as input artifact
git Add a git repository as input artifact
json Add a JSON input
list List the inputs of an environment
secret Add an encrypted input secret
text Add a text input
unset Remove input of an environment
yaml Add a YAML input
Flags:
-h, --help help for input
Global Flags:
-w, --workspace string Specify a workspace (defaults to current git repository)
Use "dagger input [command] --help" for more information about a command.
```
It led me to write hacky configs to bypass it, however, it's not sustainable:
```shell
localMode: dagger.#Input & { string | *null }
```
Having a bool type as input is important because it's a good way to leverage environments to its fullest: I use it to have a local testing behavior on previously implement code.
Having a bool as input makes it backward compatible on all the configs without changing the code: I just have 2 environments, one with the bool as null, the other as a string (should be true/ a bool), the code remains exactly the same.
|
https://github.com/dagger/dagger/issues/888
|
https://github.com/dagger/dagger/pull/916
|
9d7b40253dc500b1508c741a06bff71384e06f39
|
a8b3d9325d5bf794d2928ad0133a9442bd730102
| 2021-08-17T00:48:22Z |
go
| 2021-08-24T17:51:18Z |
state/input.go
|
Ref string `yaml:"ref,omitempty"`
}
func (i dockerInput) Compile(_ string, _ *State) (*compiler.Value, error) {
panic("NOT IMPLEMENTED")
}
func TextInput(data string) Input {
i := textInput(data)
return Input{
Text: &i,
}
}
type textInput string
func (i textInput) Compile(_ string, _ *State) (*compiler.Value, error) {
return compiler.Compile("", fmt.Sprintf("%q", i))
}
func SecretInput(data string) Input {
i := secretInput(data)
return Input{
Secret: &i,
}
}
type secretInput string
func (i secretInput) Compile(key string, _ *State) (*compiler.Value, error) {
return compiler.Compile("", fmt.Sprintf(`{id:%q}`, "secret="+key))
}
func (i secretInput) PlainText() string {
return string(i)
}
func JSONInput(data string) Input {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 888 |
Bool input type integration (CLI option)
|
Currently, dagger's CLI doesn't accept a bool type as input:
```shell
➜ universe git:(docs-test) ✗ dagger input
Manage an environment's inputs
Usage:
dagger input [command]
Available Commands:
container Add a container image as input artifact
dir Add a local directory as input artifact
git Add a git repository as input artifact
json Add a JSON input
list List the inputs of an environment
secret Add an encrypted input secret
text Add a text input
unset Remove input of an environment
yaml Add a YAML input
Flags:
-h, --help help for input
Global Flags:
-w, --workspace string Specify a workspace (defaults to current git repository)
Use "dagger input [command] --help" for more information about a command.
```
It led me to write hacky configs to bypass it, however, it's not sustainable:
```shell
localMode: dagger.#Input & { string | *null }
```
Having a bool type as input is important because it's a good way to leverage environments to its fullest: I use it to have a local testing behavior on previously implement code.
Having a bool as input makes it backward compatible on all the configs without changing the code: I just have 2 environments, one with the bool as null, the other as a string (should be true/ a bool), the code remains exactly the same.
|
https://github.com/dagger/dagger/issues/888
|
https://github.com/dagger/dagger/pull/916
|
9d7b40253dc500b1508c741a06bff71384e06f39
|
a8b3d9325d5bf794d2928ad0133a9442bd730102
| 2021-08-17T00:48:22Z |
go
| 2021-08-24T17:51:18Z |
state/input.go
|
i := jsonInput(data)
return Input{
JSON: &i,
}
}
type jsonInput string
func (i jsonInput) Compile(_ string, _ *State) (*compiler.Value, error) {
return compiler.DecodeJSON("", []byte(i))
}
func YAMLInput(data string) Input {
i := yamlInput(data)
return Input{
YAML: &i,
}
}
type yamlInput string
func (i yamlInput) Compile(_ string, _ *State) (*compiler.Value, error) {
return compiler.DecodeYAML("", []byte(i))
}
func FileInput(data string) Input {
return Input{
File: &fileInput{
Path: data,
},
}
}
type fileInput struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 888 |
Bool input type integration (CLI option)
|
Currently, dagger's CLI doesn't accept a bool type as input:
```shell
➜ universe git:(docs-test) ✗ dagger input
Manage an environment's inputs
Usage:
dagger input [command]
Available Commands:
container Add a container image as input artifact
dir Add a local directory as input artifact
git Add a git repository as input artifact
json Add a JSON input
list List the inputs of an environment
secret Add an encrypted input secret
text Add a text input
unset Remove input of an environment
yaml Add a YAML input
Flags:
-h, --help help for input
Global Flags:
-w, --workspace string Specify a workspace (defaults to current git repository)
Use "dagger input [command] --help" for more information about a command.
```
It led me to write hacky configs to bypass it, however, it's not sustainable:
```shell
localMode: dagger.#Input & { string | *null }
```
Having a bool type as input is important because it's a good way to leverage environments to its fullest: I use it to have a local testing behavior on previously implement code.
Having a bool as input makes it backward compatible on all the configs without changing the code: I just have 2 environments, one with the bool as null, the other as a string (should be true/ a bool), the code remains exactly the same.
|
https://github.com/dagger/dagger/issues/888
|
https://github.com/dagger/dagger/pull/916
|
9d7b40253dc500b1508c741a06bff71384e06f39
|
a8b3d9325d5bf794d2928ad0133a9442bd730102
| 2021-08-17T00:48:22Z |
go
| 2021-08-24T17:51:18Z |
state/input.go
|
Path string `json:"data,omitempty"`
}
func (i fileInput) Compile(_ string, _ *State) (*compiler.Value, error) {
data, err := ioutil.ReadFile(i.Path)
if err != nil {
return nil, err
}
value := compiler.NewValue()
if err := value.FillPath(cue.MakePath(), data); err != nil {
return nil, err
}
return value, nil
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 972 |
`dagger input dir src xxxx -e prod` hangs forever
|
The command `dagger input dir src xxxx -e prod` hangs forever when `xxxx` doesn't exist.
|
https://github.com/dagger/dagger/issues/972
|
https://github.com/dagger/dagger/pull/973
|
4d45e269e006899dc28ba64913a51520aa10a641
|
8dbfdaca1bf2decd474fff5a3ad366fbd3f8eaaf
| 2021-09-14T13:58:14Z |
go
| 2021-09-14T15:44:33Z |
cmd/dagger/cmd/input/dir.go
|
package input
import (
"path/filepath"
"strings"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"go.dagger.io/dagger/cmd/dagger/cmd/common"
"go.dagger.io/dagger/cmd/dagger/logger"
"go.dagger.io/dagger/state"
)
var dirCmd = &cobra.Command{
Use: "dir TARGET PATH",
Short: "Add a local directory as input artifact",
Args: cobra.ExactArgs(2),
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())
p, err := filepath.Abs(args[1])
if err != nil {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 972 |
`dagger input dir src xxxx -e prod` hangs forever
|
The command `dagger input dir src xxxx -e prod` hangs forever when `xxxx` doesn't exist.
|
https://github.com/dagger/dagger/issues/972
|
https://github.com/dagger/dagger/pull/973
|
4d45e269e006899dc28ba64913a51520aa10a641
|
8dbfdaca1bf2decd474fff5a3ad366fbd3f8eaaf
| 2021-09-14T13:58:14Z |
go
| 2021-09-14T15:44:33Z |
cmd/dagger/cmd/input/dir.go
|
lg.Fatal().Err(err).Str("path", args[1]).Msg("unable to resolve path")
}
workspace := common.CurrentWorkspace(ctx)
if !strings.HasPrefix(p, workspace.Path) {
lg.Fatal().Err(err).Str("path", args[1]).Msg("dir is outside the workspace")
}
p, err = filepath.Rel(workspace.Path, p)
if err != nil {
lg.Fatal().Err(err).Str("path", args[1]).Msg("unable to resolve path")
}
if !strings.HasPrefix(p, ".") {
p = "./" + p
}
updateEnvironmentInput(ctx, cmd, args[0],
state.DirInput(
p,
viper.GetStringSlice("include"),
viper.GetStringSlice("exclude"),
),
)
},
}
func init() {
dirCmd.Flags().StringSlice("include", []string{}, "Include pattern")
dirCmd.Flags().StringSlice("exclude", []string{}, "Exclude pattern")
if err := viper.BindPFlags(dirCmd.Flags()); err != nil {
panic(err)
}
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
environment/pipeline.go
|
package environment
import (
"context"
"encoding/json"
"errors"
"fmt"
"io"
"io/fs"
"net"
"net/url"
"strings"
"time"
"cuelang.org/go/cue"
bkplatforms "github.com/containerd/containerd/platforms"
"github.com/docker/distribution/reference"
bk "github.com/moby/buildkit/client"
"github.com/moby/buildkit/client/llb"
"github.com/moby/buildkit/exporter/containerimage/exptypes"
dockerfilebuilder "github.com/moby/buildkit/frontend/dockerfile/builder"
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
environment/pipeline.go
|
"github.com/moby/buildkit/frontend/dockerfile/dockerfile2llb"
bkgw "github.com/moby/buildkit/frontend/gateway/client"
bkpb "github.com/moby/buildkit/solver/pb"
digest "github.com/opencontainers/go-digest"
specs "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/rs/zerolog/log"
"gopkg.in/yaml.v3"
"go.dagger.io/dagger/compiler"
"go.dagger.io/dagger/solver"
)
type State string
const (
StateComputing = State("computing")
StateCanceled = State("canceled")
StateFailed = State("failed")
StateCompleted = State("completed")
)
type Pipeline struct {
code *compiler.Value
name string
s solver.Solver
state llb.State
platform specs.Platform
result bkgw.Reference
image dockerfile2llb.Image
computed *compiler.Value
}
func NewPipeline(code *compiler.Value, s solver.Solver, platform specs.Platform) *Pipeline {
return &Pipeline{
code: code,
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
environment/pipeline.go
|
name: code.Path().String(),
platform: platform,
s: s,
state: llb.Scratch(),
computed: compiler.NewValue(),
}
}
func (p *Pipeline) WithCustomName(name string) *Pipeline {
p.name = name
return p
}
func (p *Pipeline) State() llb.State {
return p.state
}
func (p *Pipeline) Result() (llb.State, error) {
if p.result == nil {
return llb.Scratch(), nil
}
return p.result.ToState()
}
func (p *Pipeline) FS() fs.FS {
return solver.NewBuildkitFS(p.result)
}
func (p *Pipeline) ImageConfig() dockerfile2llb.Image {
return p.image
}
func (p *Pipeline) Computed() *compiler.Value {
return p.computed
}
func isComponent(v *compiler.Value) bool {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
environment/pipeline.go
|
return v.Lookup("#up").Exists()
}
func ops(code *compiler.Value) ([]*compiler.Value, error) {
ops := []*compiler.Value{}
if isComponent(code) {
xops, err := code.Lookup("#up").List()
if err != nil {
return nil, err
}
ops = append(ops, xops...)
} else if _, err := code.Lookup("do").String(); err == nil {
ops = append(ops, code)
} else if xops, err := code.List(); err == nil {
ops = append(ops, xops...)
} else {
source, err := code.Source()
if err != nil {
panic(err)
}
return nil, fmt.Errorf("not executable: %s (%s)", source, code.Path().String())
}
return ops, nil
}
func Analyze(fn func(*compiler.Value) error, code *compiler.Value) error {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
environment/pipeline.go
|
ops, err := ops(code)
if err != nil {
return nil
}
for _, op := range ops {
if err := analyzeOp(fn, op); err != nil {
return err
}
}
return nil
}
func analyzeOp(fn func(*compiler.Value) error, op *compiler.Value) error {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
environment/pipeline.go
|
if err := fn(op); err != nil {
return err
}
do, err := op.Lookup("do").String()
if err != nil {
return err
}
switch do {
case "load", "copy":
return Analyze(fn, op.Lookup("from"))
case "exec":
fields, err := op.Lookup("mount").Fields()
if err != nil {
return err
}
for _, mnt := range fields {
if from := mnt.Value.Lookup("from"); from.Exists() {
return Analyze(fn, from)
}
}
}
return nil
}
func (p *Pipeline) Run(ctx context.Context) error {
lg := log.
Ctx(ctx).
With().
Str("component", p.name).
Logger()
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
environment/pipeline.go
|
start := time.Now()
lg.
Info().
Str("state", string(StateComputing)).
Msg(string(StateComputing))
err := p.run(ctx)
if err != nil {
if strings.Contains(err.Error(), "context canceled") {
lg.
Error().
Dur("duration", time.Since(start)).
Str("state", string(StateCanceled)).
Msg(string(StateCanceled))
} else {
lg.
Error().
Dur("duration", time.Since(start)).
Err(err).
Str("state", string(StateFailed)).
Msg(string(StateFailed))
}
return err
}
lg.
Info().
Dur("duration", time.Since(start)).
Str("state", string(StateCompleted)).
Msg(string(StateCompleted))
return nil
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
environment/pipeline.go
|
}
func (p *Pipeline) run(ctx context.Context) error {
ops, err := ops(p.code)
if err != nil {
return err
}
for idx, op := range ops {
if err := op.IsConcreteR(); err != nil {
log.
Ctx(ctx).
Warn().
Str("original_cue_error", err.Error()).
Int("op", idx).
Msg("pipeline was partially executed because of missing inputs")
return nil
}
p.state, err = p.doOp(ctx, op, p.state)
if err != nil {
return err
}
p.result, err = p.s.Solve(ctx, p.state, p.platform)
if err != nil {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
environment/pipeline.go
|
return err
}
}
return nil
}
func (p *Pipeline) doOp(ctx context.Context, op *compiler.Value, st llb.State) (llb.State, error) {
do, err := op.Lookup("do").String()
if err != nil {
return st, err
}
log.
Ctx(ctx).
Debug().
Str("pipeline", p.name).
Str("do", do).
Msg("executing operation")
switch do {
case "copy":
return p.Copy(ctx, op, st)
case "exec":
return p.Exec(ctx, op, st)
case "export":
return p.Export(ctx, op, st)
case "docker-login":
return p.DockerLogin(ctx, op, st)
case "fetch-container":
return p.FetchContainer(ctx, op, st)
case "push-container":
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
environment/pipeline.go
|
return p.PushContainer(ctx, op, st)
case "save-image":
return p.SaveImage(ctx, op, st)
case "fetch-git":
return p.FetchGit(ctx, op, st)
case "fetch-http":
return p.FetchHTTP(ctx, op, st)
case "local":
return p.Local(ctx, op, st)
case "load":
return p.Load(ctx, op, st)
case "workdir":
return p.Workdir(ctx, op, st)
case "subdir":
return p.Subdir(ctx, op, st)
case "docker-build":
return p.DockerBuild(ctx, op, st)
case "write-file":
return p.WriteFile(ctx, op, st)
case "mkdir":
return p.Mkdir(ctx, op, st)
default:
return st, fmt.Errorf("invalid operation: %s", op.JSON())
}
}
func (p *Pipeline) vertexNamef(format string, a ...interface{}) string {
prefix := fmt.Sprintf("@%s@", p.name)
name := fmt.Sprintf(format, a...)
return prefix + " " + name
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
environment/pipeline.go
|
func (p *Pipeline) Workdir(ctx context.Context, op *compiler.Value, st llb.State) (llb.State, error) {
path, err := op.Lookup("path").String()
if err != nil {
return st, err
}
return st.Dir(path), nil
}
func (p *Pipeline) Subdir(ctx context.Context, op *compiler.Value, st llb.State) (llb.State, error) {
dir, err := op.Lookup("dir").String()
if err != nil {
return st, err
}
return llb.Scratch().File(
llb.Copy(
st,
dir,
"/",
&llb.CopyInfo{
CopyDirContentsOnly: true,
},
),
llb.WithCustomName(p.vertexNamef("Subdir %s", dir)),
), nil
}
func (p *Pipeline) Copy(ctx context.Context, op *compiler.Value, st llb.State) (llb.State, error) {
src, err := op.Lookup("src").String()
if err != nil {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
environment/pipeline.go
|
return st, err
}
dest, err := op.Lookup("dest").String()
if err != nil {
return st, err
}
from := NewPipeline(op.Lookup("from"), p.s, p.platform)
if err := from.Run(ctx); err != nil {
return st, err
}
return st.File(
llb.Copy(
from.State(),
src,
dest,
&llb.CopyInfo{
CopyDirContentsOnly: true,
CreateDestPath: true,
AllowWildcard: true,
},
),
llb.WithCustomName(p.vertexNamef("Copy %s %s", src, dest)),
), nil
}
func (p *Pipeline) Local(ctx context.Context, op *compiler.Value, st llb.State) (llb.State, error) {
dir, err := op.Lookup("dir").String()
if err != nil {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
environment/pipeline.go
|
return st, err
}
opts := []llb.LocalOption{
llb.WithCustomName(p.vertexNamef("Local %s", dir)),
llb.SessionID(p.s.SessionID()),
llb.SharedKeyHint(dir),
}
includes, err := op.Lookup("include").List()
if err != nil {
return st, err
}
if len(includes) > 0 {
includePatterns := []string{}
for _, i := range includes {
pattern, err := i.String()
if err != nil {
return st, err
}
includePatterns = append(includePatterns, pattern)
}
opts = append(opts, llb.IncludePatterns(includePatterns))
}
excludes, err := op.Lookup("exclude").List()
if err != nil {
return st, err
}
excludePatterns := []string{"**/.dagger/"}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
environment/pipeline.go
|
if len(excludes) > 0 {
for _, i := range excludes {
pattern, err := i.String()
if err != nil {
return st, err
}
excludePatterns = append(excludePatterns, pattern)
}
}
opts = append(opts, llb.ExcludePatterns(excludePatterns))
return st.File(
llb.Copy(
llb.Local(
dir,
opts...,
),
"/",
"/",
),
llb.WithCustomName(p.vertexNamef("Local %s [copy]", dir)),
), nil
}
func (p *Pipeline) Exec(ctx context.Context, op *compiler.Value, st llb.State) (llb.State, error) {
opts := []llb.RunOption{}
var cmd struct {
Args []string
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
environment/pipeline.go
|
Dir string
Always bool
}
if err := op.Decode(&cmd); err != nil {
return st, err
}
opts = append(opts, llb.Args(cmd.Args))
opts = append(opts, llb.Dir(cmd.Dir))
if env := op.Lookup("env"); env.Exists() {
envs, err := op.Lookup("env").Fields()
if err != nil {
return st, err
}
for _, env := range envs {
v, err := env.Value.String()
if err != nil {
return st, err
}
opts = append(opts, llb.AddEnv(env.Label(), v))
}
}
if cmd.Always {
opts = append(opts, llb.IgnoreCache)
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
environment/pipeline.go
|
if hosts := op.Lookup("hosts"); hosts.Exists() {
fields, err := hosts.Fields()
if err != nil {
return st, err
}
for _, host := range fields {
s, err := host.Value.String()
if err != nil {
return st, err
}
if err != nil {
return st, err
}
opts = append(opts, llb.AddExtraHost(host.Label(), net.ParseIP(s)))
}
}
if user := op.Lookup("user"); user.Exists() {
u, err := user.String()
if err != nil {
return st, err
}
opts = append(opts, llb.User(u))
}
if mounts := op.Lookup("mount"); mounts.Exists() {
mntOpts, err := p.mountAll(ctx, mounts)
if err != nil {
return st, err
}
opts = append(opts, mntOpts...)
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
environment/pipeline.go
|
}
args := make([]string, 0, len(cmd.Args))
for _, a := range cmd.Args {
args = append(args, fmt.Sprintf("%q", a))
}
opts = append(opts, llb.WithCustomName(p.vertexNamef("Exec [%s]", strings.Join(args, ", "))))
return st.Run(opts...).Root(), nil
}
func (p *Pipeline) mountAll(ctx context.Context, mounts *compiler.Value) ([]llb.RunOption, error) {
opts := []llb.RunOption{}
fields, err := mounts.Fields()
if err != nil {
return nil, err
}
for _, mnt := range fields {
o, err := p.mount(ctx, mnt.Label(), mnt.Value)
if err != nil {
return nil, err
}
opts = append(opts, o)
}
return opts, err
}
func (p *Pipeline) mount(ctx context.Context, dest string, mnt *compiler.Value) (llb.RunOption, error) {
if s, err := mnt.String(); err == nil {
switch s {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
environment/pipeline.go
|
case "cache":
return llb.AddMount(
dest,
llb.Scratch().File(
llb.Mkdir("/cache", fs.FileMode(0755)),
llb.WithCustomName(p.vertexNamef("Mkdir /cache (cache mount %s)", dest)),
),
), nil
case "tmpfs":
return llb.AddMount(
dest,
llb.Scratch(),
llb.Tmpfs(),
), nil
default:
return nil, fmt.Errorf("invalid mount source: %q", s)
}
}
if secret := mnt.Lookup("secret"); secret.Exists() {
id, err := getSecretID(secret)
if err != nil {
return nil, err
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
environment/pipeline.go
|
return llb.AddSecret(dest,
llb.SecretID(id),
llb.SecretFileOpt(0, 0, 0400),
), nil
}
if stream := mnt.Lookup("stream"); stream.Exists() {
if !stream.HasAttr("stream") {
return nil, fmt.Errorf("invalid stream %q: not a stream", stream.Path().String())
}
unixValue := stream.Lookup("unix")
if !unixValue.Exists() {
return nil, fmt.Errorf("invalid stream %q: not a unix socket", stream.Path().String())
}
unix, err := unixValue.String()
if err != nil {
return nil, fmt.Errorf("invalid unix path id: %w", err)
}
return llb.AddSSHSocket(
llb.SSHID(fmt.Sprintf("unix=%s", unix)),
llb.SSHSocketTarget(dest),
), nil
}
if !mnt.Lookup("from").Exists() {
return nil, fmt.Errorf("invalid mount: should have %s structure",
"{from: _, path: string | *\"/\"}")
}
from := NewPipeline(mnt.Lookup("from"), p.s, p.platform)
if err := from.Run(ctx); err != nil {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
environment/pipeline.go
|
return nil, err
}
var mo []llb.MountOption
if mp := mnt.Lookup("path"); mp.Exists() {
mps, err := mp.String()
if err != nil {
return nil, err
}
mo = append(mo, llb.SourcePath(mps))
}
return llb.AddMount(dest, from.State(), mo...), nil
}
func (p *Pipeline) canonicalPath(v *compiler.Value) string {
vPath := v.Path().Selectors()
pipelinePath := p.code.Path().Selectors()
_, ref := p.code.ReferencePath()
if len(ref.Selectors()) == 0 {
return v.Path().String()
}
canonicalPipelinePath := ref.Selectors()
vPath = vPath[len(pipelinePath):]
vPath = append(canonicalPipelinePath, vPath...)
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
environment/pipeline.go
|
return cue.MakePath(vPath...).String()
}
func (p *Pipeline) Export(ctx context.Context, op *compiler.Value, st llb.State) (llb.State, error) {
source, err := op.Lookup("source").String()
if err != nil {
return st, err
}
format, err := op.Lookup("format").String()
if err != nil {
return st, err
}
contents, err := fs.ReadFile(p.FS(), source)
if err != nil {
return st, fmt.Errorf("export %s: %w", source, err)
}
switch format {
case "string":
log.
Ctx(ctx).
Debug().
Bytes("contents", contents).
Msg("exporting string")
if err := p.computed.FillPath(cue.MakePath(), string(contents)); err != nil {
return st, err
}
case "json":
var o interface{}
o, err := unmarshalAnything(contents, json.Unmarshal)
if err != nil {
return st, err
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
environment/pipeline.go
|
}
log.
Ctx(ctx).
Debug().
Interface("contents", o).
Msg("exporting json")
if err := p.computed.FillPath(cue.MakePath(), o); err != nil {
return st, err
}
case "yaml":
var o interface{}
o, err := unmarshalAnything(contents, yaml.Unmarshal)
if err != nil {
return st, err
}
log.
Ctx(ctx).
Debug().
Interface("contents", o).
Msg("exporting yaml")
if err := p.computed.FillPath(cue.MakePath(), o); err != nil {
return st, err
}
default:
return st, fmt.Errorf("unsupported export format: %q", format)
}
return st, nil
}
type unmarshaller func([]byte, interface{}) error
func unmarshalAnything(data []byte, fn unmarshaller) (interface{}, error) {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
environment/pipeline.go
|
var oMap map[string]interface{}
if err := fn(data, &oMap); err == nil {
return oMap, nil
}
var o interface{}
err := fn(data, &o)
return o, err
}
func parseStringOrSecret(ctx context.Context, ss solver.SecretsStore, v *compiler.Value) (string, error) {
if value, err := v.String(); err == nil {
return value, nil
}
id, err := getSecretID(v)
if err != nil {
return "", err
}
secretBytes, err := ss.GetSecret(ctx, id)
if err != nil {
return "", err
}
return string(secretBytes), nil
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
environment/pipeline.go
|
func (p *Pipeline) Load(ctx context.Context, op *compiler.Value, st llb.State) (llb.State, error) {
from := NewPipeline(op.Lookup("from"), p.s, p.platform)
if err := from.Run(ctx); err != nil {
return st, err
}
p.image = from.ImageConfig()
return from.State(), nil
}
func (p *Pipeline) DockerLogin(ctx context.Context, op *compiler.Value, st llb.State) (llb.State, error) {
username, err := op.Lookup("username").String()
if err != nil {
return st, err
}
secretValue, err := parseStringOrSecret(ctx, p.s.GetOptions().SecretsStore, op.Lookup("secret"))
if err != nil {
return st, err
}
target, err := op.Lookup("target").String()
if err != nil {
return st, err
}
p.s.AddCredentials(target, username, secretValue)
log.
Ctx(ctx).
Debug().
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
environment/pipeline.go
|
Str("target", target).
Msg("docker login to registry")
return st, nil
}
func (p *Pipeline) FetchContainer(ctx context.Context, op *compiler.Value, st llb.State) (llb.State, error) {
rawRef, err := op.Lookup("ref").String()
if err != nil {
return st, err
}
ref, err := reference.ParseNormalizedNamed(rawRef)
if err != nil {
return st, fmt.Errorf("failed to parse ref %s: %w", rawRef, err)
}
ref = reference.TagNameOnly(ref)
st = llb.Image(
ref.String(),
llb.WithCustomName(p.vertexNamef("FetchContainer %s", rawRef)),
)
p.image, err = p.s.ResolveImageConfig(ctx, ref.String(), llb.ResolveImageConfigOpt{
LogName: p.vertexNamef("load metadata for %s", ref.String()),
Platform: &p.platform,
})
if err != nil {
return st, err
}
return applyImageToState(p.image, st), nil
}
func applyImageToState(image dockerfile2llb.Image, st llb.State) llb.State {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
environment/pipeline.go
|
for _, env := range image.Config.Env {
k, v := parseKeyValue(env)
st = st.AddEnv(k, v)
}
if image.Config.WorkingDir != "" {
st = st.Dir(image.Config.WorkingDir)
}
if image.Config.User != "" {
st = st.User(image.Config.User)
}
return st
}
func parseKeyValue(env string) (string, string) {
parts := strings.SplitN(env, "=", 2)
v := ""
if len(parts) > 1 {
v = parts[1]
}
return parts[0], v
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
environment/pipeline.go
|
}
func (p *Pipeline) PushContainer(ctx context.Context, op *compiler.Value, st llb.State) (llb.State, error) {
rawRef, err := op.Lookup("ref").String()
if err != nil {
return st, err
}
ref, err := reference.ParseNormalizedNamed(rawRef)
if err != nil {
return st, fmt.Errorf("failed to parse ref %s: %w", rawRef, err)
}
ref = reference.TagNameOnly(ref)
resp, err := p.s.Export(ctx, p.State(), &p.image, bk.ExportEntry{
Type: bk.ExporterImage,
Attrs: map[string]string{
"name": ref.String(),
"push": "true",
},
})
if err != nil {
return st, err
}
if dgst, ok := resp.ExporterResponse["containerimage.digest"]; ok {
imageRef := fmt.Sprintf(
"%s@%s",
resp.ExporterResponse["image.name"],
dgst,
)
return st.File(
llb.Mkdir("/dagger", fs.FileMode(0755)),
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
environment/pipeline.go
|
llb.WithCustomName(p.vertexNamef("Mkdir /dagger")),
).File(
llb.Mkfile("/dagger/image_digest", fs.FileMode(0644), []byte(dgst)),
llb.WithCustomName(p.vertexNamef("Storing image digest to /dagger/image_digest")),
).File(
llb.Mkfile("/dagger/image_ref", fs.FileMode(0644), []byte(imageRef)),
llb.WithCustomName(p.vertexNamef("Storing image ref to /dagger/image_ref")),
), nil
}
return st, err
}
func (p *Pipeline) SaveImage(ctx context.Context, op *compiler.Value, st llb.State) (llb.State, error) {
tag, err := op.Lookup("tag").String()
if err != nil {
return st, err
}
dest, err := op.Lookup("dest").String()
if err != nil {
return st, err
}
pipeR, pipeW := io.Pipe()
var (
errCh = make(chan error)
image []byte
)
go func() {
var err error
image, err = io.ReadAll(pipeR)
errCh <- err
}()
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
environment/pipeline.go
|
resp, err := p.s.Export(ctx, p.State(), &p.image, bk.ExportEntry{
Type: bk.ExporterDocker,
Attrs: map[string]string{
"name": tag,
},
Output: func(_ map[string]string) (io.WriteCloser, error) {
return pipeW, nil
},
})
if err != nil {
return st, err
}
if err := <-errCh; err != nil {
return st, err
}
if id, ok := resp.ExporterResponse["containerimage.config.digest"]; ok {
st = st.File(
llb.Mkdir("/dagger", fs.FileMode(0755)),
llb.WithCustomName(p.vertexNamef("Mkdir /dagger")),
).File(
llb.Mkfile("/dagger/image_id", fs.FileMode(0644), []byte(id)),
llb.WithCustomName(p.vertexNamef("Storing image id to /dagger/image_id")),
)
}
return st.File(
llb.Mkfile(dest, 0644, image),
llb.WithCustomName(p.vertexNamef("SaveImage %s", dest)),
), nil
}
func getSecretID(secretField *compiler.Value) (string, error) {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
environment/pipeline.go
|
if !secretField.HasAttr("secret") {
return "", fmt.Errorf("invalid secret %q: not a secret", secretField.Path().String())
}
idValue := secretField.Lookup("id")
if !idValue.Exists() {
return "", fmt.Errorf("invalid secret %q: no id field", secretField.Path().String())
}
id, err := idValue.String()
if err != nil {
return "", fmt.Errorf("invalid secret id: %w", err)
}
return id, nil
}
func (p *Pipeline) FetchGit(ctx context.Context, op *compiler.Value, st llb.State) (llb.State, error) {
remote, err := op.Lookup("remote").String()
if err != nil {
return st, err
}
ref, err := op.Lookup("ref").String()
if err != nil {
return st, err
}
remoteRedacted := remote
if u, err := url.Parse(remote); err == nil {
remoteRedacted = u.Redacted()
}
gitOpts := []llb.GitOption{}
var opts struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
environment/pipeline.go
|
KeepGitDir bool
}
if err := op.Decode(&opts); err != nil {
return st, err
}
if opts.KeepGitDir {
gitOpts = append(gitOpts, llb.KeepGitDir())
}
if authToken := op.Lookup("authToken"); authToken.Exists() {
id, err := getSecretID(authToken)
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
environment/pipeline.go
|
if err != nil {
return st, err
}
gitOpts = append(gitOpts, llb.AuthTokenSecret(id))
}
if authHeader := op.Lookup("authHeader"); authHeader.Exists() {
id, err := getSecretID(authHeader)
if err != nil {
return st, err
}
gitOpts = append(gitOpts, llb.AuthHeaderSecret(id))
}
gitOpts = append(gitOpts, llb.WithCustomName(p.vertexNamef("FetchGit %s@%s", remoteRedacted, ref)))
return llb.Git(
remote,
ref,
gitOpts...,
), nil
}
func (p *Pipeline) FetchHTTP(ctx context.Context, op *compiler.Value, st llb.State) (llb.State, error) {
link, err := op.Lookup("url").String()
if err != nil {
return st, err
}
linkRedacted := link
if u, err := url.Parse(link); err == nil {
linkRedacted = u.Redacted()
}
httpOpts := []llb.HTTPOption{}
var opts struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
environment/pipeline.go
|
Checksum string
Filename string
Mode int64
UID int
GID int
}
if err := op.Decode(&opts); err != nil {
return st, err
}
if opts.Checksum != "" {
dgst, err := digest.Parse(opts.Checksum)
if err != nil {
return st, err
}
httpOpts = append(httpOpts, llb.Checksum(dgst))
}
if opts.Filename != "" {
httpOpts = append(httpOpts, llb.Filename(opts.Filename))
}
if opts.Mode != 0 {
httpOpts = append(httpOpts, llb.Chmod(fs.FileMode(opts.Mode)))
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
environment/pipeline.go
|
if opts.UID != 0 && opts.GID != 0 {
httpOpts = append(httpOpts, llb.Chown(opts.UID, opts.GID))
}
httpOpts = append(httpOpts, llb.WithCustomName(p.vertexNamef("FetchHTTP %s", linkRedacted)))
return llb.HTTP(
link,
httpOpts...,
), nil
}
func (p *Pipeline) DockerBuild(ctx context.Context, op *compiler.Value, st llb.State) (llb.State, error) {
var (
dockerContext = op.Lookup("context")
dockerfile = op.Lookup("dockerfile")
contextDef *bkpb.Definition
dockerfileDef *bkpb.Definition
err error
)
if !dockerContext.Exists() && !dockerfile.Exists() {
return st, errors.New("context or dockerfile required")
}
if dockerContext.Exists() {
from := NewPipeline(op.Lookup("context"), p.s, p.platform)
if err := from.Run(ctx); err != nil {
return st, err
}
contextDef, err = p.s.Marshal(ctx, from.State())
if err != nil {
return st, err
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
environment/pipeline.go
|
}
dockerfileDef = contextDef
}
if dockerfile.Exists() {
content, err := dockerfile.String()
if err != nil {
return st, err
}
dockerfileDef, err = p.s.Marshal(ctx,
llb.Scratch().File(
llb.Mkfile("/Dockerfile", 0644, []byte(content)),
),
)
if err != nil {
return st, err
}
if contextDef == nil {
contextDef = dockerfileDef
}
}
opts, err := dockerBuildOpts(ctx, op, p.s.GetOptions().SecretsStore)
if err != nil {
return st, err
}
if p.s.NoCache() {
opts["no-cache"] = ""
}
if opts["platform"] == "" {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
environment/pipeline.go
|
opts["platform"] = bkplatforms.Format(p.platform)
}
req := bkgw.SolveRequest{
Frontend: "dockerfile.v0",
FrontendOpt: opts,
FrontendInputs: map[string]*bkpb.Definition{
dockerfilebuilder.DefaultLocalNameContext: contextDef,
dockerfilebuilder.DefaultLocalNameDockerfile: dockerfileDef,
},
}
res, err := p.s.SolveRequest(ctx, req)
if err != nil {
return st, err
}
if meta, ok := res.Metadata[exptypes.ExporterImageConfigKey]; ok {
if err := json.Unmarshal(meta, &p.image); err != nil {
return st, fmt.Errorf("failed to unmarshal image config: %w", err)
}
}
ref, err := res.SingleRef()
if err != nil {
return st, err
}
st, err = ref.ToState()
if err != nil {
return st, err
}
return applyImageToState(p.image, st), nil
}
func dockerBuildOpts(ctx context.Context, op *compiler.Value, ss solver.SecretsStore) (map[string]string, error) {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
environment/pipeline.go
|
opts := map[string]string{}
if dockerfilePath := op.Lookup("dockerfilePath"); dockerfilePath.Exists() {
filename, err := dockerfilePath.String()
if err != nil {
return nil, err
}
opts["filename"] = filename
}
if target := op.Lookup("target"); target.Exists() {
tgr, err := target.String()
if err != nil {
return nil, err
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
environment/pipeline.go
|
}
opts["target"] = tgr
}
if hosts := op.Lookup("hosts"); hosts.Exists() {
p := []string{}
fields, err := hosts.Fields()
if err != nil {
return nil, err
}
for _, host := range fields {
s, err := host.Value.String()
if err != nil {
return nil, err
}
p = append(p, host.Label()+"="+s)
}
if len(p) > 0 {
opts["add-hosts"] = strings.Join(p, ",")
}
}
if buildArgs := op.Lookup("buildArg"); buildArgs.Exists() {
fields, err := buildArgs.Fields()
if err != nil {
return nil, err
}
for _, buildArg := range fields {
v, err := parseStringOrSecret(ctx, ss, buildArg.Value)
if err != nil {
return nil, err
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
environment/pipeline.go
|
opts["build-arg:"+buildArg.Label()] = v
}
}
if labels := op.Lookup("label"); labels.Exists() {
fields, err := labels.Fields()
if err != nil {
return nil, err
}
for _, label := range fields {
s, err := label.Value.String()
if err != nil {
return nil, err
}
opts["label:"+label.Label()] = s
}
}
if platforms := op.Lookup("platforms"); platforms.Exists() {
p := []string{}
list, err := platforms.List()
if err != nil {
return nil, err
}
for _, platform := range list {
s, err := platform.String()
if err != nil {
return nil, err
}
p = append(p, s)
}
if len(p) > 0 {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
environment/pipeline.go
|
opts["platform"] = strings.Join(p, ",")
}
if len(p) > 1 {
opts["multi-platform"] = "true"
}
}
return opts, nil
}
func (p *Pipeline) WriteFile(ctx context.Context, op *compiler.Value, st llb.State) (llb.State, error) {
var content []byte
var err error
switch kind := op.Lookup("content").Kind(); kind {
case cue.BytesKind:
content, err = op.Lookup("content").Bytes()
case cue.StringKind:
var str string
str, err = op.Lookup("content").String()
if err == nil {
content = []byte(str)
}
case cue.BottomKind:
err = fmt.Errorf("%s: WriteFile content is not set", p.canonicalPath(op))
default:
err = fmt.Errorf("%s: unhandled data type in WriteFile: %s", p.canonicalPath(op), kind)
}
if err != nil {
return st, err
}
dest, err := op.Lookup("dest").String()
if err != nil {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
environment/pipeline.go
|
return st, err
}
mode, err := op.Lookup("mode").Int64()
if err != nil {
return st, err
}
return st.File(
llb.Mkfile(dest, fs.FileMode(mode), content),
llb.WithCustomName(p.vertexNamef("WriteFile %s", dest)),
), nil
}
func (p *Pipeline) Mkdir(ctx context.Context, op *compiler.Value, st llb.State) (llb.State, error) {
pathString, err := op.Lookup("path").String()
if err != nil {
return st, err
}
dir, err := op.Lookup("dir").String()
if err != nil {
return st, err
}
mode, err := op.Lookup("mode").Int64()
if err != nil {
return st, err
}
return st.Dir(dir).File(
llb.Mkdir(pathString, fs.FileMode(mode)),
llb.WithCustomName(p.vertexNamef("Mkdir %s", pathString)),
), nil
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
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"
)
type Solver struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
solver/solver.go
|
opts Opts
eventsWg *sync.WaitGroup
closeCh chan *bk.SolveStatus
}
type Opts struct {
Control *bk.Client
Gateway bkgw.Client
Events chan *bk.SolveStatus
Auth *RegistryAuthProvider
SecretsStore SecretsStore
NoCache bool
}
func New(opts Opts) Solver {
return Solver{
eventsWg: &sync.WaitGroup{},
closeCh: make(chan *bk.SolveStatus),
opts: opts,
}
}
func invalidateCache(def *llb.Definition) error {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
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() {
close(s.closeCh)
s.eventsWg.Wait()
close(s.opts.Events)
}
func (s Solver) AddCredentials(target, username, secret string) {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
solver/solver.go
|
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, error) {
var image dockerfile2llb.Image
_, meta, err := s.opts.Gateway.ResolveImageConfig(ctx, ref, opts)
if err != nil {
return image, err
}
if err := json.Unmarshal(meta, &image); err != nil {
return image, err
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
solver/solver.go
|
return image, nil
}
func (s Solver) SolveRequest(ctx context.Context, req bkgw.SolveRequest) (*bkgw.Result, error) {
res, err := s.opts.Gateway.Solve(ctx, req)
if err != nil {
return nil, CleanError(err)
}
return res, nil
}
func (s Solver) Solve(ctx context.Context, st llb.State, platform specs.Platform) (bkgw.Reference, error) {
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,
Evaluate: true,
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
solver/solver.go
|
})
if err != nil {
return nil, err
}
return res.SingleRef()
}
func (s Solver) forwardEvents(ch chan *bk.SolveStatus) {
s.eventsWg.Add(1)
defer s.eventsWg.Done()
for event := range ch {
s.opts.Events <- event
}
}
func (s Solver) Export(ctx context.Context, st llb.State, img *dockerfile2llb.Image, output bk.ExportEntry) (*bk.SolveResponse, error) {
select {
case <-s.closeCh:
return nil, context.Canceled
default:
}
def, err := s.Marshal(ctx, st)
if err != nil {
return nil, err
}
opts := bk.SolveOpt{
Exports: []bk.ExportEntry{output},
Session: []session.Attachable{
s.opts.Auth,
s.opts.SecretsStore.Secrets,
NewDockerSocketProvider(),
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
solver/solver.go
|
},
}
ch := make(chan *bk.SolveStatus)
go s.forwardEvents(ch)
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
| 1,087 |
multi-arch support broke docker.#Push
|
Follow-up of merging https://github.com/dagger/dagger/pull/1074
On the todoapp example, it gives me this error on push.
<img width="944" alt="Screen Shot 2021-11-01 at 4 16 45 PM" src="https://user-images.githubusercontent.com/216487/139754301-32c429ef-d95e-47b0-9280-8bd0d6372da4.png">
Not sure the root cause since the docker.#Push hasn't change, it seems that the default arch is no more set on the pushed image.
|
https://github.com/dagger/dagger/issues/1087
|
https://github.com/dagger/dagger/pull/1089
|
954192118e563dc0b4b8215d5b2c0e7096ae3ab0
|
2cc3f9ad5a47f98181bb239566e9a158e9ff0145
| 2021-11-01T23:23:06Z |
go
| 2021-11-02T17:58:40Z |
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
| 823 |
[BUG] Windows version of 0.19 throw an error on dagger up
|
I have two environments:
-WSL
-Windows 10
I created an empty workspace (no .cue files), did dagger init and dagger new 'myworkplace'
Expected result:
```bash
user@laptop:/mnt/c/Users/user/.alefesta/dg-orig$ dagger up
1:46PM FTL system | failed to up environment: plan config: no CUE files in .
```
on WSL this works fine (Linux binary) on Windows I get:
```powershell
panic: illegal character U+0073 's' in escape sequence:
1:28
goroutine 44 [running]:
go.dagger.io/dagger/environment.(*Environment).LocalDirs(0xc000610560,
0x1f349a0)
/home/runner/work/dagger/dagger/environment/environment.go:174
+0x3e5
go.dagger.io/dagger/client.(*Client).buildfn(0xc000286630, 0x237f378, 0xc00046e600, 0xc000545810, 0xc000610560, 0xc0002aa378, 0xc00015a840, 0xc000396d20, 0xc0000c20e0)
/home/runner/work/dagger/dagger/client/client.go:102 +0xa6
go.dagger.io/dagger/client.(*Client).Do.func2(0xc000396ee0, 0xc0000c20e0)
/home/runner/work/dagger/dagger/client/client.go:92 +0x67
golang.org/x/sync/errgroup.(*Group).Go.func1(0xc0001b4270, 0xc00046e780)
/home/runner/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:57 +0x62
created by golang.org/x/sync/errgroup.(*Group).Go
/home/runner/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:54 +0x71
```
as per the image attached

|
https://github.com/dagger/dagger/issues/823
|
https://github.com/dagger/dagger/pull/1103
|
b956ed4d918a409bb6520aafe7fcec1b2b223dc6
|
23d488d4625bb83b9cb9bec4dcf537415e833924
| 2021-07-14T11:55:09Z |
go
| 2021-11-08T21:20:31Z |
state/input.go
|
package state
import (
"crypto/sha256"
"encoding/json"
"fmt"
"io/ioutil"
"os"
"path"
"path/filepath"
"strings"
"cuelang.org/go/cue"
"go.dagger.io/dagger/compiler"
)
type Input struct {
Dir *dirInput `yaml:"dir,omitempty"`
Git *gitInput `yaml:"git,omitempty"`
Docker *dockerInput `yaml:"docker,omitempty"`
Secret *secretInput `yaml:"secret,omitempty"`
Text *textInput `yaml:"text,omitempty"`
JSON *jsonInput `yaml:"json,omitempty"`
YAML *yamlInput `yaml:"yaml,omitempty"`
File *fileInput `yaml:"file,omitempty"`
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 823 |
[BUG] Windows version of 0.19 throw an error on dagger up
|
I have two environments:
-WSL
-Windows 10
I created an empty workspace (no .cue files), did dagger init and dagger new 'myworkplace'
Expected result:
```bash
user@laptop:/mnt/c/Users/user/.alefesta/dg-orig$ dagger up
1:46PM FTL system | failed to up environment: plan config: no CUE files in .
```
on WSL this works fine (Linux binary) on Windows I get:
```powershell
panic: illegal character U+0073 's' in escape sequence:
1:28
goroutine 44 [running]:
go.dagger.io/dagger/environment.(*Environment).LocalDirs(0xc000610560,
0x1f349a0)
/home/runner/work/dagger/dagger/environment/environment.go:174
+0x3e5
go.dagger.io/dagger/client.(*Client).buildfn(0xc000286630, 0x237f378, 0xc00046e600, 0xc000545810, 0xc000610560, 0xc0002aa378, 0xc00015a840, 0xc000396d20, 0xc0000c20e0)
/home/runner/work/dagger/dagger/client/client.go:102 +0xa6
go.dagger.io/dagger/client.(*Client).Do.func2(0xc000396ee0, 0xc0000c20e0)
/home/runner/work/dagger/dagger/client/client.go:92 +0x67
golang.org/x/sync/errgroup.(*Group).Go.func1(0xc0001b4270, 0xc00046e780)
/home/runner/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:57 +0x62
created by golang.org/x/sync/errgroup.(*Group).Go
/home/runner/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:54 +0x71
```
as per the image attached

|
https://github.com/dagger/dagger/issues/823
|
https://github.com/dagger/dagger/pull/1103
|
b956ed4d918a409bb6520aafe7fcec1b2b223dc6
|
23d488d4625bb83b9cb9bec4dcf537415e833924
| 2021-07-14T11:55:09Z |
go
| 2021-11-08T21:20:31Z |
state/input.go
|
Bool *boolInput `yaml:"bool,omitempty"`
Socket *socketInput `yaml:"socket,omitempty"`
}
func (i Input) Compile(key string, state *State) (*compiler.Value, error) {
switch {
case i.Dir != nil:
return i.Dir.Compile(key, state)
case i.Git != nil:
return i.Git.Compile(key, state)
case i.Docker != nil:
return i.Docker.Compile(key, state)
case i.Text != nil:
return i.Text.Compile(key, state)
case i.Secret != nil:
return i.Secret.Compile(key, state)
case i.JSON != nil:
return i.JSON.Compile(key, state)
case i.YAML != nil:
return i.YAML.Compile(key, state)
case i.File != nil:
return i.File.Compile(key, state)
case i.Bool != nil:
return i.Bool.Compile(key, state)
case i.Socket != nil:
return i.Socket.Compile(key, state)
default:
return nil, fmt.Errorf("input has not been set")
}
}
func DirInput(path string, include []string, exclude []string) Input {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 823 |
[BUG] Windows version of 0.19 throw an error on dagger up
|
I have two environments:
-WSL
-Windows 10
I created an empty workspace (no .cue files), did dagger init and dagger new 'myworkplace'
Expected result:
```bash
user@laptop:/mnt/c/Users/user/.alefesta/dg-orig$ dagger up
1:46PM FTL system | failed to up environment: plan config: no CUE files in .
```
on WSL this works fine (Linux binary) on Windows I get:
```powershell
panic: illegal character U+0073 's' in escape sequence:
1:28
goroutine 44 [running]:
go.dagger.io/dagger/environment.(*Environment).LocalDirs(0xc000610560,
0x1f349a0)
/home/runner/work/dagger/dagger/environment/environment.go:174
+0x3e5
go.dagger.io/dagger/client.(*Client).buildfn(0xc000286630, 0x237f378, 0xc00046e600, 0xc000545810, 0xc000610560, 0xc0002aa378, 0xc00015a840, 0xc000396d20, 0xc0000c20e0)
/home/runner/work/dagger/dagger/client/client.go:102 +0xa6
go.dagger.io/dagger/client.(*Client).Do.func2(0xc000396ee0, 0xc0000c20e0)
/home/runner/work/dagger/dagger/client/client.go:92 +0x67
golang.org/x/sync/errgroup.(*Group).Go.func1(0xc0001b4270, 0xc00046e780)
/home/runner/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:57 +0x62
created by golang.org/x/sync/errgroup.(*Group).Go
/home/runner/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:54 +0x71
```
as per the image attached

|
https://github.com/dagger/dagger/issues/823
|
https://github.com/dagger/dagger/pull/1103
|
b956ed4d918a409bb6520aafe7fcec1b2b223dc6
|
23d488d4625bb83b9cb9bec4dcf537415e833924
| 2021-07-14T11:55:09Z |
go
| 2021-11-08T21:20:31Z |
state/input.go
|
return Input{
Dir: &dirInput{
Path: path,
Include: include,
Exclude: exclude,
},
}
}
type dirInput struct {
Path string `yaml:"path,omitempty"`
Include []string `yaml:"include,omitempty"`
Exclude []string `yaml:"exclude,omitempty"`
}
func (dir dirInput) Compile(_ string, state *State) (*compiler.Value, error) {
includeLLB := []byte("[]")
if len(dir.Include) > 0 {
var err error
includeLLB, err = json.Marshal(dir.Include)
if err != nil {
return nil, err
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 823 |
[BUG] Windows version of 0.19 throw an error on dagger up
|
I have two environments:
-WSL
-Windows 10
I created an empty workspace (no .cue files), did dagger init and dagger new 'myworkplace'
Expected result:
```bash
user@laptop:/mnt/c/Users/user/.alefesta/dg-orig$ dagger up
1:46PM FTL system | failed to up environment: plan config: no CUE files in .
```
on WSL this works fine (Linux binary) on Windows I get:
```powershell
panic: illegal character U+0073 's' in escape sequence:
1:28
goroutine 44 [running]:
go.dagger.io/dagger/environment.(*Environment).LocalDirs(0xc000610560,
0x1f349a0)
/home/runner/work/dagger/dagger/environment/environment.go:174
+0x3e5
go.dagger.io/dagger/client.(*Client).buildfn(0xc000286630, 0x237f378, 0xc00046e600, 0xc000545810, 0xc000610560, 0xc0002aa378, 0xc00015a840, 0xc000396d20, 0xc0000c20e0)
/home/runner/work/dagger/dagger/client/client.go:102 +0xa6
go.dagger.io/dagger/client.(*Client).Do.func2(0xc000396ee0, 0xc0000c20e0)
/home/runner/work/dagger/dagger/client/client.go:92 +0x67
golang.org/x/sync/errgroup.(*Group).Go.func1(0xc0001b4270, 0xc00046e780)
/home/runner/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:57 +0x62
created by golang.org/x/sync/errgroup.(*Group).Go
/home/runner/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:54 +0x71
```
as per the image attached

|
https://github.com/dagger/dagger/issues/823
|
https://github.com/dagger/dagger/pull/1103
|
b956ed4d918a409bb6520aafe7fcec1b2b223dc6
|
23d488d4625bb83b9cb9bec4dcf537415e833924
| 2021-07-14T11:55:09Z |
go
| 2021-11-08T21:20:31Z |
state/input.go
|
}
}
excludeLLB := []byte("[]")
if len(dir.Exclude) > 0 {
var err error
excludeLLB, err = json.Marshal(dir.Exclude)
if err != nil {
return nil, err
}
}
p := dir.Path
if !filepath.IsAbs(p) {
p = filepath.Clean(path.Join(state.Project, dir.Path))
}
if !strings.HasPrefix(p, state.Project) {
return nil, fmt.Errorf("%q is outside the project", dir.Path)
}
if _, err := os.Stat(p); os.IsNotExist(err) {
return nil, fmt.Errorf("%q dir doesn't exist", dir.Path)
}
llb := fmt.Sprintf(
`#up: [{do:"local",dir:"%s", include:%s, exclude:%s}]`,
p,
includeLLB,
excludeLLB,
)
return compiler.Compile("", llb)
}
type gitInput struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 823 |
[BUG] Windows version of 0.19 throw an error on dagger up
|
I have two environments:
-WSL
-Windows 10
I created an empty workspace (no .cue files), did dagger init and dagger new 'myworkplace'
Expected result:
```bash
user@laptop:/mnt/c/Users/user/.alefesta/dg-orig$ dagger up
1:46PM FTL system | failed to up environment: plan config: no CUE files in .
```
on WSL this works fine (Linux binary) on Windows I get:
```powershell
panic: illegal character U+0073 's' in escape sequence:
1:28
goroutine 44 [running]:
go.dagger.io/dagger/environment.(*Environment).LocalDirs(0xc000610560,
0x1f349a0)
/home/runner/work/dagger/dagger/environment/environment.go:174
+0x3e5
go.dagger.io/dagger/client.(*Client).buildfn(0xc000286630, 0x237f378, 0xc00046e600, 0xc000545810, 0xc000610560, 0xc0002aa378, 0xc00015a840, 0xc000396d20, 0xc0000c20e0)
/home/runner/work/dagger/dagger/client/client.go:102 +0xa6
go.dagger.io/dagger/client.(*Client).Do.func2(0xc000396ee0, 0xc0000c20e0)
/home/runner/work/dagger/dagger/client/client.go:92 +0x67
golang.org/x/sync/errgroup.(*Group).Go.func1(0xc0001b4270, 0xc00046e780)
/home/runner/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:57 +0x62
created by golang.org/x/sync/errgroup.(*Group).Go
/home/runner/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:54 +0x71
```
as per the image attached

|
https://github.com/dagger/dagger/issues/823
|
https://github.com/dagger/dagger/pull/1103
|
b956ed4d918a409bb6520aafe7fcec1b2b223dc6
|
23d488d4625bb83b9cb9bec4dcf537415e833924
| 2021-07-14T11:55:09Z |
go
| 2021-11-08T21:20:31Z |
state/input.go
|
Remote string `yaml:"remote,omitempty"`
Ref string `yaml:"ref,omitempty"`
Dir string `yaml:"dir,omitempty"`
}
func GitInput(remote, ref, dir string) Input {
return Input{
Git: &gitInput{
Remote: remote,
Ref: ref,
Dir: dir,
},
}
}
func (git gitInput) Compile(_ string, _ *State) (*compiler.Value, error) {
ref := "HEAD"
if git.Ref != "" {
ref = git.Ref
}
dir := ""
if git.Dir != "" {
dir = fmt.Sprintf(`,{do:"subdir", dir:"%s"}`, git.Dir)
}
return compiler.Compile("", fmt.Sprintf(
`#up: [{do:"fetch-git", remote:"%s", ref:"%s"}%s]`,
git.Remote,
ref,
dir,
))
}
func DockerInput(ref string) Input {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 823 |
[BUG] Windows version of 0.19 throw an error on dagger up
|
I have two environments:
-WSL
-Windows 10
I created an empty workspace (no .cue files), did dagger init and dagger new 'myworkplace'
Expected result:
```bash
user@laptop:/mnt/c/Users/user/.alefesta/dg-orig$ dagger up
1:46PM FTL system | failed to up environment: plan config: no CUE files in .
```
on WSL this works fine (Linux binary) on Windows I get:
```powershell
panic: illegal character U+0073 's' in escape sequence:
1:28
goroutine 44 [running]:
go.dagger.io/dagger/environment.(*Environment).LocalDirs(0xc000610560,
0x1f349a0)
/home/runner/work/dagger/dagger/environment/environment.go:174
+0x3e5
go.dagger.io/dagger/client.(*Client).buildfn(0xc000286630, 0x237f378, 0xc00046e600, 0xc000545810, 0xc000610560, 0xc0002aa378, 0xc00015a840, 0xc000396d20, 0xc0000c20e0)
/home/runner/work/dagger/dagger/client/client.go:102 +0xa6
go.dagger.io/dagger/client.(*Client).Do.func2(0xc000396ee0, 0xc0000c20e0)
/home/runner/work/dagger/dagger/client/client.go:92 +0x67
golang.org/x/sync/errgroup.(*Group).Go.func1(0xc0001b4270, 0xc00046e780)
/home/runner/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:57 +0x62
created by golang.org/x/sync/errgroup.(*Group).Go
/home/runner/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:54 +0x71
```
as per the image attached

|
https://github.com/dagger/dagger/issues/823
|
https://github.com/dagger/dagger/pull/1103
|
b956ed4d918a409bb6520aafe7fcec1b2b223dc6
|
23d488d4625bb83b9cb9bec4dcf537415e833924
| 2021-07-14T11:55:09Z |
go
| 2021-11-08T21:20:31Z |
state/input.go
|
return Input{
Docker: &dockerInput{
Ref: ref,
},
}
}
type dockerInput struct {
Ref string `yaml:"ref,omitempty"`
}
func (i dockerInput) Compile(_ string, _ *State) (*compiler.Value, error) {
panic("NOT IMPLEMENTED")
}
func TextInput(data string) Input {
i := textInput(data)
return Input{
Text: &i,
}
}
type textInput string
func (i textInput) Compile(_ string, _ *State) (*compiler.Value, error) {
return compiler.Compile("", fmt.Sprintf("%q", i))
}
func SecretInput(data string) Input {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 823 |
[BUG] Windows version of 0.19 throw an error on dagger up
|
I have two environments:
-WSL
-Windows 10
I created an empty workspace (no .cue files), did dagger init and dagger new 'myworkplace'
Expected result:
```bash
user@laptop:/mnt/c/Users/user/.alefesta/dg-orig$ dagger up
1:46PM FTL system | failed to up environment: plan config: no CUE files in .
```
on WSL this works fine (Linux binary) on Windows I get:
```powershell
panic: illegal character U+0073 's' in escape sequence:
1:28
goroutine 44 [running]:
go.dagger.io/dagger/environment.(*Environment).LocalDirs(0xc000610560,
0x1f349a0)
/home/runner/work/dagger/dagger/environment/environment.go:174
+0x3e5
go.dagger.io/dagger/client.(*Client).buildfn(0xc000286630, 0x237f378, 0xc00046e600, 0xc000545810, 0xc000610560, 0xc0002aa378, 0xc00015a840, 0xc000396d20, 0xc0000c20e0)
/home/runner/work/dagger/dagger/client/client.go:102 +0xa6
go.dagger.io/dagger/client.(*Client).Do.func2(0xc000396ee0, 0xc0000c20e0)
/home/runner/work/dagger/dagger/client/client.go:92 +0x67
golang.org/x/sync/errgroup.(*Group).Go.func1(0xc0001b4270, 0xc00046e780)
/home/runner/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:57 +0x62
created by golang.org/x/sync/errgroup.(*Group).Go
/home/runner/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:54 +0x71
```
as per the image attached

|
https://github.com/dagger/dagger/issues/823
|
https://github.com/dagger/dagger/pull/1103
|
b956ed4d918a409bb6520aafe7fcec1b2b223dc6
|
23d488d4625bb83b9cb9bec4dcf537415e833924
| 2021-07-14T11:55:09Z |
go
| 2021-11-08T21:20:31Z |
state/input.go
|
i := secretInput(data)
return Input{
Secret: &i,
}
}
type secretInput string
func (i secretInput) Compile(key string, _ *State) (*compiler.Value, error) {
hash := sha256.New()
hash.Write([]byte(key))
checksum := hash.Sum([]byte(i.PlainText()))
secretValue := fmt.Sprintf(`{id:"secret=%s;hash=%x"}`, key, checksum)
return compiler.Compile("", secretValue)
}
func (i secretInput) PlainText() string {
return string(i)
}
func BoolInput(data string) Input {
i := boolInput(data)
return Input{
Bool: &i,
}
}
type boolInput string
func (i boolInput) Compile(_ string, _ *State) (*compiler.Value, error) {
s := map[boolInput]struct{}{
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 823 |
[BUG] Windows version of 0.19 throw an error on dagger up
|
I have two environments:
-WSL
-Windows 10
I created an empty workspace (no .cue files), did dagger init and dagger new 'myworkplace'
Expected result:
```bash
user@laptop:/mnt/c/Users/user/.alefesta/dg-orig$ dagger up
1:46PM FTL system | failed to up environment: plan config: no CUE files in .
```
on WSL this works fine (Linux binary) on Windows I get:
```powershell
panic: illegal character U+0073 's' in escape sequence:
1:28
goroutine 44 [running]:
go.dagger.io/dagger/environment.(*Environment).LocalDirs(0xc000610560,
0x1f349a0)
/home/runner/work/dagger/dagger/environment/environment.go:174
+0x3e5
go.dagger.io/dagger/client.(*Client).buildfn(0xc000286630, 0x237f378, 0xc00046e600, 0xc000545810, 0xc000610560, 0xc0002aa378, 0xc00015a840, 0xc000396d20, 0xc0000c20e0)
/home/runner/work/dagger/dagger/client/client.go:102 +0xa6
go.dagger.io/dagger/client.(*Client).Do.func2(0xc000396ee0, 0xc0000c20e0)
/home/runner/work/dagger/dagger/client/client.go:92 +0x67
golang.org/x/sync/errgroup.(*Group).Go.func1(0xc0001b4270, 0xc00046e780)
/home/runner/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:57 +0x62
created by golang.org/x/sync/errgroup.(*Group).Go
/home/runner/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:54 +0x71
```
as per the image attached

|
https://github.com/dagger/dagger/issues/823
|
https://github.com/dagger/dagger/pull/1103
|
b956ed4d918a409bb6520aafe7fcec1b2b223dc6
|
23d488d4625bb83b9cb9bec4dcf537415e833924
| 2021-07-14T11:55:09Z |
go
| 2021-11-08T21:20:31Z |
state/input.go
|
"true": {},
"false": {},
}
if _, ok := s[i]; ok {
return compiler.DecodeJSON("", []byte(i))
}
return nil, fmt.Errorf("%q is not a valid boolean: <true|false>", i)
}
func JSONInput(data string) Input {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 823 |
[BUG] Windows version of 0.19 throw an error on dagger up
|
I have two environments:
-WSL
-Windows 10
I created an empty workspace (no .cue files), did dagger init and dagger new 'myworkplace'
Expected result:
```bash
user@laptop:/mnt/c/Users/user/.alefesta/dg-orig$ dagger up
1:46PM FTL system | failed to up environment: plan config: no CUE files in .
```
on WSL this works fine (Linux binary) on Windows I get:
```powershell
panic: illegal character U+0073 's' in escape sequence:
1:28
goroutine 44 [running]:
go.dagger.io/dagger/environment.(*Environment).LocalDirs(0xc000610560,
0x1f349a0)
/home/runner/work/dagger/dagger/environment/environment.go:174
+0x3e5
go.dagger.io/dagger/client.(*Client).buildfn(0xc000286630, 0x237f378, 0xc00046e600, 0xc000545810, 0xc000610560, 0xc0002aa378, 0xc00015a840, 0xc000396d20, 0xc0000c20e0)
/home/runner/work/dagger/dagger/client/client.go:102 +0xa6
go.dagger.io/dagger/client.(*Client).Do.func2(0xc000396ee0, 0xc0000c20e0)
/home/runner/work/dagger/dagger/client/client.go:92 +0x67
golang.org/x/sync/errgroup.(*Group).Go.func1(0xc0001b4270, 0xc00046e780)
/home/runner/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:57 +0x62
created by golang.org/x/sync/errgroup.(*Group).Go
/home/runner/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:54 +0x71
```
as per the image attached

|
https://github.com/dagger/dagger/issues/823
|
https://github.com/dagger/dagger/pull/1103
|
b956ed4d918a409bb6520aafe7fcec1b2b223dc6
|
23d488d4625bb83b9cb9bec4dcf537415e833924
| 2021-07-14T11:55:09Z |
go
| 2021-11-08T21:20:31Z |
state/input.go
|
i := jsonInput(data)
return Input{
JSON: &i,
}
}
type jsonInput string
func (i jsonInput) Compile(_ string, _ *State) (*compiler.Value, error) {
return compiler.DecodeJSON("", []byte(i))
}
func YAMLInput(data string) Input {
i := yamlInput(data)
return Input{
YAML: &i,
}
}
type yamlInput string
func (i yamlInput) Compile(_ string, _ *State) (*compiler.Value, error) {
return compiler.DecodeYAML("", []byte(i))
}
func FileInput(data string) Input {
return Input{
File: &fileInput{
Path: data,
},
}
}
type fileInput struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 823 |
[BUG] Windows version of 0.19 throw an error on dagger up
|
I have two environments:
-WSL
-Windows 10
I created an empty workspace (no .cue files), did dagger init and dagger new 'myworkplace'
Expected result:
```bash
user@laptop:/mnt/c/Users/user/.alefesta/dg-orig$ dagger up
1:46PM FTL system | failed to up environment: plan config: no CUE files in .
```
on WSL this works fine (Linux binary) on Windows I get:
```powershell
panic: illegal character U+0073 's' in escape sequence:
1:28
goroutine 44 [running]:
go.dagger.io/dagger/environment.(*Environment).LocalDirs(0xc000610560,
0x1f349a0)
/home/runner/work/dagger/dagger/environment/environment.go:174
+0x3e5
go.dagger.io/dagger/client.(*Client).buildfn(0xc000286630, 0x237f378, 0xc00046e600, 0xc000545810, 0xc000610560, 0xc0002aa378, 0xc00015a840, 0xc000396d20, 0xc0000c20e0)
/home/runner/work/dagger/dagger/client/client.go:102 +0xa6
go.dagger.io/dagger/client.(*Client).Do.func2(0xc000396ee0, 0xc0000c20e0)
/home/runner/work/dagger/dagger/client/client.go:92 +0x67
golang.org/x/sync/errgroup.(*Group).Go.func1(0xc0001b4270, 0xc00046e780)
/home/runner/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:57 +0x62
created by golang.org/x/sync/errgroup.(*Group).Go
/home/runner/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:54 +0x71
```
as per the image attached

|
https://github.com/dagger/dagger/issues/823
|
https://github.com/dagger/dagger/pull/1103
|
b956ed4d918a409bb6520aafe7fcec1b2b223dc6
|
23d488d4625bb83b9cb9bec4dcf537415e833924
| 2021-07-14T11:55:09Z |
go
| 2021-11-08T21:20:31Z |
state/input.go
|
Path string `json:"data,omitempty"`
}
func (i fileInput) Compile(_ string, _ *State) (*compiler.Value, error) {
data, err := ioutil.ReadFile(i.Path)
if err != nil {
return nil, err
}
value := compiler.NewValue()
if err := value.FillPath(cue.MakePath(), data); err != nil {
return nil, err
}
return value, nil
}
func SocketInput(data string) Input {
i := socketInput{
Unix: data,
}
return Input{
Socket: &i,
}
}
type socketInput struct {
Unix string `json:"unix,omitempty"`
}
func (i socketInput) Compile(_ string, _ *State) (*compiler.Value, error) {
socketValue := fmt.Sprintf(`{unix: %q}`, i.Unix)
return compiler.Compile("", socketValue)
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 1,111 |
Support `input stream` on Windows
|
Currently, most examples work out of the box on Windows, unless the config requires access to the local docker socket (eg. "Getting started" from the docs).
We need to implement npipe support for Windows so the client can proxy `\\.\pipe\docker_engine` (host) to `/var/run/docker.sock` (WSL).
This last change should unblock all windows users with a decent support as soon as it's released.
Assigning to myself.
|
https://github.com/dagger/dagger/issues/1111
|
https://github.com/dagger/dagger/pull/1112
|
2d371ca32b8ecf2569e6b10456be6252360e7cb1
|
8ffee8922eeff3de6b5faf6c4c51c96839890586
| 2021-11-08T23:10:41Z |
go
| 2021-11-09T02:06:50Z |
cmd/dagger/cmd/input/socket.go
|
package input
import (
"os"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"go.dagger.io/dagger/cmd/dagger/logger"
"go.dagger.io/dagger/state"
)
var socketCmd = &cobra.Command{
Use: "socket <TARGET> <UNIX path>",
Short: "Add a socket input",
Args: cobra.ExactArgs(2),
PreRun: func(cmd *cobra.Command, args []string) {
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.