Define SIDEKIQ_MIGRATED_SHARDS for sidekiq shard router
What does this MR do and why?
This MR introduces a SIDEKIQ_MIGRATED_SHARDS
envvar to specify shards which have been migrated and should now be routed to the new shard instance instead of main
.
This allows us to eventually remove the feature flag post-migration.
The workflow would be
- Use feature flag to migrate the workflow
- Once the feature flag is 100% enabled and the migration is deemed completed, add the shard to the envvar as a json-structured list
[\"xxxx\",\"yyyy\"]
- Delete the feature flag
Note that we do not remove the worker-type feature flag since we can use it for future migrations (for .com, we may migrate other queues in the future). Furthermore the worker-type feature flag can be used all users, not just .com. Removing it would force non-.com users to do a hard cutover and manually migrate dangling jobs across Redis.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.