Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new test incorrectly fails for supported plugin configurations that omit org and needs to skip the org-specific check when that plugin is not compiled in.
1 open issue
1 file not reviewed
backend/plugins/all/all.go: Generated file
What changed in this PR
Restores pointer-receiver methods for compiled-in DevLake plugins, addressing missing org initialization and routes introduced by #9288.
Changes:
- Updates the generator to register plugin pointers instead of values.
- Regenerates all 47 compiled-in plugin registrations.
- Adds a regression test checking that registered
orgimplementsPluginApiandPluginInit.
| File | Description |
|---|---|
backend/tools/pluginsgen/main.go |
Generates pointer-based registrations. |
backend/plugins/all/all.go |
Registers all compiled-in plugins as pointers. |
backend/plugins/all/all_test.go |
Checks preservation of org pointer-receiver interfaces. |
Review effort: Balanced
The generated registry registered plugins by value, so methods declared on pointer receivers were dropped from the method set. org declares Init and ApiResources on *Org, so in v1.0.3-beta19 it is never initialised and every /plugins/org/* route returns 404. Shared-object loading always registered a pointer (plugin.Lookup returns *T), so this restores that behaviour. Closes apache#9327 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ahnazary
force-pushed
the
fix/register-plugins-as-pointers
branch
from
November 4, 2026 12:23
a475db0 to
9a01288
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
tools/pluginsgenregisters compiled-in plugins by value (plugin.MustRegister(org.Org{})). Methods declared on pointer receivers are not in a value's method set, soorg(whoseInitandApiResourcesare on*Org) is never initialised and gets no routes. Since v1.0.3-beta19 every/plugins/org/*endpoint (teams.csv,users.csv,user_account_mapping.csv, ...) returns 404.Shared-object loading always registered a pointer (
plugin.Lookup("PluginEntry")returns*T), so registering&T{}restores the pre-#9288 behaviour for every plugin.Changes
tools/pluginsgen: emitplugin.MustRegister(&pkg.Type{})plugins/all/all.go: regeneratedDoes this close any open issues?
Closes #9327. Regression from #9288.
🤖 Generated with Claude Code