feat: add ListTemplates and GenerateFile RPCs (template-connectors v2, PR 2)#9326
Draft
royendo wants to merge 1 commit into
Draft
feat: add ListTemplates and GenerateFile RPCs (template-connectors v2, PR 2)#9326royendo wants to merge 1 commit into
ListTemplates and GenerateFile RPCs (template-connectors v2, PR 2)#9326royendo wants to merge 1 commit into
Conversation
Wires the `runtime/templates` package up to the runtime API surface.
The frontend (PR 3) will fetch form schemas via `ListTemplates` and
render YAML previews / write files via `GenerateFile`.
- proto/rill/runtime/v1/api.proto: adds `ListTemplates` and
`GenerateFile` RPCs and the `Template`, `TemplateFile`, and
`GeneratedFile` messages. Per the v2 PRD's open-decisions section,
the legacy `GenerateTemplate` RPC from the original PR is dropped —
the frontend goes through `GenerateFile` exclusively.
- runtime/server/server.go: loads the template registry once at
startup and stores it on `Server`.
- runtime/server/templates.go: handlers for both RPCs plus
`writeRenderedFiles` (writes `.env` first so YAML referencing
`{{ .env.VAR }}` resolves on first reconcile) and `appendEnvVar`
with the v1 review hardening (newline strip + quoting of values
with whitespace / shell-special characters).
- Regenerated proto bindings, gateway, validate, swagger, and the
Orval frontend client via `make proto.generate`.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This was referenced Apr 28, 2026
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.
PR 2 of 4 from
PRD-template-connectors-v2.md. Wires theruntime/templatespackage (PR 1, #9325) up to the runtime API. Stacked on top of #9325 — review after that lands. The frontend rewire (PR 3) consumes these RPCs.ListTemplatesandGenerateFileonRuntimeService. The legacyGenerateTemplateRPC from the original PR feat: template connectors #8981 is dropped per the PRD's open-decisions recommendation: the frontend goes throughGenerateFileexclusively, and a search of the codebase showed no CLI/SDK consumer of the older shape.writeRenderedFileswrites.envbefore the rendered YAML so that secret references ({{ .env.VAR }}) resolve on the first reconcile cycle.appendEnvVarstrips newlines and quotes values containing whitespace or shell-special characters (carried over from the v1 review hardening list).proto.generateregenerates Go bindings, the gateway, validate, swagger, and the Orval client. The large diff inapi.pb.gois mostly index renumbering caused by adding seven new messages — actual content additions are scoped to the new types.Checklist:
Developed in collaboration with Claude Code