test-infra: ProwJobs should have unique names (don't allow branch sharded variants to share a name)

ref: https://github.com/kubernetes/test-infra/pull/8466, https://github.com/kubernetes/test-infra/issues/8852

Currently it is impossible to look up the configuration for a presubmit or postsubmit job based on just the job name because job names are not required to be unique. We use this to specify different variants of a job for different branches, but still report under the same job name. However, this is what the presubmit context field is for and postsubmits do not report to GitHub.

Are there any reasons to continue allowing duplicate job names or can we consider enforcing unique job names?

cc @fejta @stevekuznetsov @sebastienvas @munnerz @adrcunha @BenTheElder @krzyzacy /area prow

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 28 (20 by maintainers)

Most upvoted comments

Thanks for understanding. branch can be a regex right ?

There is one use case where setting unique name will make sense: If you can define your job separately from your triggers such that you can refer to it, and I think that’s where @cjwagner is getting at.

In practice we already do this today. The only job names that collide are variations of the same job for different branches (which have the same authors/owners). Global uniqueness would be enforced with presubmit config validation.

I think I’m for this – we have unique names anyway as we generate our jobs and use the name field as the identifier, context as the user-facing name. Flakiness data should be better after this change as flakes between branches aren’t necessarily related.