GW2024 Part 1: GW2024 extends MigrationType #1012
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the first of a series of changes in which we are going to implement the Guardian Weekly 2024 migration.
Unlike previous migrations implemented in essentially a single pull request, see for instance the example of Newspaper2024 ( #964 ), because GW2024 is also a teaching opportunity with various documentation having already been written and new ones coming soon, the question of how to present the migration code update in the engine was posed.
This PR is the first PR in the series. A migration ultimately starts with the
MigrationType
trait being extended. The change is the least amount of code that needed to be written to make it compile and pass the tests (note that no tests actually needed to be changed). Moreover we make a small change in thehandle
function of the Estimation handler to prevent it to run. This is in case somebody wants to run the state machine.Note that a PR to introduce the
GW2024Migration
object/name space had actually already been made #999.It's interesting to notice that two functions have been introduced, but not implemented:
GW2024Migration.priceData
andGW2024Migration.zuoraUpdate
. They are the main function used in the Estimation step and the Amendment step. The engine no longer makes the assumption that there is a default implementation for them. We are purposely leaving them un implemented because they are not going to be called (even if somebody runs the GW2024 state machine).The next PRs of this series will show the modifications required to activate the lambdas one by one.