Adopt switchblade v0.9.2 with CF API v3 support #485
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Update Go dependencies for Docker SDK v27 and OpenTelemetry compatibility
What
Upgrades switchblade to v0.9.2
Updates Docker SDK to v27.5.1
Adds OpenTelemetry dependencies (v1.32.0)
Resolves google.golang.org/genproto package conflicts
Why
The staticfile-buildpack integration tests require switchblade v0.9.2 for improved Docker container management. This version depends on Docker SDK v27.5.1, which in turn requires OpenTelemetry instrumentation packages.
Without these updates:
Vendoring fails due to missing OpenTelemetry packages
Docker SDK types are undefined (network.ListOptions, container.StartOptions, etc.)
Ambiguous import errors occur with conflicting genproto versions
How
Updated dependencies:
github.com/cloudfoundry/switchblade: v0.9.0 → v0.9.2
github.com/docker/docker: v27.4.1 → v27.5.1 (via replace directive)
Added go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.32.0
Added go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.32.0
Added go.opentelemetry.io/otel/metric v1.32.0
Added go.opentelemetry.io/otel/sdk v1.32.0
Added go.opentelemetry.io/otel/trace v1.32.0
Added go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.57.0
Fixed genproto conflicts:
Excluded google.golang.org/genproto v0.0.0-20230403163135-c38d8f061ccd
Added explicit google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28
Added explicit google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28
Replaced packages for compatibility:
github.com/docker/distribution → v2.8.2+incompatible
github.com/docker/docker → v27.5.1+incompatible
Updated vendor directory with go mod tidy && go mod vendor.
Testing
Verified that:
go mod tidy completes without errors
go mod vendor successfully vendors all dependencies
No ambiguous import or missing package errors remain