Skip to content

[generic_config_updater] Add SONiC version precheck for test_buffer_profile_create_remove_rollback#23327

Merged
xincunli-sonic merged 2 commits intosonic-net:masterfrom
xincunli-sonic:xincun/add-version-check-buffer-remove
Mar 26, 2026
Merged

[generic_config_updater] Add SONiC version precheck for test_buffer_profile_create_remove_rollback#23327
xincunli-sonic merged 2 commits intosonic-net:masterfrom
xincunli-sonic:xincun/add-version-check-buffer-remove

Conversation

@xincunli-sonic
Copy link
Contributor

Description of PR

Summary:
Add a SONiC version precheck at the start of test_buffer_profile_create_remove_rollback
to skip the test on images that do not yet contain the required GCU buffer profile
create/remove support.

Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • New Test case
    • Skipped for non-supported platforms
  • Test case improvement

Back port request

  • 202205
  • 202305
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511
  • 202605

Approach

What is the motivation for this PR?

test_buffer_profile_create_remove_rollback exercises GCU buffer profile
create/remove/rollback functionality that is only present in SONiC 202605+
(or 202405+ on modular-chassis platforms). Without the precheck, the test
fails spuriously on older images instead of being skipped cleanly.

How did you do it?

Read duthost.os_version at the start of the test and compare the first
6 characters (YYYYMM) against the minimum required branch string. Modular-
chassis DUTs (detected via duthost.get_facts().get("modular_chassis"))
use a lower minimum of 202405; all other platforms require 202605.
master and internal builds always bypass the check.

How did you verify/test it?

Manually verified version string parsing logic against both version formats
(YYYYMM.DD and YYYYMMDD.N) used in the SONiC ecosystem.

Any platform specific information?

Modular-chassis DUTs require SONiC >= 202405; non-chassis DUTs require >= 202605.

Supported testbed topology if it's a new test case?

t0

Documentation

N/A

Approach

What is the motivation for this PR?

How did you do it?

How did you verify/test it?

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@xwjiang-ms xwjiang-ms left a comment

Choose a reason for hiding this comment

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

LGTM

@xincunli-sonic xincunli-sonic enabled auto-merge (squash) March 26, 2026 01:09
@xincunli-sonic xincunli-sonic merged commit 9cc8626 into sonic-net:master Mar 26, 2026
18 checks passed
ravaliyel pushed a commit to ravaliyel/sonic-mgmt that referenced this pull request Mar 27, 2026
…rofile_create_remove_rollback (sonic-net#23327)

* generic_config_updater: add version precheck for buffer profile test

Signed-off-by: Xincun Li <[email protected]>

* generic_config_updater: fix version comparison operator in buffer profile test

Signed-off-by: Xincun Li <[email protected]>

---------

Signed-off-by: Xincun Li <[email protected]>
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