-
Notifications
You must be signed in to change notification settings - Fork 303
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
New CLI Flag --devel
To Include Development/Prerelease Versions of Charts
#139
Conversation
There is massive refactoring happens in #131 , will have to wait for it to complete |
Just to record my investigations, exerpt from Helm sources, if o.devel { // search for releases and prereleases (alpha, beta, and release candidate releases).
o.version = ">0.0.0-0"
} else { // search only for stable releases, prerelease versions will be skip
o.version = ">0.0.0"
}
constraint, err := semver.NewConstraint(o.version)
v, err := semver.NewVersion(r.Chart.Version)
if constraint.Check(v) {
} |
The proper approach to this feature would include the checkbox in UI to enable display of development charts, passing that as parameter to API |
@undera Thanks for the pointers. It is working as expected. A query before submitting this PR: How does the user enable development versions:
|
Two factors I take into account:
From that, I would do it as an environment variable. Once set, the user would get versions filtered accordingly. Note that the filtering has to apply not only in |
@undera Thanks! That makes sense. Please confirm the following:
|
|
@undera While I was trying to add tests for these changes, I noticed that they need interfaces for mocking. Otherwise, not testable. However, when I started adding interfaces and tests, I realized that it is reorganizing most parts or This card can only be tested manually. These are the sample calls I used to verify, with and without
|
I have replied in #210 about testing. The code is testable, with the Helm's standard way of injecting fixtures. I don't see a real need in in introducing interfaces. |
The flag `--devel` for enabling/disabling dev versions of charts in following endpoints: 1. /api/helm/repositories/kafka-operator 2. /api/helm/repositories/versions 3. /api/helm/repositories/latestver Signed-off-by: Bhargav Ravuri <[email protected]>
Do you plan to add the test @Bhargav-InfraCloud ? |
Signed-off-by: Bhargav Ravuri <[email protected]>
--devel
Flag for Functions Called by Repository Tab--devel
To Include Development/Prerelease Versions of Charts
@undera My apologies, I didn't find time to update you on the progress. I've submitted the commit with test cases. Please review. |
Looks good. Awesome contributioN! |
Thanks, @undera. I appreciate the help throughout the time. 😊 |
Motivation
Issue #94
Changes
--devel
.Charts()
andContaining()
.Summary
CLI flag
--devel
to list/include development (prerelease versions like release candidate, alpha, beta, etc.) in the following endpoints:Related Issues
Closes #94