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

v0.14.8 breaking build #770

Closed
Niiph opened this issue May 22, 2023 · 2 comments · Fixed by caddyserver/caddy-docker#298 or dunglas/symfony-docker#407
Closed

v0.14.8 breaking build #770

Niiph opened this issue May 22, 2023 · 2 comments · Fixed by caddyserver/caddy-docker#298 or dunglas/symfony-docker#407

Comments

@Niiph
Copy link

Niiph commented May 22, 2023

Today's update of 0.14.8 caused errors on CI on my two ApiPlatform repositories, with message:

#36 31.63 github.com/dunglas/mercure/caddy imports
#36 31.63 	github.com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile imports
#36 31.63 	github.com/caddyserver/caddy/v2/modules/caddytls imports
#36 31.63 	github.com/smallstep/certificates/authority/provisioner imports
#36 31.63 	github.com/slackhq/nebula/cert imports
#36 31.63 	crypto/ecdh: package crypto/ecdh is not in GOROOT (/usr/local/go/src/crypto/ecdh)
#36 34.40 2023/05/22 16:36:03 [FATAL] exit status 1
#36 ERROR: executor failed running [/bin/sh -c xcaddy build 	--with github.com/dunglas/mercure 	--with github.com/dunglas/mercure/caddy 	--with github.com/dunglas/vulcain 	--with github.com/dunglas/vulcain/caddy]: exit code: 1
failed to solve: executor failed running [/bin/sh -c xcaddy build 	--with github.com/dunglas/mercure 	--with github.com/dunglas/mercure/caddy 	--with github.com/dunglas/vulcain 	--with github.com/dunglas/vulcain/caddy]: exit code: 1
------
 > [app_caddy_builder 2/2] RUN xcaddy build 	--with github.com/dunglas/mercure 	--with github.com/dunglas/mercure/caddy 	--with github.com/dunglas/vulcain 	--with github.com/dunglas/vulcain/caddy:
#36 22.75 go: downloading github.com/shurcooL/sanitized_anchor_name v1.0.0
#36 22.77 go: downloading github.com/mattn/go-colorable v0.1.13
#36 22.79 go: downloading github.com/mattn/go-isatty v0.0.19
#36 31.63 github.com/dunglas/mercure/caddy imports
#36 31.63 	github.com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile imports
#36 31.63 	github.com/caddyserver/caddy/v2/modules/caddytls imports
#36 31.63 	github.com/smallstep/certificates/authority/provisioner imports
#36 31.63 	github.com/slackhq/nebula/cert imports
#36 31.63 	crypto/ecdh: package crypto/ecdh is not in GOROOT (/usr/local/go/src/crypto/ecdh)
#36 34.40 2023/05/22 16:36:03 [FATAL] exit status 1
------
Error: Process completed with exit code 17.

After I locked caddy in dockerfile to:

RUN xcaddy build \
	--with github.com/dunglas/mercure/caddy@v0.14.6 \

It works fine

@dunglas
Copy link
Owner

dunglas commented May 22, 2023

The problem is that github.com/slackhq/nebula requires crypto/ecdh which is part of Go 1.20, and Caddy's base image is still using Go 1.19.
I don't know why xcaddy doesn't resolve the versions correctly (@mholt may have an idea), but a quick workaround is to use the 2.7 version of the Caddy builder:

-caddy:2.6-builder-alpine
+caddy:2.7-builder-alpine

@mholt
Copy link

mholt commented May 22, 2023

I am not sure 🤔

I have a feeling it's not a problem with xcaddy or caddy code/repos, but rather the way Go modules works with relation to a plugin's go.mod. Maybe MVS or something?

marinhekman added a commit to BredaUniversityResearch/MSPChallenge-Server that referenced this issue May 24, 2023
marinhekman added a commit to BredaUniversityResearch/MSPChallenge-Server that referenced this issue May 24, 2023
roverwolf added a commit to opensalt/opensalt that referenced this issue May 30, 2023
@dunglas dunglas pinned this issue May 31, 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 a pull request may close this issue.

3 participants