Skip to content

Fix depstat why path search for large graphs#102

Merged
k8s-ci-robot merged 1 commit intokubernetes-sigs:mainfrom
dims:fix-why-raft-trace
Feb 11, 2026
Merged

Fix depstat why path search for large graphs#102
k8s-ci-robot merged 1 commit intokubernetes-sigs:mainfrom
dims:fix-why-raft-trace

Conversation

@dims
Copy link
Member

@dims dims commented Feb 11, 2026

Summary

  • prune why-path DFS using reverse reachability to avoid full-graph traversal
  • correct per-main-module max-paths accounting
  • update why tests for new signature

Issue

depstat why go.etcd.io/raft/v3 in the etcd repo would hang / produce no output even though the dependency exists. The search walked the full graph instead of pruning to nodes that can reach the target.

Fix

Precompute reverse reachability and only traverse nodes that can reach the target. This makes why complete quickly for large graphs and returns valid path output.

Testing

  • go test ./...

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dims

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Feb 11, 2026
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 11, 2026
@dims dims changed the title Fix depstat why path search Fix depstat why path search for large graphs Feb 11, 2026
@dims dims added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 11, 2026
@k8s-ci-robot k8s-ci-robot merged commit b1177e7 into kubernetes-sigs:main Feb 11, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants