-
Notifications
You must be signed in to change notification settings - Fork 90
Fix upgrade tests for release-5.0 #664
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -250,7 +250,7 @@ EOL | |
fi | ||
|
||
log::info "Waiting for deployment $name to be ready in $ns" | ||
wait_for_deployment_to_be_ready "$ns" "$name" $((2 * "$minute")) | ||
wait_for_deployment_to_be_ready "$ns" "$name" $((2 * $minute)) | ||
} | ||
|
||
wait_for_deployment_to_be_ready(){ | ||
|
@@ -397,15 +397,18 @@ discover_versions(){ | |
major_version="$(echo $full_version | cut -d'.' -f1)" | ||
minor_version="$(echo $full_version | cut -d'.' -f2)" | ||
|
||
# we shouldn't run into this yet... maybe for 6.0 but we should like | ||
# add the 'Replaces' spec field and use that for the previous_version | ||
if [[ $minor_version -eq 0 ]]; then | ||
log::info "Will be unable to calculate the previous_version since our minor version is 0" | ||
exit 0 | ||
export version="$(echo $major_version.$minor_version)" | ||
|
||
# Hard rewrite of 5.0.0 to superficial 4.7.0, as replacement for | ||
# the breaking point when OpenShift Logging shifted release schema. | ||
if [[ $major_version -eq 5 ]] && [[ $minor_version -eq 0 ]]; then | ||
# Set this to 4.7 because we need to calculate the latest previous | ||
# version prior to 5.0, which is 4.6 for OpenShift Logging. | ||
major_version=4 | ||
minor_version=7 | ||
fi | ||
|
||
export version="$(echo $major_version.$minor_version)" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see the export above the if block, but it serves the same purpose as it would if we exported it here after the if block There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No it is not! The |
||
get_latest_previous_version $version | ||
get_latest_previous_version "$(echo $major_version.$minor_version)" | ||
periklis marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
|
||
get_es_pods_count() { | ||
|
@@ -491,7 +494,7 @@ deploy_previous_version() { | |
|
||
# deploy elasticsearch-operator | ||
log::info "Deploying elasticsearch-operator ${previous_version} from marketplace..." | ||
deploy_marketplace_operator "openshift-operators-redhat" "elasticsearch-operator" "$previous_version" "elasticsearch-operator" | ||
deploy_marketplace_operator "openshift-operators-redhat" "elasticsearch-operator" "$previous_version" "elasticsearch-operator" true | ||
|
||
# check if the operator is running | ||
log::info "Verifying if elasticsearch-operator deployment is ready..." | ||
|
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.
previous version should be 4.7 or 4.6?
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.
Previous to 5.0 is 4.6, but in order to calculate that via
get_latests_previous_version
in need to fake 5.0 as 4.7. The whole block should be removed in master.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.
ok
Uh oh!
There was an error while loading. Please reload this page.
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.
i think the fix should instead happen in the "get_latest_previous_version"
this feels like a hacky way to resolve this...
it also means that we are dependent on the 4.7 manifest being in our branch for this to work...
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.
No we are not dependent to 4.7 manifest. We only pretend 5.0 to be 4.7 for the sake of this bash sourcery. The version 4.7 is used for calculation of 4.6 to create Subscription using operatorhub.