Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kogito-serverless-operator: generate stable names for workflow resources
Motivation: Workflowproj generates a configmap per schema or subflow or specs in a separate file for each one, however the name is not deterministic. In one iteration you can get the specs in 01-configmap-FLOWNAME-resources.yaml and in the next iteration the same content will go in 02-configmap-FLOWNAME-resources.yaml. While the flow spec file will be updated accordingly and stay correct, the behaviour generates lots of changes when tracking changes in git. Modification: This fix will make the generation behaviour deterministic by sorting the resources iteration prior to generating them and also add the related schemas|specs/subflows to the generated file name: Result: old schema configmap manifest: 0x-configmap-FLOWNAME-resources.yaml new schema configmap manifest: 01-configmap-FLOWNAME-resources-schemas.yaml old specs config map manifest: 0x-configmap-FLOWNAME-resources.yaml new specs configmap manifest: 02-configmap-FLOWNAME-resources-specs.yaml old subflows config map manifest: 0x-configmap-FLOWNAME-resources.yaml new subflows configmap manifest: 01-configmap-FLOWNAME-resources-subflows.yaml Also the name of the config map itself will get the name related to the content like: '03-FLOWNAME-resources-schemas' Signed-off-by: Roy Golan <[email protected]>
- Loading branch information