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: initial provider generator #5839

Merged
merged 2 commits into from
Apr 25, 2023

Conversation

iyear
Copy link
Contributor

@iyear iyear commented Apr 12, 2023

Description of your changes

Part of #5364

This is initial impl of provider generator. The impl is a bit hacky currently and I will refactor it in the future. So it's helpful to just look into testings instead of impl code.

How it works:

  1. Provider generator extracts providers from map[string]github.com/kubevela/pkg/cue/cuex/runtime.ProviderFn in target go file.
  2. Call cuegen to generate struct decls.
  3. Modify and compose decls, and call cuegen Format.

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

@iyear
Copy link
Contributor Author

iyear commented Apr 12, 2023

/cc @FogDong

@iyear iyear force-pushed the cuegen/initial-provider-gen branch from 64c56c3 to 3be88aa Compare April 12, 2023 08:44
@codecov
Copy link

codecov bot commented Apr 12, 2023

Codecov Report

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

Comparison is base (9042ed0) 61.35% compared to head (140f8d8) 61.28%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5839      +/-   ##
==========================================
- Coverage   61.35%   61.28%   -0.07%     
==========================================
  Files         224      224              
  Lines       31121    31121              
==========================================
- Hits        19093    19073      -20     
- Misses      10233    10254      +21     
+ Partials     1795     1794       -1     
Flag Coverage Δ
core-unittests 55.84% <ø> (+0.05%) ⬆️
e2e-multicluster-test 24.84% <ø> (-0.07%) ⬇️
e2etests 27.00% <ø> (+0.01%) ⬆️

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

see 14 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.

Signed-off-by: iyear <ljyngup@gmail.com>
@iyear iyear force-pushed the cuegen/initial-provider-gen branch from cd627a0 to cb6a900 Compare April 21, 2023 13:06
Signed-off-by: iyear <ljyngup@gmail.com>
@iyear iyear force-pushed the cuegen/initial-provider-gen branch from cb6a900 to 140f8d8 Compare April 21, 2023 13:28
@iyear
Copy link
Contributor Author

iyear commented Apr 23, 2023

Ready for review.

/cc @FogDong @Somefive

@Somefive Somefive merged commit 5b8c38a into kubevela:master Apr 25, 2023
21 checks passed
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