#1148552 golang-k8s-metrics-dev: ships k8s.io/component-helpers under k8s.io/metrics (wrong orig)

Package:
golang-k8s-metrics
Source:
golang-k8s-metrics
Submitter:
Hermes Jesús Rodríguez Azuaje
Date:
2026-09-20 19:33:01 UTC
Severity:
normal
Tags:
#1148552#5
Date:
2026-09-20 17:48:40 UTC
From:
To:
Dear Maintainer,

golang-k8s-metrics-dev 0.36.4-1 in unstable installs files under
/usr/share/gocode/src/k8s.io/metrics/, but that tree is not the
kubernetes/metrics module.

Evidence on an unstable chroot after installing golang-k8s-metrics-dev:

  $ head -3 /usr/share/gocode/src/k8s.io/metrics/go.mod
  module k8s.io/component-helpers
  go 1.26.0

  $ head -5 /usr/share/gocode/src/k8s.io/metrics/doc.go
  package componenthelpers

The installed layout (auth/rbac, apps/poddisruptionbudget, node/topology,
apimachinery/lease, …) matches k8s.io/component-helpers, which is already
packaged correctly as golang-k8s-component-helpers-dev under
k8s.io/component-helpers.

The real upstream for this source package is:

https://github.com/kubernetes/metrics
  (go.mod: module k8s.io/metrics)

At tag v0.36.4 that repository provides the expected API client paths, e.g.:

  k8s.io/metrics/pkg/apis/metrics/v1beta1
  k8s.io/metrics/pkg/client/clientset/versioned

Those directories are absent from golang-k8s-metrics_0.36.4.orig.tar.gz /
golang-k8s-metrics-dev. Homepage and Description claim metrics APIs/clients,
but the orig tarball appears to be component-helpers content renamed into the
metrics import path.

Impact: reverse dependencies that import the metrics client (e.g. packaging of
github.com/hrodrig/groot, ITP #1148543) FTBFS with:

  cannot find package "k8s.io/metrics/pkg/apis/metrics/v1beta1"
  cannot find package "k8s.io/metrics/pkg/client/clientset/versioned"

Suggested fix: reimport the correct kubernetes/metrics orig for 0.36.4 (or the
intended version), drop the mistaken component-helpers tree from this package,
and keep depending on golang-k8s-component-helpers-dev only if metrics actually
needs it.

I can help test a corrected package against groot's Debian packaging once a
fixed orig is available.

Thanks,
Hermes Rodríguez

#1148552#10
Date:
2026-09-20 19:31:02 UTC
From:
To:
Hi,

I prepared a local fix for testing (not uploaded):

  Version: 0.36.4+really0.36.4-1
  Upstream: https://github.com/kubernetes/metrics tag v0.36.4
  (cannot replace golang-k8s-metrics_0.36.4.orig.tar.gz in the archive)

Changes vs 0.36.4-1:
  - reimport correct kubernetes/metrics tree (go.mod: module k8s.io/metrics;
    pkg/apis/... and pkg/client/... present)
  - drop golang-k8s-component-helpers-dev from Build-Depends/Depends
    (not required by metrics go.mod)

Verified: sbuild of github.com/hrodrig/groot (ITP #1148543) against this
.deb succeeds (DEB_BUILD_OPTIONS=nocheck for unrelated fake-gcs test deps).

Happy to open a Salsa MR on go-team/packages/golang-k8s-metrics if that
helps, or send a debdiff / branch tip.

Thanks,
Hermes Rodríguez