Skip to content

Conversation

@tnqv
Copy link
Contributor

@tnqv tnqv commented Nov 29, 2020

What this PR does / why we need it:

  • Allow input username and password mongodb via file
  • Currently support SCRAM for default authMechanism

Which issue(s) this PR fixes:

Fixes #683

Does this PR introduce a user-facing change?:

Yes, user can input username or password via file from control-plane configs

Copy link
Member

@nakabonne nakabonne left a comment

Choose a reason for hiding this comment

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

Great work. Left a trivial comment, while looks pretty neat entirely. Thank you!

const (
// Scram type ref https://github.com/mongodb/mongo-go-driver/blob/9e2aca8afd8821e6b068cc2f25192bc640d90a0d/mongo/client_examples_test.go#L119
// Default
Scram string = "SCRAM"
Copy link
Member

Choose a reason for hiding this comment

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

nit: I feel like we can keep it private until needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@nakabonne Thanks for your review, I change it to unexported one. Please check again when you have time 👍 👍

@nakabonne
Copy link
Member

/trigger presubmit

@nakabonne
Copy link
Member

/trigger presubmits

@pipecd-bot
Copy link
Collaborator

TRIGGER

@nakabonne: Your requested presubmits has been scheduled in response to this comment.

@pipecd-bot
Copy link
Collaborator

COVERAGE

Code coverage for golang is 33.20%. This pull request does not change code coverage.

}
return mongodb.NewMongoDB(ctx, mdConfig.URL,
mdConfig.Database,
options...)
Copy link
Member

Choose a reason for hiding this comment

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

nit: Just want to be unified with our coding conventions.

mongodb.NewMongoDB(
   ctx,
   mdConfig.URL,
   ...,
)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@nghialv
Thanks for your review.
I changed it to match the coding conventions. Please check it again when you have time 👍 👍

@nghialv
Copy link
Member

nghialv commented Nov 30, 2020

/lgtm
Great work. Thank you.

@pipecd-bot pipecd-bot removed the lgtm label Nov 30, 2020
@nakabonne
Copy link
Member

/trigger presubmits

@pipecd-bot
Copy link
Collaborator

TRIGGER

@nakabonne: Your requested presubmits has been scheduled in response to this comment.

@nakabonne
Copy link
Member

@tnqv Thank you. You're the best!
/approve

@pipecd-bot
Copy link
Collaborator

APPROVE

This pull request is APPROVED by nakabonne.

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 4ad197c into pipe-cd:master Dec 1, 2020
@pipecd-bot pipecd-bot mentioned this pull request Dec 16, 2020
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.

Enable to specify username and password via file.

4 participants