-
Notifications
You must be signed in to change notification settings - Fork 530
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
Feat/thumbor bucket in url #521
Closed
bennet-esyoil
wants to merge
8
commits into
aws-solutions:main
from
bennet-esyoil:feat/thumbor-bucket-in-url
Closed
Changes from 5 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
f135101
feat(thumbor-urls): add logic to parse bucket from path
bennet-esyoil 2589355
feat: add tests
bennet-esyoil 7aed95c
fix: replace bucket-name in url if present
bennet-esyoil 57137dd
fix: also replace key
bennet-esyoil 7fad979
fix: well
bennet-esyoil bf21c19
chore(tests): added test to verify that correct bucket gets selected …
bennet-esyoil 52038a1
fix: typo in test title
bennet-esyoil eabd936
feat: switch to s3:bucket syntax
bennetgallein File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
thumbor
is spelled incorrectly in the above string and in the next test.Does this test cover when no bucket is provided? For instance, in my use case I do not want to specify a bucket name in the URL.
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.
I've found some unrelated cases where the tests did not cover, thus my "akward" commits after creating the PR.
the only problem I currently see with my approach is that if you have a path that contains the bucket-name which you do not want to use, this would fail.
e.g. you have a bucket
bucket-1
and want to request the file/bucket-1/test.jpg
, from that bucket, the logic would remove thebucket-1
since it's a name. I was thinking about prefixing the parameter with something likebucket:bucket-1/bucket-1/test.jpg
which would resolve that issue.If you dont, behaviour is the same as before (takes the first bucket provided in the env-variables)
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.
Ok thanks for the reply.
Yes, I agree with using a keyword like "bucket:"/ "s3:" similar to the "filters:" in the URL. That would work around the issue and hopefully not cause an issue with the path/bucket name
Example
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.
I think the
s3:name
looks pretty sleek, kinda ressembles the normals3://bucket/object
syntax. I'll get this changed.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.
I kinda don't like how it's not part of the
ThumborMapper
class, but it's kinda not part of thumbor itself and also needs to happen at an earlier stage, so it makes sense to have it where it is now..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.
Hey @t4colingough any update?
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.
Hello again @t4colingough & @dougtoppin ,
any chance to get this released any time soon?
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.
Hi @bennet-esyoil,
This change has been made internally and is currently set to be included in the next minor/major release. While our internal processes had us merge the code manually, once the release with this change is out, you'll see yourself included in the external contributors section towards the bottom of the readme and this PR will be closed.
Thanks for your contributions,
Simon