[SLO] update default feature flag value for slo management (#216919)

## Summary

update default feature flag value for slo management, persist flag state
to callout
This commit is contained in:
Bailey Cash 2025-04-07 09:07:35 -04:00 committed by GitHub
parent 0c5fa84659
commit 8999324ed5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 10 additions and 21 deletions

View file

@ -378,7 +378,6 @@ export default function ({ getService }: PluginFunctionalProviderContext) {
'xpack.apm.featureFlags.ruleFormV2Enabled (boolean?)',
'xpack.observability.unsafe.ruleFormV2.enabled (boolean?)',
'xpack.slo.experimental.ruleFormV2.enabled (boolean?)',
'xpack.slo.experimental.management.enabled (boolean?)',
/**/
];
// We don't assert that actualExposedConfigKeys and expectedExposedConfigKeys are equal, because test failure messages with large

View file

@ -16,9 +16,6 @@ export const configSchema = schema.object({
ruleFormV2: schema.object({
enabled: schema.boolean({ defaultValue: false }),
}),
management: schema.object({
enabled: schema.boolean({ defaultValue: false }),
}),
})
),
});

View file

@ -140,9 +140,9 @@ export const renderApp = ({
};
function App() {
const { isServerless, experimentalFeatures } = usePluginContext();
const { isServerless } = usePluginContext();
const routes = getRoutes(isServerless, experimentalFeatures);
const routes = getRoutes(isServerless);
return (
<Routes enableExecutionContextTracking={true}>

View file

@ -44,7 +44,6 @@ export class SLOPlugin
{
private readonly appUpdater$ = new BehaviorSubject<AppUpdater>(() => ({}));
private experimentalFeatures: ExperimentalFeatures = {
management: { enabled: false },
ruleFormV2: { enabled: false },
};

View file

@ -20,12 +20,10 @@ import {
SLO_SETTINGS_PATH,
} from '../../common/locators/paths';
import { SloSettingsPage } from '../pages/slo_settings/slo_settings';
import { ExperimentalFeatures } from '../../common/config';
import { SloManagementPage } from '../pages/slo_management/slo_management_page';
export const getRoutes = (
isServerless?: boolean,
experimentalFeatures?: ExperimentalFeatures
isServerless?: boolean
): {
[key: string]: {
handler: () => React.ReactElement;
@ -73,17 +71,13 @@ export const getRoutes = (
},
}
: {}),
...(!!experimentalFeatures?.management.enabled
? {
[SLOS_MANAGEMENT_PATH]: {
handler: () => {
return <SloManagementPage />;
},
params: {},
exact: true,
},
}
: {}),
[SLOS_MANAGEMENT_PATH]: {
handler: () => {
return <SloManagementPage />;
},
params: {},
exact: true,
},
[SLO_DETAIL_PATH]: {
handler: () => {
return <SloDetailsPage />;