Skip to content

Commit

Permalink
[ResponseOps][Rules]Deprecate ruleFormV2 flag. (#196507)
Browse files Browse the repository at this point in the history
Fixes #196493

## Summary

In a previous PR the `ruleFormV2` feature flag was renamed when it
should have been deprecated. This PR fixes that.
  • Loading branch information
adcoelho authored Oct 17, 2024
1 parent e1f227d commit 7988ced
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ export const allowedExperimentalValues = Object.freeze({
isUsingRuleCreateFlyout: false,
});

const deprecatedExperimentalValues = new Set(['ruleFormV2']);

type ExperimentalConfigKeys = Array<keyof ExperimentalFeatures>;
type Mutable<T> = { -readonly [P in keyof T]: T[P] };

Expand Down Expand Up @@ -56,7 +58,10 @@ export const parseExperimentalConfigValue = (configValue: string[]): Experimenta
};

export const isValidExperimentalValue = (value: string): boolean => {
return allowedKeys.includes(value as keyof ExperimentalFeatures);
return (
allowedKeys.includes(value as keyof ExperimentalFeatures) ||
deprecatedExperimentalValues.has(value)
);
};

export const getExperimentalAllowedValues = (): string[] => [...allowedKeys];

0 comments on commit 7988ced

Please sign in to comment.