Repository navigation
[Nexthop][fboss2-dev] Add integration test for LoadBalancer.id - #1815
Closed
abhinav-nexthop wants to merge 2 commits into
Closed
abhinav-nexthop wants to merge 2 commits into
abhinav-nexthop wants to merge 2 commits into
Conversation
Contributor
Author
|
/autorebase |
Contributor
|
@joseph5wu has imported this pull request. If you are a Meta employee, you can view this in D131379339. |
joseph5wu
requested changes
Nov 12, 2026
Address review on the upstream PR: LoadBalancerIdSelectsEntry re-ran the same command as EcmpHashSeed, hardcoded a seed that fails on a switch already using it, and matched switch-state entries on the value's id rather than the loadBalancerMaps key. Drop the separate test and have testSeed check, for the load balancer it changes, that the running config still has exactly one entry with that id, that the switch-state entry stored under that key carries the new seed and its own id equals the key, and that the other load balancer is untouched in both. Derive the test seed from the current one so it always differs, and restore it from a scope guard so a failed check leaves the switch as found.
|
@abhinav-nexthop has updated the pull request. You must reimport the pull request before landing. |
Contributor
Author
|
/autorebase |
Contributor
|
@joseph5wu merged this pull request in 4e29ac8. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pre-submission checklist
Summary
Covers
LoadBalancer.idin the existingConfigLoadBalancingTest.EcmpHashSeedtest, through the sharedtestSeedhelper, rather than in a separate test.LoadBalancer.idis the keyconfig load-balancing ecmp|laguses to find the entry it updates, and the key the agent stores the entry under inloadBalancerMaps. The test runs:It then checks that the running config still has exactly one load balancer with that id, carrying the new seed, and that the switch-state entry stored under that key has the new seed and its own
idequals the key. The LAG load balancer must be unchanged in both.The test seed is the current seed with the low bit flipped (or 1 if unset), so it never matches the existing value. The original seed is restored at the end, and by a scope guard if a check fails. The create path (an absent id gets a new entry) is covered by the unit test
CmdConfigLoadBalancingTestFixture.applyCreatesNewLoadBalancer.Test Plan