-
Notifications
You must be signed in to change notification settings - Fork 56
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
Unable to build Caddy plugin #98
Comments
I'm on it 🚀✌️ |
UPDATE: In the meantime, I have resolved this by additional
@darkweak did you test a successful build? It might help to add a github workflow to catch this xcaddy build failure in future? ARG CADDY_VERSION=2.4.3
FROM caddy:${CADDY_VERSION}-builder AS builder
ARG SOUIN_VERSION=@ed8b9e9fd2d4
RUN xcaddy build \
--with github.com/darkweak/souin/plugins/caddy${SOUIN_VERSION}
FROM caddy:${CADDY_VERSION}-alpine
COPY --from=builder /usr/bin/caddy /usr/bin/caddy I have tried without appending a version to the I continue to get a |
Workaround by adding a
This version of badger is an RC release...why? This version of badger had an official release back in Jan 2020, there's been multiple releases since, and since Jan 2021; v3 (not compatible with v2). Looking through the repo a bit and the rest of the xcaddy build output, it seems that while Badger v3 is present, you still have references to v1 and v2? From what I can make of my build output, when building the latest commit for the caddy plugin, all 3 versions of Badger with downloaded, this is supposedly because of being referenced here?: Can that be fixed by removing those lines if they're not needed? If so perhaps you have a way to cleanup/remove old content like that which shouldn't be part of the codebase/dependencies anymore? I'm not familiar with package management in Go or committing to a repo, in NodeJS and Rust we don't commit dependencies like you seem to with In the meantime, as a user I am able to finally get a successful build by also telling ARG CADDY_VERSION=2.4.3
FROM caddy:${CADDY_VERSION}-builder AS builder
ARG SOUIN_VERSION=@ed8b9e9fd2d4
RUN xcaddy build \
--with github.com/darkweak/souin${SOUIN_VERSION} \
--with github.com/dgraph-io/badger/v2 \
--with github.com/darkweak/souin/plugins/caddy${SOUIN_VERSION}
FROM caddy:${CADDY_VERSION}-alpine
COPY --from=builder /usr/bin/caddy /usr/bin/caddy |
I'll add a Github action to ensure it can be built |
Done https://github.com/Darkweak/Souin/actions/runs/1144408675. |
Every build are tested now, I'm waiting for the merge to be sure everything is ok and we will tag a new version with these changes. |
Awesome work @darkweak ! 😀 I believe you can revert the v3 downgrade of Badger and builds should pass still. Would be good to resolve that before tagging the new release. Seems the RC v2 badger dependency was on a Caddy dependency for |
We have to wait for the patch on the badger side 😁 |
@darkweak which patch? Or did you mean the |
Yes that's what I mean, and the PR from @francislavoie must be merge in Badger too |
Reopened to keep in mind we have to bump deps when everything will be ready on badger/caddy sides |
Should be okay now, reopen if the problem persists (or open a new issue) :) |
Fails to build with this Dockerfile:
Error output suggests a checksum mismatch:
Not sure if it's related but the plugin seems to also reference a beta release of Caddy 2.4, whereas we're up to 2.4.3 now:
https://github.com/Darkweak/Souin/blob/01e06b75a5768c0c04d9b6e27aa7ffa94514bd4f/plugins/caddy/go.mod#L6
The text was updated successfully, but these errors were encountered: