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

Fix AKS node pool and node resource group validation #10712

Merged

Conversation

mantis-toboggan-md
Copy link
Member

Summary

Fixes #10462 #9433

Occurred changes and/or fixed issues

This PR fixes the validation used for AKS node and resource group names.

Technical notes summary

The previous regular expression used to validate resource group characters caused catastrophic backtracking https://www.regular-expressions.info/catastrophic.html

Areas or cases that should be tested

  • resource group names containing invalid characters
  • node pool names containing invalid characters/excessive length

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

momesgin
momesgin previously approved these changes Mar 27, 2024
Copy link
Member

@momesgin momesgin left a comment

Choose a reason for hiding this comment

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

Tested and LGTM

Edit: one unit test needs an update:

describe('fx: clusterNameChars', () => {
  it.each([
      ['!!abc!!', MOCK_TRANSLATION],
      ['123aBc-_', undefined]] // This is the failing one
    ....
    

@mantis-toboggan-md mantis-toboggan-md merged commit 7d419eb into rancher:master Mar 27, 2024
25 checks 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.

AKS: Nodepool name field needs validation for unsupported format
2 participants