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

[backport v2.9.3] Default to empty object for missing machineSelectorConfig #12113

Merged
merged 1 commit into from
Oct 3, 2024

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Oct 3, 2024

This is an automated request to port PR #12061 by @rak-phillip

Original PR body:

Summary

This defaults to an empty object when machineSelectorConfig is missing from the RKE2 manifest. An unhandled exception would throw if machineSelectorConfig is undefined, causing the edit form to fail on render.

Fixes #12058

Occurred changes and/or fixed issues

  • Use optional chaining when when attempting to access machineSelectorConfig in the agenConfig getter
  • Default to an empty object if the lookup fails

Areas or cases that should be tested

  • This can happen when creating custom RKE2 clusters

Areas which could experience regressions

  • Notes on how to reproduce are in the issue

Checklist

  • The PR is linked to an issue and the linked issue has a Milestone, or no issue is needed
  • The PR has a Milestone
  • The PR template has been filled out
  • The PR has been self reviewed
  • The PR has a reviewer assigned
  • The PR has automated tests or clear instructions for manual tests and the linked issue has appropriate QA labels, or tests are not needed
  • The PR has reviewed with UX and tested in light and dark mode, or there are no UX changes

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
@rak-phillip rak-phillip merged commit 0f8cb76 into release-2.9 Oct 3, 2024
1 check passed
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.

[backport v2.9.3] Missing machineSelectorConfig throws unhandled exception
2 participants