Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use --server-side for null test #289

Merged

Conversation

dhaiducek
Copy link
Member

@dhaiducek dhaiducek commented Aug 26, 2024

In K8s v1.31, kubectl create and kubectl apply client-side both treat null as removing the field, which breaks our test that is trying to test when the field is actually set to null. Using kubectl apply --server-side fixes it.

In the client-side apply on create, defining the null value as "delete the key associated with this value". [SIG API Machinery, CLI and Testing]

ref: https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.31.md

Also refactor to get more informative results, including:

  • Moving the variables to be function-scoped
  • Returning a diff rather than a boolean

This test is failing downstream but seems to pass
for me locally. Refactoring to at least get more
informative results.

Signed-off-by: Dale Haiducek <[email protected]>
@dhaiducek dhaiducek changed the title Refactor case7 Use --server-side for null test Aug 26, 2024
@dhaiducek dhaiducek marked this pull request as ready for review August 26, 2024 18:30
@openshift-ci openshift-ci bot requested review from gparvin and mprahl August 26, 2024 18:30
Copy link

openshift-ci bot commented Aug 26, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dhaiducek, mprahl

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:

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

@openshift-merge-bot openshift-merge-bot bot merged commit a14266b into open-cluster-management-io:main Aug 26, 2024
13 checks passed
@dhaiducek dhaiducek deleted the case7-refactor2 branch August 26, 2024 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants