ci-tools icon indicating copy to clipboard operation
ci-tools copied to clipboard

ci-operator: label all resources it creates (2nd attempt)

Open Prucek opened this issue 1 year ago • 14 comments

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

Prucek avatar Sep 19 '24 12:09 Prucek

/lgtm

bear-redhat avatar Sep 19 '24 13:09 bear-redhat

/test e2e

Prucek avatar Sep 19 '24 13:09 Prucek

/hold

Prucek avatar Sep 19 '24 13:09 Prucek

/retest

droslean avatar Sep 19 '24 14:09 droslean

/test e2e

Prucek avatar Sep 19 '24 14:09 Prucek

/label tide/merge-method-squash

Prucek avatar Sep 19 '24 14:09 Prucek

/test remaining-required

openshift-ci-robot avatar Sep 20 '24 09:09 openshift-ci-robot

/test remaining-required

openshift-ci-robot avatar Sep 23 '24 10:09 openshift-ci-robot

/retest-required

Prucek avatar Sep 23 '24 10:09 Prucek

/test e2e /test breaking-changes

Prucek avatar Sep 24 '24 08:09 Prucek

/test all

droslean avatar Sep 24 '24 14:09 droslean

/test images

Prucek avatar Sep 25 '24 08:09 Prucek

/label tide/merge-method-squash /hold cancel /lgtm

droslean avatar Sep 25 '24 09:09 droslean

[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

Needs approval from an approver in each of these files:
  • ~~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

openshift-ci[bot] avatar Sep 25 '24 09:09 openshift-ci[bot]

@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.

openshift-ci[bot] avatar Sep 25 '24 12:09 openshift-ci[bot]

/retest-required

Remaining retests: 0 against base HEAD 88263aabcfe67a0cb6d361cac4eff693e3c1b5ed and 2 for PR HEAD 1348d00e23dd3089e44bcd20d532a13d1ee7001a in total

openshift-ci-robot avatar Sep 25 '24 13:09 openshift-ci-robot