openshift / ci-operator-prowgen

A generator for Prow job configuration from CI Operator configuration

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does not remove targets when ci-operator config removes test

chancez opened this issue · comments

I basically added 2 tests, verify, and unit when I first created my ci-operator config. Later I removed the verify target from the ci-operator config, and re-ran docker run -it -v $(pwd)/ci-operator:/ci-operator:z registry.svc.ci.openshift.org/ci/ci-operator-prowgen:latest --from-dir /ci-operator/config/ --to-dir /ci-operator/jobs but the prow job file didn't get updated to remove the contents relating to the verify target.

That was intentional because prowgen checks your already existing presubmit yaml file and allow you to have the extra job that doesn't exist to the ci-operator config.

I wouldn't call it "intentional", it's a side effect of the naive way how unknown jobs are handled. If we do not generate something, we just leave it as it is, even if we generated it earlier. There's room for improvement here - maybe we can annotate generated jobs?