Skip to content

OCPBUGS-76919: add listtype atomic#2713

Open
kannon92 wants to merge 1 commit intoopenshift:masterfrom
kannon92:ocpbugs-76919
Open

OCPBUGS-76919: add listtype atomic#2713
kannon92 wants to merge 1 commit intoopenshift:masterfrom
kannon92:ocpbugs-76919

Conversation

@kannon92
Copy link

@kannon92 kannon92 commented Feb 17, 2026

@openshift-ci-robot
Copy link

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 17, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 17, 2026

Hello @kannon92! Some important instructions when contributing to openshift/api:
API design plays an important part in the user experience of OpenShift and as such API PRs are subject to a high level of scrutiny to ensure they follow our best practices. If you haven't already done so, please review the OpenShift API Conventions and ensure that your proposed changes are compliant. Following these conventions will help expedite the api review process for your PR.

@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Feb 17, 2026
@openshift-ci-robot
Copy link

@kannon92: This pull request references Jira Issue OCPBUGS-76919, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.22.0) matches configured target version for branch (4.22.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @lyman9966

The bug has been updated to refer to the pull request using the external bug tracker.

Details

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

@qodo-code-review
Copy link

ⓘ You are approaching your monthly quota for Qodo. Upgrade your plan

Review Summary by Qodo

Add listType map and listMapKey annotations to Conditions

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Add listType map and listMapKey type annotations to Conditions field
• Enables proper list handling in KubeletConfigStatus struct
Diagram
flowchart LR
  A["KubeletConfigStatus"] -- "adds list annotations" --> B["Conditions field"]
  B -- "listType=map" --> C["Map-based list handling"]
  B -- "listMapKey=type" --> D["Type as map key"]
Loading

Grey Divider

File Changes

1. machineconfiguration/v1/types.go ✨ Enhancement +2/-0

Add list type annotations to Conditions field

• Added +listType=map annotation to Conditions field in KubeletConfigStatus
• Added +listMapKey=type annotation to specify type as the map key
• Improves list serialization and handling semantics

machineconfiguration/v1/types.go


Grey Divider

Qodo Logo

@coderabbitai
Copy link

coderabbitai bot commented Feb 17, 2026

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

The pull request adds +listType=atomic to KubeletConfigStatus.Conditions in machineconfiguration/v1/types.go and adds x-kubernetes-list-type: atomic to the status.conditions.items schema in the CRD YAML. No other fields, annotations, or structural changes were made.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: adding listType atomic annotation to handle atomic list semantics in the KubeletConfigStatus.
Description check ✅ Passed The description references the related Jira issue OCPBUGS-76919, which is directly related to the changeset implementing the atomic list type annotation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.5.0)

Error: build linters: unable to load custom analyzer "kubeapilinter": tools/_output/bin/kube-api-linter.so, plugin: not implemented
The command is terminated due to an error: build linters: unable to load custom analyzer "kubeapilinter": tools/_output/bin/kube-api-linter.so, plugin: not implemented


Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci openshift-ci bot requested a review from lyman9966 February 17, 2026 14:23
@openshift-ci openshift-ci bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Feb 17, 2026
@qodo-code-review
Copy link

ⓘ You are approaching your monthly quota for Qodo. Upgrade your plan

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (1) 📎 Requirement gaps (0)

Grey Divider


Action required

1. Conditions markers undocumented 📘 Rule violation ✓ Correctness
Description
The Conditions field adds +listType=map and +listMapKey=type markers but the field comment
does not document what these validations imply (map semantics/uniqueness by type). This violates
the requirement that validation markers must be fully documented in the field comment to keep the
API self-describing and enforceable.
Code

machineconfiguration/v1/types.go[R773-775]

+	// +listType=map
+	// +listMapKey=type
	Conditions []KubeletConfigCondition `json:"conditions"`
Evidence
PR Compliance ID 13 requires that every validation marker be documented in the field comment. The PR
adds two list markers to Conditions without updating the comment to describe the map behavior or
the significance of the type key.

AGENTS.md
machineconfiguration/v1/types.go[773-775]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The `Conditions` field has new validation markers (`+listType=map`, `+listMapKey=type`) but its comment does not explain the behavior those markers enforce.

## Issue Context
Per compliance requirements, API field comments must fully document any validation/structural schema markers so users understand constraints such as map semantics and uniqueness keys.

## Fix Focus Areas
- machineconfiguration/v1/types.go[773-775] կառավար

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Optional list map key 🐞 Bug ✓ Correctness
Description
KubeletConfigStatus.Conditions is now declared as a map-like list keyed by type, but the element
field used as the key (KubeletConfigCondition.Type) is still annotated as optional. This can allow
missing/empty keys, which undermines the intended uniqueness/merge semantics of a map-list and can
cause apply/merge behavior to be unreliable or rejected by schema validation.
Code

machineconfiguration/v1/types.go[R773-775]

+	// +listType=map
+	// +listMapKey=type
	Conditions []KubeletConfigCondition `json:"conditions"`
Evidence
The field is annotated as a map-list keyed by type, but the corresponding Type field in the
element struct is marked optional. In contrast, another map-keyed conditions list in the same API
package (ControllerConfigStatus.Conditions) uses a condition struct where Type is explicitly
required, matching the map-key semantics.

machineconfiguration/v1/types.go[765-776]
machineconfiguration/v1/types.go[778-786]
machineconfiguration/v1/types.go[195-206]
machineconfiguration/v1/types.go[236-245]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`KubeletConfigStatus.Conditions` is annotated as a map-like list keyed by `type` (`+listType=map`, `+listMapKey=type`), but `KubeletConfigCondition.Type` is still marked `+optional`. Map-list keys should be consistently present to ensure deterministic merge/apply behavior.

### Issue Context
Other map-keyed condition lists in this repo (e.g., `ControllerConfigStatus.Conditions`) use a condition struct whose `Type` is marked `+required`.

### Fix Focus Areas
- machineconfiguration/v1/types.go[778-783]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

@kannon92 kannon92 changed the title WIP: OCPBUGS-76919: add listtype map and listkey type OCPBUGS-76919: add listtype map and listkey type Feb 17, 2026
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 17, 2026
@openshift-ci-robot
Copy link

@kannon92: This pull request references Jira Issue OCPBUGS-76919, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.22.0) matches configured target version for branch (4.22.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @lyman9966

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Fixes: https://issues.redhat.com/browse/OCPBUGS-76919

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.

@openshift-ci openshift-ci bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 17, 2026
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@machineconfiguration/v1/types.go`:
- Around line 771-775: The CRD item key field KubeletConfigCondition.Type is
currently marked with // +optional which conflicts with Conditions having
+listType=map and +listMapKey=type; remove the `// +optional` comment above the
Type field in the KubeletConfigCondition struct so the `type` key is treated as
required (or alternatively add a default), ensuring the Conditions map key
(`+listMapKey=type`) meets the CRD structural schema requirements and avoids
validation/SSA merge errors.

@kannon92 kannon92 changed the title OCPBUGS-76919: add listtype map and listkey type OCPBUGS-76919: add listtype atomic Feb 17, 2026
@openshift-ci openshift-ci bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 17, 2026
@JoelSpeed
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 18, 2026
@openshift-ci-robot
Copy link

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-aws-ovn
/test e2e-aws-ovn-hypershift
/test e2e-aws-ovn-hypershift-conformance
/test e2e-aws-ovn-techpreview
/test e2e-aws-serial-1of2
/test e2e-aws-serial-2of2
/test e2e-aws-serial-techpreview-1of2
/test e2e-aws-serial-techpreview-2of2
/test e2e-azure
/test e2e-gcp
/test e2e-upgrade
/test e2e-upgrade-out-of-change
/test minor-e2e-upgrade-minor

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 18, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JoelSpeed

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 18, 2026
@kannon92
Copy link
Author

/retest

@kannon92
Copy link
Author

/verified ci

@openshift-ci-robot
Copy link

@kannon92: The /verified command must be used with one of the following actions: by, later, remove, or bypass. See https://docs.ci.openshift.org/docs/architecture/jira/#premerge-verification for more information.

Details

In response to this:

/verified ci

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.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 20, 2026

@kannon92: all tests passed!

Full PR test history. Your PR dashboard.

Details

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.

@kannon92
Copy link
Author

/verified by ci

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Feb 20, 2026
@openshift-ci-robot
Copy link

@kannon92: This PR has been marked as verified by ci.

Details

In response to this:

/verified by ci

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments