joewiz / s3

S3 helper
0 stars 3 forks source link

fix(S3): Replace static s3 paths with constants from hsg-shell config #11

Closed plutonik-a closed 3 years ago

plutonik-a commented 3 years ago

Import hsg-shell config and use constants $hsg-config:S3_BUCKET and $hsg-config:S3_URL for paths to S3 buckets.

Note:
There is a problematic path
'https://s3.amazonaws.com/static.history.state.gov/temp/static.history.state.gov-ebooks-s3-cache.zip'
in file load-cache-from-zip.xq,
which I replaced with
let $url := $hsg-config:S3_URL || '/temp/static.history.state.gov-ebooks-s3-cache.zip'.

The problematic part is the static.history.state.gov-ebooks-s3-cache.zip':
It seems, that this is the bucket name and a filename concatented with a dash, but it could also just be a filename and no bucketname. I left this uri as mentioned above for the time being and could refactor it later with a constant containing the current UAT / PROD S3 bucketname, if needed .

joewiz commented 3 years ago

The .zip file problem can be ignored.

joewiz commented 3 years ago

After merging, we realized that the module namespace URI was wrong: https://github.com/joewiz/s3/pull/11/files#diff-faa93ec95a9934e4b89de5bcc80f6db5fa077167093f75c6e3590b985c75770dR10. In my haste, I reset HEAD to before the merge of the PR and force-pushed it.

Please resubmit the PR with the fixed module namespace URI.