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

支持设定service name #199

Closed
wants to merge 3 commits into from

Conversation

socket515
Copy link
Contributor

@socket515 socket515 commented Jul 15, 2021

build时候支持设置service_name,不只是使用可执行文件作为name

  1. 补充说明一下这么做的原因,以便评估是否需要
  2. build 不是唯一会编译的命令,还有 install/run

抱歉前段时间有点忙,现在才回复。

  1. 项目部署的服务的文件名都是一样的,需要指定一个服务名来区分不同的微服务进程
  2. 已经在run和intsall补上

@qiniu-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: socket515
To complete the pull request process, please assign lyyyuna
You can assign the PR to them by writing /assign @lyyyuna in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@lyyyuna
Copy link
Collaborator

lyyyuna commented Jul 15, 2021

  1. 补充说明一下这么做的原因,以便评估是否需要
  2. build 不是唯一会编译的命令,还有 install/run

@lyyyuna
Copy link
Collaborator

lyyyuna commented Sep 8, 2021

@socket515 下次回复直接加新留言就行,不要 edit,不然没通知。

对于 flag 名字,建议换一个,这个容易引起误解,并且在 help 中说明 flag 未指定时,service 的默认值是什么。

提供默认值
@socket515
Copy link
Contributor Author

关于flag的名字,profile中也是用service,所以flag使用这个

@CarlJi
Copy link
Collaborator

CarlJi commented Feb 10, 2022

以名字为启动参数的需求

这里能不能补充点详细的信息呢,比如给个例子。@maxiloEmmmm

@maxiloEmmmm
Copy link

maxiloEmmmm commented Feb 10, 2022

@CarlJi
没事了 谢谢, 没仔细看代码
v2的extra可以满足 我通过环境变量注入即可

@maxiloEmmmm
Copy link

maxiloEmmmm commented Feb 10, 2022

@CarlJi
extra可能会被多个同宿client污染 感觉还是需要service name
例子大概是
switch os.args(0)
case...

@codecov
Copy link

codecov bot commented Oct 28, 2022

Codecov Report

Merging #199 (fb2789e) into master (45aee23) will increase coverage by 2.79%.
The diff coverage is 80.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #199      +/-   ##
==========================================
+ Coverage   68.48%   71.27%   +2.79%     
==========================================
  Files          34       34              
  Lines        1745     2012     +267     
==========================================
+ Hits         1195     1434     +239     
- Misses        445      472      +27     
- Partials      105      106       +1     
Flag Coverage Δ
e2e-1.11.x ∅ <ø> (∅)
e2e-1.12.x ∅ <ø> (∅)
e2e-1.13.x ∅ <ø> (∅)
e2e-1.14.x ∅ <ø> (∅)
e2e-1.15.x ∅ <ø> (∅)
e2e-1.16.x ∅ <ø> (∅)
unittest-1.13.x 71.17% <80.00%> (+2.69%) ⬆️
unittest-1.14.x 71.17% <80.00%> (+2.69%) ⬆️
unittest-1.15.x 71.27% <80.00%> (+2.79%) ⬆️
unittest-1.16.x 71.17% <80.00%> (+2.69%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
cmd/run.go 6.12% <0.00%> (+1.24%) ⬆️
pkg/cover/instrument.go 20.83% <ø> (+1.78%) ⬆️
cmd/build.go 67.64% <100.00%> (+4.31%) ⬆️
cmd/commonflags.go 90.90% <100.00%> (-3.04%) ⬇️
cmd/install.go 66.66% <100.00%> (+4.59%) ⬆️
pkg/cover/cover.go 72.15% <100.00%> (+2.53%) ⬆️
pkg/cover/delta.go 87.09% <0.00%> (-2.27%) ⬇️
pkg/build/run.go 0.00% <0.00%> (ø)
pkg/qiniu/mock.go 100.00% <0.00%> (ø)
... and 30 more

@CarlJi CarlJi closed this Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants