Litmusctl should check existence of workflow name before scheduling & add the same if not present already
Closed this issue · 1 comments
If the manifest provided by users doesn't contain name
& only contains generateName
, It fails with empty workflow name.
Issue :
Currently, Litmusctl expects the users to use workflow.metadata.name
explicitly.
Reason :
Graphql-server also checks the workflow name provided via API parameters with workflow.metadata.name
before scheduling so that we are able to track the workflow after scheduling. In UI also, we generate the workflow name ourself if workflow doesn't have it.
How we can enhance this?
Litmusctl can check if workflow contains workflow.metadata.name
or not. If workflow contains workflow.metadata.generateName
& not the workflow.metadata.name
, Litmusctl can add the workflow.metadata.name
by generating it by adding some hash to generateName
. So, workflow.metadata.name
will be workflow.metadata.generateName+(some-hash)
.