Skip to content

Commit

Permalink
Remove disablePipelineExperiments feature flag
Browse files Browse the repository at this point in the history
  • Loading branch information
DaoDaoNoCode committed Sep 30, 2024
1 parent 228e221 commit 8c35856
Show file tree
Hide file tree
Showing 31 changed files with 86 additions and 236 deletions.
1 change: 0 additions & 1 deletion backend/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export type DashboardConfig = K8sResourceCommon & {
disableKServeMetrics: boolean;
disableModelMesh: boolean;
disableAcceleratorProfiles: boolean;
disablePipelineExperiments: boolean;
disableDistributedWorkloads: boolean;
disableModelRegistry: boolean;
disableConnectionTypes: boolean;
Expand Down
1 change: 0 additions & 1 deletion backend/src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ export const blankDashboardCR: DashboardConfig = {
disableKServeMetrics: false,
disableModelMesh: false,
disableAcceleratorProfiles: false,
disablePipelineExperiments: false,
disableDistributedWorkloads: false,
disableModelRegistry: false,
disableConnectionTypes: true,
Expand Down
2 changes: 0 additions & 2 deletions docs/dashboard-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ spec:
disableKServeMetrics: false
disableBiasMetrics: false
disablePerformanceMetrics: false
disablePipelineExperiments: true
disableDistributedWorkloads: false
disableConnectionTypes: false
disableStorageClasses: false
Expand Down Expand Up @@ -162,7 +161,6 @@ spec:
disableKServeMetrics: true
disableBiasMetrics: false
disablePerformanceMetrics: false
disablePipelineExperiments: false
disableNIMModelServing: true
notebookController:
enabled: true
Expand Down
3 changes: 0 additions & 3 deletions frontend/src/__mocks__/mockDashboardConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ type MockDashboardConfigType = {
disableAcceleratorProfiles?: boolean;
disablePerformanceMetrics?: boolean;
disableBiasMetrics?: boolean;
disablePipelineExperiments?: boolean;
disableDistributedWorkloads?: boolean;
disableModelRegistry?: boolean;
disableConnectionTypes?: boolean;
Expand Down Expand Up @@ -53,7 +52,6 @@ export const mockDashboardConfig = ({
disableAcceleratorProfiles = false,
disablePerformanceMetrics = false,
disableBiasMetrics = false,
disablePipelineExperiments = false,
disableDistributedWorkloads = false,
disableModelRegistry = false,
disableConnectionTypes = true,
Expand Down Expand Up @@ -161,7 +159,6 @@ export const mockDashboardConfig = ({
disableKServeMetrics,
disableModelMesh,
disableAcceleratorProfiles,
disablePipelineExperiments,
disableDistributedWorkloads,
disableModelRegistry,
disableConnectionTypes,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -419,12 +419,7 @@ type InterceptsType = {
};

const initIntercepts = ({ noMetrics }: InterceptsType) => {
cy.interceptOdh(
'GET /api/config',
mockDashboardConfig({
disablePipelineExperiments: false,
}),
);
cy.interceptOdh('GET /api/config', mockDashboardConfig({}));
cy.interceptK8sList(
DataSciencePipelineApplicationModel,
mockK8sResourceList([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ const shouldFilterItems = (filter: FilterArgs, query?: string) => {
};

const initIntercepts = (interceptMlmd: boolean, isExecutionsEmpty?: boolean) => {
cy.interceptOdh('GET /api/config', mockDashboardConfig({ disablePipelineExperiments: false }));
cy.interceptOdh('GET /api/config', mockDashboardConfig({}));
cy.interceptK8sList(
DataSciencePipelineApplicationModel,
mockK8sResourceList([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ describe('Runs page for archived experiment', () => {
});

const initIntercepts = () => {
cy.interceptOdh('GET /api/config', mockDashboardConfig({ disablePipelineExperiments: false }));
cy.interceptOdh('GET /api/config', mockDashboardConfig({}));
cy.interceptK8sList(
DataSciencePipelineApplicationModel,
mockK8sResourceList([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
} from '~/__tests__/cypress/cypress/utils/models';

export const configIntercept = (): void => {
cy.interceptOdh('GET /api/config', mockDashboardConfig({ disablePipelineExperiments: false }));
cy.interceptOdh('GET /api/config', mockDashboardConfig({}));
};

export const projectsIntercept = (
Expand Down
5 changes: 0 additions & 5 deletions frontend/src/concepts/areas/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export const allFeatureFlags: string[] = Object.keys({
disableKServeMetrics: false,
disableModelMesh: false,
disableAcceleratorProfiles: false,
disablePipelineExperiments: false,
disableDistributedWorkloads: false,
disableModelRegistry: false,
disableConnectionTypes: false,
Expand Down Expand Up @@ -107,10 +106,6 @@ export const SupportedAreasStateMap: SupportedAreasState = {
requiredComponents: [StackComponent.TRUSTY_AI],
reliantAreas: [SupportedArea.BIAS_METRICS],
},
[SupportedArea.PIPELINE_EXPERIMENTS]: {
featureFlags: ['disablePipelineExperiments'],
reliantAreas: [SupportedArea.DS_PIPELINES],
},
[SupportedArea.DISTRIBUTED_WORKLOADS]: {
featureFlags: ['disableDistributedWorkloads'],
requiredComponents: [StackComponent.KUEUE],
Expand Down
1 change: 0 additions & 1 deletion frontend/src/concepts/areas/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export enum SupportedArea {

/* Pipelines areas */
DS_PIPELINES = 'ds-pipelines',
PIPELINE_EXPERIMENTS = 'pipeline-experiments',

/* Admin areas */
BYON = 'bring-your-own-notebook',
Expand Down
15 changes: 1 addition & 14 deletions frontend/src/concepts/pipelines/content/createRun/RunPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import { ValueOf } from '~/typeHelpers';
import { useGetSearchParamValues } from '~/utilities/useGetSearchParamValues';
import { PipelineRunSearchParam } from '~/concepts/pipelines/content/types';
import { asEnumMember } from '~/utilities/utils';
import { SupportedArea, useIsAreaAvailable } from '~/concepts/areas';
import useDefaultExperiment from '~/pages/pipelines/global/experiments/useDefaultExperiment';

type RunPageProps = {
Expand Down Expand Up @@ -64,7 +63,6 @@ const RunPage: React.FC<RunPageProps> = ({
const triggerType = asEnumMember(triggerTypeString, ScheduledType);
const isSchedule = runType === RunTypeOption.SCHEDULED;

const isExperimentsAvailable = useIsAreaAvailable(SupportedArea.PIPELINE_EXPERIMENTS).status;
const [defaultExperiment] = useDefaultExperiment();

const jumpToSections = Object.values(CreateRunPageSections).filter(
Expand Down Expand Up @@ -104,21 +102,10 @@ const RunPage: React.FC<RunPageProps> = ({
[setFormDataValue],
);

const runPageSectionTitlesEdited = isExperimentsAvailable
? runPageSectionTitles
: {
...runPageSectionTitles,
[CreateRunPageSections.PROJECT_AND_EXPERIMENT]: 'Project',
};

return (
<div data-testid={testId}>
<PageSection isFilled variant="light">
<GenericSidebar
sections={jumpToSections}
titles={runPageSectionTitlesEdited}
maxWidth={175}
>
<GenericSidebar sections={jumpToSections} titles={runPageSectionTitles} maxWidth={175}>
<RunForm isCloned={!!cloneRun} data={formData} onValueChange={onValueChange} />
</GenericSidebar>
</PageSection>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@ import * as React from 'react';
import { Alert, Button, Split, SplitItem, Stack, StackItem } from '@patternfly/react-core';
import { useNavigate } from 'react-router-dom';
import { RunFormData, RunTypeOption } from '~/concepts/pipelines/content/createRun/types';
import {
isFilledRunFormData,
isFilledRunFormDataExperiment,
} from '~/concepts/pipelines/content/createRun/utils';
import { isFilledRunFormData } from '~/concepts/pipelines/content/createRun/utils';
import { handleSubmit } from '~/concepts/pipelines/content/createRun/submitUtils';
import { usePipelinesAPI } from '~/concepts/pipelines/context';
import { SupportedArea, useIsAreaAvailable } from '~/concepts/areas';
import { isRunSchedule } from '~/concepts/pipelines/utils';

type RunPageFooterProps = {
Expand All @@ -23,10 +19,7 @@ const RunPageFooter: React.FC<RunPageFooterProps> = ({ data, contextPath }) => {
const [isSubmitting, setSubmitting] = React.useState(false);
const [error, setError] = React.useState<Error | null>(null);

const isExperimentsAvailable = useIsAreaAvailable(SupportedArea.PIPELINE_EXPERIMENTS).status;
const canSubmit = isExperimentsAvailable
? isFilledRunFormDataExperiment(data)
: isFilledRunFormData(data);
const canSubmit = isFilledRunFormData(data);

return (
<Stack hasGutter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
} from '~/concepts/pipelines/content/createRun/const';
import { ActiveExperimentSelector } from '~/concepts/pipelines/content/experiment/ExperimentSelector';
import CreateExperimentButton from '~/concepts/pipelines/content/experiment/CreateExperimentButton';
import { SupportedArea, useIsAreaAvailable } from '~/concepts/areas';

type ProjectAndExperimentSectionProps = {
projectName: string;
Expand All @@ -20,41 +19,31 @@ const ProjectAndExperimentSection: React.FC<ProjectAndExperimentSectionProps> =
projectName,
value,
onChange,
}) => {
const isExperimentsAvailable = useIsAreaAvailable(SupportedArea.PIPELINE_EXPERIMENTS).status;

return (
<FormSection
id={CreateRunPageSections.PROJECT_AND_EXPERIMENT}
title={
isExperimentsAvailable
? runPageSectionTitles[CreateRunPageSections.PROJECT_AND_EXPERIMENT]
: 'Project'
}
>
<FormGroup label="Project">
<Text>{projectName}</Text>
</FormGroup>
{isExperimentsAvailable && (
<FormGroup label="Experiment" aria-label="Experiment" isRequired>
<Stack hasGutter>
<StackItem>
<ActiveExperimentSelector selection={value?.display_name} onSelect={onChange} />
</StackItem>
<StackItem>
<CreateExperimentButton
variant="link"
icon={<PlusCircleIcon />}
onCreate={(experiment) => onChange(experiment)}
>
Create new experiment
</CreateExperimentButton>
</StackItem>
</Stack>
</FormGroup>
)}
</FormSection>
);
};
}) => (
<FormSection
id={CreateRunPageSections.PROJECT_AND_EXPERIMENT}
title={runPageSectionTitles[CreateRunPageSections.PROJECT_AND_EXPERIMENT]}
>
<FormGroup label="Project">
<Text>{projectName}</Text>
</FormGroup>
<FormGroup label="Experiment" aria-label="Experiment" isRequired>
<Stack hasGutter>
<StackItem>
<ActiveExperimentSelector selection={value?.display_name} onSelect={onChange} />
</StackItem>
<StackItem>
<CreateExperimentButton
variant="link"
icon={<PlusCircleIcon />}
onCreate={(experiment) => onChange(experiment)}
>
Create new experiment
</CreateExperimentButton>
</StackItem>
</Stack>
</FormGroup>
</FormSection>
);

export default ProjectAndExperimentSection;
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
runPageSectionTitles,
} from '~/concepts/pipelines/content/createRun/const';
import { createRecurringRunRoute, createRunRoute } from '~/routes';
import { SupportedArea, useIsAreaAvailable } from '~/concepts/areas';
import { RunFormData, RunTypeOption } from '~/concepts/pipelines/content/createRun/types';

interface RunTypeSectionProps {
Expand All @@ -20,19 +19,13 @@ interface RunTypeSectionProps {
export const RunTypeSection: React.FC<RunTypeSectionProps> = ({ data, isCloned }) => {
const { namespace, experimentId, pipelineId, pipelineVersionId } = useParams();
const [isAlertOpen, setIsAlertOpen] = React.useState(true);
const isExperimentsAvailable = useIsAreaAvailable(SupportedArea.PIPELINE_EXPERIMENTS).status;

let runTypeValue = 'Run once immediately after creation';
let alertTitle = (
<>
To create a schedule that executes recurring runs,{' '}
<Link
to={createRecurringRunRoute(
namespace,
isExperimentsAvailable ? experimentId : undefined,
pipelineId,
pipelineVersionId,
)}
to={createRecurringRunRoute(namespace, experimentId, pipelineId, pipelineVersionId)}
state={{ locationData: data }}
data-testid="run-type-section-alert-link"
>
Expand All @@ -48,12 +41,7 @@ export const RunTypeSection: React.FC<RunTypeSectionProps> = ({ data, isCloned }
<>
To create a non-recurring run,{' '}
<Link
to={createRunRoute(
namespace,
isExperimentsAvailable ? experimentId : undefined,
pipelineId,
pipelineVersionId,
)}
to={createRunRoute(namespace, experimentId, pipelineId, pipelineVersionId)}
state={{ locationData: data }}
data-testid="run-type-section-alert-link"
>
Expand Down
4 changes: 1 addition & 3 deletions frontend/src/concepts/pipelines/content/createRun/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,13 @@ export const isFilledRunFormData = (formData: RunFormData): formData is SafeRunF
!!formData.nameDesc.name &&
!!formData.pipeline &&
!!formData.version &&
!!formData.experiment &&
hasRequiredInputParams &&
runTypeSafeData(formData.runType) &&
runTypeSafeDates(formData.runType)
);
};

export const isFilledRunFormDataExperiment = (formData: RunFormData): formData is SafeRunFormData =>
isFilledRunFormData(formData) && !!formData.experiment;

export const getInputDefinitionParams = (
version: PipelineVersionKFv2 | null | undefined,
): ParametersKF | undefined => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
import { usePipelinesAPI } from '~/concepts/pipelines/context';
import { PipelineRecurringRunKFv2, RecurringRunStatus } from '~/concepts/pipelines/kfTypes';
import { cloneRecurringRunRoute } from '~/routes';
import { useIsAreaAvailable, SupportedArea } from '~/concepts/areas';
import { getDashboardMainContainer } from '~/utilities/utils';

type PipelineRecurringRunDetailsActionsProps = {
Expand All @@ -29,7 +28,6 @@ const PipelineRecurringRunDetailsActions: React.FC<PipelineRecurringRunDetailsAc
const navigate = useNavigate();
const { experimentId, pipelineId, pipelineVersionId } = useParams();
const { namespace, api, refreshAllAPI } = usePipelinesAPI();
const isExperimentsAvailable = useIsAreaAvailable(SupportedArea.PIPELINE_EXPERIMENTS).status;
const [open, setOpen] = React.useState(false);
const [isEnabled, setIsEnabled] = React.useState(
recurringRun?.status === RecurringRunStatus.ENABLED,
Expand Down Expand Up @@ -112,7 +110,7 @@ const PipelineRecurringRunDetailsActions: React.FC<PipelineRecurringRunDetailsAc
cloneRecurringRunRoute(
namespace,
recurringRun.recurring_run_id,
isExperimentsAvailable ? experimentId : undefined,
experimentId,
pipelineId,
pipelineVersionId,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { usePipelinesAPI } from '~/concepts/pipelines/context';
import useNotification from '~/utilities/useNotification';
import { PipelineRunKFv2, RuntimeStateKF, StorageStateKF } from '~/concepts/pipelines/kfTypes';
import { cloneRunRoute, experimentsCompareRunsRoute } from '~/routes';
import { SupportedArea, useIsAreaAvailable } from '~/concepts/areas';
import useExperimentById from '~/concepts/pipelines/apiHooks/useExperimentById';
import { getDashboardMainContainer } from '~/utilities/utils';

Expand All @@ -34,7 +33,6 @@ const PipelineRunDetailsActions: React.FC<PipelineRunDetailsActionsProps> = ({
const { namespace, api, refreshAllAPI } = usePipelinesAPI();
const notification = useNotification();
const [open, setOpen] = React.useState(false);
const isExperimentsAvailable = useIsAreaAvailable(SupportedArea.PIPELINE_EXPERIMENTS).status;
const isRunActive = run?.storage_state === StorageStateKF.AVAILABLE;
const [experiment] = useExperimentById(run?.experiment_id);
const isExperimentActive = experiment?.storage_state === StorageStateKF.AVAILABLE;
Expand Down Expand Up @@ -102,7 +100,7 @@ const PipelineRunDetailsActions: React.FC<PipelineRunDetailsActionsProps> = ({
cloneRunRoute(
namespace,
run.run_id,
isExperimentsAvailable ? experimentId : undefined,
experimentId,
pipelineId,
pipelineVersionId,
),
Expand All @@ -124,7 +122,7 @@ const PipelineRunDetailsActions: React.FC<PipelineRunDetailsActionsProps> = ({
>
Stop
</DropdownItem>,
isExperimentsAvailable && experimentId && isRunActive ? (
experimentId && isRunActive ? (
<DropdownItem
key="compare-runs"
onClick={() =>
Expand Down
Loading

0 comments on commit 8c35856

Please sign in to comment.