Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix docker buildx issue #202

Merged
merged 3 commits into from
Aug 22, 2023
Merged

fix docker buildx issue #202

merged 3 commits into from
Aug 22, 2023

Conversation

Yaiba
Copy link
Contributor

@Yaiba Yaiba commented Aug 21, 2023

remove replace for k8s deps, which cause docker build issue

../../../go/pkg/mod/github.com/docker/[email protected]/driver/kubernetes/manifest/manifest.go:94:9: unknown field ProbeHandler in struct literal of type "k8s.io/api/core/v1".Probe
../../../go/pkg/mod/github.com/docker/[email protected]/driver/kubernetes/manifest/manifest.go:94:30: undefined: corev1.ProbeHandler
# github.com/docker/buildx/driver/kubernetes/execconn
../../../go/pkg/mod/github.com/docker/[email protected]/driver/kubernetes/execconn/execconn.go:46:16: exec.StreamWithContext undefined (type "k8s.io/client-go/tools/remotecommand".Executor has no field or method StreamWithContext)

@Yaiba Yaiba self-assigned this Aug 21, 2023
go.mod Outdated
replace (
// for testcontainers-go
github.com/cucumber/godog => github.com/laurazard/godog v0.0.0-20220922095256-4c4b17abdae7

// what are these for?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great question. Let's get rid of them if they're forgotten cruft. Everything builds and tests fine without them on my machine.

go.mod Outdated
Comment on lines 255 to 256
// for testcontainers-go
github.com/cucumber/godog => github.com/laurazard/godog v0.0.0-20220922095256-4c4b17abdae7
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was this for? "for testcontainers-go" doesn't really say why. Everything builds and tests fine without this replace too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for acceptance/integration test, it's said required according to their docs. I just tried remove all replace and it works. I'll delete those

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where in their docs does it say you need a replace? That's terrible. A package should never require or suggest that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah you found it. But surprisingly it still work

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, the build works, but there are errors from toolings making the code highlighting fail, will add it back.

Copy link
Member

@jchappelow jchappelow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool. We should get rid of all the replaces unless there's much clearer documented need for them. replaces are usually trouble.

@sonarcloud
Copy link

sonarcloud bot commented Aug 22, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@Yaiba Yaiba merged commit 6dbd808 into main Aug 22, 2023
2 of 3 checks passed
@Yaiba Yaiba deleted the fix/docker-buildx-issue branch August 22, 2023 14:58
@jchappelow jchappelow added this to the v0.6.0 milestone Sep 28, 2023
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