Skip to content

Conversation

shraddhabang
Copy link
Collaborator

@shraddhabang shraddhabang commented Sep 23, 2025

Issue

LBC was incorrectly handling listener rules with weighted target groups, causing unnecessary rule modifications and creations instead of efficient priority reordering.

Description

The CompareOptionForTargetGroupTuples function was not sorting target groups by ARN, causing equivalent configurations with different orders to be considered different. This led to:

  • Unnecessary ModifyRule/CreateRule API calls instead of SetRulePriorities
  • Temporary rule deletions causing 4XX errors during updates

Fix:

  1. Add ARN-based sorting in target group comparison transformer
  2. Maintained backward compatibility for single target group scenarios
  3. Added Comprehensive unit tests for complex scenarios

Local Testing Verification

Using an ingress with two rules having weighted target group actions:

Before Fix:

  • Changing priority of weighted target group rules → 2 ModifyRule API calls

After Fix:

  • Changing priority of weighted target group rules → 1 SetRulePriorities API call

Checklist

  • Added tests that cover your change (if possible)
  • Added/modified documentation as required (such as the README.md, or the docs directory)
  • Manually tested
  • Made sure the title of the PR is a good description that can go into the release notes

BONUS POINTS checklist: complete for good vibes and maybe prizes?! 🤯

  • Backfilled missing tests for code in same general area 🎉
  • Refactored something and made the world a better place 🌟

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 23, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: shraddhabang

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

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Sep 23, 2025
@zac-nixon
Copy link
Collaborator

/approved
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 25, 2025
@k8s-ci-robot
Copy link
Contributor

@shraddhabang: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-aws-load-balancer-controller-e2e-test 7f7c5da link true /test pull-aws-load-balancer-controller-e2e-test

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants