mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix(agent/agentcontainers): make sure arch is set for sub agents (#18428)
This commit is contained in:
@@ -252,6 +252,15 @@ func (m *fakeSubAgentClient) Create(ctx context.Context, agent agentcontainers.S
|
||||
}
|
||||
}
|
||||
}
|
||||
if agent.Name == "" {
|
||||
return agentcontainers.SubAgent{}, xerrors.New("name must be set")
|
||||
}
|
||||
if agent.Architecture == "" {
|
||||
return agentcontainers.SubAgent{}, xerrors.New("architecture must be set")
|
||||
}
|
||||
if agent.OperatingSystem == "" {
|
||||
return agentcontainers.SubAgent{}, xerrors.New("operating system must be set")
|
||||
}
|
||||
agent.ID = uuid.New()
|
||||
agent.AuthToken = uuid.New()
|
||||
if m.agents == nil {
|
||||
|
||||
Reference in New Issue
Block a user