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(aws): Fix IPv6 addresses being incorrectly associated when cloning server groups that have launch templates enabled (#6979) #10142

Merged
merged 1 commit into from
Sep 11, 2024

Conversation

ashleykleynhans
Copy link
Contributor

This is a fix for #6979.

ipv6

The IPv6 checkbox was previously checked when it should not have been.

This line:

associateIPv6Address: shouldAutoEnableIPv6 || Boolean(ipv6AddressCount),

Was casting the entire object below to Boolean, which ALWAYS resulted in a value of true:

[
  {
    "deviceIndex": 0,
    "groups": [
      "sg-0a1a8a45acf3192b8"
    ],
    "ipv4Prefixes": [],
    "ipv6AddressCount": 0,
    "ipv6Addresses": [],
    "ipv6Prefixes": [],
    "privateIpAddresses": []
  }
]

The change casts the value of ipv6AddressCount within the object to Boolean instead of the object itself.

…g server groups that have launch templates enabled (spinnaker#6979)
@dbyron-sf
Copy link
Contributor

Thanks for this @ashleykleynhans . I suspect this is the right fix. What's involved in writing an automated test to demonstrate the bug + fix?

@ashleykleynhans
Copy link
Contributor Author

@dbyron-sf unfortunately I have no idea, frontend is not one of my strengths, I am a backend person. This bug has just not been fixed in about 2 years so I figured nobody is going to fix it and had to fix it myself.

@dbyron-sf
Copy link
Contributor

Fair enough. I had to ask :)

@dbyron-sf dbyron-sf added the ready to merge Reviewed and ready for merge label Sep 11, 2024
@ashleykleynhans
Copy link
Contributor Author

There may already be some kind of test for it, because my first attempt failed a test and I had to make a change to get it to pass the test.

@mergify mergify bot added the auto merged Merged automatically by a bot label Sep 11, 2024
@mergify mergify bot merged commit 22818c6 into spinnaker:master Sep 11, 2024
4 checks passed
@dbyron-sf
Copy link
Contributor

@Mergifyio backport release-1.35.x

Copy link
Contributor

mergify bot commented Sep 11, 2024

backport release-1.35.x

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Sep 11, 2024
…g server groups that have launch templates enabled (#6979) (#10142)

(cherry picked from commit 22818c6)
mergify bot added a commit that referenced this pull request Sep 11, 2024
…g server groups that have launch templates enabled (#6979) (#10142) (#10144)

(cherry picked from commit 22818c6)

Co-authored-by: Ashley Kleynhans <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto merged Merged automatically by a bot ready to merge Reviewed and ready for merge target-release/1.36
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants