Skip to content

[agent][cfggen] Fix len() called with no arguments in PortChannel Fallback parsing - #26404

Merged
yxieca merged 1 commit into
sonic-net:masterfrom
rustiqly:fix/minigraph-len-no-args
Mar 28, 2026
Merged

yxieca merged 1 commit into
sonic-net:masterfrom
rustiqly:fix/minigraph-len-no-args

Conversation

@rustiqly

Copy link
Copy Markdown
Contributor

What I did

Fix len() called with no arguments in minigraph.py:969, which crashes PortChannel Fallback parsing with TypeError.

How I did it

Changed len() to len(pcmbr_list), matching the non-Fallback branch on line 971.

How to verify it

Parse a minigraph XML containing a PortChannel with a <Fallback> element — it should no longer crash.

Which release branch to backport

master

Description for the changelog

Fix TypeError crash in minigraph PortChannel Fallback parsing due to len() called with no arguments.

Fixes: #26399

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@rustiqly
rustiqly force-pushed the fix/minigraph-len-no-args branch from ba940cd to 94303b4 Compare March 26, 2026 14:01
@yxieca
yxieca requested a review from qiluo-msft March 27, 2026 03:22
@yxieca

yxieca commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@yxieca
yxieca requested review from saiarcot895 and yxieca March 27, 2026 03:23
…lback parsing

minigraph.py:969 calls len() with no arguments, causing TypeError
when parsing a PortChannel with a Fallback element. The correct
argument is pcmbr_list, matching the non-Fallback branch on line 971.

Fixes: sonic-net#26399

Signed-off-by: Rustiqly <rustiqly@users.noreply.github.com>
@rustiqly
rustiqly force-pushed the fix/minigraph-len-no-args branch from 94303b4 to 55fa8e9 Compare March 27, 2026 14:01
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@yxieca

yxieca commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

The T1-LAG failure is a legit failure but not related to this change. Retrying

@yxieca
yxieca merged commit c9c093c into sonic-net:master Mar 28, 2026
21 of 23 checks passed
mhchann pushed a commit to mhchann/sonic-buildimage that referenced this pull request May 7, 2026
…lback parsing (sonic-net#26404)

minigraph.py:969 calls len() with no arguments, causing TypeError
when parsing a PortChannel with a Fallback element. The correct
argument is pcmbr_list, matching the non-Fallback branch on line 971.

Fixes: sonic-net#26399

Signed-off-by: Rustiqly <rustiqly@users.noreply.github.com>
Co-authored-by: Rustiqly <rustiqly@users.noreply.github.com>
Signed-off-by: mhchann <mhchann082@gmail.com>
roger530-ho pushed a commit to roger530-ho/sonic-buildimage that referenced this pull request Jun 23, 2026
…lback parsing (sonic-net#26404)

minigraph.py:969 calls len() with no arguments, causing TypeError
when parsing a PortChannel with a Fallback element. The correct
argument is pcmbr_list, matching the non-Fallback branch on line 971.

Fixes: sonic-net#26399

Signed-off-by: Rustiqly <rustiqly@users.noreply.github.com>
Co-authored-by: Rustiqly <rustiqly@users.noreply.github.com>
xdqi pushed a commit to canonical/sonic-buildimage that referenced this pull request Jul 6, 2026
…lback parsing (sonic-net#26404)

minigraph.py:969 calls len() with no arguments, causing TypeError
when parsing a PortChannel with a Fallback element. The correct
argument is pcmbr_list, matching the non-Fallback branch on line 971.

Fixes: sonic-net#26399

Signed-off-by: Rustiqly <rustiqly@users.noreply.github.com>
Co-authored-by: Rustiqly <rustiqly@users.noreply.github.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator

This PR has backport request label(s) for branch(es): msft-202503,202505,202511,202605, but is missing required test information. Please make sure you tick the tested branch(es) in the Tested branch section and provide test evidence (e.g., 202503: <test result>) in the Test result section as well in your PR description.

---Powered by SONiC BuildBot

@rookie-who

Copy link
Copy Markdown

Hi — this PR is flagged for cherry-pick to the 202605 branch (Request for 202605 Branch). To move forward with the cherry-pick, could you please:

  1. Test this change on the 202605 branch and add the test results to the PR description
  2. Add the label Tested for 202605 branch once testing is complete

This helps us track readiness and ensures we don't cherry-pick untested changes. Thanks!

Comment by @vaibhavhd via automated tooling

@mssonicbld

Copy link
Copy Markdown
Collaborator

Cherry-pick PR to msft-202503: Azure/sonic-buildimage-msft#2810

@mssonicbld

Copy link
Copy Markdown
Collaborator

@rustiqly cherry pick PR didn't pass PR checker after retry. Please help check! Thanks.
Azure/sonic-buildimage-msft#2810

---Powered by SONiC BuildBot

@mssonicbld

Copy link
Copy Markdown
Collaborator

Cherry-pick PR to msft-202512: Azure/sonic-buildimage-msft#3004

@mssonicbld

Copy link
Copy Markdown
Collaborator

This PR has backport request label(s) for branch(es): msft-202512, but is missing required test information. Please make sure you tick the tested branch(es) in the Tested branch section and provide test evidence (e.g., 202512: <test result>) in the Test result section as well in your PR description.

---Powered by SONiC BuildBot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[cfggen] len() called with no arguments crashes PortChannel Fallback parsing

6 participants