-
Notifications
You must be signed in to change notification settings - Fork 485
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
feat: refactor services to build monolithic service easily #5010
Conversation
fixes edgexfoundry#5009 There is a user requirement that prefers to combine all core services into a single monolithic service. To easily achieve this based on current code structure, refactor following codes: 1. Change the signature of main function for each core services to allow pass os arguments rather than directly parse `os.Args[1:]`. With this change, the single monolithic service can alter the behavior of each individual internal services by passing different arguments. 2. Remove `os.Exit(0)` by end of a successful run of common_config_bootstrapper. This call is redundant and will force monolithic service to exit directly. Signed-off-by: Jude Hung <[email protected]>
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #5010 +/- ##
=======================================
Coverage 28.07% 28.07%
=======================================
Files 243 243
Lines 17591 17590 -1
=======================================
Hits 4938 4938
+ Misses 11525 11524 -1
Partials 1128 1128 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
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
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.
please make the same change to all other services
don't limit to core services
make them consistence
Change the signature of main function for each edgex services to allow pass os arguments rather than directly parse os.Args[1:]. With this change, the single monolithic service can alter the behavior of each individual internal services by passing different arguments. Signed-off-by: Jude Hung <[email protected]>
applied same changes to all edgex services in 9598f85 |
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
fixes #5009
There is a user requirement that prefers to combine all core services into a single monolithic service. To easily achieve this based on current code structure, refactor following codes:
os.Args[1:]
. With this change, the single monolithic service can alter the behavior of each individual internal services by passing different arguments.os.Exit(0)
by end of a successful run of common_config_bootstrapper. This call is redundant and will force monolithic service to exit directly.If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/edgex-go/blob/main/.github/Contributing.md
PR Checklist
Please check if your PR fulfills the following requirements:
BREAKING CHANGE:
describing the break)Testing Instructions
make build
run core-keeper, core-common-config-boostrapper, core-command, core-data, core-metadata, and ensure all bootstraps as expected.
New Dependency Instructions (If applicable)