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 minio client #693

Merged
merged 2 commits into from
Aug 26, 2020
Merged

Add minio client #693

merged 2 commits into from
Aug 26, 2020

Conversation

nakabonne
Copy link
Member

What this PR does / why we need it:
This PR lets us utilize minio as a filestore.

Which issue(s) this PR fixes:

Fixes #35

Does this PR introduce a user-facing change?:

NONE

@@ -56,5 +56,4 @@ type Store interface {
Lister
Closer
NewReader(ctx context.Context, path string) (io.ReadCloser, error)
NewWriter(ctx context.Context, path string) io.WriteCloser
Copy link
Member Author

Choose a reason for hiding this comment

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

NewWriter is unused by anywhere, so got rid of it.

@pipecd-bot
Copy link
Collaborator

COVERAGE

Code coverage for golang is 20.10%. This pull request decreases coverage by -0.01%.

File Function Base Head Diff
pkg/app/api/stagelogstore/filestore.go stageLogFileStore.Get 95.45% 90.91% -4.55%

@@ -145,12 +145,12 @@ func (s *server) run(ctx context.Context, t cli.Telemetry) error {

fs, err := s.createFilestore(ctx, cfg, t.Logger)
if err != nil {
t.Logger.Error("failed creating firestore", zap.Error(err))
t.Logger.Error("failed creating filestore", zap.Error(err))
Copy link
Member

Choose a reason for hiding this comment

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

"failed to create ..."

return err
}
defer func() {
if err := fs.Close(); err != nil {
t.Logger.Error("failed closing firestore client", zap.Error(err))
t.Logger.Error("failed closing filestore client", zap.Error(err))
Copy link
Member

Choose a reason for hiding this comment

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

"failed to close ..."

}

func (s *Store) ListObjects(ctx context.Context, prefix string) ([]filestore.Object, error) {
return nil, nil
objectsCh := s.client.ListObjects(ctx, s.bucket, minio.ListObjectsOptions{Prefix: prefix, Recursive: true})
Copy link
Member

Choose a reason for hiding this comment

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

objectCh

@nghialv
Copy link
Member

nghialv commented Aug 26, 2020

/approve

@pipecd-bot
Copy link
Collaborator

APPROVE

This pull request is APPROVED by nghialv.

Approvers can cancel the approval by writing /approve cancel in a comment. Any additional commits also will change this pull request to be not-approved.

@pipecd-bot pipecd-bot merged commit 91d087e into master Aug 26, 2020
@pipecd-bot pipecd-bot deleted the minio branch August 26, 2020 02:00
@pipecd-bot
Copy link
Collaborator

TEMPLATE

failed to handle template rule examples

Details
Error: unabled to push rendered files to destination

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.

Add filestore client for Minio
3 participants