Add a temporary pre-v4 endpoint to ease frontend transition away from /v3/ (original) (raw)

Problem:
Addons-frontend uses /api/v3/ which is frozen and stable for Firefox to use, but we would like to move it to using /api/v4/ #12019 to get new API features. But one breaking change in particular (always dicts for localized fields #5757) is making this a challenge to do in one move as a non-goal task.

Current practise:
So what we are currently doing is backporting any required API change from /v4/ to /v3/ (and crossing our fingers that because they aren't breaking changes it won't cause any Firefox regressions).

This, IMO, is not an acceptable solution.

Solutions proposed so far:
#5797 proposes a number of possible solutions involving being able to specify api feature-gates in the request so frontend (or any other client) can control which changes they want to use. There isn't a consensus, and all the solutions will involve an unknown amount of work on addons-server and addons-frontend.
A final suggestion in #5797 is that maybe we wont need to do anything complicated - addons-frontend can just upgrade to /api/v4/. But discussion #12019 indicates that isn't easy to do after all.

So both of those solutions are not viable in the short term either.

Hacky interim workaround proposal:
We add a /api/v3.5/ (or /api/v3.9/ or /api/v4a/ etc) which only disables the breaking change (localized fields being dicts) and is otherwise /api/v4/. This allows us to stop backporting changes to /v3/ and allows us to upgrade frontend almost-all-the-way to /v4/ and make the final fix at our leisure.
Addons-server can also implement #5797 (or similar) at our leisure.