Skip to content

docs: describe the single binary and plugin sideloading - #837

Merged
Startrekzky merged 3 commits into
mainfrom
docs/single-binary-plugins
Nov 1, 2026
Merged

Startrekzky merged 3 commits into
mainfrom
docs/single-binary-plugins

Conversation

@klesh

@klesh klesh commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Documents the packaging change tracked in apache/devlake#9276: DevLake ships as one lake binary containing the framework, the API and every official plugin, chosen at build time from a generated registry, and a deployed binary still loads extra .so plugins from PLUGIN_DIR.

Five files:

  • docs/Overview/Architecture.md — says the official plugins are compiled into the server binary, and adds a "Plugin packaging" section: the generated plugins/all registry, DEVLAKE_PLUGINS/GO_PLUGINS selection, Python plugins, and where sideloading fits.

  • docs/DeveloperManuals/PluginImplementation.md — how a plugin becomes part of the binary: the plugins/*/impl layout, the generated registry, when to regenerate it, core-only builds, and when to build a .so and sideload instead.

  • docs/DeveloperManuals/DeveloperSetup.md — the "Compiling" section was indented four spaces, so it rendered as a code block, and it documented two things that do not exist: PLUGIN=<name> (the variable is DEVLAKE_PLUGINS) and make build-worker. Rewritten for the single-binary default, with the DEVLAKE_PLUGINS subset, the registry drift check, the debug build flag, and the core-only and make build-plugin paths. A "Sideloading plugins" section explains where the .so files go, why they must be built with the matching toolchain, and that a plugin that fails to load is skipped instead of taking the server down.

  • docs/GettingStarted/Environment.md — new PLUGIN_DIR entry: default value, the container mount path (/app/bin/plugins), the skip-on-failure behaviour and the override warning.

  • docs/GettingStarted/DockerComposeSetup.md — FAQ entry showing the compose volume that sideloads a plugin into the image, since adding a plugin no longer means rebuilding the image.

Dependency (merge after the implementation)

The behaviour described here lands in two devlake PRs:

Both are merged into feat/single-binary.

Does this close any open issues?

Refs apache/devlake#9276.

klesh added 2 commits October 31, 2026 11:59
`make build` now produces one `bin/lake` with the framework, the API and
every official plugin compiled in, and a deployed binary still loads
extra `.so` plugins from PLUGIN_DIR.

- Rewrite the "Compiling" section, which was rendered as a code block and
  documented two things that do not exist: `PLUGIN=<name>` (the variable is
  DEVLAKE_PLUGINS) and `make build-worker`.
- Add a "Sideloading plugins" section: where the .so files go, why they
  must be built with the matching toolchain, and that a plugin which fails
  to load is skipped rather than taking the server down.
- Document PLUGIN_DIR in the environment variables reference, including the
  container mount path and the override warning.
The image ships one binary with every official plugin, so adding a plugin
means mounting a directory over /app/bin/plugins rather than rebuilding it.
Adds an FAQ entry with the compose snippet, the naming/override rule and the
"build it in the matching lake-builder image" constraint.
@klesh
klesh marked this pull request as ready for review October 31, 2026 04:54
The build no longer produces one .so per plugin for the release: a
generated registry links every official plugin into bin/lake, and the
image ships that binary alone. Document the model where plugin authors
and operators will look for it.

- Architecture: state that official plugins are compiled into the lake
  binary, and add a "Plugin packaging" section covering the generated
  registry, DEVLAKE_PLUGINS/GO_PLUGINS selection, Python plugins, and
  how PLUGIN_DIR sideloading fits on top.
- Plugin implementation: describe how a plugin gets into the registry,
  how to regenerate it, the core-only builds, and when to sideload
  instead.
- Developer setup: note the checked-in registry and the CI drift check,
  the debug build flag, and document how to build a core-only server.

@Startrekzky Startrekzky left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@Startrekzky
Startrekzky merged commit 838e3e1 into main Nov 1, 2026
1 check passed
@Startrekzky
Startrekzky deleted the docs/single-binary-plugins branch November 1, 2026 11:58
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