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

Upgrade GetBucketRegion to aws-sdk-go-v2 #1470

Merged

Conversation

kaovilai
Copy link
Member

@kaovilai kaovilai commented Jul 16, 2024

Signed-off-by: Tiger Kaovilai [email protected]

Why the changes were made

To test that aws-sdk-go-v2 upgrade in aws plugin did not break bucket discovery to debug #1451 failures.

How to test the changes made

go test ./pkg/storage/aws/...

Followup

@openshift-ci openshift-ci bot requested review from mrnold and sseago July 16, 2024 18:55
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 16, 2024
@kaovilai
Copy link
Member Author

TODO: Move CloudStorageAPI for aws to aws-sdk-go-v2

sseago
sseago previously approved these changes Jul 16, 2024
@kaovilai
Copy link
Member Author

--- FAIL: TestDPAReconciler_ValidateBackupStorageLocations (0.01s)
    --- FAIL: TestDPAReconciler_ValidateBackupStorageLocations/BSL_Region_not_set_for_aws_provider_without_S3ForcePathStyle_with_BackupImages_false_expect_to_succeed (0.00s)
        bsl_test.go:1503: ValidateBackupStorageLocations() error = region for AWS backupstoragelocation not automatically discoverable. Please set the region in the backupstoragelocation config, wantErr false

uhoh unit test

@kaovilai
Copy link
Member Author

the ValidateBSL unit test' bucket does work in s3_test.go so I think might be same issue we're hitting elsewhere?

@kaovilai
Copy link
Member Author

FWIW the same suite test works locally

❯ go test -run TestDPAReconciler_ValidateBackupStorageLocations ./controllers/...
ok      github.com/openshift/oadp-operator/controllers  1.361s

@kaovilai kaovilai force-pushed the aws-sdk-go-v2-GetBucketRegion branch from be32d26 to 8f1be57 Compare July 16, 2024 20:34
@kaovilai kaovilai requested review from mrnold and sseago July 16, 2024 20:35
pkg/storage/aws/s3.go Outdated Show resolved Hide resolved
@weshayutin
Copy link
Contributor

glad we tested this in the scrum lolz 0/

@kaovilai
Copy link
Member Author

/retest

@mateusoliveira43

This comment was marked as resolved.

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 17, 2024
weshayutin
weshayutin previously approved these changes Aug 14, 2024
Copy link
Contributor

@weshayutin weshayutin left a comment

Choose a reason for hiding this comment

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

thanks @kaovilai

@kaovilai
Copy link
Member Author

FYI the PR in velero is practically similar to this except that they use real credentials. I do not think it is urgent or practical to do so as far as unit test goes.. but we can implement this in the prod env as a follow up.

Benefit to real creds as opposed to anonymous is it can list bucket regions for private buckets.

Copy link
Member

@shubham-pampattiwar shubham-pampattiwar left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 14, 2024
pkg/storage/aws/s3.go Show resolved Hide resolved
pkg/storage/aws/s3.go Outdated Show resolved Hide resolved
pkg/storage/aws/s3.go Show resolved Hide resolved
Signed-off-by: Tiger Kaovilai <[email protected]>

Load anonymous credentials when GetBucketRegion

Signed-off-by: Tiger Kaovilai <[email protected]>

Try setting region in LoadDefaultConfig

Signed-off-by: Tiger Kaovilai <[email protected]>

more debug

Signed-off-by: Tiger Kaovilai <[email protected]>

return err from aws

Signed-off-by: Tiger Kaovilai <[email protected]>

debug

Signed-off-by: Tiger Kaovilai <[email protected]>
@kaovilai kaovilai force-pushed the aws-sdk-go-v2-GetBucketRegion branch from 8f1be57 to bcaadda Compare September 4, 2024 17:33
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Sep 4, 2024
mateusoliveira43

This comment was marked as outdated.

@kaovilai
Copy link
Member Author

kaovilai commented Sep 4, 2024

/unhold

updated PR description

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 4, 2024
@mateusoliveira43
Copy link
Contributor

/retest
post restore flake (deployment/deploymentConfig not available)

Copy link

openshift-ci bot commented Sep 5, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kaovilai, mateusoliveira43, mrnold, shubham-pampattiwar

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [kaovilai,mateusoliveira43,mrnold,shubham-pampattiwar]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mateusoliveira43
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 16, 2024
@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 510c203 and 2 for PR HEAD a56c3d5 in total

Copy link

openshift-ci bot commented Sep 16, 2024

@kaovilai: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit ab459ea into openshift:master Sep 16, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants