mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-20 00:08:02 +01:00
fix: Removed CR on variants flag (it's GA) (#3738)
This PR removes the usage of crOnVariants flag, but keeps the behaviour, so CR are now enabled on variants. --------- Co-authored-by: Nuno Góis <github@nunogois.com>
This commit is contained in:
parent
73c9780bec
commit
eaacb979d6
@ -269,9 +269,7 @@ export const EnvironmentVariantsModal = ({
|
|||||||
? 'Add to existing change request'
|
? 'Add to existing change request'
|
||||||
: 'Add change to draft';
|
: 'Add change to draft';
|
||||||
|
|
||||||
const isChangeRequest =
|
const isChangeRequest = isChangeRequestConfigured(environment?.name || '');
|
||||||
isChangeRequestConfigured(environment?.name || '') &&
|
|
||||||
uiConfig.flags.crOnVariants;
|
|
||||||
|
|
||||||
const stickiness = useMemo(() => {
|
const stickiness = useMemo(() => {
|
||||||
if (!loading) {
|
if (!loading) {
|
||||||
|
@ -69,11 +69,9 @@ export const FeatureEnvironmentVariants = () => {
|
|||||||
() =>
|
() =>
|
||||||
feature?.environments?.map(environment => ({
|
feature?.environments?.map(environment => ({
|
||||||
...environment,
|
...environment,
|
||||||
crEnabled:
|
crEnabled: isChangeRequestConfigured(environment.name),
|
||||||
uiConfig.flags.crOnVariants &&
|
|
||||||
isChangeRequestConfigured(environment.name),
|
|
||||||
})) || [],
|
})) || [],
|
||||||
[feature.environments, uiConfig.flags.crOnVariants]
|
[feature.environments]
|
||||||
);
|
);
|
||||||
|
|
||||||
const createPatch = (
|
const createPatch = (
|
||||||
|
@ -41,7 +41,6 @@ export interface IFlags {
|
|||||||
messageBanner?: boolean;
|
messageBanner?: boolean;
|
||||||
featuresExportImport?: boolean;
|
featuresExportImport?: boolean;
|
||||||
caseInsensitiveInOperators?: boolean;
|
caseInsensitiveInOperators?: boolean;
|
||||||
crOnVariants?: boolean;
|
|
||||||
proPlanAutoCharge?: boolean;
|
proPlanAutoCharge?: boolean;
|
||||||
notifications?: boolean;
|
notifications?: boolean;
|
||||||
personalAccessTokensKillSwitch?: boolean;
|
personalAccessTokensKillSwitch?: boolean;
|
||||||
|
@ -69,7 +69,6 @@ exports[`should create default config 1`] = `
|
|||||||
"anonymiseEventLog": false,
|
"anonymiseEventLog": false,
|
||||||
"caseInsensitiveInOperators": false,
|
"caseInsensitiveInOperators": false,
|
||||||
"cleanClientApi": false,
|
"cleanClientApi": false,
|
||||||
"crOnVariants": false,
|
|
||||||
"demo": false,
|
"demo": false,
|
||||||
"embedProxy": true,
|
"embedProxy": true,
|
||||||
"embedProxyFrontend": true,
|
"embedProxyFrontend": true,
|
||||||
@ -92,7 +91,6 @@ exports[`should create default config 1`] = `
|
|||||||
"anonymiseEventLog": false,
|
"anonymiseEventLog": false,
|
||||||
"caseInsensitiveInOperators": false,
|
"caseInsensitiveInOperators": false,
|
||||||
"cleanClientApi": false,
|
"cleanClientApi": false,
|
||||||
"crOnVariants": false,
|
|
||||||
"demo": false,
|
"demo": false,
|
||||||
"embedProxy": true,
|
"embedProxy": true,
|
||||||
"embedProxyFrontend": true,
|
"embedProxyFrontend": true,
|
||||||
|
@ -1737,13 +1737,7 @@ class FeatureToggleService {
|
|||||||
user: User,
|
user: User,
|
||||||
oldVariants?: IVariant[],
|
oldVariants?: IVariant[],
|
||||||
): Promise<IVariant[]> {
|
): Promise<IVariant[]> {
|
||||||
if (this.flagResolver.isEnabled('crOnVariants')) {
|
await this.stopWhenChangeRequestsEnabled(projectId, environment, user);
|
||||||
await this.stopWhenChangeRequestsEnabled(
|
|
||||||
projectId,
|
|
||||||
environment,
|
|
||||||
user,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return this.saveVariantsOnEnv(
|
return this.saveVariantsOnEnv(
|
||||||
projectId,
|
projectId,
|
||||||
featureName,
|
featureName,
|
||||||
@ -1761,10 +1755,8 @@ class FeatureToggleService {
|
|||||||
newVariants: IVariant[],
|
newVariants: IVariant[],
|
||||||
user: User,
|
user: User,
|
||||||
): Promise<IVariant[]> {
|
): Promise<IVariant[]> {
|
||||||
if (this.flagResolver.isEnabled('crOnVariants')) {
|
for (const env of environments) {
|
||||||
for (const env of environments) {
|
await this.stopWhenChangeRequestsEnabled(projectId, env);
|
||||||
await this.stopWhenChangeRequestsEnabled(projectId, env);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return this.setVariantsOnEnvs(
|
return this.setVariantsOnEnvs(
|
||||||
projectId,
|
projectId,
|
||||||
|
@ -33,10 +33,6 @@ const flags = {
|
|||||||
process.env.UNLEASH_EXPERIMENTAL_CASE_INSENSITIVE_IN_OPERATORS,
|
process.env.UNLEASH_EXPERIMENTAL_CASE_INSENSITIVE_IN_OPERATORS,
|
||||||
false,
|
false,
|
||||||
),
|
),
|
||||||
crOnVariants: parseEnvVarBoolean(
|
|
||||||
process.env.UNLEASH_EXPERIMENTAL_CR_ON_VARIANTS,
|
|
||||||
false,
|
|
||||||
),
|
|
||||||
strictSchemaValidation: parseEnvVarBoolean(
|
strictSchemaValidation: parseEnvVarBoolean(
|
||||||
process.env.UNLEASH_STRICT_SCHEMA_VALIDTION,
|
process.env.UNLEASH_STRICT_SCHEMA_VALIDTION,
|
||||||
false,
|
false,
|
||||||
|
Loading…
Reference in New Issue
Block a user