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

[Backport release-1.4] Fix: address vela-core crash due to empty policy properties (#4473) #4480

Merged
merged 1 commit into from
Jul 27, 2022

Conversation

Somefive
Copy link
Collaborator

  • Fix: fix topology core crash

Signed-off-by: Charlie Chiang charlie_c_0129@outlook.com

  • Test: add tests

Signed-off-by: Charlie Chiang charlie_c_0129@outlook.com

  • Fix: same problem in other places

Signed-off-by: Charlie Chiang charlie_c_0129@outlook.com

  • Style: remove empty line

Signed-off-by: Charlie Chiang charlie_c_0129@outlook.com

  • Feat: raise error when empty topology is used

Signed-off-by: Charlie Chiang charlie_c_0129@outlook.com

  • Feat: raise error when empty override policy is used

Signed-off-by: Charlie Chiang charlie_c_0129@outlook.com

Description of your changes

Fixes #

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 Jul 27, 2022

Codecov Report

Merging #4480 (fc14121) into release-1.4 (4cb9a14) will decrease coverage by 11.43%.
The diff coverage is 87.50%.

@@               Coverage Diff                @@
##           release-1.4    #4480       +/-   ##
================================================
- Coverage        58.47%   47.03%   -11.44%     
================================================
  Files              331      296       -35     
  Lines            31975    27788     -4187     
================================================
- Hits             18697    13070     -5627     
- Misses           10776    13209     +2433     
+ Partials          2502     1509      -993     
Flag Coverage Δ
apiserver-unittests ?
core-unittests 54.84% <87.50%> (+0.19%) ⬆️
e2e-multicluster-test 20.17% <0.00%> (+0.05%) ⬆️
e2e-rollout-tests 22.42% <0.00%> (-0.02%) ⬇️
e2etests 29.52% <0.00%> (?)

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

Impacted Files Coverage Δ
pkg/policy/envbinding/utils.go 64.70% <0.00%> (ø)
pkg/policy/override.go 100.00% <100.00%> (ø)
pkg/policy/topology.go 95.34% <100.00%> (+0.22%) ⬆️
pkg/resourcekeeper/gc.go 77.35% <100.00%> (+0.94%) ⬆️
pkg/workflow/providers/multicluster/deploy.go 80.21% <100.00%> (+2.69%) ⬆️
pkg/apiserver/utils/version.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/apiserver/utils/cache.go 0.00% <0.00%> (-92.60%) ⬇️
pkg/apiserver/domain/service/service.go 0.00% <0.00%> (-92.31%) ⬇️
pkg/apiserver/domain/model/workflow.go 11.76% <0.00%> (-88.24%) ⬇️
pkg/apiserver/utils/http.go 0.00% <0.00%> (-87.50%) ⬇️
... and 142 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4cb9a14...fc14121. Read the comment docs.

…#4473)

* Fix: fix topology core crash

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Fix: same problem in other places

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: remove empty line

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: raise error when empty topology is used

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: raise error when empty override policy is used

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
@wonderflow wonderflow merged commit 766c585 into kubevela:release-1.4 Jul 27, 2022
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