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

Supplemental: update to get the correct version from URL #512

Closed
wants to merge 1 commit into from

Conversation

Kevin222004
Copy link

@Kevin222004 Kevin222004 commented Jun 17, 2024

Description

This PR fixes #

Notes for Reviewers

Signed commits

  • Yes, I signed my commits.

Copy link

welcome bot commented Jun 17, 2024

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.
Be sure to double-check that you have signed your commits. Here are instructions for making signing an implicit activity while peforming a commit.

@Kevin222004
Copy link
Author

@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. https://github.com/kubernetes-sigs/metrics-server/metrics-server-helm-chart-3.12.1
and this needs to get updated

}

if version := output.GetVersion(); version != "metrics-server" {
t.Errorf("Expected version metrics-server, got %s", version)
Copy link
Author

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.

Copy link
Contributor

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
image

Copy link
Author

@Kevin222004 Kevin222004 Jun 22, 2024

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

meshkit/utils/utils.go

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

Copy link
Contributor

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.

Copy link
Author

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

@leecalcote leecalcote requested a review from Jougan-0 June 17, 2024 18:37
@leecalcote leecalcote added the kind/enhancement Improvement in current feature label Jun 17, 2024
@Kevin222004
Copy link
Author

@Jougan-0 ping, please take a look and review

@leecalcote
Copy link
Member

Thanks, @Kevin222004 👍

@@ -23,3 +23,4 @@ cmd/errorutil/errorutil
**errorutil_errors_export.json
*.DS_Store
coverage.txt
.idea
Copy link
Contributor

Choose a reason for hiding this comment

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

Why this??

Copy link
Author

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

@Kevin222004 Kevin222004 changed the title minor: update the comment Supplemental: update to get the correct version from URL Jun 23, 2024
@leecalcote
Copy link
Member

Re-running build workflows...

Signed-off-by: Kevin222004 <kevinpatel222004@gmail.com>
@Kevin222004
Copy link
Author

@leecalcote @Jougan-0 If you are good with the changes can you merge it :)

@Kevin222004 Kevin222004 requested a review from Jougan-0 July 13, 2024 17:27
@Kevin222004
Copy link
Author

@Jougan-0 let's finish this pr.

Copy link

stale bot commented Oct 2, 2024

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.

@stale stale bot added the issue/stale Issue has not had any activity for an extended period of time label Oct 2, 2024
Copy link

stale bot commented Oct 28, 2024

This issue is being automatically closed due to inactivity. However, you may choose to reopen this issue.

@stale stale bot closed this Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue/stale Issue has not had any activity for an extended period of time kind/enhancement Improvement in current feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants