Skip to content

[APPS-2792] Add: v3 to v4 migration guide entry - #511

Draft
tyffical wants to merge 2 commits into
tiffany.trinh/apps-2792-custom-credentials-local-resolutionfrom
tiffany.trinh/apps-2792-migrations-v3-to-v4
Draft

[APPS-2792] Add: v3 to v4 migration guide entry#511
tyffical wants to merge 2 commits into
tiffany.trinh/apps-2792-custom-credentials-local-resolutionfrom
tiffany.trinh/apps-2792-migrations-v3-to-v4

Conversation

@tyffical

@tyffical tyffical commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Motivation

  • Local Node execution for App Builder backend functions is landing across several already-merged PRs (in-process execution, npm run dev:verify, the runtime network/subprocess guard, build-time rejection of Node built-ins/raw network globals, Custom Credentials local resolution, and real-identity hydration for getInitiatingUser()/getExecutionUser()), with process.env scoping as the last piece still in review.
  • This bundle of changes is breaking for existing apps and is intended to ship as the next major version bump — MIGRATIONS.md needs a ## v3 to v4 entry describing it before that bump goes out.
  • This PR can be reviewed and merged now; the actual version bump (bump.yaml dispatch) should wait until the process.env scoping work and its security sign-off land — see Out of Scope below.

Changes

2 changes across MIGRATIONS.md
What changed File
Added a ## v3 to v4 entry covering in-process local execution, npm run dev:verify, and the process.env allowlist, plus its Table of Contents entry MIGRATIONS.md
Added subsections covering Custom Credentials local resolution (datadog-app.local.json) and real-identity hydration for getInitiatingUser()/getExecutionUser(), plus their Table of Contents entries MIGRATIONS.md

QA Instructions

Docs-only change — no functional QA applies.

yarn cli integrity
# Regenerates the file's Table of Contents from its headings and runs the repo's install/format/typecheck/OSS-compliance checks
# Expected: exits 0; `git status --short` shows only MIGRATIONS.md changed ✅ VERIFIED

The described behavior was cross-checked against the actual merged code rather than assumed:

Blast Radius

  • Documentation-only change (MIGRATIONS.md). Zero runtime risk.

Out of Scope / Follow-ups

1 item deferred
Item Status Next step
The actual major version bump (bump.yaml dispatch) this entry documents blocked Wait until the process.env scoping (Secret Store parity, #504) and env-guard hardening (#510) work merge and security sign-off completes, then dispatch the bump separately

@datadog-prod-us1-5

This comment has been minimized.

@tyffical
tyffical force-pushed the tiffany.trinh/apps-2792-migrations-v3-to-v4 branch from 5395c22 to c01b3b9 Compare September 10, 2026 04:55
@tyffical
tyffical changed the base branch from master to tiffany.trinh/apps-2792-custom-credentials-local-resolution September 10, 2026 04:55
@tyffical
tyffical added this pull request to stack #499 September 10, 2026 05:00
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2792-migrations-v3-to-v4 branch from 4687e4c to b39e663 Compare September 10, 2026 05:05
@tyffical
tyffical requested a lite review from Copilot September 10, 2026 05:23

This comment was marked as resolved.

@tyffical
tyffical force-pushed the tiffany.trinh/apps-2792-migrations-v3-to-v4 branch from b39e663 to 281ac50 Compare September 10, 2026 05:39
@tyffical
tyffical requested a lite review from Copilot September 10, 2026 06:40
@tyffical

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-10T06:44:55.346261Z 281ac50 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Documentation corrections remain in MIGRATIONS.md.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details

Suppressed comments (2)

MIGRATIONS.md:52

  • The phrase “even though the equivalent read against the deployed function succeeds in production” is too broad: an arbitrary shell variable such as the AWS_REGION example is not necessarily configured in the deployed app at all. Qualify this with “when that variable is provided by the deployed app or a connection” so the guide does not imply production supplies every local shell variable.
Reading any other variable — including one your shell has set, or one a secret-backed connection would resolve to in production — returns `undefined` locally, even though the equivalent read against the deployed function succeeds in production. The one exception is a Custom Credentials-backed variable declared in `datadog-app.local.json` (see below).

MIGRATIONS.md:36

  • This migration entry omits the other half of the breaking behavior: local execution installs runtime guards for network, subprocess, worker-thread, and DNS-resolver APIs, so a dependency can now fail when it makes one even if the app file has no forbidden syntax. Please document that alongside the build-time checks; literal dynamic Node imports are also rejected, so “static imports” is too narrow.
Static imports of Node built-ins (`fs`, `child_process`, `net`, etc.) and raw network globals (`fetch`, `XMLHttpRequest`, `WebSocket`, `EventSource`) in a backend file are rejected at build time. Backend functions have never had access to these in production, so this only surfaces earlier — at `npm run dev` time instead of only once the app is published — a case that previously appeared to work locally but would fail in production.
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread MIGRATIONS.md Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 281ac50508

ℹ️ 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".

Comment thread MIGRATIONS.md Outdated
Comment thread MIGRATIONS.md Outdated
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2792-migrations-v3-to-v4 branch 2 times, most recently from 10d55b1 to e3c9bda Compare September 10, 2026 07:05
Documents the upcoming breaking change to how `npm run dev` runs
backend functions: in-process execution instead of a cloud round
trip, the new `npm run dev:verify` cloud-parity check, and the
process.env allowlist during local execution.
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2792-migrations-v3-to-v4 branch from e3c9bda to 3e35c51 Compare September 10, 2026 07:33
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