openshift / ci-operator-prowgen

A generator for Prow job configuration from CI Operator configuration

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WARN: Generated job name is longer than 63 characters

tnozicka opened this issue · comments

$ go run cmd/ci-operator-prowgen/main.go --from-dir ../release/ci-operator/config/openshift/cluster-openshift-controller-manager-operator --to-dir ../release/ci-operator/jobs
WARN[0000] Generated job name is longer than 63 characters. This may cause issues when Prow attempts to label resources with job name.  name=pull-ci-openshift-cluster-openshift-controller-manager-operator-master-verify
WARN[0000] Generated job name is longer than 63 characters. This may cause issues when Prow attempts to label resources with job name.  name=pull-ci-openshift-cluster-openshift-controller-manager-operator-master-unit
WARN[0000] Generated job name is longer than 63 characters. This may cause issues when Prow attempts to label resources with job name.  name=pull-ci-openshift-cluster-openshift-controller-manager-operator-master-images
WARN[0000] Generated job name is longer than 63 characters. This may cause issues when Prow attempts to label resources with job name.  name=branch-ci-openshift-cluster-openshift-controller-manager-operator-master-images

AFAICS the name is taken from the repo name so I can't influence it. The tool needs to handle it, not complain to me about something I can't configure.

/kind bug
/cc @stevekuznetsov

It's a warning. You can ignore it if you haven't written the job. We will gracefully handle names that are too long downstream of the config. How can we make the output better?

We should probably just support overriding the job name from the ci-operator config.

Why? Job name is opaque to users once it's committed to config. We just don't want people going crazy. Only reason this is even warned about is that we add the job name to a label on our CRD and want to be able to use label selectors to get at branches

Seems more obvious than trying to turn the generated name into something short enough. Is labels potentially overlapping not a problem?

No, truncating them and having them overlap is the issue. But job names -- internal names to Prow, not the context names that show up to devs on PRs -- are an implementation detail and we shouldn't really care about them. This is a warning in case your actual job name is long. The logic right now gating this warning is checking to see how long your generated org/repo/branch prefix is and if you have a lot of room before you hit the label size limit, and you hit it, then you're perhaps making a really long job name.