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

✨ Add internal/db/storage/blob #388

Merged
merged 3 commits into from May 19, 2020

Conversation

rinx
Copy link
Contributor

@rinx rinx commented May 19, 2020

Signed-off-by: Rintaro Okamura rintaro.okamura@gmail.com

Description:

  • Added internal/db/storage/blob & internal/db/storage/blob/s3 packages
  • already tested using blob_test.go

Related Issue:

Nothing.

How Has This Been Tested?:

Running blob_test.go

Environment:

  • Golang Version: 1.14.3
  • Docker Version: 19.03.8
  • Kubernetes Version: 1.18.2
  • NGT Version: 1.11.5

Types of changes:

  • Bug fix [type/bug]
  • New feature [type/feature]
  • Add tests [type/test]
  • Security related changes [type/security]
  • Add documents [type/documentation]
  • Refactoring [type/refactoring]
  • Update dependencies [type/dependency]
  • Update benchmarks and performances [type/bench]
  • Update CI [type/ci]

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

Checklist:

  • I have read the CONTRIBUTING document.
  • I have checked open Pull Requests for the similar feature or fixes?
  • I have added tests and benchmarks to cover my changes.
  • I have ensured all new and existing tests passed.
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly.

@pull-assistant
Copy link

pull-assistant bot commented May 19, 2020

Score: 0.93

Best reviewed: commit by commit


Optimal code review plan

     ✨ Add internal/db/storage/blob

     ♻️ Revise name of objects / Use aws-sdk's session.NewSession fu...

     🐧 Add use legacy list flag

Powered by Pull Assistant. Last update aa9f28e ... 52564ae. Read the comment docs.

@vdaas-ci
Copy link
Collaborator

[WARNING] Changes in interal/config may require you to change Helm charts. Please check.

if err != nil {
t.Fatalf("fetch writer failed: %s", err)
}
defer func() {
Copy link
Contributor

Choose a reason for hiding this comment

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

[golangci] reported by reviewdog 🐶
only one cuddle assignment allowed before defer statement (wsl)

if err != nil {
t.Fatalf("fetch reader failed: %s", err)
}
defer func() {
Copy link
Contributor

Choose a reason for hiding this comment

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

[golangci] reported by reviewdog 🐶
only one cuddle assignment allowed before defer statement (wsl)

)

func (bst BlobStorageType) String() string {
switch bst {
Copy link
Contributor

Choose a reason for hiding this comment

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

[golangci] reported by reviewdog 🐶
singleCaseSwitch: should rewrite switch statement to if statement (gocritic)

internal/db/storage/blob/s3/s3.go Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented May 19, 2020

Codecov Report

Merging #388 into master will increase coverage by 0.06%.
The diff coverage is 30.18%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #388      +/-   ##
=========================================
+ Coverage    7.85%   7.91%   +0.06%     
=========================================
  Files         353     356       +3     
  Lines       18266   18319      +53     
=========================================
+ Hits         1434    1450      +16     
- Misses      16625   16660      +35     
- Partials      207     209       +2     
Impacted Files Coverage Δ
internal/config/blob.go 0.00% <0.00%> (ø)
internal/db/storage/blob/blob.go 40.00% <40.00%> (ø)
internal/db/storage/blob/option.go 100.00% <100.00%> (ø)

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 36efe03...52564ae. Read the comment docs.

internal/config/blob.go Outdated Show resolved Hide resolved
internal/config/blob.go Outdated Show resolved Hide resolved
internal/db/storage/blob/s3/s3.go Outdated Show resolved Hide resolved
internal/db/storage/blob/s3/s3.go Outdated Show resolved Hide resolved
internal/db/storage/blob/s3/s3.go Outdated Show resolved Hide resolved
internal/db/storage/blob/s3/s3.go Outdated Show resolved Hide resolved
@vdaas-ci
Copy link
Collaborator

[WARNING] Changes in interal/config may require you to change Helm charts. Please check.

@rinx
Copy link
Contributor Author

rinx commented May 19, 2020

@kpango Thanks for your suggestions. I've revised them.

@vdaas-ci
Copy link
Collaborator

[WARNING] Changes in interal/config may require you to change Helm charts. Please check.

@rinx
Copy link
Contributor Author

rinx commented May 19, 2020

/rebase

@vdaas-ci
Copy link
Collaborator

[REBASE] Rebase triggered by rinx for branch: feature/internal/add-db-storage-blob-s3-implementation

rinx added 3 commits May 19, 2020 02:55
Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>
Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>
Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>
@vdaas-ci vdaas-ci force-pushed the feature/internal/add-db-storage-blob-s3-implementation branch from bd77569 to 52564ae Compare May 19, 2020 02:55
@vdaas-ci
Copy link
Collaborator

[WARNING] Changes in interal/config may require you to change Helm charts. Please check.

}

func AtoBST(bst string) BlobStorageType {
switch strings.ToLower(bst) {
Copy link
Contributor

Choose a reason for hiding this comment

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

[golangci] reported by reviewdog 🐶
singleCaseSwitch: should rewrite switch statement to if statement (gocritic)

@kpango
Copy link
Collaborator

kpango commented May 19, 2020

LGTM

@kpango kpango merged commit df143c9 into master May 19, 2020
@kpango kpango deleted the feature/internal/add-db-storage-blob-s3-implementation branch May 19, 2020 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants