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

Fix: resolve locally installed addons not being displayed #3827

Merged
merged 8 commits into from
May 10, 2022

Conversation

charlie0129
Copy link
Member

@charlie0129 charlie0129 commented May 7, 2022

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

Description of your changes

Addressed an issue where locally installed addons being displayed as the registry one if there is an addon with the same name is in the registry.

Before

Notice the dex addon, which is installed from local sources, but displayed as the one in the registry.

Screen Shot 2022-05-07 at 7 40 04 PM

After

It is now displayed properly as locally installed (the one in KubeVela registry is not affected).

Screen Shot 2022-05-07 at 7 41 52 PM

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

Changes that need to apply to existing unit tests have been added.

Special notes for your reviewer

Addressed an issue where locally installed addons may not be displayed
if one with the same name is in the registry

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

codecov bot commented May 7, 2022

Codecov Report

Merging #3827 (e1d8e99) into master (eefccfb) will increase coverage by 1.39%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #3827      +/-   ##
==========================================
+ Coverage   62.66%   64.06%   +1.39%     
==========================================
  Files         312      312              
  Lines       29561    29692     +131     
==========================================
+ Hits        18524    19021     +497     
+ Misses       8572     8211     -361     
+ Partials     2465     2460       -5     
Flag Coverage Δ
apiserver-unittests 35.11% <ø> (-0.21%) ⬇️
core-unittests 56.63% <ø> (+0.14%) ⬆️
e2e-multicluster-test 26.52% <ø> (-0.15%) ⬇️
e2e-rollout-tests 23.61% <ø> (-0.07%) ⬇️
e2etests 31.23% <ø> (?)

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

Impacted Files Coverage Δ
pkg/apiserver/sync/convert/convert.go 37.97% <0.00%> (-22.79%) ⬇️
pkg/apiserver/sync/store.go 55.00% <0.00%> (-4.00%) ⬇️
pkg/resourcetracker/app.go 88.88% <0.00%> (-3.76%) ⬇️
pkg/addon/versioned_registry.go 62.06% <0.00%> (-2.57%) ⬇️
...troller/core.oam.dev/v1alpha2/application/apply.go 86.28% <0.00%> (-2.27%) ⬇️
...es/policydefinition/policydefinition_controller.go 69.47% <0.00%> (-2.11%) ⬇️
pkg/addon/utils.go 69.90% <0.00%> (-2.10%) ⬇️
...aits/traitdefinition/traitdefinition_controller.go 72.63% <0.00%> (ø)
pkg/addon/addon.go 65.30% <0.00%> (+0.15%) ⬆️
pkg/utils/helm/helm_helper.go 39.50% <0.00%> (+0.71%) ⬆️
... and 38 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 eefccfb...e1d8e99. Read the comment docs.

Copy link
Collaborator

@wonderflow wonderflow left a comment

Choose a reason for hiding this comment

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

good job, please add some test cases

when an addon with the same as registry one is locally installed

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
@charlie0129
Copy link
Member Author

Thank you for you suggestions. Relevant tests have been added.

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
i.e. local and registry

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

@wonderflow wonderflow left a comment

Choose a reason for hiding this comment

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

good job

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
@wonderflow wonderflow added the backport release-1.3 add this label will automatically backport this PR to release-1.3 branch label May 10, 2022
@github-actions
Copy link

Successfully created backport PR #3842 for release-1.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release-1.3 add this label will automatically backport this PR to release-1.3 branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants