-
Notifications
You must be signed in to change notification settings - Fork 100
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
Supplemental: update to get the correct version from URL #512
Conversation
Yay, your first pull request! 👍 A contributor will be by to give feedback soon. In the meantime, please review the Layer5 Community Welcome Guide and sure to join the community Slack. |
@MUzairS15 as you mentioned is slack chat I have removed the version. But may be I am not able to explain you this scenario. please take a look at the test case in both the test code will give you the correct version only if the URL is in form. |
generators/github/url_test.go
Outdated
} | ||
|
||
if version := output.GetVersion(); version != "metrics-server" { | ||
t.Errorf("Expected version metrics-server, got %s", version) |
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.
This is not expected correct version is metrics-server-helm-chart-3.12.1
If I am missing anything here please let me know or else tell me I will update the code base to get the version in this PR itself.
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.
What is the final goal of this test?
Check if the version is retrieved but the issue which I see is still we checking with metrics-server-helm-chart-3.12.1
shouldn't it be just 3.12.1
See here in the logs it still shows metrics-server-helm-chart-3.12.1
instead of just showing the version 3.12.1
The main problem was we were showing
Generated 0 components for model [metrics-server] metrics-server
where it should have been
Generated 0 components for model [metrics-server] 3.12.1
.
The test case should also follow these norms imo.
Here is the current log that is being generated in the recent workflow run
The issue still persist even though we changed the link it still shows.
Generated 0 components for model [metrics-server] metrics-server-helm-chart-3.12.1
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.
The final goal of the test should be to get the correct version when the repo URL is provided.
The new link that is been changed is of type git protocol. which use this method to get all the version
Lines 205 to 207 in efd59b7
func GetLatestReleaseTagsSorted(org string, repo string) ([]string, error) { | |
var url string = "https://github.com/" + org + "/" + repo + "/releases" | |
resp, err := http.Get(url) |
please checkout https://github.com/kubernetes-sigs/metrics-server/tags in their releases the tag that has been
metrics-server-helm-chart-3.12.1
that's why we are getting the version like this but if I talk about the URL with https
protocol the implementation is wrong. i don't have much idea about releases but if you want that we need only the latest version as they mentioned https://github.com/kubernetes-sigs/metrics-server/releases#:~:text=v0.7.1-,Latest,-Installation I will find some way to get that.
until then I have updated repo so that if you use URL you get the latest verison
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.
Please update and ping me if we need to update the github url in the sheel mention I'll update and let's see the logs.
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.
Yup lets update it and see what logs are getting generated know with the URL https://github.com/kubernetes-sigs/metrics-server
@Jougan-0 ping, please take a look and review |
Thanks, @Kevin222004 👍 |
@@ -23,3 +23,4 @@ cmd/errorutil/errorutil | |||
**errorutil_errors_export.json | |||
*.DS_Store | |||
coverage.txt | |||
.idea |
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.
Why this??
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.
it is like .vscode/
for jetbrains ide
3dde254
to
33f0de5
Compare
Re-running build workflows... |
Signed-off-by: Kevin222004 <kevinpatel222004@gmail.com>
8bed16a
to
0995d15
Compare
@leecalcote @Jougan-0 If you are good with the changes can you merge it :) |
@Jougan-0 let's finish this pr. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue is being automatically closed due to inactivity. However, you may choose to reopen this issue. |
Description
This PR fixes #
Notes for Reviewers
Signed commits