Repository navigation
[release-4.21] OCPBUGS-140844: Add machineconfignode, pinnedimageset, machineosconfig, and machineosbuild resources to relatedObjects - #6759
Conversation
… machineosbuild resources to relatedObjects
|
Pipeline controller notification This PR uses the pipeline controller for second-stage tests. Selection and triggering follow the repository configuration. Use |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
| Check name | Status | Explanation |
|---|---|---|
| Stable And Deterministic Test Names | The check covers Ginkgo test titles (It, Describe, Context, When). This PR (openshift/machine-config-operator #6759, author isabella-janssen) only adds four resources to the ClusterOperator relatedObj… |
|
| Test Structure And Quality | The check applies to Ginkgo test code. The PR changes the MCO ClusterOperator relatedObjects list in pkg/operator/status.go and does not add any Ginkgo It/Describe blocks, ote.Informing() ca… |
|
| Microshift Test Compatibility | The check applies only to new Ginkgo e2e tests (It/Describe/Context/When). This PR is a manual cherry-pick of #6706. It adds machineconfignode, pinnedimagesets, `m… |
|
| Single Node Openshift (Sno) Test Compatibility | The check applies only when new Ginkgo e2e tests (It/Describe/Context/When) are added. This PR (#6759, author isabella-janssen, a manual cherry-pick of #6706) changes … |
|
| Topology-Aware Scheduling Compatibility | The check applies when deployment manifests, operator code, or controllers add or modify scheduling constraints. This PR is a manual cherry-pick (per the PR description) that adds four entries to the … | |
| Ote Binary Stdout Contract | The check applies to OTE binary process-level stdout (main, init, TestMain, suite setup, top-level initializers). This PR is a cherry-pick that adds four entries (machineconfignodes, pinnedimagesets, … | |
| Ipv6 And Disconnected Network Test Compatibility | The check applies only to newly added Ginkgo e2e tests (It, Describe, Context, When). This PR adds none. The PR (cherry-pick of #6706, OCPBUGS-140844) changes only `pk… | |
| No-Weak-Crypto | The PR (openshift/machine-config-operator #6759, author isabella-janssen) adds four machineconfiguration.openshift.io entries to syncRelatedObjects in pkg/operator/status.go: `machineconfignodes… |
|
| Container-Privileges | The check flags privileged containers, host namespaces, SYS_ADMIN, root containers, and allowPrivilegeEscalation in container or Kubernetes manifests. PR #6759 (openshift/machine-config-operator, auth… |
|
| No-Sensitive-Data-In-Logs | The check looks for logging that may expose passwords, tokens, API keys, PII, session IDs, internal hostnames, or customer data. The PR (openshift/machine-config-operator #6759, a cherry-pick of #6706… |
Full details: Stable And Deterministic Test Names
-
Explanation
The check covers Ginkgo test titles (It, Describe, Context, When). This PR (openshift/machine-config-operator
#6759, author isabella-janssen) only adds four resources to the ClusterOperator relatedObjects list in pkg/operator/status.go. It also adds one plain Go unit test, TestSyncRelatedObjectsContainsMachineConfigurationTypes, in pkg/operator/status_test.go. Neither file imports Ginkgo, and status_test.go contains no g.It or g.Describe titles. The added test name is static and descriptive, so it would also satisfy the naming rule if the check were applied to Go test names. The legacy openshift-tests-private tokens (Author:, NonHyperShiftHOST, ROSA/OSD_CCS/ARO, Polarion IDs) do not appear in the changed code. No Ginkgo titles are introduced, so the check is inapplicable and passes. Limitation: the local git history is a single squashed commit (5628168), so the PR diff was inferred from the PR description and by reading the touched files directly, not from a per-PR diff.
Full details: Test Structure And Quality
-
Explanation
The check applies to Ginkgo test code. The PR changes the MCO ClusterOperator
relatedObjectslist inpkg/operator/status.goand does not add any GinkgoIt/Describeblocks,ote.Informing()calls, orEventually/Consistentlywaits. Evidence: - The repository is a single squashed commit (5628168), so no pre-change base was available. I identified PR-relevant test code by content, not by diff. - The only related test isTestSyncRelatedObjectsContainsMachineConfigurationTypesinpkg/operator/status_test.go(lines 829-853). It is a plain Gotestingtest using testifyassert. It imports no Ginkgo, Gomega, orotepackages. - The test creates no cluster-scoped resources. It builds an in-memoryClusterOperator, callssyncRelatedObjects, and checks that the expectedmachineconfiguration.openshift.ioresources are present. No cleanup is needed. - Its assertion includes a meaningful failure message: "relatedObjects must include %s for oc adm inspect to collect it". - Thetest/e2e-2of2/mcn_test.gohits referencemachineconfignodesbut are pre-existing and not part of this change's test additions. I did not find evidence that they were added by this PR. Criterion 6 (informing) targets new GinkgoIt()blocks. None were added, so it does not apply. Because the check is scoped to Ginkgo code and the PR adds none, the check is not applicable and passes.
Full details: Microshift Test Compatibility
-
Explanation
The check applies only to new Ginkgo e2e tests (It/Describe/Context/When). This PR is a manual cherry-pick of #6706. It adds
machineconfignode,pinnedimagesets,machineosconfigs, andmachineosbuildsto the ClusterOperatorrelatedObjectslist. Evidence gathered: -install/0000_80_machine-config_06_clusteroperator.yamllists the four newmachineconfiguration.openshift.ioresources inrelatedObjects(lines 30-37). -pkg/operator/status.godefinessyncRelatedObjects, which populates those objects. -pkg/operator/status_test.golines 829-853 addTestSyncRelatedObjectsContainsMachineConfigurationTypes. This is a standardtesting.Tunit test, not a GinkgoIt/Describee2e test. - The PR description's verification steps are manualoccommands. They do not add any Ginkgo test. Limitation: the local HEAD is a single root commit, andorigin/mainis an unrelated, much larger base. So the PR patch could not be diffed cleanly. No new Ginkgo test file org.Itblock was identified that the PR introduces. The existing[apigroup:machineconfiguration.openshift.io]tests intest/extendedandtest/extended-privpredate this change. None of the changed code is a new e2e test, so no MicroShift-compatibility failure condition is triggered.
Full details: Single Node Openshift (Sno) Test Compatibility
-
Explanation
The check applies only when new Ginkgo e2e tests (It/Describe/Context/When) are added. This PR (#6759, author isabella-janssen, a manual cherry-pick of
#6706) changes ClusterOperatorrelatedObjectsfor four machineconfiguration.openshift.io resources. Evidence gathered: - The checkout is a single-commit snapshot (commit 5628168, no parent), so a PR base diff is not available. The file-level diff therefore could not be isolated. - The PR description describes only the relatedObjects change and manualocverification steps. It mentions no new Ginkgo tests. - The relatedObjects logic is in pkg/operator/status.go (syncRelatedObjects, around lines 51-80 and 461-462). The only test tied to it,TestSyncRelatedObjectsContainsMachineConfigurationTypesin pkg/operator/status_test.go (line 829), is a standard Go unit test, not a Ginkgo e2e test. - A search of test/ forrelatedObjectsand the four resource names found no Ginkgo test that asserts on relatedObjects. The Ginkgo files that reference these resources (test/extended/machineconfignode.go, test/extended/image_mode_status_reporting.go, test/extended-priv/*) were not shown to be added by this PR. Because the PR does not add Ginkgo e2e tests, the SNO topology review does not apply. The base diff was not available, so this rests on the PR description and the scope of the visible change, not on a full diff review.
Full details: Topology-Aware Scheduling Compatibility
-
Explanation
The check applies when deployment manifests, operator code, or controllers add or modify scheduling constraints. This PR is a manual cherry-pick (per the PR description) that adds four entries to the machine-config ClusterOperator
relatedObjectslist:machineconfignodes,pinnedimagesets,machineosconfigs, andmachineosbuilds(groupmachineconfiguration.openshift.io). The current tree shows these entries inpkg/operator/status.go(lines 63-66) andinstall/0000_80_machine-config_06_clusteroperator.yaml(lines 31-37), with the expected test list inpkg/operator/status_test.go. None of these are scheduling-related. The repository is a single squashed commit, so a line-by-line diff against a base was not available. The evidence still does not show any affinity, anti-affinity, toleration, nodeSelector, topology-spread, replica-count, or PDB change introduced by this PR. The PR description also describes only the relatedObjects change. No topology-sensitive scheduling constraint is introduced, so no failure condition is met.
Full details: Ote Binary Stdout Contract
-
Explanation
The check applies to OTE binary process-level stdout (main, init, TestMain, suite setup, top-level initializers). This PR is a cherry-pick that adds four entries (machineconfignodes, pinnedimagesets, machineosconfigs, machineosbuilds) to the
syncRelatedObjectsslice in pkg/operator/status.go, with a matching assertion in pkg/operator/status_test.go. Neither file is part of the OTE test binary. The OTE binary is cmd/machine-config-tests-ext/main.go. Its main() was reviewed and it has no stdout writes in the PR's changes. The PR does not modify that file, and the added lines contain no fmt.Print*, os.Stdout, klog, or log output calls. The check is therefore inapplicable to this change, and no new process-level stdout write is introduced. Note: the sandbox HEAD commit contains the full tree, so the diff was checked by file content and the PR description rather than a clean patch. The conclusion holds because the relevant changes are limited to operator status code.
Full details: Ipv6 And Disconnected Network Test Compatibility
-
Explanation
The check applies only to newly added Ginkgo e2e tests (It, Describe, Context, When). This PR adds none. The PR (cherry-pick of #6706, OCPBUGS-140844) changes only
pkg/operator/status.go, wheresyncRelatedObjectsadds fourmachineconfiguration.openshift.ioentries to the ClusterOperatorrelatedObjects:machineconfignodes,pinnedimagesets,machineosconfigs, andmachineosbuilds. It also addsTestSyncRelatedObjectsContainsMachineConfigurationTypesinpkg/operator/status_test.go. That test is a plain Gotesting.Tunit test, not a Ginkgo spec. A grep ofpkg/operator/found nog.It(,g.Describe(, orginkgo.usage. The added code contains no IP literals, IP parsing, external URLs, or network connectivity. Because the repository is a single root commit, I could not isolate a diff against a parent. I identified the changed code from the commit contents and the PR description, which is sufficient for this check.
Full details: No-Weak-Crypto
-
Explanation
The PR (openshift/machine-config-operator
#6759, author isabella-janssen) adds fourmachineconfiguration.openshift.ioentries tosyncRelatedObjectsinpkg/operator/status.go:machineconfignodes,pinnedimagesets,machineosconfigs, andmachineosbuilds. Its test assertion inpkg/operator/status_test.goalso covers these entries. The PR description describes only this change, a cherry-pick of#6706. The check flags weak cryptography (MD5, SHA1, DES, RC4, 3DES, Blowfish, ECB), custom crypto, and non-constant-time comparison of secrets or tokens. Searches ofpkgandcmdfound MD5 usage inpkg/controller/render/hash.goandpkg/controller/build/buildrequest/machineosbuild.go. Neither file is part of the described change, and both are pre-existing content hashing. The added lines contain no cryptographic primitive, no cipher, and no secret comparison. Limitation: the sandbox shows the PR commit as a full-tree addition, so a line-level base diff was not available. The PASS relies on the commit message, the PR description, and thestatus.gohunk. None of these show a crypto change.
Full details: Container-Privileges
-
Explanation
The check flags privileged containers, host namespaces, SYS_ADMIN, root containers, and allowPrivilegeEscalation in container or Kubernetes manifests. PR
#6759(openshift/machine-config-operator, author isabella-janssen) only adds four machineconfiguration.openshift.io resources to ClusterOperator relatedObjects, which the must-gather/inspect tooling reads. Evidence: - pkg/operator/status.go, syncRelatedObjects (lines 51-79): adds machineconfignodes, pinnedimagesets, machineosconfigs, and machineosbuilds entries to coStatusCopy.RelatedObjects. The other entries are unchanged. - pkg/operator/status.go, around line 461: the bootstrap-time relatedObjects list is unchanged in the security sense. It holds only namespaces, MCPs, controllerconfigs, and machineconfigurations. - install/0000_80_machine-config_06_clusteroperator.yaml: the ClusterOperator status lists the same four resources. It contains no pod spec, container, or securityContext fields. - pkg/operator/status_test.go, TestSyncRelatedObjectsContainsMachineConfigurationTypes: a unit test that asserts those resources are present. It adds no workload configuration. The repository snapshot is a single squashed commit with no parent, so the exact PR patch cannot be isolated from history. The files the PR description and summary name were read directly. None of them contains privileged, hostPID, hostNetwork, hostIPC, SYS_ADMIN, runAsUser 0, or allowPrivilegeEscalation settings. Matches in the commit belong to vendored code and unrelated manifests, not to this change. No explicit failure condition of the check is introduced.
Full details: No-Sensitive-Data-In-Logs
-
Explanation
The check looks for logging that may expose passwords, tokens, API keys, PII, session IDs, internal hostnames, or customer data. The PR (openshift/machine-config-operator
#6759, a cherry-pick of#6706, by isabella-janssen) adds fourObjectReferenceentries tosyncRelatedObjectsinpkg/operator/status.go(lines 63-66:machineconfignodes,pinnedimagesets,machineosconfigs,machineosbuilds). It also updates the matchingrelatedObjectslist ininstall/0000_80_machine-config_06_clusteroperator.yamland adds test entries inpkg/operator/status_test.go. None of these changes adds a log statement or writes any runtime value to logs. The Go-diff grep for new klog/Infof/Errorf-style lines in the commit returned no matches. The PR therefore introduces no logging that could expose sensitive data.
|
Skipping CI for Draft Pull Request. |
|
/jira cherrypick OCPBUGS-136140 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@isabella-janssen: Jira Issue OCPBUGS-136140 has been cloned as Jira Issue OCPBUGS-140844. Will retitle bug to link to clone. DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
machineconfignode, pinnedimageset, machineosconfig, and machineosbuild resources to relatedObjectsmachineconfignode, pinnedimageset, machineosconfig, and machineosbuild resources to relatedObjects
|
@isabella-janssen: This pull request references Jira Issue OCPBUGS-140844, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
machineconfignode, pinnedimageset, machineosconfig, and machineosbuild resources to relatedObjectsmachineconfignode, pinnedimageset, machineosconfig, and machineosbuild resources to relatedObjects
|
Chai risk assessment for Tier: Low Reason: This change adds four existing MCO resource types (machineconfignodes, pinnedimagesets, machineosconfigs, machineosbuilds) to the ClusterOperator's Change it with /label chai-risk-assessment/low |
|
@isabella-janssen: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. |
Closes: OCPBUGS-140844
- What I did
This is a manual cherrypick of #6706.
- How to verify it
Test on a 4.21 cluster with this PR included that has at least one PinnedImageSet applied and OCL enabled.
/tmp/mco-inspectmachineconfiguration.openshift.iorelated objects from step 1 and targetted by this bug are included in themachineconfiguration.openshift.iodirectory- Description for the changelog
OCPBUGS-140844: Add
machineconfignode,pinnedimageset,machineosconfig, andmachineosbuildresources torelatedObjects