fix(agent/agentcontainers): make sure arch is set for sub agents (#18428)

This commit is contained in:
Mathias Fredriksson
2025-06-18 17:35:29 +03:00
committed by GitHub
parent 2f59cd0c73
commit 56ff0fb65a
2 changed files with 15 additions and 0 deletions

View File

@ -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 {