test-infra: Rerun auth config does not work well for periodic Prow jobs
What happened:
Currently RerunAuthConfigs in Prow config supports a map, with org/repo, org or * being the key, and a RerunAuthConfig struct as value, see https://github.com/kubernetes/test-infra/blob/9e913caefb4f2d04ee0e5d71b69dcb7fa17b9ed5/prow/config/config.go#L1220
When it checks the rerun auth for a Prow job, it gets the org from pj.Refs, and returns the corresponding RerunAuthConfig, see https://github.com/kubernetes/test-infra/blob/9e913caefb4f2d04ee0e5d71b69dcb7fa17b9ed5/prow/config/config.go#L1223-L1237
This works for presubmit and postsubmit Prow jobs since it always has a Refs field, but not for periodic Prow jobs which do not have. This is providing confusing user experience since most people would want to use it for periodic Prow jobs since there is no /retest command.
What you expected to happen:
Option 1: consider the first pj.Extra_refs in periodic Prow jobs as pj.Refs
Option 2:
Allowing multiple keys to solve this problem more generally, and stating clearly that org/repo as the key does not work for periodic Prow jobs, such as:
- orgRepo: knative
rerun_auth_configs:
- # team id, slug etc.
- cluster: build
rerun_auth_configs:
- # same
How to reproduce it (as minimally and precisely as possible):
Below works for presubmit/postsubmit Prow jobs for some-org, but not for periodic:
some-org:
github_team_slugs:
- org: some-other-org
slug: some-team
Below works for all Prow jobs:
*:
github_team_slugs:
- org: some-other-org
slug: some-team
/area prow
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 17 (17 by maintainers)
@smg247 , I see your point now, and it’s reasonable to use the first ref from
extraRefsas the org/repo, which is been used in other places such as deck already. Please feel free working on this./reopen