remove all v5 stuff#3222
Conversation
There was a problem hiding this comment.
Pull request overview
This PR removes remaining backend v5 client-controller surface area (controller, validators, and related tests) and updates the codebase to use a v6-friendly assignment type name (IExperimentAssignment) while retaining the old IExperimentAssignmentv5 name for compatibility.
Changes:
- Remove the v5 client controller and its associated validators and unit tests.
- Rename the assignment type to
IExperimentAssignmentand update backend + JS client references accordingly, while keepingIExperimentAssignmentv5as a deprecated compatibility alias. - Remove the legacy
blobDataLogpathway and update test mocks/integration tests to match.
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/types/src/index.ts | Re-export new IExperimentAssignment from the types package entrypoint. |
| packages/types/src/Experiment/interfaces.ts | Introduce IExperimentAssignment and deprecate IExperimentAssignmentv5 as a compatibility alias. |
| packages/backend/test/unit/controllers/mocks/ExperimentClientControllerMock.ts | Remove mock for deleted v5 controller. |
| packages/backend/test/unit/controllers/mocks/ExperimentAssignmentServiceMock.ts | Update mock typings and remove legacy blobDataLog stub. |
| packages/backend/test/unit/controllers/ExperimentClientController.test.ts | Remove v5 controller unit tests. |
| packages/backend/test/integration/utils/index.ts | Update integration helpers to use IExperimentAssignment. |
| packages/backend/test/integration/UserNotDefined/index.ts | Remove blobDataLog expectations. |
| packages/backend/src/api/services/ExperimentAssignmentService.ts | Update assignment typing and remove blobDataLog implementation. |
| packages/backend/src/api/controllers/validators/UpdateWorkingGroupValidator.ts | Remove v5 validator class; keep v6 validator only. |
| packages/backend/src/api/controllers/validators/MarkExperimentValidator.v5.ts | Remove v5 mark validator. |
| packages/backend/src/api/controllers/validators/LogValidator.ts | Remove v5 validator class; keep v6 validator only. |
| packages/backend/src/api/controllers/validators/ExperimentUserAliasesValidator.ts | Remove v5 validator class; keep v6 validator only. |
| packages/backend/src/api/controllers/validators/ExperimentAssignmentValidator.ts | Remove v5 validator class; keep v6 validator only. |
| packages/backend/src/api/controllers/ExperimentClientController.v6.ts | Update return types/imports to IExperimentAssignment. |
| packages/backend/src/api/controllers/ExperimentClientController.v5.ts | Remove v5 controller implementation entirely. |
| packages/backend/src/api/controllers/BatchAssignController.ts | Update return types/imports to IExperimentAssignment. |
| packages/backend/src/api/Algorithms.ts | Update assignment typing to IExperimentAssignment. |
| packages/backend/.env.test | Change TypeORM test DB port value. |
| clientlibs/js/src/UpGradeClient/UpgradeClient.ts | Update public API typings/docs to IExperimentAssignment. |
| clientlibs/js/src/DataService/DataService.ts | Update stored assignment typing to IExperimentAssignment. |
| clientlibs/js/src/DataService/DataService.spec.ts | Update tests to IExperimentAssignment. |
| clientlibs/js/src/Assignment/Assignment.ts | Update constructor typing to IExperimentAssignment. |
| clientlibs/js/src/Assignment/Assignment.spec.ts | Update tests to IExperimentAssignment. |
| clientlibs/js/src/ApiService/ApiService.ts | Update API method typing to IExperimentAssignment. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
4f833c3 to
e6451ee
Compare
…yarn/clientlibs/js/form-data-4.0.6 Bump form-data from 4.0.5 to 4.0.6 in /clientlibs/js
e6451ee to
6b26620
Compare
bcb37
left a comment
There was a problem hiding this comment.
The UserCheckMiddleware tests still mention 'v5', but only as an example of a url that doesn't end in '/v6/featureflag', to verify fall through to default behavior. It might be less confusing to get rid of that.
this removes the v5 client controller and tests. note Portal will need to be on v6, i've got a pr in to do that which should be in well before we get this into prod.
the
IExperimentAssignmentv5type is still technically the name of the type we use in v6, so i've aliased this asIExperimentAssignmentand put a deprecation notice on the old name so we can keep backwards compatibility.