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

separate s3 subfolders (key prefix for different packages) #313

Merged
merged 13 commits into from
Jan 23, 2020

Conversation

armingjazi
Copy link

@armingjazi armingjazi commented Jan 20, 2020

https://github.com/verdaccio/verdaccio/blob/master/CONTRIBUTING.md#git-commit-guidelines

Type: Feature
Scope: aws-s3-storage plugin

The following has been addressed in the PR:

Description:

the s3 plugin adds all packages (proxy or none proxy) flat out in the root of the s3 bucket. This PR resolves that issue by using the storage key in the packages section of the config file as a folder in s3 bucket

Armin Jazi added 7 commits January 16, 2020 12:07
Remove packagename as key for s3 objects
Add package path from custom storage of packages
remove the duplications in trailing slash on paths
this folder is used per convention for minio or localstack for database
this is to access the packages and their store key
@juanpicado
Copy link
Member

🚀🙏

@codecov
Copy link

codecov bot commented Jan 20, 2020

Codecov Report

Merging #313 into master will increase coverage by 5.45%.
The diff coverage is 77.77%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #313      +/-   ##
==========================================
+ Coverage   65.17%   70.62%   +5.45%     
==========================================
  Files          26       27       +1     
  Lines        1407     1413       +6     
  Branches      205      206       +1     
==========================================
+ Hits          917      998      +81     
+ Misses        487      412      -75     
  Partials        3        3
Flag Coverage Δ
#core 90.47% <ø> (+2.29%) ⬆️
#plugins 57.71% <66.66%> (-0.45%) ⬇️
Impacted Files Coverage Δ
plugins/aws-s3-storage/src/index.ts 0% <0%> (ø) ⬆️
plugins/aws-s3-storage/src/addTrailingSlash.ts 100% <100%> (ø)
plugins/aws-s3-storage/src/s3PackageManager.ts 42.94% <100%> (+42.3%) ⬆️
plugins/aws-s3-storage/src/s3Errors.ts 36.36% <0%> (+36.36%) ⬆️
plugins/aws-s3-storage/src/deleteKeyPrefix.ts 63.63% <0%> (+63.63%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 21c47d3...c87af0f. Read the comment docs.

Copy link
Member

@juanpicado juanpicado left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it, test included 🥇 , still checking this but looks pretty promising, we should ignore some Docker files + config with the .npmignore so are not bundle in the tarball.

@juanpicado juanpicado requested a review from a team January 21, 2020 06:05
@juanpicado juanpicado added enhancement New feature or request plugin: aws-s3 labels Jan 21, 2020
@juanpicado juanpicado requested review from a team January 21, 2020 06:09
Copy link
Member

@juanpicado juanpicado left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Impeccable 👌 thanks so much for taking care of this

@juanpicado juanpicado merged commit 38c85e8 into verdaccio:master Jan 23, 2020
juanpicado pushed a commit that referenced this pull request Jan 23, 2020
* test: createPackage with s3 mock

* feat: Add Custom Storage

Remove packagename as key for s3 objects
Add package path from custom storage of packages

* test: Add number of assertions to tests

* refactor: trailing slash function

remove the duplications in trailing slash on paths

* chore: add data to gitignore

this folder is used per convention for minio or localstack for database

* fix: replace s3config with whole config

this is to access the packages and their store key

* Add readme section

* fix: jest registry in yarn.lock

* Upgrade: aws-sdk

aws-s3-storage plugin

* fix: set minio endpoint in config.yaml

* fix: Remove registry.env file from repo

Update the README

* Fix: aws secret access key example in README

* Add npmignore
juanpicado pushed a commit that referenced this pull request Jan 23, 2020
…r different packages) (#313)

* test: createPackage with s3 mock

* feat: Add Custom Storage

Remove packagename as key for s3 objects
Add package path from custom storage of packages

* test: Add number of assertions to tests

* refactor: trailing slash function

remove the duplications in trailing slash on paths

* chore: add data to gitignore

this folder is used per convention for minio or localstack for database

* fix: replace s3config with whole config

this is to access the packages and their store key

* Add readme section

* fix: jest registry in yarn.lock

* Upgrade: aws-sdk

aws-s3-storage plugin

* fix: set minio endpoint in config.yaml

* fix: Remove registry.env file from repo

Update the README

* Fix: aws secret access key example in README

* Add npmignore
@armingjazi
Copy link
Author

Impeccable 👌 thanks so much for taking care of this

my pleasure. This was a really good foundation for future work together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request plugin: aws-s3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

seperate s3 subfolders (key prefix for different packages)
2 participants