-
Notifications
You must be signed in to change notification settings - Fork 330
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
[ENG-4624] [S3 Improvements] Project PR - OSF Backend Part #10416
Conversation
@@ -78,29 +87,43 @@ def set_folder(self, folder_id, auth): | |||
self.folder_name = '{} ({})'.format(folder_id, bucket_location) | |||
self.save() | |||
|
|||
self.nodelogger.log(action='bucket_linked', extra={'bucket': str(folder_id)}, save=True) |
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.
@mfraezz I was wondering what you think about this, obviously I want to avoid migrating the logs, I figure if this is purely additive (the bucket name will stay the same string.) we can add path a new thing without causing discontinuous historical data. I feel just adding something to the logs like this is appropriate if it's in extra
.
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.
It's a Product decision whether we want to display folder info in these logs. Presently, it will maintain existing behavior and just say linked the Amazon S3 bucket ${bucket}
sans any folder path info, which is fine if Product signs off on it.
129f8ec
to
56d258e
Compare
56d258e
to
cb47a9e
Compare
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.
One small request, one Minor
open question. Otherwise LGTM
@@ -135,10 +158,16 @@ def serialize_waterbutler_credentials(self): | |||
} | |||
|
|||
def serialize_waterbutler_settings(self): | |||
""" | |||
We use the folder id to hold the bucket location |
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.
Minor, and I don't really know the best place for this one, but related to the comment:
Using folder_id
for the bucket and folder_path
for the... folder path would be more consistent other addon behavior. What was the rationale for not doing so -- avoiding a migration?
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.
Yes avoiding the migration was the rational.
Purpose
Enable OSF users to choose subfolders as add-on storage root in project for S3.
Credit @Johnetordoff for all the work 👍
Project notion: https://www.notion.so/cos/S3-improvements-476a5b07cb7e4f458e9cd4c77cfa03ec
WB part: CenterForOpenScience/waterbutler#406
Changes
boto3
to get S3 buckets:/
as the new delimiter for S3 bucket:/
delimiterDevOps Notes
Dev Notes
Here are all child PRs that have been merged into this feature branch.
boto3
: [ENG-4624] [S3 Improvements] Use boto3 to access bucket regions using V4 s3 auth #10427boto3
:/
)QA Notes
See QA docs in the project notion page
Documentation
Update our user guide for using S3 (TBD)
Side Effects
boto3
, there are new bucket regions that cannot be handled by WB. With our U.S. account, there are 3 of them (Asia Pacific (Osaka) ap-northeast-3, EU (Paris) eu-west-3 and EU (Stockholm) eu-north-1.)Ticket
https://openscience.atlassian.net/browse/ENG-4624