Skip to content

Singhavnish/aft base test get request#5305

Open
singhavnish2516 wants to merge 4 commits intomainfrom
singhavnish/aft_base_test_get_request
Open

Singhavnish/aft base test get request#5305
singhavnish2516 wants to merge 4 commits intomainfrom
singhavnish/aft_base_test_get_request

Conversation

@singhavnish2516
Copy link
Copy Markdown
Contributor

  • Add a temp test to validate AFT Get Request (Subscribe Once)

@singhavnish2516 singhavnish2516 requested a review from a team as a code owner April 6, 2026 09:06
@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 simplifies the AFT base test suite by replacing a multi-step churn verification process with a direct, efficient validation of AFT entries. The changes streamline the test setup, remove legacy hardware profile handling, and introduce a more robust verification mechanism for IPv4 and IPv6 prefixes.

Highlights

  • Test Simplification: Refactored the AFT base test to focus on a single, streamlined validation flow for AFT Get Requests, removing complex churn scenarios and redundant setup logic.
  • Verification Logic: Introduced a dedicated verifyAFT function to directly validate IPv4 and IPv6 entries, replacing the previous verifyAFTState helper and associated caching mechanisms.
  • Configuration Updates: Updated constant definitions for route counts and prefixes to support the new test structure, while removing unused flags and legacy hardware profile configurations.
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.

@OpenConfigBot
Copy link
Copy Markdown

OpenConfigBot commented Apr 6, 2026

Pull Request Functional Test Report for #5305 / c4e733c

Virtual Devices

Device Test Test Documentation Job Raw Log
Arista cEOS status
AFT-1.1: AFTs Base
eda35b0d Log
Cisco 8000E status
AFT-1.1: AFTs Base
1b47afc6 Log
Cisco XRd status
AFT-1.1: AFTs Base
42c969eb Log
Juniper ncPTX status
AFT-1.1: AFTs Base
c3eaa94e Log
Nokia SR Linux status
AFT-1.1: AFTs Base
fec52678 Log
Openconfig Lemming status
AFT-1.1: AFTs Base
41472c64 Log

Hardware Devices

Device Test Test Documentation Raw Log
Arista 7808 status
AFT-1.1: AFTs Base
Cisco 8808 status
AFT-1.1: AFTs Base
Juniper PTX10008 status
AFT-1.1: AFTs Base
Nokia 7250 IXR-10e status
AFT-1.1: AFTs Base

Help

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 refactors the afts_base_test.go file by simplifying IPv6 prefix constants, removing the debug_notifications flag, and streamlining the AFT data collection and comparison logic. The test structure in TestBGP was significantly modified, replacing a complex multi-step churn test with a more direct verification of IPv4 and IPv6 prefixes using a new verifyAFT helper function. Feedback was provided regarding the hardcoded 5-minute timeout for prefix verification, suggesting it be defined as a constant for better reusability and adjusted to prevent premature failures.

Comment on lines +730 to 732
if duration > 5*time.Minute {
t.Errorf("Prefix verification took %v, want <= 5 minutes", duration)
}
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 duration check for prefix verification (5 minutes) may be too restrictive. In tests involving convergence, timeouts must be sufficiently long to prevent premature failure. Additionally, consider defining this as a general constant to promote reusability across different vendors and test scales, rather than hardcoding it.

References
  1. In tests that inject artificial latency, convergence timeouts must be sufficiently long to account for the added delay and prevent premature test failure.
  2. Constants that may be applicable to multiple vendors in the future should be kept general, even if they are currently used in a vendor-specific context, to promote reusability.

Copy link
Copy Markdown
Contributor

@paramasivamn1 paramasivamn1 left a comment

Choose a reason for hiding this comment

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

Hi Avnish, Can you add the key requirements for this changes and also our observation so that reviewers will get the context and behavior. so that they can provide the possible optimization or other inputs.

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