Conversation
Signed-off-by: somaz <genius5711@gmail.com>
somaz94
added a commit
to somaz94/somaz94
that referenced
this pull request
Sep 8, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #140 +/- ##
==========================================
+ Coverage 88.62% 88.71% +0.09%
==========================================
Files 95 95
Lines 4985 4991 +6
==========================================
+ Hits 4418 4428 +10
+ Misses 373 371 -2
+ Partials 194 192 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
somaz94
marked this pull request as ready for review
September 8, 2026 08:25
somaz94
requested review from
FogDong,
Somefive,
anoop2811,
briankane and
jguionnet
as code owners
September 8, 2026 08:25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
FunctionCallError.Error()builds its message from three parts unconditionally, so when a part ismissing the message shows the gap instead of omitting it:
Pathis empty for a root value, which renders asfunction call error for : ...with nothingbefore the colon.
NewFunctionCallErrorputs the formatting failure into theValuefield whenutil.ToStringfails, so the message ends with
(value: cue/format: unsupported node type <nil>). That reads asthough the user's value caused a CUE problem, and sends people looking for a CUE error in their own
input that is not there.
Both clauses are now emitted only when they carry something. A message that has both parts is
unchanged.
function call error for a.b: err (value: "c")function call error for : err (value: "c")function call error: err (value: "c")... (value: cue/format: unsupported node type <nil>)Reported in kubevela/kubevela#7365, where it surfaces on every shared-resource conflict:
That issue also needs a
go.modbump in kubevela/kubevela before the fix reaches users, so I havenot used a closing keyword here.
Note on
ValueWhen the value cannot be rendered, the exported
FunctionCallError.Valuefield is now empty ratherthan holding the formatting error's text.
FunctionCallErroris only constructed and read insidecue/cuex, and the existing case incompiler_test.gopasses a non-emptyValue, so nothing elsechanges.
Testing
go test -count=1 ./cue/cuex/andmake unit-test(full suite with envtest)golangci-lint run ./...with the pinned 1.60.1 frommakefiles/const.mk(0 issues)gofmtandgo vetNewFunctionCallErrorcase asserts the message does not containcue/format, which is the exactstring from the report.
AI assistance
Claude Code helped with this change and the tests. I reviewed the result and checked the behavior
myself with the test suite and linters.
Summary by cubic
Fixes function call error messages so they omit empty paths and unrenderable values, removing misleading output like
function call error for :and(value: cue/format: unsupported node type <nil>). This addresses the error messages seen in kubevela/kubevela#7365. Messages that include both a path and a value are unchanged. The exportedFunctionCallError.Valuefield is now empty when the value can't be rendered, but only internalcue/cuexcode uses it. Note: ago.modbump in kubevela/kubevela is still needed before the fix reaches users.Written for commit 1f3eff9. Summary will update on new commits.