add snapshot while context , default configs updates
Problem
Record for config's history after every cac_config changes, we also encountered problem regarding generating snowflake_id, we were not dropping the acquired mutex lock, and when generating another snowflake_id , it gets stuck in deadlock kind of situation
Solution
Created config_versions table which will store the config's snapshot after every updates which affect the configs. Fetch contexts and default_configs and insert into config_Versions table after any updates within the same transaction. we are explicitly dropping acquired lock after snowflake_id generation Also accepting tags parameters in every update request so that user can tag every versions
Environment variable changes
NA
Pre-deployment activity
Create db changes
Post-deployment activity
NA
API changes
get_config apis we will now provide priority inside context objects adding optional tags field in every context, default_config and experiments updates accepting version queryparam in every get_config apis
Possible Issues in the future
NA
Can we squash all commits into one?
What happens when someone tries to update tags? Is that possible?
@Datron currently this is not supported , a different api will be needed also we need to have list versions api with filter on tags support these changes can be added later on , this pr already has lot of changes