curl -XPOST http://localhost:4000/api/v1/applicationsets --d '{"apiVersion":"argoproj.io/v1alpha1","kind":"ApplicationSet","metadata":{"name":"guestbook"},"spec":{"goTemplate":true,"goTemplateOptions":["missingkey=error"],"generators":[],"template":{"metadata":{"name":"guestbook"},"spec":{"project":"my-project","source":{"repoURL":"https://github.com/infra-team/cluster-deployments.git","targetRevision":"HEAD","path":"guestbook/foo"},"destination":{"server":"localhost","namespace":"guestbook"}}}}}'
Results in a 500
{"error":"error creating ApplicationSets: ApplicationSets is nil in request","code":2,"message":"error creating ApplicationSets: ApplicationSets is nil in request"}%
Expected behavior
Should return 200 on a valid applicationset or 400 with an invalid
Checklist:
argocd version
.Describe the bug
Introduced in https://github.com/argoproj/argo-cd/commit/3a5b653fb153edff37ca1460ef34d44301bf23a5, the
Generate
definespost: /api/v1/applicationsets
which already exists as theCreate
rpc, breaking the existing API.To Reproduce
{"error":"error creating ApplicationSets: ApplicationSets is nil in request","code":2,"message":"error creating ApplicationSets: ApplicationSets is nil in request"}%
Expected behavior Should return 200 on a valid applicationset or 400 with an invalid
Screenshots
Version
Logs