-
Notifications
You must be signed in to change notification settings - Fork 170
command/task evaluation concurrency issue #245
Comments
I believe the problem is that task dependency resolution fails to recognize the dependencies introduced by the line
Would it be possible to somehow explicitly mark the |
@grantzvolsky thanks for digging in to that. Yes, in tip you can set I'm curious to see if that would work for you. |
@mpvl Thanks for the suggestion. I ran a couple of tests and here's what I found:
Would you like me to write the relevant test cases? If I understand it correctly, it suffices to define them in |
Yeah, that would be great. Is Thanks! |
@grantzvolsky See https://cue-review.googlesource.com/c/cue/+/4906. This improves error messages and allows depending on a group of tasks. |
@jlongtine you may be interested in this as well. |
- report error if not a reference - reference must be exact (may not point inside task) - reference may refer to task group Issue #245 Change-Id: Ib210ab38e0cb6bb750d4c020f9e7138442169ac3 Reviewed-on: https://cue-review.googlesource.com/c/cue/+/4906 Reviewed-by: Grant Zvolský <grant@zvolsky.org> Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
The existing implementatin resulted in an infinite loop in two cases: 1. In the v.Equals(after) call when the 'after' dependencies were cyclic 2. In the task.Walk function when task fields cyclically referenced other tasks This commit solves both cases by - stepping out of the Walk lambda when it had already been evaluated with the given parameter; and - removing the special case for 'after' dependencies as it is no longer necessary. Relevent tests are included. Updates #245 Change-Id: I914ff9aad96eb43ae89964000dea60ccd44c38a2 Reviewed-on: https://cue-review.googlesource.com/c/cue/+/4910 Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
This seems to have been fixed with the move to |
This issue has been migrated to cue-lang/cue#245. For more details about CUE's migration to a new home, please see cue-lang/cue#1078. |
I made a simple tool to evaluate k8s secrets [edit: a working version of the tool is available here], but its output is not deterministic due to a concurrency issue that we discussed earlier with Marcel.
Code:
When I run
cue evaluatesecrets ./...
, the output is either 1):or 2)
Cue version
0.0.15
yields the error 2) in 100% of cases.latest
cue build yields 2) in cca 75% of cases.The text was updated successfully, but these errors were encountered: