mirror of
https://github.com/coder/coder.git
synced 2025-07-13 21:36:50 +00:00
fix(agent/agentcontainers): make sure arch is set for sub agents (#18428)
This commit is contained in:
committed by
GitHub
parent
2f59cd0c73
commit
56ff0fb65a
@ -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