Coder Social home page Coder Social logo

cuebe's Issues

[HELP] Windows test

I add to skip a lot of tests related to io/fs, especially tighten to Context.
I currently do not have any Windows machine available so if someone wants to tackle that that would be helpful.

[BUG] apply context fail if it's an incorrect CUE path

Describe the bug

apply context fail if it's an incorrect CUE path

To Reproduce

Steps

cuebe apply -e release -c kube-context

Expected behavior

Try to apply to "kube-context" context

Actual behavior

Error: Failed to buid release: failed to build release: failed to extract kubernetes context: invalid label kube-context

Versions

> cuebe version
Version:	dev			
Go version:	go1.17.2		
Git commit:	ede20df			
Built:		Mon Nov 15 13:52:43 2021
OS/Arch:	darwin/amd64

Additional context

[FEAT] Stop cuebe from rendering manifests when ignore attribute has been set

Is your feature request related to a problem? Please describe.
When I want something to be excluded, cuebe still tries to render the structure, yes it won't produce manifests BUT if
I'm trying to troubleshoot something specific and want to exclude something else to keep thing simple or avoid useless noise, or if I'm surrounded by bugs everywhere and would like to focus on just one thing, I wish we had the capability to stop cuebe from rendering manifests (before even extract).

I actually don't know exactly when the unification and checks for concrete values happen in the code.

Describe the solution you'd like
Either by default or enabled by a command line arg?

[FEAT] Release cycle management

Is your feature request related to a problem? Please describe.

As for now cuebe is only able to create or patch resources. It cannot detect a resource deletion in the release. In order to fully manage release lifecycle, we need a way to detect every drifts.

Describe the solution you'd like

This solution should only rely on tools already present. So Go SDK and a Kubernetes cluster.
We should also avoid messing with the cluster state. The less object we have to create, the better.

Additional context

This is an open discussion before actually implementing a solution.

[BUG] cuebe terminate with segmentation fault when it can't connect to kubernetes

Describe the bug

When I can't reach the kubernetes control plane, cuebe exits with a SIGSEGV:

cuebe apply -t debug -c release.context
Deploying to https://<redacted>...
E1119 15:14:30.773987   60333 memcache.go:179] couldn't get current server API group list: Get "https://<redacted>/api?timeout=32s": net/http: TLS handshake timeout
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x1f2c1ad]

goroutine 1 [running]:
github.com/loft-orbital/cuebe/internal/kubernetes.(*Release).Deploy(0xc0007e4e00, {0x2931bf0, 0xc0001a2000}, 0x0)
        github.com/loft-orbital/cuebe/internal/kubernetes/release.go:136 +0x60d
github.com/loft-orbital/cuebe/cmd/cuebe/cmd.applyRun(0xc000231ef0)
        github.com/loft-orbital/cuebe/cmd/cuebe/cmd/apply.go:155 +0x23c
github.com/loft-orbital/cuebe/cmd/cuebe/cmd.applyCmd(0xc000377900, {0xc000338240, 0x4, 0x4})
        github.com/loft-orbital/cuebe/cmd/cuebe/cmd/apply.go:77 +0x45
github.com/spf13/cobra.(*Command).execute(0xc000377900, {0xc000338200, 0x4, 0x4})
        github.com/spf13/[email protected]/command.go:860 +0x5f8
github.com/spf13/cobra.(*Command).ExecuteC(0x3649a00)
        github.com/spf13/[email protected]/command.go:974 +0x3bc
github.com/spf13/cobra.(*Command).Execute(...)
        github.com/spf13/[email protected]/command.go:902
github.com/loft-orbital/cuebe/cmd/cuebe/cmd.Execute()
        github.com/loft-orbital/cuebe/cmd/cuebe/cmd/root.go:39 +0x25
main.main()
        ./main.go:21 +0x17

To Reproduce

Get your targeted Kubernetes cluster out of reach, run cuebe.

Expected behavior
Should terminate gracefully, giving hints of why it could not run properly.

Actual behavior
Terminates and should a SIGSEGV error

Versions

cuebe version
Version:        dev
Go version:     go1.17.2
Git commit:     ede20df
Built:          Thu Nov 18 14:31:59 2021
OS/Arch:        darwin/amd64%

[FEAT] Exclude/Include part of the release

It might come handy to able to exclude one part of the release, like releasing everything except release.manifests.myns.Deployment or to be able to set -e multiple times. this way, an operator could do partial release if the need arise.

[HELP]

When running a cuebe apply just after a cuebe delete, the resources continue their termination and the apply command is not taken into account

A way to test :

cuebe delete -t test -e devstack.services.asset . ./deploy/gcp/dev/ -c gke-dev --dry-run

cuebe apply -t test -e devstack.services.asset . ./deploy/gcp/dev/ -c gke-dev --dry-run

Or

When re-applying a service while not all resources have been created yet, seems like the apply is not taken into account. (Mostly occurred when pods on crashloop)

[FEAT] Plain text injection

Is your feature request related to a problem? Please describe.

Cuebe always parses file when injecting value via @inject attribute.

Describe the solution you'd like

When using @Inject attribute targeting a string with root (or no) path attribute, cuebe should inject the file as plain text.

Additional context

[BUG] Concurrent map writes when vendoring

Describe the bug

fatal error: concurrent map writes

goroutine 15 [running]:
runtime.throw({0x2b85ec4, 0xc0000be1b8})
        /opt/local/lib/go/src/runtime/panic.go:1198 +0x71 fp=0xc000543ac0 sp=0xc000543a90 pc=0x1035631
runtime.mapassign_fast64ptr(0x0, 0x0, 0xc000622000)
        /opt/local/lib/go/src/runtime/map_fast64.go:191 +0x2dc fp=0xc000543af8 sp=0xc000543ac0 pc=0x10130fc
cuelang.org/go/internal/core/runtime.(*Runtime).AddInst(...)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/internal/core/runtime/imports.go:95
cuelang.org/go/internal/core/runtime.(*Runtime).Build(0xc00050e0f0, 0xc000543c98, 0xc00061e000)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/internal/core/runtime/build.go:85 +0x42f fp=0xc000543bc8 sp=0xc000543af8 pc=0x12676ef
cuelang.org/go/internal/core/runtime.(*Runtime).CompileFile(0xc00050e0f0, 0xc000543c98, 0xc0000ba240)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/internal/core/runtime/build.go:118 +0x145 fp=0xc000543c18 sp=0xc000543bc8 pc=0x1267be5
cuelang.org/go/cue.(*Context).BuildFile(0xc0001ca000, 0xc0001ca000, {0x0, 0x0, 0x0})
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/cue/context.go:158 +0x8a fp=0xc000543cf8 sp=0xc000543c18 pc=0x129b28a
github.com/loft-orbital/cuebe/pkg/modfile.Parse({0xc0001ca000, 0x0})
        /Users/banst/go/pkg/mod/github.com/loft-orbital/[email protected]/pkg/modfile/parse.go:33 +0x11b fp=0xc000543d90 sp=0xc000543cf8 pc=0x257a49b
github.com/loft-orbital/cuebe/internal/mod.GetReqs({0x2f7a980, 0xc00035e500})
        /Users/banst/go/pkg/mod/github.com/loft-orbital/[email protected]/internal/mod/get.go:56 +0x74 fp=0xc000543df8 sp=0xc000543d90 pc=0x2691834
github.com/loft-orbital/cuebe/internal/mod.ModReqs.Required({{0xc0007f4801, 0x33}, {0xc0005232c0, 0xa, 0xa}}, {{0xc0000dca01, 0x0}, {0xc0001b1261, 0x0}})
        /Users/banst/go/pkg/mod/github.com/loft-orbital/[email protected]/internal/mod/mvs.go:105 +0x196 fp=0xc000543ea0 sp=0xc000543df8 pc=0x2693ab6
github.com/loft-orbital/cuebe/internal/mod.(*ModReqs).Required(0xc00089bbc0, {{0xc0000dca01, 0x0}, {0xc0001b1261, 0x0}})
        <autogenerated>:1 +0x96 fp=0xc000543f20 sp=0xc000543ea0 pc=0x2694ab6
github.com/loft-orbital/cuebe/internal/mvs.buildWorker.func1()
        /Users/banst/go/pkg/mod/github.com/loft-orbital/[email protected]/internal/mvs/mvs.go:97 +0x4f fp=0xc000543f78 sp=0xc000543f20 pc=0x269020f
golang.org/x/sync/errgroup.(*Group).Go.func1()
        /Users/banst/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:57 +0x67 fp=0xc000543fe0 sp=0xc000543f78 pc=0x268f4a7
runtime.goexit()
        /opt/local/lib/go/src/runtime/asm_amd64.s:1581 +0x1 fp=0xc000543fe8 sp=0xc000543fe0 pc=0x10658e1
created by golang.org/x/sync/errgroup.(*Group).Go
        /Users/banst/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:54 +0x92

goroutine 1 [select]:
github.com/loft-orbital/cuebe/internal/mvs.BuildList({{0xc0007f4801, 0xc00089bbc0}, {0x0, 0x3fa5480}}, {0x2f18e38, 0xc00089bbc0})
        /Users/banst/go/pkg/mod/github.com/loft-orbital/[email protected]/internal/mvs/mvs.go:64 +0x6ba
github.com/loft-orbital/cuebe/internal/mod.(*Module).Vendor(0xc0000df240)
        /Users/banst/go/pkg/mod/github.com/loft-orbital/[email protected]/internal/mod/mvs.go:61 +0x50
github.com/loft-orbital/cuebe/cmd/cuebe/cmd/mod.vendorRun(0x0)
        /Users/banst/go/pkg/mod/github.com/loft-orbital/[email protected]/cmd/cuebe/cmd/mod/vendor.go:64 +0x6d
github.com/loft-orbital/cuebe/cmd/cuebe/cmd/mod.vendorCmd(0xc000a40f00, {0x3fd8dc8, 0x0, 0x0})
        /Users/banst/go/pkg/mod/github.com/loft-orbital/[email protected]/cmd/cuebe/cmd/mod/vendor.go:47 +0x4f
github.com/spf13/cobra.(*Command).execute(0xc000a40f00, {0x3fd8dc8, 0x0, 0x0})
        /Users/banst/go/pkg/mod/github.com/spf13/[email protected]/command.go:871 +0x5f8
github.com/spf13/cobra.(*Command).ExecuteC(0x3f8a5c0)
        /Users/banst/go/pkg/mod/github.com/spf13/[email protected]/command.go:985 +0x3bc
github.com/spf13/cobra.(*Command).Execute(...)
        /Users/banst/go/pkg/mod/github.com/spf13/[email protected]/command.go:913
github.com/loft-orbital/cuebe/cmd/cuebe/cmd.Execute()
        /Users/banst/go/pkg/mod/github.com/loft-orbital/[email protected]/cmd/cuebe/cmd/root.go:46 +0x25
main.main()
        /Users/banst/go/pkg/mod/github.com/loft-orbital/[email protected]/cmd/cuebe/main.go:25 +0x17

goroutine 20 [chan receive]:
github.com/golang/glog.(*loggingT).flushDaemon(0xc0001f8a80)
        /Users/banst/go/pkg/mod/github.com/golang/[email protected]/glog.go:882 +0x6a
created by github.com/golang/glog.init.0
        /Users/banst/go/pkg/mod/github.com/golang/[email protected]/glog.go:410 +0x1c5

goroutine 21 [chan receive]:
k8s.io/klog/v2.(*loggingT).flushDaemon(0x0)
        /Users/banst/go/pkg/mod/k8s.io/klog/[email protected]/klog.go:1181 +0x6a
created by k8s.io/klog/v2.init.0
        /Users/banst/go/pkg/mod/k8s.io/klog/[email protected]/klog.go:420 +0xfb

goroutine 9 [select]:
go.opencensus.io/stats/view.(*worker).start(0xc00087d300)
        /Users/banst/go/pkg/mod/[email protected]/stats/view/worker.go:276 +0xb9
created by go.opencensus.io/stats/view.init.0
        /Users/banst/go/pkg/mod/[email protected]/stats/view/worker.go:34 +0x92

goroutine 13 [runnable]:
cuelang.org/go/internal/core/adt.(*nodeContext).expandDisjuncts(0xc0000f0380, 0x5, 0xc0000f0380, 0x0, 0x0, 0x1)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/internal/core/adt/disjunct.go:121 +0x1b05
cuelang.org/go/internal/core/adt.(*OpContext).Unify(0xc0000e0270, 0xc000784120, 0x5)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/internal/core/adt/eval.go:281 +0x997
cuelang.org/go/internal/core/adt.(*nodeContext).completeArcs(0xc0000f0000, 0x5)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/internal/core/adt/eval.go:669 +0x4b9
cuelang.org/go/internal/core/adt.(*nodeContext).postDisjunct(0xc0000f0000, 0x5)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/internal/core/adt/eval.go:565 +0x7b0
cuelang.org/go/internal/core/adt.(*nodeContext).expandDisjuncts(0xc0000f0000, 0xb4, 0xc0000f0000, 0x0, 0x0, 0x1)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/internal/core/adt/disjunct.go:151 +0x385
cuelang.org/go/internal/core/adt.(*OpContext).Unify(0xc0000e0270, 0xc000784000, 0x5)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/internal/core/adt/eval.go:281 +0x997
cuelang.org/go/internal/core/adt.(*Vertex).Finalize(...)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/internal/core/adt/composite.go:445
cuelang.org/go/cue.newVertexRoot(0x45621d8, 0xc0000e0270, 0xc00007a900)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/cue/types.go:615 +0x69
cuelang.org/go/cue.newValueRoot(0x2f4e538, 0xc0000bc0c0, {0x2f4e4b8, 0xc000784000})
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/cue/types.go:624 +0x4d
cuelang.org/go/cue.(*Context).make(0xc0000bc0c0, 0xc0004c6390)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/cue/context.go:246 +0x57
cuelang.org/go/cue.(*Context).compile(0xc0000bc0c0, 0xc0000ebc98, 0xc000102360)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/cue/context.go:165 +0x3e
cuelang.org/go/cue.(*Context).BuildFile(0xc0000da000, 0xc0000da000, {0x0, 0x0, 0x0})
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/cue/context.go:158 +0x9a
github.com/loft-orbital/cuebe/pkg/modfile.Parse({0xc0000da000, 0x0})
        /Users/banst/go/pkg/mod/github.com/loft-orbital/[email protected]/pkg/modfile/parse.go:33 +0x11b
github.com/loft-orbital/cuebe/internal/mod.GetReqs({0x2f7a980, 0xc00081e040})
        /Users/banst/go/pkg/mod/github.com/loft-orbital/[email protected]/internal/mod/get.go:56 +0x74
github.com/loft-orbital/cuebe/internal/mod.ModReqs.Required({{0xc0007f4801, 0x33}, {0xc0005232c0, 0xa, 0xa}}, {{0xc0000dc871, 0xc0000cd6f8}, {0xc0001b1231, 0xc0000cd710}})
        /Users/banst/go/pkg/mod/github.com/loft-orbital/[email protected]/internal/mod/mvs.go:105 +0x196
github.com/loft-orbital/cuebe/internal/mvs.buildWorker.func1()
        /Users/banst/go/pkg/mod/github.com/loft-orbital/[email protected]/internal/mvs/mvs.go:97 +0x4f
golang.org/x/sync/errgroup.(*Group).Go.func1()
        /Users/banst/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:57 +0x67
created by golang.org/x/sync/errgroup.(*Group).Go
        /Users/banst/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:54 +0x92

goroutine 14 [runnable]:
cuelang.org/go/internal/core/adt.(*nodeContext).expandDisjuncts(0xc0003bca80, 0x5, 0xc0003bca80, 0x0, 0x0, 0x1)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/internal/core/adt/disjunct.go:121 +0x1b05
cuelang.org/go/internal/core/adt.(*OpContext).Unify(0xc000032ea0, 0xc000a72bd0, 0x5)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/internal/core/adt/eval.go:281 +0x997
cuelang.org/go/internal/core/adt.(*nodeContext).completeArcs(0xc0003bc700, 0x5)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/internal/core/adt/eval.go:669 +0x4b9
cuelang.org/go/internal/core/adt.(*nodeContext).postDisjunct(0xc0003bc700, 0x5)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/internal/core/adt/eval.go:565 +0x7b0
cuelang.org/go/internal/core/adt.(*nodeContext).expandDisjuncts(0xc0003bc700, 0xb4, 0xc0003bc700, 0x0, 0x0, 0x1)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/internal/core/adt/disjunct.go:151 +0x385
cuelang.org/go/internal/core/adt.(*OpContext).Unify(0xc000032ea0, 0xc000a72ab0, 0x5)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/internal/core/adt/eval.go:281 +0x997
cuelang.org/go/internal/core/adt.(*Vertex).Finalize(...)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/internal/core/adt/composite.go:445
cuelang.org/go/cue.newVertexRoot(0x4560108, 0xc000032ea0, 0x3fa5480)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/cue/types.go:615 +0x69
cuelang.org/go/cue.newValueRoot(0x2f4e538, 0xc0008d7a00, {0x2f4e4b8, 0xc000a72ab0})
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/cue/types.go:624 +0x4d
cuelang.org/go/cue.(*Context).make(0xc0008d7a00, 0xc00089bd40)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/cue/context.go:246 +0x57
cuelang.org/go/cue.(*Context).compile(0xc0008d7a00, 0xc00072dc98, 0xc0004fcf00)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/cue/context.go:165 +0x3e
cuelang.org/go/cue.(*Context).BuildFile(0xc00005e780, 0xc00005e780, {0x0, 0x0, 0x0})
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/cue/context.go:158 +0x9a
github.com/loft-orbital/cuebe/pkg/modfile.Parse({0xc00005e780, 0x0})
        /Users/banst/go/pkg/mod/github.com/loft-orbital/[email protected]/pkg/modfile/parse.go:33 +0x11b
github.com/loft-orbital/cuebe/internal/mod.GetReqs({0x2f7a980, 0xc0007bc780})
        /Users/banst/go/pkg/mod/github.com/loft-orbital/[email protected]/internal/mod/get.go:56 +0x74
github.com/loft-orbital/cuebe/internal/mod.ModReqs.Required({{0xc0007f4801, 0x33}, {0xc0005232c0, 0xa, 0xa}}, {{0xc0000dc911, 0x0}, {0xc0001b1248, 0x0}})
        /Users/banst/go/pkg/mod/github.com/loft-orbital/[email protected]/internal/mod/mvs.go:105 +0x196
github.com/loft-orbital/cuebe/internal/mvs.buildWorker.func1()
        /Users/banst/go/pkg/mod/github.com/loft-orbital/[email protected]/internal/mvs/mvs.go:97 +0x4f
golang.org/x/sync/errgroup.(*Group).Go.func1()
        /Users/banst/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:57 +0x67
created by golang.org/x/sync/errgroup.(*Group).Go
        /Users/banst/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:54 +0x92

goroutine 16 [runnable]:
cuelang.org/go/internal/core/adt.MakeConjunct(0xc0002ffcc0, {0x2f129e8, 0xc0005361c0}, {0x0, 0x0, 0x0})
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/internal/core/adt/composite.go:769 +0x1ea
cuelang.org/go/internal/core/adt.(*nodeContext).addStruct(0xc000552700, 0xc0002ffbd0, 0xc0005501b0, {0x0, 0x0, 0x0})
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/internal/core/adt/eval.go:1778 +0x4a5
cuelang.org/go/internal/core/adt.(*nodeContext).addExprConjunct(0xc000552700, {0xc0002ffbd0, {0x2f12d08, 0xc0005501b0}, {0x0, 0x0, 0x0}})
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/internal/core/adt/eval.go:1188 +0x210
cuelang.org/go/internal/core/adt.(*nodeContext).insertConjuncts(0xc000552700)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/internal/core/adt/eval.go:367 +0xdb
cuelang.org/go/internal/core/adt.(*OpContext).Unify(0xc000532270, 0xc000550480, 0x5)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/internal/core/adt/eval.go:227 +0x2fc
cuelang.org/go/internal/core/adt.(*nodeContext).completeArcs(0xc000552380, 0x5)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/internal/core/adt/eval.go:669 +0x4b9
cuelang.org/go/internal/core/adt.(*nodeContext).postDisjunct(0xc000552380, 0x5)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/internal/core/adt/eval.go:565 +0x7b0
cuelang.org/go/internal/core/adt.(*nodeContext).expandDisjuncts(0xc000552380, 0xf0, 0xc000552380, 0x0, 0x0, 0x1)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/internal/core/adt/disjunct.go:151 +0x385
cuelang.org/go/internal/core/adt.(*OpContext).Unify(0xc000532270, 0xc0005502d0, 0x5)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/internal/core/adt/eval.go:281 +0x997
cuelang.org/go/internal/core/adt.(*nodeContext).completeArcs(0xc000552000, 0x5)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/internal/core/adt/eval.go:669 +0x4b9
cuelang.org/go/internal/core/adt.(*nodeContext).postDisjunct(0xc000552000, 0x5)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/internal/core/adt/eval.go:565 +0x7b0
cuelang.org/go/internal/core/adt.(*nodeContext).expandDisjuncts(0xc000552000, 0xb4, 0xc000552000, 0x0, 0x0, 0x1)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/internal/core/adt/disjunct.go:151 +0x385
cuelang.org/go/internal/core/adt.(*OpContext).Unify(0xc000532270, 0xc000550000, 0x5)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/internal/core/adt/eval.go:281 +0x997
cuelang.org/go/internal/core/adt.(*Vertex).Finalize(...)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/internal/core/adt/composite.go:445
cuelang.org/go/cue.newVertexRoot(0x4560a68, 0xc000532270, 0xc000600000)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/cue/types.go:615 +0x69
cuelang.org/go/cue.newValueRoot(0x2f4e538, 0xc000836060, {0x2f4e4b8, 0xc000550000})
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/cue/types.go:624 +0x4d
cuelang.org/go/cue.(*Context).make(0xc000836060, 0xc000348330)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/cue/context.go:246 +0x57
cuelang.org/go/cue.(*Context).compile(0xc000836060, 0xc000547c98, 0xc000794120)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/cue/context.go:165 +0x3e
cuelang.org/go/cue.(*Context).BuildFile(0xc00053a000, 0xc00053a000, {0x0, 0x0, 0x0})
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/cue/context.go:158 +0x9a
github.com/loft-orbital/cuebe/pkg/modfile.Parse({0xc00053a000, 0x0})
        /Users/banst/go/pkg/mod/github.com/loft-orbital/[email protected]/pkg/modfile/parse.go:33 +0x11b
github.com/loft-orbital/cuebe/internal/mod.GetReqs({0x2f7a980, 0xc000536040})
        /Users/banst/go/pkg/mod/github.com/loft-orbital/[email protected]/internal/mod/get.go:56 +0x74
github.com/loft-orbital/cuebe/internal/mod.ModReqs.Required({{0xc0007f4801, 0x33}, {0xc0005232c0, 0xa, 0xa}}, {{0xc0007f4881, 0x0}, {0xc0001b1279, 0x0}})
        /Users/banst/go/pkg/mod/github.com/loft-orbital/[email protected]/internal/mod/mvs.go:105 +0x196
github.com/loft-orbital/cuebe/internal/mvs.buildWorker.func1()
        /Users/banst/go/pkg/mod/github.com/loft-orbital/[email protected]/internal/mvs/mvs.go:97 +0x4f
golang.org/x/sync/errgroup.(*Group).Go.func1()
        /Users/banst/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:57 +0x67
created by golang.org/x/sync/errgroup.(*Group).Go
        /Users/banst/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:54 +0x92

goroutine 50 [runnable]:
cuelang.org/go/cue.Value.IsConcrete({0xc00070e060, 0xc00073e1b0, 0x0})
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/cue/types.go:1134 +0x119
cuelang.org/go/cue.(*decoder).decode(0x29ad220, {0x27de0a0, 0xc000736180, 0x6}, {0xc00070e060, 0xc00073e1b0, 0x0}, 0x0)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/cue/decode.go:104 +0x16b
cuelang.org/go/cue.(*decoder).convertStruct(0x29ad220, {0x29ad220, 0xc000736180, 0xc0005a0100}, {0xc00070e060, 0xc00073e000, 0x0})
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/cue/decode.go:446 +0x406
cuelang.org/go/cue.(*decoder).decode(0x2767600, {0x29ad220, 0xc000736180, 0xc00073e000}, {0xc00070e060, 0xc00073e000, 0x0}, 0xb4)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/cue/decode.go:241 +0xe95
cuelang.org/go/cue.Value.Decode({0xc00070e060, 0xc00073e000, 0x0}, {0x2767600, 0xc000736180})
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/cue/decode.go:46 +0x1ba
github.com/loft-orbital/cuebe/pkg/modfile.Parse({0xc000722000, 0x0})
        /Users/banst/go/pkg/mod/github.com/loft-orbital/[email protected]/pkg/modfile/parse.go:38 +0x1c8
github.com/loft-orbital/cuebe/internal/mod.GetReqs({0x2f7a980, 0xc00071c040})
        /Users/banst/go/pkg/mod/github.com/loft-orbital/[email protected]/internal/mod/get.go:56 +0x74
github.com/loft-orbital/cuebe/internal/mod.ModReqs.Required({{0xc0007f4801, 0x33}, {0xc0005232c0, 0xa, 0xa}}, {{0xc0007f48c1, 0x0}, {0xc0001b1291, 0x0}})
        /Users/banst/go/pkg/mod/github.com/loft-orbital/[email protected]/internal/mod/mvs.go:105 +0x196
github.com/loft-orbital/cuebe/internal/mvs.buildWorker.func1()
        /Users/banst/go/pkg/mod/github.com/loft-orbital/[email protected]/internal/mvs/mvs.go:97 +0x4f
golang.org/x/sync/errgroup.(*Group).Go.func1()
        /Users/banst/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:57 +0x67
created by golang.org/x/sync/errgroup.(*Group).Go
        /Users/banst/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:54 +0x92

goroutine 51 [runnable]:
cuelang.org/go/cue.(*decoder).decode(0x29ad220, {0x278ef20, 0xc0008f4190, 0x7}, {0xc0004865c0, 0xc0008fa240, 0x0}, 0x0)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/cue/decode.go:224 +0x163b
cuelang.org/go/cue.(*decoder).convertStruct(0x29ad220, {0x29ad220, 0xc0008f4180, 0xc0006a0100}, {0xc0004865c0, 0xc0008fa000, 0x0})
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/cue/decode.go:446 +0x406
cuelang.org/go/cue.(*decoder).decode(0x2767600, {0x29ad220, 0xc0008f4180, 0xc0008fa000}, {0xc0004865c0, 0xc0008fa000, 0x0}, 0xb4)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/cue/decode.go:241 +0xe95
cuelang.org/go/cue.Value.Decode({0xc0004865c0, 0xc0008fa000, 0x0}, {0x2767600, 0xc0008f4180})
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/cue/decode.go:46 +0x1ba
github.com/loft-orbital/cuebe/pkg/modfile.Parse({0xc0008e4000, 0x0})
        /Users/banst/go/pkg/mod/github.com/loft-orbital/[email protected]/pkg/modfile/parse.go:38 +0x1c8
github.com/loft-orbital/cuebe/internal/mod.GetReqs({0x2f7a980, 0xc0008de040})
        /Users/banst/go/pkg/mod/github.com/loft-orbital/[email protected]/internal/mod/get.go:56 +0x74
github.com/loft-orbital/cuebe/internal/mod.ModReqs.Required({{0xc0007f4801, 0x33}, {0xc0005232c0, 0xa, 0xa}}, {{0xc0007f4901, 0x0}, {0xc0001b12a9, 0x0}})
        /Users/banst/go/pkg/mod/github.com/loft-orbital/[email protected]/internal/mod/mvs.go:105 +0x196
github.com/loft-orbital/cuebe/internal/mvs.buildWorker.func1()
        /Users/banst/go/pkg/mod/github.com/loft-orbital/[email protected]/internal/mvs/mvs.go:97 +0x4f
golang.org/x/sync/errgroup.(*Group).Go.func1()
        /Users/banst/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:57 +0x67
created by golang.org/x/sync/errgroup.(*Group).Go
        /Users/banst/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:54 +0x92

goroutine 52 [runnable]:
golang.org/x/sync/errgroup.(*Group).Go.func1()
        /Users/banst/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:54
created by golang.org/x/sync/errgroup.(*Group).Go
        /Users/banst/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:54 +0x92

goroutine 53 [runnable]:
cuelang.org/go/internal/core/debug.(*compactPrinter).node(0xc00040aa00, {0x2f12df8, 0xc0005b0360})
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/internal/core/debug/compact.go:34 +0x234a
cuelang.org/go/internal/core/debug.WriteNode({0x2efa0e0, 0xc0008a6360}, {0x2f12e20, 0xc00007c120}, {0x2f12df8, 0xc0005b0360}, 0x100b2ad)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/internal/core/debug/debug.go:53 +0x212
cuelang.org/go/internal/core/debug.NodeString(...)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/internal/core/debug/debug.go:61
cuelang.org/go/internal/core/eval.NewContext.func1({0x2f12df8, 0xc0005b0360})
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/internal/core/eval/eval.go:54 +0x90
cuelang.org/go/internal/core/adt.(*OpContext).Str(0xc00007c120, {0x2f12df8, 0xc0005b0360})
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/internal/core/adt/context.go:1208 +0x73
cuelang.org/go/cue.Value.checkKind({0xc00007c120, 0xc0005b0360, 0xc00007c280}, 0xc0005b0360, 0x1)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/cue/types.go:1182 +0xc5
cuelang.org/go/cue.Value.Null({0xc00007c120, 0xc0005b0360, 0xc00007c280})
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/cue/types.go:1264 +0x79
cuelang.org/go/cue.(*decoder).decode(0x278ef20, {0x2990e80, 0xc0008a6340, 0x278ef20}, {0xc00007c120, 0xc0005b0360, 0xc00007c280}, 0x1)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/cue/decode.go:110 +0x190
cuelang.org/go/cue.(*decoder).decode(0x29ad220, {0x278ef20, 0xc00040a290, 0x7}, {0xc00007c120, 0xc0005b0240, 0x0}, 0x0)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/cue/decode.go:237 +0x1808
cuelang.org/go/cue.(*decoder).convertStruct(0x29ad220, {0x29ad220, 0xc00040a280, 0xc0005a0100}, {0xc00007c120, 0xc0005b0000, 0x0})
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/cue/decode.go:446 +0x406
cuelang.org/go/cue.(*decoder).decode(0x2767600, {0x29ad220, 0xc00040a280, 0xc0005b0000}, {0xc00007c120, 0xc0005b0000, 0x0}, 0xb4)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/cue/decode.go:241 +0xe95
cuelang.org/go/cue.Value.Decode({0xc00007c120, 0xc0005b0000, 0x0}, {0x2767600, 0xc00040a280})
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/cue/decode.go:46 +0x1ba
github.com/loft-orbital/cuebe/pkg/modfile.Parse({0xc000598000, 0x0})
        /Users/banst/go/pkg/mod/github.com/loft-orbital/[email protected]/pkg/modfile/parse.go:38 +0x1c8
github.com/loft-orbital/cuebe/internal/mod.GetReqs({0x2f7a980, 0xc0008a6040})
        /Users/banst/go/pkg/mod/github.com/loft-orbital/[email protected]/internal/mod/get.go:56 +0x74
github.com/loft-orbital/cuebe/internal/mod.ModReqs.Required({{0xc0007f4801, 0x33}, {0xc0005232c0, 0xa, 0xa}}, {{0xc0007f4981, 0x0}, {0xc0001b12d9, 0x0}})
        /Users/banst/go/pkg/mod/github.com/loft-orbital/[email protected]/internal/mod/mvs.go:105 +0x196
github.com/loft-orbital/cuebe/internal/mvs.buildWorker.func1()
        /Users/banst/go/pkg/mod/github.com/loft-orbital/[email protected]/internal/mvs/mvs.go:97 +0x4f
golang.org/x/sync/errgroup.(*Group).Go.func1()
        /Users/banst/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:57 +0x67
created by golang.org/x/sync/errgroup.(*Group).Go
        /Users/banst/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:54 +0x92

goroutine 54 [runnable]:
cuelang.org/go/internal/core/debug.(*printer).string(0xc0006ae180, {0x2c68f58, 0x1})
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/internal/core/debug/debug.go:78 +0xa5
cuelang.org/go/internal/core/debug.(*compactPrinter).node(0xc0006ae180, {0x2f12df8, 0xc0006b8360})
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/internal/core/debug/compact.go:55 +0x1b6e
cuelang.org/go/internal/core/debug.(*compactPrinter).node(0xc0006ae180, {0x2f12df8, 0xc0006b8240})
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/internal/core/debug/compact.go:66 +0x1ac5
cuelang.org/go/internal/core/debug.(*compactPrinter).node(0xc0006ae180, {0x2f12df8, 0xc0006b8000})
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/internal/core/debug/compact.go:56 +0x1b8a
cuelang.org/go/internal/core/debug.WriteNode({0x2efa0e0, 0xc0003d6200}, {0x2f12e20, 0xc00020edc0}, {0x2f12df8, 0xc0006b8000}, 0x100b2ad)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/internal/core/debug/debug.go:53 +0x212
cuelang.org/go/internal/core/debug.NodeString(...)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/internal/core/debug/debug.go:61
cuelang.org/go/internal/core/eval.NewContext.func1({0x2f12df8, 0xc0006b8000})
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/internal/core/eval/eval.go:54 +0x90
cuelang.org/go/internal/core/adt.(*OpContext).Str(0xc00020edc0, {0x2f12df8, 0xc0006b8000})
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/internal/core/adt/context.go:1208 +0x73
cuelang.org/go/cue.Value.checkKind({0xc00020edc0, 0xc0006b8000, 0x0}, 0xc0006b8000, 0x1)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/cue/types.go:1182 +0xc5
cuelang.org/go/cue.Value.Null({0xc00020edc0, 0xc0006b8000, 0x0})
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/cue/types.go:1264 +0x79
cuelang.org/go/cue.(*decoder).decode(0x2767600, {0x29ad220, 0xc0006ae100, 0xc0006b8000}, {0xc00020edc0, 0xc0006b8000, 0x0}, 0xb4)
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/cue/decode.go:110 +0x190
cuelang.org/go/cue.Value.Decode({0xc00020edc0, 0xc0006b8000, 0x0}, {0x2767600, 0xc0006ae100})
        /Users/banst/go/pkg/mod/cuelang.org/[email protected]/cue/decode.go:46 +0x1ba
github.com/loft-orbital/cuebe/pkg/modfile.Parse({0xc000698000, 0x0})
        /Users/banst/go/pkg/mod/github.com/loft-orbital/[email protected]/pkg/modfile/parse.go:38 +0x1c8
github.com/loft-orbital/cuebe/internal/mod.GetReqs({0x2f7a980, 0xc0003d6040})
        /Users/banst/go/pkg/mod/github.com/loft-orbital/[email protected]/internal/mod/get.go:56 +0x74
github.com/loft-orbital/cuebe/internal/mod.ModReqs.Required({{0xc0007f4801, 0x33}, {0xc0005232c0, 0xa, 0xa}}, {{0xc0007f49c1, 0x0}, {0xc0001b12f1, 0x0}})
        /Users/banst/go/pkg/mod/github.com/loft-orbital/[email protected]/internal/mod/mvs.go:105 +0x196
github.com/loft-orbital/cuebe/internal/mvs.buildWorker.func1()
        /Users/banst/go/pkg/mod/github.com/loft-orbital/[email protected]/internal/mvs/mvs.go:97 +0x4f
golang.org/x/sync/errgroup.(*Group).Go.func1()
        /Users/banst/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:57 +0x67
created by golang.org/x/sync/errgroup.(*Group).Go
        /Users/banst/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:54 +0x92

goroutine 55 [runnable]:
golang.org/x/sync/errgroup.(*Group).Go.func1()
        /Users/banst/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:54
created by golang.org/x/sync/errgroup.(*Group).Go
        /Users/banst/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:54 +0x92

goroutine 56 [semacquire]:
sync.runtime_Semacquire(0x0)
        /opt/local/lib/go/src/runtime/sema.go:56 +0x25
sync.(*WaitGroup).Wait(0x0)
        /opt/local/lib/go/src/sync/waitgroup.go:130 +0x71
golang.org/x/sync/errgroup.(*Group).Wait(0xc00089bc20)
        /Users/banst/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:40 +0x27
github.com/loft-orbital/cuebe/internal/mvs.BuildList.func1()
        /Users/banst/go/pkg/mod/github.com/loft-orbital/[email protected]/internal/mvs/mvs.go:58 +0x26
created by github.com/loft-orbital/cuebe/internal/mvs.BuildList
        /Users/banst/go/pkg/mod/github.com/loft-orbital/[email protected]/internal/mvs/mvs.go:57 +0x325

To Reproduce

Steps

Run cuebe mod vendor with a lot of dependencies. Hard to reproduce consistenly, since this concurrent write is not consistent

Expected behavior

No concurrent write

Actual behavior

Versions

v0.1.0-beta.2

Additional context

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.