ci-tools
ci-tools copied to clipboard
ci-operator: label all resources it creates (2nd attempt)
This PR resolves issues:
{ could not create RPM repo server deployment: Deployment.apps "rpm-repo" is invalid: [spec.selector.matchLabels: Invalid value: "[images]": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?'), spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{"OPENSHIFT_CI":"true", "app":"rpm-repo", "ci.openshift.io/jobid":"a48ae780-8696-4a50-9c09-c173d61e75ad", "ci.openshift.io/jobname":"branch-ci-openshift-kubernetes-release-4.17-images", "ci.openshift.io/jobtype":"postsubmit", "ci.openshift.io/metadata.branch":"release-4.17", "ci.openshift.io/metadata.org":"openshift", "ci.openshift.io/metadata.repo":"kubernetes", "ci.openshift.io/metadata.target":"[images]", "ci.openshift.io/metadata.variant":"", "ci.openshift.io/ttl.ignore":"true", "created-by-ci":"true"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: invalid label selector]}
by cloning (maps.Clone()) the lables first before working with them.
And:
{ failed to get CLI image: unable to tag the 'cli' image into the stable stream: ImageStreamTag.image.openshift.io "stable:cli" is invalid: metadata: Invalid value: "": may not update fields other than metadata.annotations}
by not applying the labels when client.Update() is done, NS are handled separately
Original PR: https://github.com/openshift/ci-tools/pull/4306 Reverts: https://github.com/openshift/ci-tools/pull/4320
/lgtm
/test e2e
/hold
/retest
/test e2e
/label tide/merge-method-squash
/test remaining-required
/test remaining-required
/retest-required
/test e2e /test breaking-changes
/test all
/test images
/label tide/merge-method-squash /hold cancel /lgtm
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: bear-redhat, droslean, Prucek
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [Prucek,bear-redhat,droslean]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
@Prucek: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:
| Test name | Commit | Details | Required | Rerun command |
|---|---|---|---|---|
| ci/prow/security | 1348d00e23dd3089e44bcd20d532a13d1ee7001a | link | false | /test security |
Full PR test history. Your PR dashboard.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.
/retest-required
Remaining retests: 0 against base HEAD 88263aabcfe67a0cb6d361cac4eff693e3c1b5ed and 2 for PR HEAD 1348d00e23dd3089e44bcd20d532a13d1ee7001a in total