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

Enhance S3 bucket to download from any bucket using any role #135

Merged
merged 1 commit into from
Feb 10, 2023

Conversation

gaiksaya
Copy link
Member

@gaiksaya gaiksaya commented Feb 8, 2023

Description

This change makes the library flexible enough to download anything from any any S3 bucket using any role.

Issues Resolved

List any issues this PR will resolve, e.g. Closes [...].

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@gaiksaya gaiksaya marked this pull request as ready for review February 8, 2023 02:02
@gaiksaya gaiksaya requested a review from a team as a code owner February 8, 2023 02:02
@codecov-commenter
Copy link

Codecov Report

Merging #135 (83fc7d7) into main (09ba828) will not change coverage.
The diff coverage is n/a.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff            @@
##               main     #135   +/-   ##
=========================================
  Coverage     83.07%   83.07%           
  Complexity       24       24           
=========================================
  Files            70       70           
  Lines           195      195           
  Branches         11       11           
=========================================
  Hits            162      162           
  Misses           25       25           
  Partials          8        8           
Impacted Files Coverage Δ
tests/jenkins/jobs/DownloadFromS3_Jenkinsfile 100.00% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

s3Download(file: args.destPath, bucket: args.bucket, path: args.path, force: args.force)
boolean forceDownload = args.force ?: false

withCredentials([string(credentialsId: "${args.roleAccountNumberCred}", variable: 'AWS_ACCOUNT_NUMBER')]) {
Copy link
Member

Choose a reason for hiding this comment

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

Should we ask team to put specific account number as credentialID here? This would expose the AWS account number right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Its jenkins credential id so AWS secrets manager name. ex: jenkins-aws-account-number which in AWS secrets manager will hold the actual account number

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Oh so we would need to store each of the account we would download from to the secret manager right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, thats the plan

Copy link
Member

@zelinh zelinh left a comment

Choose a reason for hiding this comment

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

LGTM.

Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
@gaiksaya gaiksaya added the > breaking Identifies as a breaking change label Feb 10, 2023
@gaiksaya gaiksaya merged commit 462aec7 into opensearch-project:main Feb 10, 2023
@gaiksaya gaiksaya deleted the modify-s3-download branch February 10, 2023 01:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
> breaking Identifies as a breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants