2

A lot of articles online give very simple examples on Blue-Green deployments. However, how would data update be handled?

Say I have a column called Category with values (A, B, C, D). In my next release I want to consolidate values (B, C) -> (E) to handle a new logic. However something goes wrong and I need to rollback in the next release. At this point, the data seems salvageable.

What are ways to properly handle this kind of situations?

2
  • Continuous integration does not regard production deployment, but rather development and testing. Do you mean the production or testing update?
    – max630
    May 19, 2019 at 5:55
  • BG deployment with a single database, or BG deployment with two databases?
    – Doc Brown
    May 20, 2019 at 20:05

1 Answer 1

3

Once the data has been updated, there's very little opportunity for an easily manageable rollback. Unless you carry forward an "oldCategory" value of sorts (obviously undesirable), once you've consolidated the data at the data source you're pretty committed to the change.

I would suggest first changing the code so that the behaviour is how you want it; that is anything in categories B, C or E is treated as E. Possibly start inserting new values as E in places you're happy with.

This way, if you need to roll it back, it's just a change of the code again. A later step can be to perform the data updates (when you've verified the behaviour won't change from it) and then finally remove references to status B and C from the code when the data is all cleaned up.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.