Add project variable migration support#12313
Conversation
Reports project-variable counts in MigrationReport and points the migration lib pin at the add-project-variable-migration dev branch.
Greptile SummaryThis PR stacks on the API-key migration branch and wires up
Confidence Score: 5/5The changes are narrow and additive — one new response model rule and one new e2e test — with no modifications to existing migration logic or API contracts. All changed code follows the patterns established by the API-key migration that this PR stacks on. The model change is a one-liner rule addition, and the test exercises both the happy path and the security-relevant secret-value masking behaviour. No existing paths are altered. The destination variable list fetch in MigrationsBase.php is not paginated; if the destination project accumulates enough variables the test could produce a false negative. Important Files Changed
Reviews (3): Last reviewed commit: "Add E2E test for project variable migrat..." | Re-trigger Greptile |
| }, | ||
| "config": { | ||
| "platform": { | ||
| }, | ||
| "platform": {}, | ||
| "allow-plugins": { | ||
| "php-http/discovery": true, | ||
| "tbachert/spi": true | ||
| } | ||
| } | ||
| }, |
There was a problem hiding this comment.
VCS repository entry should not be committed long-term
The repositories block added here points directly to the GitHub VCS source for utopia-php/migration. This is needed to resolve the dev branch now, but if this entry is still present when the stack lands on main, production builds will pull from a branch that may eventually be deleted (or may diverge unexpectedly). Standard practice is to remove the VCS override once the package is published to Packagist and the dependency is pinned to a stable release. Please ensure this block is cleaned up before the final merge to the main branch.
✨ Benchmark resultsComparing add-api-key-migration (before) to add-project-variable-migration (after). Before
After
Delta
Top API waits
|
🔄 PHP-Retry SummaryFlaky tests detected across commits: Commit
|
| Test | Retries | Total Time | Details |
|---|---|---|---|
UsageTest::testFunctionsStats |
1 | 10.20s | Logs |
UsageTest::testPrepareSitesStats |
1 | 7ms | Logs |
UsageTest::testEmbeddingsTextUsageDoesNotBreakProjectUsage |
1 | 5ms | Logs |
LegacyConsoleClientTest::testNotEndsWith |
1 | 240.67s | Logs |
Covers plain + secret variables, asserts secret value is not exfiltrated through the migration (source SDK strips it, destination writes empty).
Summary
Stacks on #12308. Adds the
project-variablerule toMigrationReportso the wizard can show the source's project-variable count. Pinsutopia-php/migrationto the matching dev branch.Cross-repo