feat(create-plugin): extend experimental-app-sdk to Go backends - #2856
Draft
stevesg wants to merge 4 commits into
Draft
feat(create-plugin): extend experimental-app-sdk to Go backends#2856stevesg wants to merge 4 commits into
stevesg wants to merge 4 commits into
Conversation
stevesg
force-pushed
the
add-app-sdk-backend-support
branch
from
August 27, 2026 12:32
ed3b5ef to
f81e509
Compare
Adds opt-in support for `grafana-app-sdk` via feature flag or `add`: ``` $ create-plugin --feature-flags=experimentalAppSdk $ create-plugin add experimental-app-sdk ``` Code generation runs through `npm run generate:kinds`, a convenience script to download the grafana-app-sdk binary and run it. This change covers frontend-only app plugins: `kinds/config.cue` sets `codegen: goEnabled: false`, so no Go code, go.mod dependency, or backend is involved. Validation/mutation/conversion and custom routes are not supported. Summary of changes: - templates/app-sdk/: CUE kinds, the generate script, and a README - kinds/config.cue writes the manifest straight into src/app-sdk-manifest.json, so the frontend build's existing **/*.json copy pattern picks it up with no dedicated copy step - docker-compose.yaml: enable the plugins.appSDKManifest feature toggle - AGENTS/: app-sdk.md and edit to instructions.md to point at it
stevesg
force-pushed
the
add-app-sdk-backend-support
branch
from
August 27, 2026 12:38
f81e509 to
ca55f6a
Compare
@grafana/create-plugin
@grafana/eslint-config
@grafana/eslint-plugin-plugins
@grafana/plugin-docs-cli
@grafana/plugin-docs-parser
@grafana/plugin-e2e
@grafana/plugin-meta-extractor
@grafana/plugin-types-bundler
@grafana/react-detect
@grafana/sign-plugin
@grafana/tsconfig
commit: |
Extends the `experimental-app-sdk addition` to wire up a plugin's Go backend, for app plugins that have one. When a backend is present: - kinds/config.cue: flips `codegen: goEnabled: true` and sets `goGenPath`, so code generation also emits Go types alongside the existing TypeScript output - pkg/provider/provider.go: new template scaffolding the app.Provider/app.App. - pkg/main.go: replaces the plain `app.Manage(...)` call with the app-sdk's `plugin.Run` helper (best effort, significantly reworked main.go's will need manual intervention). Both edits are idempotent and bail out safely (skip + warn) if main.go has already diverged from the scaffolded shape they expect.
stevesg
force-pushed
the
add-app-sdk-backend-support
branch
from
August 27, 2026 14:41
ca55f6a to
58f9908
Compare
11 tasks
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.
Extends the
add experimental-app-sdkto wire up a plugin's Go backend,for app plugins that have one. When a backend is present:
codegen: goEnabled: trueand setsgoGenPath, socode generation also emits Go types alongside the existing TypeScript output
app.Manage(...)call with the app-sdk'splugin.Runhelper (best effort, significantly reworked main.go's will needmanual intervention).
Both edits are idempotent and bail out safely (skip + warn) if main.go has
already diverged from the scaffolded shape they expect.
Part of #2842