Description
At the moment, it is hard to test scenario migrations 100%, because we do not have a stable dump of all migratable scenarios on beta/pro. That means that edge cases which were not considered during development can cause the migration to fail halfway through, leading to complications like twice-migrated scenarios.
Current Behavior
We currently have a class, ScenarioMigration, which filters for keep_compatible scenarios, and provides useful output about how many scenarios where migrated etc. This method also raises an error if no scenarios were actually effected by the given migration.
Proposed Improvement
The easiest improvement would be enhanced logging:
More complicated, but to give us certainty with our migrations would be to add a 'dry-run' option:
So to test a migration on beta for example, I would push the migration to beta (without schema changes) and then trigger the dry run on beta with a rake/runner task. If happy with the results, just retrigger the task with dry-run:false and the migration will run for real.
Success Criteria
Description
At the moment, it is hard to test scenario migrations 100%, because we do not have a stable dump of all migratable scenarios on beta/pro. That means that edge cases which were not considered during development can cause the migration to fail halfway through, leading to complications like twice-migrated scenarios.
Current Behavior
We currently have a class, ScenarioMigration, which filters for keep_compatible scenarios, and provides useful output about how many scenarios where migrated etc. This method also raises an error if no scenarios were actually effected by the given migration.
Proposed Improvement
The easiest improvement would be enhanced logging:
More complicated, but to give us certainty with our migrations would be to add a 'dry-run' option:
So to test a migration on beta for example, I would push the migration to beta (without schema changes) and then trigger the dry run on beta with a rake/runner task. If happy with the results, just retrigger the task with dry-run:false and the migration will run for real.
Success Criteria