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

K8SPG-597 Fixing test case upgrade-minor to work with postures images which have minor numbers in the image name #821

Merged
merged 2 commits into from
Jun 25, 2024

Conversation

ptankov
Copy link
Contributor

@ptankov ptankov commented Jun 24, 2024

K8SPG-597 Powered by Pull Request Badge

CHANGE DESCRIPTION

Problem:
The test case upgrade-minor fails when the PGO_POSTGRES_IMAGE contains an image with minor version, e.g. percona/percona-postgresql-operator:2.4.0-ppg16.3-postgres. Now I use the PG_VER env var.

Cause:
Short explanation of the root cause of the issue if applicable.

Solution:
Short explanation of the solution we are providing with this PR.

CHECKLIST

Jira

  • Is the Jira ticket created and referenced properly?
  • Does the Jira ticket have the proper statuses for documentation (Needs Doc) and QA (Needs QA)?
  • Does the Jira ticket link to the proper milestone (Fix Version field)?

Tests

  • Is an E2E test/test case added for the new feature/change?
  • Are unit tests added where appropriate?

Config/Logging/Testability

  • Are all needed new/changed options added to default YAML files?
  • Are the manifests (crd/bundle) regenerated if needed?
  • Did we add proper logging messages for operator actions?
  • Did we ensure compatibility with the previous version or cluster upgrade process?
  • Does the change support oldest and newest supported PG version?
  • Does the change support oldest and newest supported Kubernetes version?

…he image name, also, the calculation was buggy when the version contains a dot and a minor number, e.g. 16.3
@@ -13,25 +13,25 @@ commands:
curl -s "https://raw.githubusercontent.com/percona/percona-postgresql-operator/v${lower_ver}/deploy/cr.yaml" >"${TEMP_DIR}/cr_lower.yaml"

# get PG version which we want to test
pg_ver=$(echo "$IMAGE_POSTGRESQL" | cut -d':' -f2 | grep -oE '\-ppg[0-9]+-' | grep -oE '[0-9]+' | tr -d '-')
pg_ver=$PG_VER
Copy link
Member

Choose a reason for hiding this comment

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

Just make sure that these versions are the same and that there was no intention that we provide image with the different version.
Can we just use PG_VER and not set another variable?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can we just use PG_VER and not set another variable?
Well, we could, but later we have pg_ver=$((pg_ver - 1))

Copy link
Contributor Author

@ptankov ptankov Jun 24, 2024

Choose a reason for hiding this comment

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

Just make sure that these versions are the same and that there was no intention that we provide image with the different version.

Well, we set PG_VER here which is basically a more robust way than the one I'm obsoleting right now, because it works with minor numbers, as well.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi, I would add passed param verification or modification. We rely that this is major version without minor (16 but not 16.3 or modify 16.3 to 16).

e2e-tests/tests/upgrade-minor/05-upgrade-cluster.yaml Outdated Show resolved Hide resolved
@ptankov ptankov requested a review from tplavcic June 24, 2024 15:22
@JNKPercona
Copy link
Collaborator

Test name Status
custom-extensions passed
demand-backup passed
init-deploy passed
major-upgrade passed
monitoring passed
one-pod passed
operator-self-healing passed
pitr passed
scaling passed
scheduled-backup passed
self-healing passed
start-from-backup passed
tablespaces passed
telemetry-transfer passed
upgrade-consistency passed
upgrade-minor passed
users passed
We run 17 out of 17

commit: 579f033
image: perconalab/percona-postgresql-operator:PR-821-579f0331b

@ptankov ptankov changed the title K8SPG-597 K8SPG-597 Fixing test case upgrade-minor Jun 24, 2024
@ptankov ptankov changed the title K8SPG-597 Fixing test case upgrade-minor K8SPG-597 Fixing test case upgrade-minor to work with postures images which have minor numbers in the image name Jun 24, 2024
@ptankov ptankov merged commit 47ea9d1 into release-2.4.0 Jun 25, 2024
14 of 15 checks passed
@ptankov ptankov deleted the K8SPG-597 branch June 25, 2024 16:58
hors added a commit that referenced this pull request Jun 28, 2024
* K8SPG-597 Update images and versions for 2.4.0 release (#819)

* K8SPG-597 Update images and versions for 2.4.0 release

* supply minor tag versions

* update the image in upgrade.yaml

* K8SPG-600: Fix failed backup status (#820)

* Fix failed backup status

* fix lint

* fix fmt

* fix regression and status update

* K8SPG-518: Fix WAL archiving on Openshift (#823)

* K8SPG-597 Fixing test case upgrade-minor to work with postures images which have minor numbers in the image name (#821)

* We now have env var PG_VER so no need to calculate the version from the image name, also, the calculation was buggy when the version contains a dot and a minor number, e.g. 16.3

* Refactor upgrade-cluster.yaml to use PG_VER environment variable instead of calculating version from image name

* K8SPG-597 - Update monitoring test (#824)

* K8SPG-254: Fix major upgrade on Openshift (#826)

---------

Co-authored-by: Andrii Dema <[email protected]>
Co-authored-by: Ege Güneş <[email protected]>
Co-authored-by: Tomislav Plavcic <[email protected]>
Co-authored-by: Viacheslav Sarzhan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants