Skip to content

Do not merge alex gribi scale#5424

Open
dracazacula wants to merge 8 commits into
mainfrom
do_not_merge_alex_gribi_scale
Open

Do not merge alex gribi scale#5424
dracazacula wants to merge 8 commits into
mainfrom
do_not_merge_alex_gribi_scale

Conversation

@dracazacula
Copy link
Copy Markdown
Contributor

No description provided.

@dracazacula dracazacula requested review from a team as code owners May 5, 2026 15:14
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces the infrastructure and test implementation for the TE-14.3 gRIBI full-scale scaling test. By modularizing the configuration and validation logic into a shared helper package, the changes enable consistent testing across different scale targets (T1 and T2) while ensuring that the test suite remains maintainable and extensible for future scaling requirements.

Highlights

  • New Test Implementation: Added a new test file 'gribi_full_scale_t1_test.go' to implement the TE-14.3 gRIBI full-scale scaling test for target T1.
  • Shared Helper Library: Introduced 'internal/cfgplugins/gribifullscale.go' to centralize topology configuration, gRIBI programming, and traffic validation logic for both T1 and T2 scaling tests.
  • Platform Configuration: Updated 'metadata.textproto' to include platform exceptions for Arista devices, specifically enabling interface-enabled and default-network-instance deviations.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@dracazacula
Copy link
Copy Markdown
Contributor Author

/fptest virtual

@OpenConfigBot
Copy link
Copy Markdown

OpenConfigBot commented May 5, 2026

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new gRIBI full-scale scaling test (TE-14.3) for target T1, supported by a new shared cfgplugins package that handles topology setup, gRIBI entry programming, and traffic validation. Review feedback suggests increasing test coverage by verifying ARP resolution for all interfaces instead of a limited subset. Furthermore, several configuration functions in the cfgplugins package require refactoring to align with the repository's style guide, specifically by utilizing gnmi.SetBatch for batched configuration updates and adopting the required function signatures.

Comment on lines +103 to +109
// Limiting it to 100 since checking ARP for 1024 interfaces takes long time
ifs := interfaceNamesList
if len(ifs) >= 100 {
ifs = ifs[:100]
}
cfgplugins.IsIPv4InterfaceARPresolved(t, ate, cfgplugins.AddressFamilyParams{InterfaceNames: ifs})
cfgplugins.IsIPv6InterfaceARPresolved(t, ate, cfgplugins.AddressFamilyParams{InterfaceNames: ifs})
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Limiting the ARP resolution check to the first 100 interfaces significantly reduces the test coverage, especially for a scale test intended to validate 640+ VLANs. This could allow configuration or connectivity issues on the remaining interfaces to go undetected. Verify ARP for all configured interfaces to ensure full test coverage.

Suggested change
// Limiting it to 100 since checking ARP for 1024 interfaces takes long time
ifs := interfaceNamesList
if len(ifs) >= 100 {
ifs = ifs[:100]
}
cfgplugins.IsIPv4InterfaceARPresolved(t, ate, cfgplugins.AddressFamilyParams{InterfaceNames: ifs})
cfgplugins.IsIPv6InterfaceARPresolved(t, ate, cfgplugins.AddressFamilyParams{InterfaceNames: ifs})
cfgplugins.IsIPv4InterfaceARPresolved(t, ate, cfgplugins.AddressFamilyParams{InterfaceNames: interfaceNamesList})
cfgplugins.IsIPv6InterfaceARPresolved(t, ate, cfgplugins.AddressFamilyParams{InterfaceNames: interfaceNamesList})

Comment on lines +344 to +375
func ConfigureDUT(t *testing.T, dut *ondatra.DUTDevice) {
t.Helper()
dp1 := dut.Port(t, "port1")
dp2 := dut.Port(t, "port2")
d := gnmi.OC()
vrfBatch := new(gnmi.SetBatch)

ConfigureHardwareInit(t, dut)
CreateGRIBIScaleVRFs(t, dut, vrfBatch)
portList := []*ondatra.Port{dp1, dp2}
dutPortAttrs := []attrs.Attributes{dutPort1Attr, dutPort2Attr}

for idx, a := range dutPortAttrs {
p := portList[idx]
intf := a.NewOCInterface(p.Name(), dut)
gnmi.BatchUpdate(vrfBatch, d.Interface(p.Name()).Config(), intf)
t.Logf("Configured DUT port %s (%s)", p.Name(), a.Desc)
}
fptest.ConfigureDefaultNetworkInstance(t, dut)

if deviations.InterfaceConfigVRFBeforeAddress(dut) {
t.Log("Configure/update Network Instance type")
dutConfNIPath := d.NetworkInstance(deviations.DefaultNetworkInstance(dut))
gnmi.Replace(t, dut, dutConfNIPath.Type().Config(), oc.NetworkInstanceTypes_NETWORK_INSTANCE_TYPE_DEFAULT_INSTANCE)
}
// Configure sub-interfaces on port1 (1 VLAN) and port2 (640 VLANs).
ConfigureDUTSubinterfaces(t, vrfBatch, new(oc.Root), dut, dp1, DUTPort1IPv4Start, DUTPort1IPv6Start, StartVLANPort1, NumPort1VLANs)
ConfigureDUTSubinterfaces(t, vrfBatch, new(oc.Root), dut, dp2, DUTPort2IPv4Start, DUTPort2IPv6Start, StartVLANPort2, NumPort2VLANs)
vrfBatch.Set(t, dut)
// TODO: VRF selection policy must be configured (Fix: 500317744 defect).
ConfigureVRFSelectionPolicy(t, dut)
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The ConfigureDUT function does not adhere to the cfgplugins guidelines. According to the repository style guide (lines 101-102 and 105-106), configuration plugins should append to a provided *gnmi.SetBatch and the calling test code should be responsible for executing .Set(). Additionally, the function signature should include a configuration struct.

References
  1. Functions in cfgplugins must follow a specific signature: (t *testing.T, dut *ondatra.DUTDevice, sb *gnmi.SetBatch, cfg MyConfigStruct) *gnmi.SetBatch. The plugin should append to the batch, and the caller is responsible for calling .Set(). (link)

Comment thread internal/cfgplugins/gribifullscale.go Outdated
if deviations.InterfaceConfigVRFBeforeAddress(dut) {
t.Log("Configure/update Network Instance type")
dutConfNIPath := d.NetworkInstance(deviations.DefaultNetworkInstance(dut))
gnmi.Replace(t, dut, dutConfNIPath.Type().Config(), oc.NetworkInstanceTypes_NETWORK_INSTANCE_TYPE_DEFAULT_INSTANCE)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

This gnmi.Replace call should be refactored to use the *gnmi.SetBatch object. Configuration plugins should avoid direct gNMI operations and instead accumulate changes in a batch to be applied by the caller.

References
  1. Configuration plugins should append to a *gnmi.SetBatch object rather than applying the configuration directly. (link)

Comment thread internal/cfgplugins/gribifullscale.go Outdated
if deviations.InterfaceRefConfigUnsupported(dut) {
intf.InterfaceRef = nil
}
gnmi.Replace(t, dut, gnmi.OC().NetworkInstance(defaultVRF).PolicyForwarding().Config(), pf)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The ConfigureVRFSelectionPolicy function uses gnmi.Replace directly instead of appending to a *gnmi.SetBatch. This violates the cfgplugins guidelines which require batching configuration updates to allow callers to compose and apply configurations efficiently.

References
  1. Configuration plugins should append to a *gnmi.SetBatch object rather than applying the configuration directly. (link)

@dracazacula
Copy link
Copy Markdown
Contributor Author

/fptest virtual

@dracazacula
Copy link
Copy Markdown
Contributor Author

/fptest virtual

@dracazacula
Copy link
Copy Markdown
Contributor Author

/fptest virtual

@dracazacula
Copy link
Copy Markdown
Contributor Author

/fptest virtual

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.

3 participants