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: velaux support override policy #4352

Merged
merged 4 commits into from Jul 14, 2022

Conversation

wangyikewxgm
Copy link
Collaborator

Signed-off-by: 楚岳 wangyike.wyk@alibaba-inc.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

@wangyikewxgm wangyikewxgm marked this pull request as draft July 11, 2022 08:31
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

add comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
@codecov
Copy link

codecov bot commented Jul 11, 2022

Codecov Report

Merging #4352 (49fd501) into master (fd70aa9) will increase coverage by 0.60%.
The diff coverage is 41.17%.

@@            Coverage Diff             @@
##           master    #4352      +/-   ##
==========================================
+ Coverage   60.49%   61.09%   +0.60%     
==========================================
  Files         343      345       +2     
  Lines       33832    33990     +158     
==========================================
+ Hits        20467    20767     +300     
+ Misses      10679    10498     -181     
- Partials     2686     2725      +39     
Flag Coverage Δ
apiserver-unittests 35.22% <41.17%> (+0.74%) ⬆️
core-unittests 56.02% <ø> (+0.62%) ⬆️
e2e-multicluster-test 19.90% <0.00%> (-0.17%) ⬇️
e2e-rollout-tests ?
e2etests 28.76% <ø> (+0.35%) ⬆️

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

Impacted Files Coverage Δ
pkg/apiserver/domain/service/application.go 58.53% <28.20%> (+1.35%) ⬆️
pkg/apiserver/domain/service/util.go 83.33% <83.33%> (ø)
pkg/apiserver/domain/repository/application.go 42.59% <0.00%> (-16.39%) ⬇️
pkg/resourcekeeper/dispatch.go 77.35% <0.00%> (-7.55%) ⬇️
pkg/apiserver/utils/cache.go 85.18% <0.00%> (-7.41%) ⬇️
pkg/utils/file.go 54.90% <0.00%> (-5.97%) ⬇️
...ponentdefinition/componentdefinition_controller.go 80.00% <0.00%> (-5.56%) ⬇️
...tepdefinition/workflowstepdefinition_controller.go 63.82% <0.00%> (-5.32%) ⬇️
...es/policydefinition/policydefinition_controller.go 71.57% <0.00%> (-5.27%) ⬇️
pkg/velaql/providers/query/utils.go 40.00% <0.00%> (-2.86%) ⬇️
... and 41 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 fd70aa9...49fd501. Read the comment docs.

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix

in the middle of work

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

add test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

reverse flacky test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix goling

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
@wangyikewxgm wangyikewxgm marked this pull request as ready for review July 13, 2022 12:37
}
}
// the target policy isn't exist yet, put it in.
return res[:i], len(c) != i
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

len(c) != i it will only be true?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if len(c) != i, that's mean target policy exist in the list, this function has delete it from returned result, and outer caller should update with it.

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
Copy link
Collaborator

@barnettZQG barnettZQG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@barnettZQG barnettZQG merged commit 930d866 into kubevela:master Jul 14, 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