Skip to content

Conversation

@jakefhyde
Copy link
Contributor

Issue: rancher/rancher#52223

Problem

Forgot zero value for objects isn't nil so create operations were triggering rke config validation.

This is causing rancher/rancher#52351 to fail.

Solution

Check request.Operation when performing RKEConfig validation.

CheckList

  • Test
  • Docs

@jakefhyde jakefhyde requested review from a team, jiaqiluo and pmatseykanets October 17, 2025 15:19
@jakefhyde jakefhyde requested a review from a team as a code owner October 17, 2025 15:19
pmatseykanets
pmatseykanets previously approved these changes Oct 17, 2025
Copy link
Contributor

@pmatseykanets pmatseykanets left a comment

Choose a reason for hiding this comment

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

The test needs to be adjusted too

Error: pkg/resources/provisioning.cattle.io/v1/cluster/validator_test.go:2857:58: not enough arguments in call to p.validateRKEConfigChanged

@pmatseykanets pmatseykanets dismissed their stale review October 17, 2025 15:47

Tests are failing

@jakefhyde jakefhyde force-pushed the 52223-fix-prevent-zeroing-rkeconfig branch from 989c552 to 9d7a48b Compare October 17, 2025 15:52
@jakefhyde
Copy link
Contributor Author

The test needs to be adjusted too

Error: pkg/resources/provisioning.cattle.io/v1/cluster/validator_test.go:2857:58: not enough arguments in call to p.validateRKEConfigChanged

Whoops, updated the tests and committed them, forgot to push. Should be updated now.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants