-
Notifications
You must be signed in to change notification settings - Fork 20
Handle sharded ci-operator CMs in rehearse #104
Handle sharded ci-operator CMs in rehearse #104
Conversation
| continue | ||
| } | ||
| if env.ValueFrom.ConfigMapKeyRef.Name == config.CiOperatorConfigsCMName { | ||
| if config.IsCiopConfigCM(env.ValueFrom.ConfigMapKeyRef.Name) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait so this method just returns any presubmit that uses ci-op in a configmap mount? How's it used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The method returns any presubmit that references one of the configs in ciopConfigs. The rehearsal main() uses this method to obtain a set of jobs that were affected by a change to a ciop config - it passes just the ciop configs that were changed into this method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is it doing the filtering for things actually in the ciopConfigs? Right now it returns any presubmit that mounts any CI Op config file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// if it is one of the CMs with ciop configs
if config.IsCiopConfigCM(env.ValueFrom.ConfigMapKeyRef.Name) {
// if the key into the CM is one of the filenames in `ciopConfigs`
if _, ok := ciopConfigs[env.ValueFrom.ConfigMapKeyRef.Key]; ok {
ret.Add(repo, job)
}
}
- Regenerate generated jobs with recent Prowgen, changing: - ci-operator-configs CM names - remove `--target=[release:latest]` from some jobs - remove CPU limits from jobs
Previously, rehearse assumed all ci-operator configs live in a single CM, called "ci-operator-configs". After openshift/release PR#3009, this is no longer true, so the two places that work with ci-operator configs (change detection and ciop config inlining) need to be adjusted.
f4337d8 to
ef7ae54
Compare
| - --artifact-dir=$(ARTIFACTS) | ||
| - --give-pr-author-access-to-namespace=true | ||
| - --target=[images] | ||
| - --target=[release:latest] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is surprising -- @smarterclayton ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's expected after regeneration - the source file is https://github.com/openshift/ci-operator-prowgen/blob/master/test/pj-rehearse-integration/candidate/ci-operator/config/super/duper/super-duper-ciop-cfg-change.yaml - it does not have a promotion stanza so prowgen does not generate this target, because such component would not promote any images.
| cpu: 10m | ||
| serviceAccountName: ci-operator | ||
| trigger: ((?m)^/test( all| images),?(\s+|$)) | ||
| trigger: '(?m)^/test (?:.*? )?images(?: .*?)?$' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How was this not broken before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are just test jobs for rehearse, I believe this field is not used anywhere.
stevekuznetsov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: petr-muller, stevekuznetsov The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
3 similar comments
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
Previously, rehearse assumed all ci-operator configs live in a single
CM, called
ci-operator-configs. After openshift/release PR#3009, thisis no longer true, so the two places that work with ci-operator configs
(change detection and ciop config inlining) need to be adjusted.
Builds on #101