Skip to content

chore(deps): upgrade github.com/replicatedhq/troubleshoot to v0.128.1#5908

Merged
emosbaugh merged 2 commits into
mainfrom
fix-k8s-deps-align-troubleshoot
May 14, 2026
Merged

chore(deps): upgrade github.com/replicatedhq/troubleshoot to v0.128.1#5908
emosbaugh merged 2 commits into
mainfrom
fix-k8s-deps-align-troubleshoot

Conversation

@emosbaugh
Copy link
Copy Markdown
Contributor

@emosbaugh emosbaugh commented May 13, 2026

Summary

Fixes go mod tidy failures caused by mismatched Kubernetes dependency versions, and upgrades github.com/ory/dockertest from v3 to v4 to remove a temporary replace directive.

Commit 1: Align k8s dependencies to v1.36.0

github.com/k0sproject/k0s was pinned to a version that pulled in k8s.io/kubernetes v1.35.0, while the rest of the repo already used k8s.io/* v0.36.0. This skew caused go mod tidy to fail because k8s.io/kubernetes v1.35.0 still imports k8s.io/api/scheduling/v1alpha1, which was removed in v0.36.0.

Changes:

  • Upgraded github.com/k0sproject/k0s to latest main (uses k8s.io/kubernetes v1.36.0)
  • Updated k8s replace directives (csi-translation-lib, dynamic-resource-allocation, kube-scheduler) from v0.35.0v0.36.0
  • Added temporary replace github.com/opencontainers/runc => v1.3.3 because runc v1.4.0 removed libcontainer/user, breaking dockertest/v3

Commit 2: Upgrade github.com/ory/dockertest/v3 to v4.0.0

The runc replace in commit 1 was only needed for dockertest/v3. Rather than carry a replace directive forever for a test-only dependency, we upgraded to dockertest/v4, which does not depend on the removed runc package.

Key API migration changes in integration/database/rqlite_migration_test.go:

  • dockertest.NewPool("")dockertest.NewPool(ctx, "")
  • pool.RunWithOptions(&RunOptions{...}, hostConfig)pool.Run(ctx, repo, WithName(...), WithTag(...), ...) (functional options)
  • Port bindings now use network.ParsePort(...) and network.PortMap
  • Host config uses container.HostConfig from github.com/moby/moby/api/types/container
  • pool.Retry(func() error)pool.Retry(ctx, timeout, func() error)
  • pool.Purge(resource)resource.Close(ctx) + pool.Close(ctx)
  • Added a custom removeContainerByName helper since v4 removed pool.RemoveContainerByName

This allowed us to drop the opencontainers/runc replace directive entirely.

Verification

  • go mod tidy completes cleanly
  • go build ./... compiles successfully
  • go test -c ./integration/database/... compiles (tests require Docker to run)

Upgrades github.com/k0sproject/k0s to latest main to resolve
k8s.io/kubernetes v1.35.0 -> v1.36.0 mismatch that was breaking
k8s.io/api/scheduling/v1alpha1 imports during go mod tidy.

Also adds a replace directive for opencontainers/runc v1.3.3 to
maintain compatibility with github.com/ory/dockertest/v3 used in
integration tests.
@emosbaugh emosbaugh changed the title Align k8s dependencies to unblock troubleshoot upgrades chore(deps): upgrade github.com/replicatedhq/troubleshoot to v0.128.1 May 13, 2026
sgalsaleh
sgalsaleh previously approved these changes May 13, 2026
Migrates integration/database/rqlite_migration_test.go from the v3
struct-based API to the v4 functional-options API.

Key changes:
- dockertest.NewPool now requires context.Context
- pool.Run uses functional options (WithName, WithTag, WithEnv, etc.)
- Port bindings use network.ParsePort and network.PortMap
- Host config uses moby container.HostConfig types
- Retry requires context and timeout
- Resource cleanup uses Close(ctx) instead of Purge
- Custom removeContainerByName helper since v4 drops RemoveContainerByName

This also removes the github.com/opencontainers/runc replace directive
that was only needed to keep dockertest v3 working.
@emosbaugh emosbaugh force-pushed the fix-k8s-deps-align-troubleshoot branch from 560ccbc to a2ac7dd Compare May 14, 2026 02:26
@emosbaugh emosbaugh requested a review from sgalsaleh May 14, 2026 04:59
@emosbaugh emosbaugh enabled auto-merge (squash) May 14, 2026 13:47
@emosbaugh emosbaugh merged commit ab197b5 into main May 14, 2026
94 checks passed
@emosbaugh emosbaugh deleted the fix-k8s-deps-align-troubleshoot branch May 14, 2026 14:34
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