frappe / press

Full service cloud hosting for the Frappe stack - powers Frappe Cloud
https://frappe.cloud
GNU Affero General Public License v3.0
278 stars 195 forks source link

refactor(s3): Don't hardcode endpoint and region #2159

Open cogk opened 2 months ago

cogk commented 2 months ago

Don't hardcode endpoint and region for S3 buckets

There were many references to the ap-south-1 region and a global implicit reference to AWS. This PR contains refactors of the S3 bucket systems for "offsite backups", "dashboard uploads" and "Backup Bucket doctype" buckets, to avoid vendor lock-in.

I tried my best to make it backwards compatible with what I assume is the configuration on Frappe Cloud, but I can't check.

Details:

cc: @gavindsouza :wave: re: https://github.com/frappe/press/pull/19 https://github.com/frappe/press/pull/22


For the Frappe team


Typical configuration values for the fields

AWS S3 (Fallback/Legacy)

AWS S3

OVH

NagariaHussain commented 2 months ago

A patch could be written to set the value back in Press Settings if migration needs to be automatic.

cogk commented 1 month ago
codecov[bot] commented 5 days ago

Codecov Report

Attention: Patch coverage is 16.66667% with 35 lines in your changes missing coverage. Please review.

Project coverage is 39.90%. Comparing base (ee3fe50) to head (72b56a8).

Files with missing lines Patch % Lines
press/press/doctype/remote_file/remote_file.py 3.33% 29 Missing :warning:
press/api/site.py 0.00% 6 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2159 +/- ## ========================================== - Coverage 39.93% 39.90% -0.03% ========================================== Files 372 372 Lines 28210 28232 +22 ========================================== + Hits 11266 11267 +1 - Misses 16944 16965 +21 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.