Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Dec 11, 2025

Bumps the k8s-libs group with 3 updates: k8s.io/api, k8s.io/apimachinery and k8s.io/client-go.

Updates k8s.io/api from 0.34.2 to 0.34.3

Commits

Updates k8s.io/apimachinery from 0.34.2 to 0.34.3

Commits

Updates k8s.io/client-go from 0.34.2 to 0.34.3

Commits
  • 3892804 Update dependencies to v0.34.3 tag
  • ab04e77 Merge pull request #135592serathius/automated-cherry-pick-of-#135580
  • 25da701 Use transformer in consistency checker
  • 0c76ee5 Add unit tests for Data Consistency Detector
  • cc3d9d0 Embed proper interface in TransformingStore to ensure DeltaFIFO and RealFIFO ...
  • See full diff in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore <dependency name> major version will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
  • @dependabot ignore <dependency name> minor version will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
  • @dependabot ignore <dependency name> will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
  • @dependabot unignore <dependency name> will remove all of the ignore conditions of the specified dependency
  • @dependabot unignore <dependency name> <ignore condition> will remove the ignore condition of the specified dependency and ignore conditions

Bumps the k8s-libs group with 3 updates: [k8s.io/api](https://github.com/kubernetes/api), [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) and [k8s.io/client-go](https://github.com/kubernetes/client-go).


Updates `k8s.io/api` from 0.34.2 to 0.34.3
- [Commits](kubernetes/api@v0.34.2...v0.34.3)

Updates `k8s.io/apimachinery` from 0.34.2 to 0.34.3
- [Commits](kubernetes/apimachinery@v0.34.2...v0.34.3)

Updates `k8s.io/client-go` from 0.34.2 to 0.34.3
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](kubernetes/client-go@v0.34.2...v0.34.3)

---
updated-dependencies:
- dependency-name: k8s.io/api
  dependency-version: 0.34.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s-libs
- dependency-name: k8s.io/apimachinery
  dependency-version: 0.34.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s-libs
- dependency-name: k8s.io/client-go
  dependency-version: 0.34.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s-libs
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file go Pull requests that update Go code labels Dec 11, 2025
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@lingma-agents
Copy link

lingma-agents bot commented Dec 11, 2025

升级 Kubernetes 客户端库并优化缓存一致性检测

变更概述
  • 依赖更新

    • k8s.io/api 从 v0.34.2 升级到 v0.34.3
    • k8s.io/apimachinery 从 v0.34.2 升级到 v0.34.3
    • k8s.io/client-go 从 v0.34.2 升级到 v0.34.3
    • 此次升级包含多个内部改进,如数据一致性检查器使用转换器、新增单元测试等
  • 重构

    • controller.goshared_informer.go 中引入 newQueueFIFO 函数,根据特性标志动态选择 FIFO 实现(RealFIFODeltaFIFO
    • DeltaFIFORealFIFO 添加接口实现声明,明确其作为 QueueTransformingStore 的角色
  • 问题修复

    • 修复 Reflector 在处理 WatchList 时未正确传递 Transformer 的问题,确保在一致性检测中应用相同的转换逻辑
  • 测试更新

    • data_consistency_detector.go 中新增 SetDataConsistencyDetectionForWatchListEnabledForTest 方法,便于测试场景下控制一致性检测开关
    • 更新一致性检测函数以支持对列表项进行变换处理后再比较,提高检测准确性
  • 其他

    • 调整模块文件和校验和文件以反映新的依赖版本
变更文件
文件路径 变更说明
go.mod 更新了三个 Kubernetes 相关模块的版本至 v0.34.3。
go.sum 同步更新了对应模块的校验和条目。
vendor/​k8s.​io/​client-go/​tools/​cache/​controller.​go 修改 `newInformer` 使用 `newQueueFIFO` 创建队列,并定义该函数根据不同特性启用不同 FIFO 类型。
vendor/​k8s.​io/​client-go/​tools/​cache/​delta_​fifo.​go 确认 `DeltaFIFO` 实现了 `Queue` 和 `TransformingStore` 接口。
vendor/​k8s.​io/​client-go/​tools/​cache/​reflector.​go 在 Reflector 初始化时提取并传递 Transformer 到临时存储用于一致性检测;更新 TransformingStore 继承 ReflectorStore。
vendor/​k8s.​io/​client-go/​tools/​cache/​reflector_​data_​consistency_​detector.​go 允许一致性检测过程中传入 listItemTransformFunc 对象变换函数。
vendor/​k8s.​io/​client-go/​tools/​cache/​shared_​informer.​go 修改 `sharedIndexInformer.RunWithContext` 使用 `newQueueFIFO` 替代直接构造 DeltaFIFO。
vendor/​k8s.​io/​client-go/​tools/​cache/​the_​real_​fifo.​go 确认 `RealFIFO` 实现了 `Queue` 和 `TransformingStore` 接口。
vendor/​k8s.​io/​client-go/​util/​consistencydetector/​data_​consistency_​detector.​go 新增测试辅助方法 `SetDataConsistencyDetectionForWatchListEnabledForTest` 并扩展 `CheckDataConsistency` 支持对象变换。
vendor/modules.txt 更新 vendor 模块记录中的版本信息。
时序图
sequenceDiagram
    participant CI as ControllerInformer
    participant NF as newQueueFIFO
    participant FG as FeatureGate
    participant RF as RealFIFO
    participant DF as DeltaFIFO
    CI->>NF: 调用 newQueueFIFO(clientState, transform)
    NF->>FG: 查询 InOrderInformers 特性是否开启
    alt 如果启用 InOrderInformers
        NF->>RF: 返回 RealFIFO 实例
    else 否则
        NF->>DF: 返回 DeltaFIFO 实例
    end
Loading

💡 小贴士

与 lingma-agents 交流的方式

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

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

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

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

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

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

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

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

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

@dongjiang1989 dongjiang1989 merged commit f93901c into main Dec 12, 2025
4 of 5 checks passed
@dependabot dependabot bot deleted the dependabot/go_modules/k8s-libs-3fba52e296 branch December 12, 2025 02:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file go Pull requests that update Go code size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants