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

OCPBUGS-1357: Fix install-plugins.sh to not override locked plugin versions #1482

Merged
merged 2 commits into from Sep 16, 2022
Merged

OCPBUGS-1357: Fix install-plugins.sh to not override locked plugin versions #1482

merged 2 commits into from Sep 16, 2022

Conversation

coreydaley
Copy link
Member

  • Do no override locked plugin versions
  • Verify that locked plugin versions exist in the bundle-plugins.txt file

@coreydaley
Copy link
Member Author

/assign @akram @jitendar-singh

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 14, 2022
@jitendar-singh
Copy link
Contributor

/retest

@coreydaley coreydaley changed the title Fix install-plugins.sh to not override locked plugin versions OCPBUGS-1357: Fix install-plugins.sh to not override locked plugin versions Sep 15, 2022
@coreydaley
Copy link
Member Author

/jira refresh

@openshift-ci-robot
Copy link
Contributor

@coreydaley: An error was encountered querying GitHub for users with public email (jitsingh@redhat.com) for bug OCPBUGS-1357 on the Jira server at https://issues.redhat.com/. No known errors were detected, please see the full error message for details.

Full error message. Post "http://ghproxy/graphql": dial tcp 172.30.229.2:80: connect: connection refused

Please contact an administrator to resolve this issue, then request a bug refresh with /jira refresh.

In response to this:

  • Do no override locked plugin versions
  • Verify that locked plugin versions exist in the bundle-plugins.txt file

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@coreydaley
Copy link
Member Author

/jira refresh

@openshift-ci-robot
Copy link
Contributor

@coreydaley: An error was encountered querying GitHub for users with public email (jitsingh@redhat.com) for bug OCPBUGS-1357 on the Jira server at https://issues.redhat.com/. No known errors were detected, please see the full error message for details.

Full error message. Post "http://ghproxy/graphql": dial tcp 172.30.229.2:80: i/o timeout

Please contact an administrator to resolve this issue, then request a bug refresh with /jira refresh.

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot
Copy link
Contributor

@coreydaley: An error was encountered querying GitHub for users with public email (jitsingh@redhat.com) for bug OCPBUGS-1357 on the Jira server at https://issues.redhat.com/. No known errors were detected, please see the full error message for details.

Full error message. Post "http://ghproxy/graphql": dial tcp 172.30.229.2:80: i/o timeout

Please contact an administrator to resolve this issue, then request a bug refresh with /jira refresh.

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@coreydaley
Copy link
Member Author

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. labels Sep 15, 2022
@openshift-ci-robot
Copy link
Contributor

@coreydaley: This pull request references Jira Issue OCPBUGS-1357, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.12.0) matches configured target version for branch (4.12.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @jitendar-singh

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@jitendar-singh
Copy link
Contributor

/label qe-approved

@openshift-ci openshift-ci bot added the qe-approved Signifies that QE has signed off on this PR label Sep 15, 2022
@coreydaley
Copy link
Member Author

@akram All tests are passing, please take a look and let me know if you have any questions about what the issue was.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 15, 2022

@coreydaley: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Copy link
Contributor

@akram akram left a comment

Choose a reason for hiding this comment

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

is there any reason to change the lockfile from a directory to a file?
I don't know the historical reason of having a directory, but, if we can minimize changes to this old code, that would be more reinsuring.


if [[ $ignoreLockFile ]] || mkdir "$lock" &>/dev/null; then
if [[ $ignoreLockFile ]] || ! test -f $(getLockFile $plugin); then
Copy link
Contributor

Choose a reason for hiding this comment

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

is there any reason to change the lockfile from a directory to a file?
I don't know the historical reason of having a directory, but, if we can minimize changes to this old code, that would be more reinsuring.

Copy link
Member Author

Choose a reason for hiding this comment

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

I am storing the locked plugin version in the <plugin>.lock file for use when checking the versions that are being requested.

lockFile=$(getLockFile "$plugin")
lockedVersion=$(cat $lockFile)
echo "Plugin $plugin locked to version $lockedVersion, ignoring, requested version $version"
if versionLT "${lockedVersion}" "${version}"; then
Copy link
Contributor

Choose a reason for hiding this comment

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

what will we do with the warning message?
and during CI, we will not check it for sure. Should we fail in case of warning ?

Copy link
Member Author

Choose a reason for hiding this comment

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

The problem is that sometimes the versions are like 2.6.5 and sometimes they switch to 1123.456.asdflasdf, and the script does not account for 2.6.5 could be newer than 1123.456.asdflasdf, so if we show the warnings when someone updates the base-plugins.txt and then runs the install script, they can sort it out manually and update the locked version if needed, which it probably is. But specific plugins we want locked to a newer version that has CVE fixes.

@@ -310,7 +317,7 @@ function resolveDependencies() {
# download the dependence; passing "true" is needed for "download" to replace the existing dependency
if versionLT "${versionInstalled}" "${minVersion}"; then
echo "Upgrading bundled dependency $d ($minVersion > $versionInstalled)"
download "$plugin" "$minVersion" "true"
download "$plugin" "$minVersion"
Copy link
Contributor

Choose a reason for hiding this comment

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

Was the bug here? I don't see a signature change to the download function, however, it was used only with 2 arguments previously, the 2nd one being a boolean. no regression ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Since this was passing true, it was overriding the locked versions of plugins and potentially installed a different version, which may or may not be correct, or what we wanted.

@akram
Copy link
Contributor

akram commented Sep 16, 2022

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 16, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 16, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: akram, coreydaley

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-merge-robot openshift-merge-robot merged commit 2090ca5 into openshift:master Sep 16, 2022
@openshift-ci-robot
Copy link
Contributor

@coreydaley: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-1357 has been moved to the MODIFIED state.

In response to this:

  • Do no override locked plugin versions
  • Verify that locked plugin versions exist in the bundle-plugins.txt file

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

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. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged. qe-approved Signifies that QE has signed off on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants