Skip to content

Latest commit

 

History

History
69 lines (46 loc) · 1.52 KB

File metadata and controls

69 lines (46 loc) · 1.52 KB

depstat with containerd

This guide shows how to run depstat against containerd's dual-module repository and reproduce common dependency analyses.

Prerequisites

  • A containerd checkout (main branch)
  • depstat installed (go install github.com/kubernetes-sigs/depstat@latest)
  • jq (for JSON inspection)

Paths

export CONTAINERD_DIR=<your-containerd-checkout>   # e.g. ~/go/src/github.com/containerd/containerd

Main modules

CONTAINERD_MODS="github.com/containerd/containerd/v2,github.com/containerd/containerd/api"

Stats

depstat stats -m "$CONTAINERD_MODS" --json --dir "$CONTAINERD_DIR" | jq

List (split test-only)

depstat list -m "$CONTAINERD_MODS" --split-test-only --dir "$CONTAINERD_DIR"

Graph

depstat graph -m "$CONTAINERD_MODS" --dot --show-edge-types --dir "$CONTAINERD_DIR" | dot -Tsvg -o containerd-graph.svg

Topology JSON:

depstat graph -m "$CONTAINERD_MODS" --json --dir "$CONTAINERD_DIR" | jq

Cycles

depstat cycles -m "$CONTAINERD_MODS" --summary --dir "$CONTAINERD_DIR"

Archived dependencies

depstat archived -m "$CONTAINERD_MODS" --github-token-path /tmp/gh-token --json --dir "$CONTAINERD_DIR" | jq

Diff between refs

depstat diff v2.1.0 v2.2.1 -m "$CONTAINERD_MODS" --json --dir "$CONTAINERD_DIR" | jq

Why (trace a dependency)

depstat why github.com/Microsoft/hcsshim -m "$CONTAINERD_MODS" --dot --dir "$CONTAINERD_DIR" | dot -Tsvg -o containerd-why-hcsshim.svg