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

Make sure we are downloading newest version of the dependent tools #955

Merged

Conversation

mpryc
Copy link
Collaborator

@mpryc mpryc commented Apr 25, 2023

Describe the behavior changes introduced in this PR

Our current script does not always works as expected.

In situation where latest tag of the dependent tool is pointing to the lower version then the newest one, the latest will be used.

This modifies to incorporate semver checking of all the released versions and picking up the newest one (highest semver).

Linked Issues

related to: operator-framework/operator-sdk#6403
related to: #953

Testing Instructions

Ran before and after modifications, the current links are exactly the same, because latest is pointing to the greatest semver so it's working as expected. We do not look at the latest tag at all, so the semver is calculating correctly the greatest version.

$ ./scripts/get_tool_dl_url.py tkn
$ ./scripts/get_tool_dl_url.py oc
$ ./scripts/get_tool_dl_url.py ct
$ ./scripts/get_tool_dl_url.py promtool
$ ./scripts/get_tool_dl_url.py conftest
$ ./scripts/get_tool_dl_url.py noobaa
$ ./scripts/get_tool_dl_url.py operator-sdk
$ ./scripts/get_tool_dl_url.py shellcheck

# Before
https://github.com/tektoncd/cli/releases/download/v0.30.1/tkn_0.30.1_Linux_x86_64.tar.gz
https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/stable/openshift-client-linux.tar.gz
https://github.com/helm/chart-testing/releases/download/v3.8.0/chart-testing_3.8.0_linux_amd64.tar.gz
https://github.com/prometheus/prometheus/releases/download/v2.43.0/prometheus-2.43.0.linux-amd64.tar.gz
https://github.com/open-policy-agent/conftest/releases/download/v0.41.0/conftest_0.41.0_Linux_x86_64.tar.gz
https://github.com/noobaa/noobaa-operator/releases/download/v5.11.0/noobaa-linux-v5.11.0
https://github.com/operator-framework/operator-sdk/releases/download/v1.28.0/operator-sdk_linux_amd64
https://github.com/koalaman/shellcheck/releases/download/v0.9.0/shellcheck-v0.9.0.linux.x86_64.tar.xz

# After
https://github.com/tektoncd/cli/releases/download/v0.30.1/tkn_0.30.1_Linux_x86_64.tar.gz
https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/stable/openshift-client-linux.tar.gz
https://github.com/helm/chart-testing/releases/download/v3.8.0/chart-testing_3.8.0_linux_amd64.tar.gz
https://github.com/prometheus/prometheus/releases/download/v2.43.0/prometheus-2.43.0.linux-amd64.tar.gz
https://github.com/open-policy-agent/conftest/releases/download/v0.41.0/conftest_0.41.0_Linux_x86_64.tar.gz
https://github.com/noobaa/noobaa-operator/releases/download/v5.11.0/noobaa-linux-v5.11.0
https://github.com/operator-framework/operator-sdk/releases/download/v1.28.0/operator-sdk_linux_amd64
https://github.com/koalaman/shellcheck/releases/download/v0.9.0/shellcheck-v0.9.0.linux.x86_64.tar.xz

@mpryc mpryc force-pushed the operator_sdk_version branch from 87bba19 to cfe22e5 Compare April 25, 2023 12:46
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 25, 2023
Our current script does not always works as expected.

In situation where latest tag of the dependent tool is pointing to the
lower version then the newest one, the latest will be used.

This modifies to incorporate semver checking of all the released
versions and picking up the newest one (highest semver).

Related issue: operator-framework/operator-sdk#6403
Related issue: dora-metrics#953

Signed-off-by: Michal Pryc <mpryc@redhat.com>
@mpryc mpryc force-pushed the operator_sdk_version branch from cfe22e5 to 4124ebf Compare April 25, 2023 14:19
@openshift-ci openshift-ci bot removed the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 25, 2023
@mpryc
Copy link
Collaborator Author

mpryc commented Apr 26, 2023

/test 4.10-e2e-openshift

@openshift-ci
Copy link

openshift-ci bot commented Apr 26, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mateusoliveira43

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 26, 2023
@mateusoliveira43
Copy link
Collaborator

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 26, 2023
@mpryc
Copy link
Collaborator Author

mpryc commented Apr 26, 2023

/test 4.11-e2e-openshift

@mpryc
Copy link
Collaborator Author

mpryc commented Apr 26, 2023

/test 4.9-e2e-openshift

@openshift-merge-robot openshift-merge-robot merged commit 616ff8f into dora-metrics:master Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants