[APPS][Connections Part 1] Add backend connection manifest upload plumbing#338
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
Codex Review: Didn't find any major issues. You're on a roll. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🎉 All green!❄️ No new flaky tests detected 🔗 Commit SHA: 8aeb377 | Docs | Datadog PR Page | Give us feedback! |
9a1dbe0 to
04d954f
Compare
04d954f to
d230cbd
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d230cbd1d5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| allowedConnectionIds: [...func.allowedConnectionIds], | ||
| }; | ||
| } | ||
| const manifest = { backend: { functions } }; |
There was a problem hiding this comment.
Upload the manifest even when no frontend assets exist
Because this manifest is created only after the earlier if (!assets.length) return guard, any build where collectAssets() finds no frontend files skips the new manifest entirely, and also skips any backend outputs passed into handleUpload. In a backend-only app or an empty frontend output directory, getBackendFunctions()/backendOutputs can still be non-empty, but no manifest.json connection allowlist is archived or uploaded. Move the no-assets decision until after backend bundles and the manifest have been appended, or base it on the final allAssets list.
Useful? React with 👍 / 👎.
d230cbd to
a91c48b
Compare
|
Codex Review: Didn't find any major issues. 👍 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
| relativePath: refPath, | ||
| name: exportName, | ||
| absolutePath: id, | ||
| allowedConnectionIds: [], |
There was a problem hiding this comment.
We will populate this value in a later PR.
a91c48b to
9ce0085
Compare
b89f346 to
5c93fa8
Compare
2234d86 to
4769d38
Compare
3d1a731 to
bed9e2f
Compare
4769d38 to
8aeb377
Compare

Motivation
Backend Functions that use connections need to provide a static list of allowed connection ids. When the backend function executes only connections defined within this list can be used as part of an action defined within the backend function.
In the following example:
'c1ef81d2-78e6-4e4c-bf30-9c04f448d0a2'would need to be defined in the allowed connection ids forlistHosts.The allowed connection ids needs to be submitted to the backend during app upload as part of the manifest.json file (more details in the RFC here).
For this example the expected
manifest.jsonwould look like the following:Changes
Adds the plumbing necessary to submit
allowedConnectionIdsas part of the manifest.json and when testing backend functions as part of the dev server.Initially allowedConnectionIds will always be empty. Connection ID extraction is intentionally deferred to follow-up PRs in this stack.
QA Instructions
E2E and unit tests added. We can run those.
Blast Radius
This affects the apps Vite plugin backend function transform, upload archive assembly, and dev-preview execution payloads. The first PR emits empty allowlists only, so it establishes structure without enabling connection-using actions.
Documentation