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

[GSS] Test if MCG secrets are used in env variables and bucketclass can be modified #10943

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mashetty330
Copy link
Contributor

@mashetty330 mashetty330 commented Nov 28, 2024

@mashetty330 mashetty330 self-assigned this Nov 28, 2024
@mashetty330 mashetty330 requested review from a team as code owners November 28, 2024 07:09
@pull-request-size pull-request-size bot added the size/M PR that changes 30-99 lines label Nov 28, 2024
Copy link

openshift-ci bot commented Nov 28, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: mashetty330

The full list of commands accepted by this bot can be found 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

@mashetty330 mashetty330 added team/e2e E2E team related issues/PRs MCG Multi Cloud Gateway / NooBaa related issues Customer defects Defects automated aspart of GSS closed loop labels Nov 28, 2024
@pull-request-size pull-request-size bot added size/L PR that changes 100-499 lines and removed size/M PR that changes 30-99 lines labels Nov 28, 2024
@mashetty330 mashetty330 changed the title Test if MCG secrets are used in env variables [GSS] Test if MCG secrets are used in env variables and bucketclass can be modified Nov 28, 2024
env["name"].split("_")[0] != "POSTGRES"
and env["name"].split("_")[0] != "POSTGRESQL"
) and ("valueFrom" in env and "secretKeyRef" in env["valueFrom"]):
logger.info(env)
Copy link
Contributor

@sagihirshfeld sagihirshfeld Nov 28, 2024

Choose a reason for hiding this comment

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

Let's add a bit more context to make our analysis easier in case such an env var does gets added in the future:

Suggested change
logger.info(env)
logger.warn(f'Non-psql secret is referenced in the noobaa-app under env var: {env}')

f' {{"op": "replace", "path": "/spec/placementPolicy/tiers/0/placement", "value": "Mirror"}}]',
format_type="json",
)

Copy link
Contributor

Choose a reason for hiding this comment

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

It might not be in the reproduction steps in the original BZ, but please also check that the original bucket is still usable after updating the Bucketclass.

Repeating write_random_test_objects_to_bucket on it should be enough.

Comment on lines +60 to +65
obc_obj.patch(
params=f'[{{"op": "add", "path": "/spec/placementPolicy/tiers/0/backingStores/-", '
f'"value": "{backingstore.name}"}},'
f' {{"op": "replace", "path": "/spec/placementPolicy/tiers/0/placement", "value": "Mirror"}}]',
format_type="json",
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Does the change take place immediately? Please verify, ideally with a retry/Timeoutsampler, that the change was not reconciled and that the Bucketclass is ready after this patch operation.

Comment on lines +11 to +12

class TestBucketClass:
Copy link
Contributor

Choose a reason for hiding this comment

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

Add the mcg and red_squad decorators to fix the PR checks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Customer defects Defects automated aspart of GSS closed loop MCG Multi Cloud Gateway / NooBaa related issues size/L PR that changes 100-499 lines team/e2e E2E team related issues/PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants