AFAIK there aren't formalized tools to manage these kinds of migrations. This is surprising to me because it's so closely analogous to database migrations. Migration happens at runtime rather than deploy time, with requests migrated forward and responses migrated backward.
-
Show this thread
-
A number of responses say "have the client detect that it's running an old version and force reload." That works, but it's pretty annoying UX. Better handling of migrations on the server side could prevent that. (With an eventual timeout to ease the support window: maybe a week?)
8 replies 1 retweet 14 likesShow this thread -
Some responses along the lines of "only make additive changes" and other similar rules. But these add a lot of inertia. If the server's API version support window were enforced by tools, then you could add and change fields at will and it would force you to write the migrations.
3 replies 2 retweets 28 likesShow this thread -
Gary Bernhardt Retweeted Jacob Rask
This seems like the more disciplined end of the continuum today, but it's still manual: create an issue, manage it, etc. I want to make incompatible API changes and have the system force me to write a migration so old clients don't need to restart.https://twitter.com/jacobrask/status/1140719143408287747 …
Gary Bernhardt added,
6 replies 1 retweet 33 likesShow this thread -
This thread got many interesting replies about what people do for syncing client/server API changes, especially on the original tweet. Lots of what you'd expect ("manually avoid backwards-incompatible changes") and also some very fancy technical solutions (fewer of those).
5 replies 1 retweet 12 likesShow this thread -
This Stripe post describing their API migration process is almost exactly what I had in mind. It's even easier for an SPA because clients restart eventually. The next question: can TypeScript's type system statically type these migrations gracefully?https://stripe.com/en-ca/blog/api-versioning …
1 reply 4 retweets 28 likesShow this thread -
Imagine: - Unbroken static typing from the database, over the API, to the frontend. - Database gets migrated forward, statically checked against backend database access. - API gets migrated backward, statically checked against backend responses and all running frontend versions.
1 reply 5 retweets 20 likesShow this thread -
I have the first two working. It's obvious that the third is possible, though it's not yet obvious to me that it's cleanly expressible in popular static languages.
1 reply 1 retweet 4 likesShow this thread -
This kind of stuff is what draws me to static type systems. I don't particularly want to wrap my IO in a burrito. But I do want the computer to force me not to break the API, and not to access the database in a way that violates the schema, and I want no gaps in those guarantees.
4 replies 6 retweets 28 likesShow this thread -
-
-
Replying to @lukechampine @garybernhardt
“I was the lone genius”. Amazing.
0 replies 0 retweets 0 likesThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.