-
Notifications
You must be signed in to change notification settings - Fork 859
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(#5861): Support addon dependencies version ranges #6002
Feat(#5861): Support addon dependencies version ranges #6002
Conversation
This change enables addon maintainers to define version ranges for dependencies in an addon's metadata.yaml file. This behavior is similar to the version range allowed in the `system` section of the metadata file. The version range expression for `dependencies` follows the same format as for `system`. Example: ```yaml dependencies: - name: addon1 version: ">= 2.3.3, < 3.0.0" - name: addon2 version: ">= 0.1.0, < 1.0.0" ``` When installing an addon, the behavior varies depending on whether the dependency is already installed. If a dependency is already installed, the installed version will be validated against the version range, and installation will fail with an error if there's a mismatch. If a dependency is not installed, the version range will be used to select the addon version to be installed. If no addon version matching the range exists, the installation will fail with an error. Fixes #5861 Signed-off-by: Michael Russo <merusso@gmail.com>
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #6002 +/- ##
==========================================
+ Coverage 66.04% 66.54% +0.50%
==========================================
Files 193 191 -2
Lines 25127 24851 -276
==========================================
- Hits 16595 16538 -57
+ Misses 6917 6711 -206
+ Partials 1615 1602 -13
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
Signed-off-by: Michael Russo <merusso@gmail.com>
Signed-off-by: Michael Russo <merusso@gmail.com>
Signed-off-by: Michael Russo <merusso@gmail.com>
Signed-off-by: Michael Russo <merusso@gmail.com>
FYI, I'm having issues running Update: I never could run |
Signed-off-by: Michael Russo <merusso@gmail.com>
Signed-off-by: Michael Russo <merusso@gmail.com>
Signed-off-by: Michael Russo <merusso@gmail.com>
Signed-off-by: Michael Russo <merusso@gmail.com>
Signed-off-by: Michael Russo <merusso@gmail.com>
Signed-off-by: Michael Russo <merusso@gmail.com>
You can try to rebase the master branch and retest. |
Changes: * implement ListAddonInfo in Registry * add interface to aid testing of listAvailableAddons * add tests for listAvailableAddons Signed-off-by: Michael Russo <merusso@gmail.com>
move logic from validateAddonDependencies to calculateDependencyVersionToInstall. Signed-off-by: Michael Russo <merusso@gmail.com>
Signed-off-by: Michael Russo <merusso@gmail.com>
Signed-off-by: Michael Russo <merusso@gmail.com>
Signed-off-by: Michael Russo <merusso@gmail.com>
Signed-off-by: Michael Russo <merusso@gmail.com>
Signed-off-by: Michael Russo <merusso@gmail.com>
Signed-off-by: Michael Russo <merusso@gmail.com>
Signed-off-by: Michael Russo <merusso@gmail.com>
Signed-off-by: Michael Russo <merusso@gmail.com>
Signed-off-by: Michael Russo <merusso@gmail.com>
All checks pass now. I still need to do some testing, but once that completes, I think this is "ready for review" (no longer Draft) Update: Successfully ran manual tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, great job!
Signed-off-by: Michael Russo <merusso@gmail.com>
I'll work on updating the documentation here :) PR here: kubevela/kubevela.github.io#1240 |
@merusso great job! |
Thank you all! |
Description of your changes
This change enables addon maintainers to define version ranges for dependencies in an addon's metadata.yaml file.
This behavior is similar to the version range allowed in the
system
section of the metadata file. The version range expression fordependencies
follows the same format as forsystem
.Example:
When installing an addon, the behavior varies depending on whether the dependency is already installed.
If a dependency is already installed, the installed version will be validated against the version range, and installation will fail with an error if there's a mismatch.
If a dependency is not installed, the version range will be used to select the addon version to be installed. If no addon version matching the range exists, the installation will fail with an error.
Fixes #5861
I have:
PR: Docs(#5861): Update metadata.yaml dependencies.version kubevela.github.io#1240
make reviewable
to ensure this PR is ready for review.backport release-x.y
labels to auto-backport this PR if necessary.How has this code been tested
Added unit tests for new functions.
Manually tested on an existing cluster.
Special notes for your reviewer