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

K8SPSMDB-1024 fixed variable scope and make sure it always get sets #1391

Merged
merged 4 commits into from
Dec 7, 2023

Conversation

Rockawear
Copy link
Contributor

@Rockawear Rockawear commented Dec 5, 2023

K8SPSMDB-1024 Powered by Pull Request Badge

CHANGE DESCRIPTION

Problem:
*pbm-entry script is having a variable scope issue.

Cause:
*pbm-entry script is having a variable scope issue where the needed env does not get updated by the script. Instead, it keeps the initial value from the previous line even after being updated through the if statement.

Solution:

  • The solution is to move the line where it's piping to a file after the variable gets set.

CHECKLIST

Jira

  • Is the Jira ticket created and referenced properly? No I don't have one yet. I don't know where to create.
  • Does the Jira ticket have the proper statuses for documentation (Needs Doc) and QA (Needs QA)? No, it will not break anything, instead it's making sure it does what's intented.
  • Does the Jira ticket link to the proper milestone (Fix Version field)?N/A

Tests

  • Is an E2E test/test case added for the new feature/change? N/A
  • Are unit tests added where appropriate? N/A
  • Are OpenShift compare files changed for E2E tests (compare/*-oc.yml)? N/A

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 MongoDB version? yes, It does
  • Does the change support oldest and newest supported Kubernetes version? yes, it does

@CLAassistant
Copy link

CLAassistant commented Dec 5, 2023

CLA assistant check
All committers have signed the CLA.

@Rockawear
Copy link
Contributor Author

I don't know how is this test failing. I only move a line below another. This shouldn't cause this to brick. Is it possible that it was broken before my PR?

@egegunes egegunes self-assigned this Dec 6, 2023
@egegunes
Copy link
Contributor

egegunes commented Dec 6, 2023

@Rockawear there are some false negatives from time to time, I don't think your changes caused the failure. I restarted the test suite.

@JNKPercona
Copy link
Collaborator

Test name Status
arbiter passed
balancer passed
custom-replset-name passed
cross-site-sharded passed
data-at-rest-encryption passed
data-sharded passed
demand-backup passed
demand-backup-eks-credentials passed
demand-backup-physical passed
demand-backup-physical-sharded passed
demand-backup-sharded passed
expose-sharded passed
ignore-labels-annotations passed
init-deploy passed
finalizer passed
limits passed
liveness passed
mongod-major-upgrade passed
mongod-major-upgrade-sharded passed
monitoring-2-0 passed
multi-cluster-service passed
non-voting passed
one-pod passed
operator-self-healing-chaos passed
pitr passed
pitr-sharded passed
pitr-physical passed
recover-no-primary passed
rs-shard-migration passed
scaling passed
scheduled-backup passed
security-context passed
self-healing-chaos passed
service-per-pod passed
serviceless-external-nodes passed
smart-update passed
split-horizon passed
storage passed
tls-issue-cert-manager passed
upgrade passed
upgrade-consistency passed
upgrade-consistency-sharded passed
upgrade-sharded passed
users passed
version-service passed
We run 45 out of 45

commit: 0194a6e
image: perconalab/percona-server-mongodb-operator:PR-1391-0194a6e6

@Rockawear
Copy link
Contributor Author

@egegunes Do we have to wait for a new PSMDB release to get this change if merged? Currently, I'm unable to restore through regular psmdb-restore cr. Having this change asap would be helpful. Thanks

@hors hors changed the title fixed variable scope and make sure it always get sets K8SPSMDB-1024 fixed variable scope and make sure it always get sets Dec 7, 2023
@hors hors added the community label Dec 7, 2023
@hors
Copy link
Collaborator

hors commented Dec 7, 2023

@egegunes Do we have to wait for a new PSMDB release to get this change if merged? Currently, I'm unable to restore through regular psmdb-restore cr. Having this change asap would be helpful. Thanks

Hi @Rockawear, I am going to merge it today.

@hors hors merged commit 98b72fa into percona:main Dec 7, 2023
@Rockawear
Copy link
Contributor Author

@hors @egegunes I guess, I won't get this until the next release. Is there a way to start using this before?

@Rockawear Rockawear deleted the fix_variable_scope branch December 7, 2023 18:27
@hors
Copy link
Collaborator

hors commented Dec 7, 2023

@hors @egegunes I guess, I won't get this until the next release. Is there a way to start using this before?

@Rockawear you can create a custom operator docker image and use it as a custom init image in CR https://github.com/percona/percona-server-mongodb-operator/blob/main/deploy/cr.yaml#L22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants