📝 [RUM-16097] Add migration skills for v4→v5 and v5→v6 SDK upgrades#4640
📝 [RUM-16097] Add migration skills for v4→v5 and v5→v6 SDK upgrades#4640mormubis wants to merge 39 commits into
Conversation
0ace371 to
760725f
Compare
Bundles Sizes Evolution
|
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 32c0733 | Docs | Datadog PR Page | Give us feedback! |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 760725f96a
ℹ️ 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".
a9cdc3e to
7d3ae15
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: af32d7c51a
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cafcecc76c
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 05c9f32d0f
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9c5bb4d287
ℹ️ 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".
9c5bb4d to
0717e90
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0d9bc30a8e
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2bd41c7f08
ℹ️ 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".
2e73616 to
7dffd20
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7dffd20264
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e4fc08a9a3
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Checked grep --help: operands after the pattern are the files/directories being searched, so grep -r "@datadog/browser-" package.json only inspects the root package.json file. In a workspace where the Browser SDK dependency lives in packages/app/package.json, the v7 migration can leave that package on v6 while only root manifests are updated, resulting in mixed SDK majors; point the command at . with --include='package.json'.
Checked grep --help: --include=GLOB searches only files matching the listed globs, and this audit omits *.jsx/*.tsx even though Step 1 can update CDN URLs in those files. A React/Next component or dynamic loader that renders the Datadog <script> can be migrated to /v7/ without adding crossorigin, leaving v7 CDN dynamic imports blocked on replay/profiler chunks; use the same code extensions as the URL search.
For v6 configs that explicitly set allowFallbackToLocalStorage: false, applying this blanket replacement turns the fallback on: v7's sessionPersistence array tries each entry in order, while the default with no option remains cookie-only (packages/browser-core/src/domain/session/sessionStore.ts:18-41). The migration should say to use ['cookie', 'local-storage'] only when the removed option was true, and to delete explicit false entries, otherwise projects that intentionally avoided localStorage can start persisting sessions there.
For CDN migrations, crossorigin is an HTML attribute or script property, not a CSP script-src directive. If someone follows this infrastructure checklist by editing only the CSP policy while missing the Step 2 tag/property change, the v7 SDK still loads without the required CORS mode and its ESM async chunks can fail; reword this bullet to point back to adding crossorigin="anonymous" on the CDN script tags or .crossOrigin on dynamic scripts.
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1ee7d5dfff
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
For v6 configs that explicitly set allowFallbackToLocalStorage: false, applying this replacement enables the fallback they opted out of: v7 treats sessionPersistence: ['cookie', 'local-storage'] as an ordered fallback list, so when cookies are unavailable it will start persisting sessions in localStorage. The migration should only use this replacement for allowFallbackToLocalStorage: true; false configs should delete the option or keep cookie-only persistence.
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8ba9a0cd27
ℹ️ 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".
Motivation
Benoit shipped the v6→v7 migration skill in #4486. We need equivalent skills for v4→v5 and v5→v6 so they can serve as the single source of truth for migration guides and feed the
hidden_promptsent tocode-gen-api.Changes
Two new skill files following the same structure as the existing v6→v7 skill. Content sourced from the official upgrade guide and the CHANGELOG, then cross-referenced to make sure nothing was missed.
Test instructions
These are markdown files consumed by AI coding assistants. No runtime behavior to test.
Checklist