8000 fix(hatchery/local): use ServiceName as GroupName (#4351) · ovh/cds@6011fa6 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit 6011fa6

Browse files
authored
fix(hatchery/local): use ServiceName as GroupName (#4351)
Signed-off-by: Yvonnick Esnault <yvonnick.esnault@corp.ovh.com>
1 parent 01ed237 commit 6011fa6

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

engine/hatchery/local/local.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,10 @@ func (h *HatcheryLocal) WorkersStarted() []string {
336336
// WorkerModelsEnabled returns worker model enabled
337337
func (h *HatcheryLocal) WorkerModelsEnabled() ([]sdk.Model, error) {
338338
h.ModelLocal.GroupID = *h.Service().GroupID
339-
h.ModelLocal.Group = h.Service().Group
339+
h.ModelLocal.Group = &sdk.Group{
340+
ID: h.ModelLocal.GroupID,
341+
Name: h.ServiceName(),
342+
}
340343
return []sdk.Model{h.ModelLocal}, nil
341344
}
342345

sdk/hatchery/starter.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,16 +157,12 @@ func spawnWorkerForJob(h Interface, j workerStarterRequest) (bool, error) {
157157

158158
ctxSendSpawnInfo, next := observability.Span(ctx, "hatchery.SendSpawnInfo", observability.Tag("msg", sdk.MsgSpawnInfoHatcheryStarts.ID))
159159
start := time.Now()
160-
var groupName = h.ServiceName()
161-
if j.model.Group != nil {
162-
groupName = j.model.Group.Name
163-
}
164160
SendSpawnInfo(ctxSendSpawnInfo, h, j.id, sdk.SpawnMsg{
165161
ID: sdk.MsgSpawnInfoHatcheryStarts.ID,
166162
Args: []interface{}{
167163
h.Service().Name,
168164
fmt.Sprintf("%d", h.ID()),
169-
fmt.Sprintf("%s/%s", groupName, j.model.Name),
165+
fmt.Sprintf("%s/%s", j.model.Group.Name, j.model.Name),
170166
},
171167
})
172168
next()

0 commit comments

Comments
 (0)
0