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

Use external mcg endpoint in bucket utils #9733

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

Conversation

fbalak
Copy link
Contributor

@fbalak fbalak commented Apr 26, 2024

Some tests including acceptance fail in provider client test runs executed from client due to use of internal endpoint.

Signed-off-by: fbalak <fbalak@redhat.com>
@fbalak fbalak added MCG Multi Cloud Gateway / NooBaa related issues Squad/Red labels Apr 26, 2024
@fbalak fbalak self-assigned this Apr 26, 2024
@fbalak fbalak requested a review from a team as a code owner April 26, 2024 09:11
@pull-request-size pull-request-size bot added the size/S PR that changes 10-29 lines label Apr 26, 2024
Signed-off-by: fbalak <fbalak@redhat.com>
@pull-request-size pull-request-size bot added size/M PR that changes 30-99 lines and removed size/S PR that changes 10-29 lines labels May 2, 2024
Signed-off-by: fbalak <fbalak@redhat.com>
@fbalak
Copy link
Contributor Author

fbalak commented May 3, 2024

@fbalak fbalak added the Verified Mark when PR was verified and log provided label May 3, 2024
Comment on lines 58 to 62
endpoint = (
mcg_obj.s3_endpoint
if config.ENV_DATA["platform"] in constants.HCI_PC_OR_MS_PLATFORM
else mcg_obj.s3_internal_endpoint
)
Copy link
Contributor

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.

Copy link
Contributor

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.

fbalak added 2 commits May 6, 2024 11:20
Signed-off-by: fbalak <fbalak@redhat.com>
Signed-off-by: fbalak <fbalak@redhat.com>
Copy link

openshift-ci bot commented May 15, 2024

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@udaysk23 udaysk23 added the DO NOT MERGE Do not merge this change!! label May 17, 2024
or config.DEPLOYMENT.get("proxy")
or config.ENV_DATA.get("private_link")
)
else self.s3_external_endpoint
Copy link
Contributor

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
            ```

@udaysk23 udaysk23 removed the DO NOT MERGE Do not merge this change!! label May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm MCG Multi Cloud Gateway / NooBaa related issues size/M PR that changes 30-99 lines Squad/Red Verified Mark when PR was verified and log provided
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants