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

Path prefix for bucket key #4

Open
dmfutcher opened this issue Feb 26, 2017 · 4 comments
Open

Path prefix for bucket key #4

dmfutcher opened this issue Feb 26, 2017 · 4 comments
Assignees
Milestone

Comments

@dmfutcher
Copy link
Owner

Add an option to specify a path prefix for the bucket key ie. allow pushing git repos into sub-folders of S3 buckets. This would allow, for example, storage of multiple git repos in a single S3 bucket.

@dmfutcher dmfutcher added this to the 0.2.3 milestone Oct 31, 2017
@dmfutcher dmfutcher modified the milestones: 0.2.2, 0.3 Aug 21, 2020
@sleepypikachu
Copy link
Contributor

Can you assign this to me for Hacktober please? :-)

@dmfutcher
Copy link
Owner Author

dmfutcher commented Sep 25, 2020

Assigned! If you run across any other ways to improve anything, I'm all ears ... project's more than over-due some love 😅

@sleepypikachu
Copy link
Contributor

sleepypikachu commented Oct 1, 2020

How do you think prefixes should handle commit refs?

Currently we always upload to the root of the bucket and keep track of whether there are any new commits by using a git ref. If you run
git-s3-push
git-s3-push -p foo
back to back you'll end up with nothing in foo because there are "0" new commits.

This might be fine if the intended use is to only ever use a single prefix per git repo, though I'd argue we might want to add a switch/some docs on the git invocations to ignore/reset the ref to allow existing users to move into a folder.

The other option is to create a per-prefix ref and use this to track the changes. Would allow pushing branches to prefixes, etc. but perhaps that is overkill for this tool/outside the scope of this feature?

EDIT: Also means if you add a prefix where you didn't have one previously you will end up with only the updated files in the prefix directory, which I think is pretty confusing behaviour.

sleepypikachu added a commit to sleepypikachu/git-s3-push that referenced this issue Oct 1, 2020
Add new option -p to set a prefix file path which will cause uploaded files to
go to a subfolder of the S3 bucket, allowing for multiple git repos to be
hosted in a single bucket.

This works well for new repos but will currently have some pretty unexpected
handling if you've already used git-s3-push. Will need to either ignore the ref
when changing prefix or create a per-prefix ref.
sleepypikachu added a commit to sleepypikachu/git-s3-push that referenced this issue Oct 1, 2020
Add new option -p to set a prefix file path which will cause uploaded files to
go to a subfolder of the S3 bucket, allowing for multiple git repos to be
hosted in a single bucket.

This works well for new repos but will currently have some pretty unexpected
handling if you've already used git-s3-push. Will need to either ignore the ref
when changing prefix or create a per-prefix ref.
sleepypikachu added a commit to sleepypikachu/git-s3-push that referenced this issue Oct 1, 2020
Add new option -p to set a prefix file path which will cause uploaded files to
go to a subfolder of the S3 bucket, allowing for multiple git repos to be
hosted in a single bucket.

This works well for new repos but will currently have some pretty unexpected
handling if you've already used git-s3-push. Will need to either ignore the ref
when changing prefix or create a per-prefix ref.
sleepypikachu added a commit to sleepypikachu/git-s3-push that referenced this issue Oct 1, 2020
dmfutcher pushed a commit that referenced this issue Oct 9, 2020
@dmfutcher
Copy link
Owner Author

Have merged this. Will do some more extensive testing over the weekend but it's looking good so far!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants