Skip to content

tccli teo CreateL7AccRules 触发 maximum recursion depth exceeded #127

Description

@honbey

复现

tccli teo CreateL7AccRules --ZoneId zone-xxx --Rules '[]'

无论 --Rules 传什么内容(包括空数组 []),甚至不传 --Rules 只传 --ZoneId,均报错:

maximum recursion depth exceeded

环境

  • tccli 版本:3.1.128.1
  • Python 版本:3.14
  • 安装方式:uv tool install tccli
  • 操作系统:Linux

原因参考

这是 DeepSeek V4 Flash 分析的,仅供参考。

影响范围:所有入参包含 list(RuleEngineItem) 类型的 API。已知受影响:

  • CreateL7AccRules
  • ModifyL7AccRule(参数类型为 RuleEngineItem

调用链

ActionCommand.__call__()
  └─ ActionCommand._build_parameter_map()         # command.py:247
       └─ ActionCommand._get_param_model()         # command.py:245
            └─ Loader.get_param_info()             # loaders.py:356
                 └─ Loader._get_param_info()        # loaders.py:336

循环引用链

CreateL7AccRulesRequestRules 参数类型链如下:

Rules  →  list(RuleEngineItem)
          RuleEngineItem.Branches  →  list(RuleBranch)
                                     RuleBranch.SubRules  →  list(RuleEngineSubRule)
                                                             RuleEngineSubRule.Branches  →  list(RuleBranch)
                                                                                          ↑ 回到 RuleBranch,循环!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions