-
Notifications
You must be signed in to change notification settings - Fork 164
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
Use external mcg endpoint in bucket utils #9733
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: fbalak <fbalak@redhat.com>
Signed-off-by: fbalak <fbalak@redhat.com>
Signed-off-by: fbalak <fbalak@redhat.com>
ocs_ci/ocs/bucket_utils.py
Outdated
endpoint = ( | ||
mcg_obj.s3_endpoint | ||
if config.ENV_DATA["platform"] in constants.HCI_PC_OR_MS_PLATFORM | ||
else mcg_obj.s3_internal_endpoint | ||
) |
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.
Since This code is repeated in multiple places, I would suggest to create one separate method for capturing endpoint and call that method wherever required.
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 agree, please capture this under a method in the MCG class - something like determine_endpoint
. We could leverage it in a potential future refactor where we only use MCG::s3_endpoint
as a property.
Signed-off-by: fbalak <fbalak@redhat.com>
Signed-off-by: fbalak <fbalak@redhat.com>
d54b0ed
to
0d78d5b
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: fbalak, sagihirshfeld, udaysk23 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 |
or config.DEPLOYMENT.get("proxy") | ||
or config.ENV_DATA.get("private_link") | ||
) | ||
else self.s3_external_endpoint |
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.
@fbalak Can we just reverse the condition here. Something like
return (
self.s3_external_endpoint
if (
config.DEPLOYMENT.get("Provider_client")
)
else self.s3_external_endpoint
```
Some tests including acceptance fail in provider client test runs executed from client due to use of internal endpoint.