Skip to content

Conversation

@krishagarwal278
Copy link
Member

Summary

The User resource's groups field was returning null when not populated, causing issues with the Pipelines Operator's role-based approval functionality.

This change adds a default empty array for the groups field in the User API schema, ensuring it returns [] instead of null when the user is not a member of any groups.

Changes:

  • Added // +default=[] marker to User.Groups field in user/v1/types.go
  • Regenerated OpenAPI schema with default empty array

Fixes: OCPBUGS-62145

@openshift-ci-robot
Copy link

Pipeline controller notification
This repository 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. Review these jobs and use /test <job> to manually trigger optional jobs most likely to be impacted by the proposed changes.

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

@krishagarwal278: This pull request references Jira Issue OCPBUGS-62145, which is invalid:

  • expected the bug to target the "4.21.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

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

In response to this:

Summary

The User resource's groups field was returning null when not populated, causing issues with the Pipelines Operator's role-based approval functionality.

This change adds a default empty array for the groups field in the User API schema, ensuring it returns [] instead of null when the user is not a member of any groups.

Changes:

  • Added // +default=[] marker to User.Groups field in user/v1/types.go
  • Regenerated OpenAPI schema with default empty array

Fixes: OCPBUGS-62145

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 Nov 17, 2025

Hello @krishagarwal278! 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 openshift-ci bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Nov 17, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 17, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign joelspeed for approval. For more information see the Code Review Process.

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

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

@krishagarwal278
Copy link
Member Author

/jira refresh

@openshift-ci-robot
Copy link

@krishagarwal278: This pull request references Jira Issue OCPBUGS-62145, which is invalid:

  • expected the bug to target only the "4.21.0" version, but multiple target versions were set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

/jira refresh

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.

@krishagarwal278
Copy link
Member Author

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Nov 17, 2025
@openshift-ci-robot
Copy link

@krishagarwal278: This pull request references Jira Issue OCPBUGS-62145, which is valid.

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

Requesting review from QA contact:
/cc @gangwgr

In response to this:

/jira refresh

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 requested a review from gangwgr November 17, 2025 20:48
// groups specifies group names this user is a member of.
// This field is deprecated and will be removed in a future release.
// Instead, create a Group object containing the name of this User.
// +default=[]
Copy link
Contributor

Choose a reason for hiding this comment

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

This type is served via an aggregated apiserver and defaulting this here would have no affect AFAIK.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 17, 2025

@krishagarwal278: 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/verify 1253b79 link true /test verify

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.

@krishagarwal278 krishagarwal278 changed the title OCPBUGS-62145: User response does not include list of groups user is part of [WIP] OCPBUGS-62145: User response does not include list of groups user is part of Nov 17, 2025
@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 Nov 17, 2025
@krishagarwal278 krishagarwal278 marked this pull request as draft November 17, 2025 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. 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. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants