Skip to content

Conversation

@johnlanni
Copy link
Collaborator

Ⅰ. Describe what this PR did

Ⅱ. Does this pull request fix one issue?

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@lingma-agents
Copy link

lingma-agents bot commented Jun 16, 2025

修复因端口策略合并导致的控制器崩溃问题

变更概述

问题修复

  • 组件: pkg/ingress/config/ingress_config.go 中的 convertDestinationRule 方法
  • 功能描述: 修复因端口级流量策略合并逻辑缺陷导致的控制器崩溃问题
  • 实现细节:
    • 新增对 PortLevelSettings 数组的空值检查和覆盖逻辑
    • 通过循环遍历现有端口策略,优先匹配端口号进行覆盖
    • 若未找到匹配端口则追加新策略,避免因空指针或未处理项导致 panic
  • 修复原因: 原逻辑未处理端口策略数组为空或未匹配的情况,导致配置合并时出现未定义行为
变更统计
  • 📁 修改文件: 1 个文件

  • ✅ 新增代码: +15 行

  • ❌ 删除代码: -11 行

变更文件
文件路径 变更说明
pkg/​ingress/​config/​ingress_​config.​go 优化端口级流量策略合并逻辑,增加空值检查和匹配覆盖机制

💡 小贴士

与 lingma-agents 交流的方式

📜 直接回复评论
直接回复本条评论,lingma-agents 将自动处理您的请求。例如:

  • 在当前代码中添加详细的注释说明。

  • 请详细介绍一下你说的 LRU 改造方案,并使用伪代码加以说明。

📜 在代码行处标记
在文件的特定位置创建评论并 @lingma-agents。例如:

  • @lingma-agents 分析这个方法的性能瓶颈并提供优化建议。

  • @lingma-agents 对这个方法生成优化代码。

📜 在讨论中提问
在任何讨论中 @lingma-agents 来获取帮助。例如:

  • @lingma-agents 请总结上述讨论并提出解决方案。

  • @lingma-agents 请根据讨论内容生成优化代码。

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 12 lines in your changes missing coverage. Please review.

Project coverage is 46.02%. Comparing base (ef31e09) to head (b34653b).
Report is 565 commits behind head on main.

Files with missing lines Patch % Lines
pkg/ingress/config/ingress_config.go 0.00% 12 Missing ⚠️

❌ Your patch status has failed because the patch coverage (0.00%) is below the target coverage (50.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #2423       +/-   ##
===========================================
+ Coverage   35.91%   46.02%   +10.11%     
===========================================
  Files          69       81       +12     
  Lines       11576    13020     +1444     
===========================================
+ Hits         4157     5993     +1836     
+ Misses       7104     6681      -423     
- Partials      315      346       +31     
Files with missing lines Coverage Δ
pkg/ingress/config/ingress_config.go 12.54% <0.00%> (-1.34%) ⬇️

... and 77 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@johnlanni johnlanni merged commit 0b92566 into alibaba:main Jun 16, 2025
10 checks passed
erasernoob pushed a commit to erasernoob/higress that referenced this pull request Jun 18, 2025
ink-hz pushed a commit to ink-hz/higress-ai-capability-auth that referenced this pull request Nov 5, 2025
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.

2 participants