-
Notifications
You must be signed in to change notification settings - Fork 133
feat: support singleton mode #191
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
Conversation
test: ut cover cmd
| func registerHandlers() { | ||
| {{if .Singleton}} | ||
| ln, _, err := listen() |
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.
The purpose of this statement seems to avoid the scenario that in Singleton mode, the host variable is defined, but not used, right?
if yes, i prefer to print extra information to enhance it, like:
ln, host, err := listen()
if err != nil {
log.Fatalf("listen failed, err:%v", err)
}
profileAddr := "http://" + host
log.Debugf("[goc] goc profile address: %s \n", profileAddr)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.
good practice, i'll make change
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.
seems this comment was not resolved, what's happening?
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.
log output will impact e2e test that assert gocc output @CarlJi
|
hi @Rrylee , thanks for your contributions. 👍 Besides the review comments and fix failed ci jobs, it's also great to add a e2e case to cover the singleton scenario from goc CLI side. You can refer this for example https://github.com/qiniu/goc/blob/master/tests/build.bats#L36 |
Codecov Report
@@ Coverage Diff @@
## master #191 +/- ##
==========================================
+ Coverage 68.00% 68.48% +0.47%
==========================================
Files 34 34
Lines 1738 1745 +7
==========================================
+ Hits 1182 1195 +13
+ Misses 451 445 -6
Partials 105 105
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: CarlJi, rrylee The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
nice, i can build a new private image ignore goc-server |
support run singleton. Not always need a goc server