GW2024 Part 6: User Notification Step #1023
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.
Previously:
This is the sixth PR in our series where we are using the GW2024 migration to show how to organise the changes required to build a modern migration.
Here we prepare the Notification step.
The Notification step is very generic and doesn't need customisation, and updating the code only required to make sure that we apply this migration's capping for the communication to the user. (Remember that we store uncapped prices, and apply capping during the Salesforce notification step, the Notification step and the Amendment step). We also add a test to clarify the notification schedule. Which clarifies that the natural first date for notifications will be April 1st.
This test is written in a different way that similar tests we wrote in the past. It started from the assumption that we knew for sure the first available start date. I downloaded the Dynamo table and printed the list of dates to get confirmation that the Estimation step has set up the first start date of this migration to May 20th.
Note: We also unlock the following Salesforce update step: SalesforceNotificationDateUpdateHandler. We are doing both in one step instead of staging two changes as we did here: #1019 and here: #1020 .
Finding the date distribution using Ruby:
"""
aws dynamodb scan --region eu-west-1 --table-name PriceMigration-PROD-GW2024 --select ALL_ATTRIBUTES --page-size 50000 --max-items 50000 --output json --profile membership > 02-data.json
"""
The dates are between
2024-05-20
and2025-05-19
A note on running the Notification step:
Over the first few days we will run the state machine manually, it won't yet be on automatic pilot. Notably we will run the Notification step for the first time on April 2nd. This implies that on that date the engine will process items with a start date of
2024-05-20
and2024-05-21
.Also note that it is not un-usual that we get errors the first couple of days because of incomplete user data in Salesforce, which require slight changes in the data retrieval rules. This is expected and there is no real way to test for it before hand. Any user provided data is bound to be slightly dirty.