-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Building plugins with docker results in a successful build with no plugins installed #1235
Comments
@bendemeyer Due to recent adjustments to the repo name during the graduation process, this issue has arisen. There are two possible solutions: if version 1.4.1 is being used, then lower-version plugins must be specified. If the latest version 1.4.2 is being used, the latest version plugins can be utilized. Use the latest version to build. For docker FROM apache/answer:1.4.2-RC2 as answer-source
........ If you want to use the old version, you need to choose the plugin's old version specifically and use the old repo name (incubator-answer-plugins). FROM apache/answer as answer-builder
........
RUN answer build \
--with github.com/apache/incubator-answer-plugins/[email protected] \
--output /usr/bin/new_answer |
@LinkinStars Thanks for the explanation! One of the goals I'm aiming for in the way I set up my instance is to minimize long-term maintenance overhead, including things like explicit version management. Ideally I'd like to be able to update to the latest release just by re-running the build with my existing Dockerfile. Do you think it would be possible to establish a versioning/tagging pattern between the I don't know much about these projects yet, so I'm not sure how much overhead would go into implementing & maintaining something like that. If it's doable, I'd be happy to contribute if I can get some pointers on where to start. |
@LinkinStars One follow-up note on this as well, the second approach you outlined (using the older plugin versions with [email protected]) worked exactly as described, but the first (using [email protected] with the newest plugins) needed some tweaking. In a golang-builder container based on the
It errored with the following result:
I noticed it was still trying to pull
I was then able to specify a module replacement using the
|
@bendemeyer Great! The issue is due to a recent repository name change. The name was
For plugins, we support specifying the latest version of the plugin. For example: Then for you to mention establishing a correlation about the version between the two is a good idea. Maybe in the plugin, we can set a minimum version of |
Something like this seems like a great idea to me! If the plugin "releases" can hold metadata about which versions of core Another possible change that occurred to me is about the default version of After poking around in the build code, I think I have a pretty good idea of how that second change might be implemented. If it would be desirable, I can test it out and open a PR. |
I'm not sure if this issue is more appropriate here or in
answer-plugins
, since it relates to plugins but seems like it might be an issue withanswer build
generally. Anyway, I'm putting it in both and I can delete one if it's in the wrong place.I'm trying to get answer running with some plugins, using the docker build process described here: https://answer.apache.org/docs/plugins/#docker-build
When I do this the
answer build
step completes successfully, but when I runanswer plugin
with the new binary I get an empty output. If I run the server and access the admin area, it shows no plugins are installed.To troubleshoot, I set up a builder image with this basic Dockerfile:
And within that I run
That process runs, compiles, and appears to complete successfully. However, the plugins aren't actually installed in the output binary.
I can also see that the newly built binary is a little smaller than the original:
I'm running this on an M1 mac, and I've replicated this result in both arm & amd64 container architectures. I've also tried upgrading the build container to the latest version of
pnpm
to see if that made a difference, and it did not.This is the (mostly) complete console output I get when I run
answer build
, with some of the big-long-lists-of-things truncated for the sake of making it more readable:The text was updated successfully, but these errors were encountered: