-
Notifications
You must be signed in to change notification settings - Fork 171
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
Clean up some duplicated code in cmd/ #3648
Conversation
/azp run ci |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run e2e |
Azure Pipelines successfully started running 1 pipeline(s). |
pkg/util/service/database.go
Outdated
@@ -0,0 +1,71 @@ | |||
package service |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make it more specific?
service
is too general although it only concerns about cosmosdb.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with Ayato. Maybe splitting them into util/database
and util/encryption
would help.
What do you think?
pkg/util/service/helpers.go
Outdated
"github.com/Azure/ARO-RP/pkg/env" | ||
) | ||
|
||
func DBName(isLocalDevelopmentMode bool) (string, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would make more sense to me if env
package has this method (or core
interface?).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree with this one
/azp run e2e |
Azure Pipelines successfully started running 1 pipeline(s). |
e466bc8
to
f64c758
Compare
/azp run ci, e2e |
Azure Pipelines successfully started running 2 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small suggestion but this is a great change imo
pkg/util/service/database.go
Outdated
@@ -0,0 +1,71 @@ | |||
package service |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with Ayato. Maybe splitting them into util/database
and util/encryption
would help.
What do you think?
Please rebase pull request. |
f64c758
to
f408e3a
Compare
/azp run ci, e2e |
Azure Pipelines successfully started running 2 pipeline(s). |
/azp run e2e |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Which issue this PR addresses:
Part of issues.redhat.com/browse/ARO-4895 (breaking out #3571)
What this PR does / why we need it:
Reduces some duplication in cmd/ that will get repeated in MIMO
Test plan for issue:
Unit tests, E2E
Is there any documentation that needs to be updated for this PR?
N/A
How do you know this will function as expected in production?
E2E