mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
chore[demo]: update handling of strategy deletion for demo walkthrough (#7719)
This PR makes some small changes to how we handle strategy deletion in the demo environment, which has become extra important with the recent soft limits. The changes are: - lower the strategy limit from 30 to 25. The standard limit is 30, so we want to make sure we're below that. - when checking whether we should delete a strategy, check whether we're **at or above** the limit. It used to only check if we were above, but if soft limits would prevent you from adding more, then you'd never be able to go above the limit. - Also delete strategies for step3.
This commit is contained in:
parent
a676b1bc20
commit
ca35ca1b24
@ -33,6 +33,7 @@ export const specificUser = async () => {
|
||||
};
|
||||
|
||||
export const gradualRollout = async () => {
|
||||
await deleteOldStrategies('demoApp.step3');
|
||||
const featureId = 'demoApp.step3';
|
||||
|
||||
const { environments }: IFeatureToggle = await fetch(
|
||||
@ -97,8 +98,8 @@ const deleteOldStrategies = async (featureId: string) => {
|
||||
),
|
||||
);
|
||||
|
||||
const strategyLimit = 30;
|
||||
if (constrainedStrategies.length > strategyLimit) {
|
||||
const strategyLimit = 25;
|
||||
if (constrainedStrategies.length >= strategyLimit) {
|
||||
await Promise.all(
|
||||
constrainedStrategies
|
||||
.slice(0, strategyLimit - 1)
|
||||
|
Loading…
Reference in New Issue
Block a user