diff --git a/config.proto b/config.proto index 82c5981..5932ae4 100644 --- a/config.proto +++ b/config.proto @@ -24,9 +24,33 @@ message BlastRadiusConfig { int32 linkDepth = 2; } +// This account config is stored in the `kv.Store` protobuf key-value store in +// the api-server database. This means that as long as we don't have any +// *breaking* changes to the protobuf, we shouldn't need to do a migration. If +// however we do need to change this message in a breaking way, we will need to +// do some kind of a migration (depending on the change) message AccountConfig { - // The blast radius config for this account - BlastRadiusConfig blastRadius = 1; + enum BlastRadiusPreset { + // Customise advanced limits. + CUSTOM = 0; + // Runs a shallow scan for dependencies. Reduces time takes to calculate + // blast radius, but might mean some dependencies are missed + QUICK = 1; + // An optimised balance between time taken and discovery. + DETAILED = 2; + // Discovers all possible dependencies, might take a long time and + // discover items that are less likely to be relevant to a change. + FULL = 3; + } + + // The preset that we should use when calculating the blast radius for a + // change. If this is set to "CUSTOM" then the `blastRadius` config should be + // set + BlastRadiusPreset blastRadiusPreset = 2; + + // The blast radius config for this account, this is only required if the + // preset is "CUSTOM" + optional BlastRadiusConfig blastRadius = 1; } message GetAccountConfigRequest {}