Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: vela cuex eval #5562

Merged
merged 3 commits into from
Apr 23, 2023
Merged

Conversation

Somefive
Copy link
Collaborator

@Somefive Somefive commented Feb 24, 2023

Description of your changes

Support running cuex eval command in vela CLI.

$ vela help cuex eval
Eval cue file with CueX engine.

 Evaluate your cue file with the CueX engine. When your cue file does not use KubeVela's extension, it will work
similarly to the native CUE CLI. When using KubeVela's extensions, this command will execute the extension functions and
resolve values, in addition to the native CUE compile process.

Usage:
  vela cuex eval [flags]

Examples:
  # Evaluate a cue file
  vela cuex eval -f my.cue
  
  # Evaluate a cue file into json format
  vela cuex eval -f my.cue -o json
  
  # Evaluate a cue file and output the target path
  vela cuex eval -f my.cue -p key.path

Flags:
  -f, --file string     file for eval
  -o, --format string   format of the output (default "cue")
  -p, --path string     path for eval

Global Flags:
  -y, --yes   Assume yes for all user prompts

Solves #5862

I have:

  • Read and followed KubeVela's contribution process.
  • Related Docs updated properly. In a new feature or configuration option, an update to the documentation is necessary.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR if necessary.

How has this code been tested

Special notes for your reviewer

@codecov
Copy link

codecov bot commented Feb 24, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.01 ⚠️

Comparison is base (9042ed0) 61.35% compared to head (554d471) 61.34%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5562      +/-   ##
==========================================
- Coverage   61.35%   61.34%   -0.01%     
==========================================
  Files         224      224              
  Lines       31121    31121              
==========================================
- Hits        19093    19091       -2     
- Misses      10233    10235       +2     
  Partials     1795     1795              
Flag Coverage Δ
core-unittests 55.81% <ø> (+0.02%) ⬆️
e2e-multicluster-test 24.87% <ø> (-0.03%) ⬇️
e2etests 26.95% <ø> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 7 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Somefive Somefive marked this pull request as ready for review April 21, 2023 09:21
Somefive and others added 2 commits April 21, 2023 17:34
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
Signed-off-by: Zhenghao Lou <rhzx3519@gmail.com>
@Somefive Somefive requested a review from FogDong as a code owner April 21, 2023 10:15
@Somefive Somefive changed the title Feat: vela cuex compile Feat: vela cuex eval Apr 21, 2023
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
@chivalryq chivalryq merged commit 3de9e39 into kubevela:master Apr 23, 2023
21 checks passed
Kolossi pushed a commit to Kolossi/kubevela that referenced this pull request Apr 24, 2023
* Feat: vela cuex render

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* feat: CLI command `vela cuex eval <file>`

Signed-off-by: Zhenghao Lou <rhzx3519@gmail.com>

* responsive writer

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
Signed-off-by: Zhenghao Lou <rhzx3519@gmail.com>
Co-authored-by: Zhenghao Lou <rhzx3519@gmail.com>
Signed-off-by: paul <paul@kolossi.co.uk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants