Generate operators in CI
Resolves #3 (closed).
Revamps our CI:
- Search for all
operators-(.*)\.toml
files automatically. - Regenerate all operators from those files (deletes all generated code that was checked in).
- Add a manually triggered job to create an MR with the new changes and freshly generated code.
This greatly simplifies the development process as now, the operators must not be generated locally by the developer (which can be a quite lengthy process).
The implementation might seem a little complicated at first.
We (I) want to automatically collect all toml
files instead of listing them in the CI YAML
, so that anyone can add or remove toml
files without any extra thinking.
Therefore, we need to start a parent job that walks the directory and creates a child pipeline for the actual generation.
I am not sure why the CI produced different code from what was already in the repository (for those three changed files). This could be a determinism issue in the generator.
Merge request reports
Activity
added ci-generate-operators label
assigned to @he66coqe
requested review from @mohr
- Resolved by Marcus Mohr
A dynamically generated child pipeline, I am really impressed
Just small questions/suggestions:- Could we rename
file-mr
to something more verbose, e.g.submit-merge-request
? - Why do you mark the MR as Draft? It means the first thing I as user need to do is edit the MR's title? Because of our merge policy.
- I am not so happy with the MR's name. Wouldn't something like
Operators for $CI_COMMIT_SHA
orOperators for $CI_COMMIT_TITLE
be more talkative in the long run?
- Could we rename
added 2 commits
mentioned in commit a436c630