From 6781a38a2c8f811367d84ddb2ddfe42cdcbe1ac4 Mon Sep 17 00:00:00 2001 From: Jenny <32821331+jenny-s51@users.noreply.github.com> Date: Wed, 22 May 2024 11:43:45 -0400 Subject: [PATCH] update instances of Duplicate to Clone --- .../CustomServingRuntimes.cy.ts | 14 +++---- .../e2e/pipelines/PipelineCreateRuns.cy.ts | 42 +++++++++---------- .../cypress/e2e/pipelines/PipelineRuns.cy.ts | 4 +- .../e2e/pipelines/PipelinesTopology.cy.ts | 6 +-- .../content/createRun/CloneRunPage.tsx | 4 +- .../content/createRun/useRunFormData.ts | 2 +- .../PipelineRunJobDetailsActions.tsx | 2 +- .../pipelineRun/PipelineRunTableRow.tsx | 2 +- .../pipelineRunJob/PipelineRunJobTableRow.tsx | 2 +- .../CustomServingRuntimeAddTemplate.tsx | 4 +- .../CustomServingRuntimeTableRow.tsx | 4 +- .../BiasConfigurationTableRow.tsx | 2 +- 12 files changed, 44 insertions(+), 44 deletions(-) diff --git a/frontend/src/__tests__/cypress/cypress/e2e/customServingRuntimes/CustomServingRuntimes.cy.ts b/frontend/src/__tests__/cypress/cypress/e2e/customServingRuntimes/CustomServingRuntimes.cy.ts index 977f76be85..64552e1d69 100644 --- a/frontend/src/__tests__/cypress/cypress/e2e/customServingRuntimes/CustomServingRuntimes.cy.ts +++ b/frontend/src/__tests__/cypress/cypress/e2e/customServingRuntimes/CustomServingRuntimes.cy.ts @@ -174,15 +174,15 @@ describe('Custom serving runtimes', () => { }); }); - it('should duplicate a serving runtime', () => { + it('should clone a serving runtime', () => { cy.interceptOdh( 'POST /api/servingRuntimes/', { query: { dryRun: 'All' } }, mockServingRuntimeK8sResource({}), - ).as('duplicateServingRuntime'); + ).as('cloneServingRuntime'); cy.interceptOdh('POST /api/templates/', mockServingRuntimeTemplateK8sResource({})).as( - 'duplicateTemplate', + 'cloneTemplate', ); const ServingRuntimeTemplateMock = mockServingRuntimeTemplateK8sResource({ @@ -198,8 +198,8 @@ describe('Custom serving runtimes', () => { mockK8sResourceList([...customServingRuntimesInitialMock, ServingRuntimeTemplateMock]), ).as('refreshServingRuntime'); - servingRuntimes.getRowById('template-1').find().findKebabAction('Duplicate').click(); - servingRuntimes.findAppTitle().should('have.text', 'Duplicate serving runtime'); + servingRuntimes.getRowById('template-1').find().findKebabAction('Clone').click(); + servingRuntimes.findAppTitle().should('have.text', 'Clone serving runtime'); cy.url().should('include', '/addServingRuntime'); servingRuntimes.shouldDisplayAPIProtocolValues([ @@ -210,7 +210,7 @@ describe('Custom serving runtimes', () => { servingRuntimes.findSubmitButton().should('be.enabled'); servingRuntimes.findSubmitButton().click(); - cy.wait('@duplicateServingRuntime').then((interception) => { + cy.wait('@cloneServingRuntime').then((interception) => { expect(interception.request.body.metadata).to.containSubset({ name: 'template-1-copy', annotations: { 'openshift.io/display-name': 'Copy of Multi Platform' }, @@ -218,7 +218,7 @@ describe('Custom serving runtimes', () => { }); }); - cy.wait('@duplicateTemplate').then((interception) => { + cy.wait('@cloneTemplate').then((interception) => { expect(interception.request.body).to.containSubset({ metadata: { annotations: { diff --git a/frontend/src/__tests__/cypress/cypress/e2e/pipelines/PipelineCreateRuns.cy.ts b/frontend/src/__tests__/cypress/cypress/e2e/pipelines/PipelineCreateRuns.cy.ts index bd930e820a..b567b0649a 100644 --- a/frontend/src/__tests__/cypress/cypress/e2e/pipelines/PipelineCreateRuns.cy.ts +++ b/frontend/src/__tests__/cypress/cypress/e2e/pipelines/PipelineCreateRuns.cy.ts @@ -154,12 +154,12 @@ describe('Pipeline create runs', () => { verifyRelativeURL(`/pipelineRuns/${projectName}/pipelineRun/view/${createRunParams.run_id}`); }); - it('duplicates an active run', () => { + it('clones an active run', () => { const [mockRun] = initialMockRuns; const mockExperiment = mockExperiments[0]; - const mockDuplicateRun = buildMockRunKF({ - display_name: 'Duplicate of Test run', - run_id: 'duplicate-run-id', + const mockCloneRun = buildMockRunKF({ + display_name: 'Clone of Test run', + run_id: 'cloned-run-id', experiment_id: mockExperiment.experiment_id, }); @@ -177,11 +177,11 @@ describe('Pipeline create runs', () => { cloneRunPage.mockGetExperiment(projectName, mockExperiment); // Mock runs list with newly cloned run - activeRunsTable.mockGetActiveRuns([...initialMockRuns, mockDuplicateRun], projectName); + activeRunsTable.mockGetActiveRuns([...initialMockRuns, mockCloneRun], projectName); // Navigate to clone run page for a given active run pipelineRunsGlobal.findActiveRunsTab().click(); - activeRunsTable.getRowByName(mockRun.display_name).findKebabAction('Duplicate').click(); + activeRunsTable.getRowByName(mockRun.display_name).findKebabAction('Clone').click(); verifyRelativeURL(`/pipelineRuns/${projectName}/pipelineRun/clone/${mockRun.run_id}`); // Verify pre-populated values & submit @@ -196,13 +196,13 @@ describe('Pipeline create runs', () => { paramsSection.findParamById('standard_scaler').should('have.value', 'false'); cloneRunPage - .mockCreateRun(projectName, mockPipelineVersion, mockDuplicateRun) - .as('duplicateRun'); + .mockCreateRun(projectName, mockPipelineVersion, mockCloneRun) + .as('cloneRun'); cloneRunPage.submit(); - cy.wait('@duplicateRun').then((interception) => { + cy.wait('@cloneRun').then((interception) => { expect(interception.request.body).to.eql({ - display_name: 'Duplicate of Test run', + display_name: 'Clone of Test run', description: '', pipeline_version_reference: { pipeline_id: 'test-pipeline', @@ -217,7 +217,7 @@ describe('Pipeline create runs', () => { }); // Should redirect to the details of the newly cloned active run - verifyRelativeURL(`/pipelineRuns/${projectName}/pipelineRun/view/${mockDuplicateRun.run_id}`); + verifyRelativeURL(`/pipelineRuns/${projectName}/pipelineRun/view/${mockCloneRun.run_id}`); }); it('create run with default and optional parameters', () => { @@ -566,12 +566,12 @@ describe('Pipeline create runs', () => { ); }); - it('duplicates a schedule', () => { + it('clones a schedule', () => { const [mockRecurringRun] = initialMockRecurringRuns; const mockExperiment = mockExperiments[0]; - const mockDuplicateRecurringRun = buildMockJobKF({ - display_name: 'Duplicate of Test job', - recurring_run_id: 'duplicate-job-id', + const mockCloneRecurringRun = buildMockJobKF({ + display_name: 'Clone of Test job', + recurring_run_id: 'cloned-job-id', experiment_id: mockExperiment.experiment_id, }); @@ -591,7 +591,7 @@ describe('Pipeline create runs', () => { // Navigate to clone run page for a given schedule pipelineRunJobTable .getRowByName(mockRecurringRun.display_name) - .findKebabAction('Duplicate') + .findKebabAction('Clone') .click(); verifyRelativeURL( `/pipelineRuns/${projectName}/pipelineRun/cloneJob/${mockRecurringRun.recurring_run_id}?runType=scheduled`, @@ -608,13 +608,13 @@ describe('Pipeline create runs', () => { paramsSection.findParamById('neighbors').find('input').should('have.value', '0'); paramsSection.findParamById('standard_scaler').should('have.value', 'yes'); cloneSchedulePage - .mockCreateRecurringRun(projectName, mockPipelineVersion, mockDuplicateRecurringRun) - .as('duplicateSchedule'); + .mockCreateRecurringRun(projectName, mockPipelineVersion, mockCloneRecurringRun) + .as('cloneSchedule'); cloneSchedulePage.submit(); - cy.wait('@duplicateSchedule').then((interception) => { + cy.wait('@cloneSchedule').then((interception) => { expect(interception.request.body).to.eql({ - display_name: 'Duplicate of Test job', + display_name: 'Clone of Test job', description: '', pipeline_version_reference: { pipeline_id: 'test-pipeline', @@ -640,7 +640,7 @@ describe('Pipeline create runs', () => { // Should be redirected to the schedule details page verifyRelativeURL( - `/pipelineRuns/${projectName}/pipelineRunJob/view/${mockDuplicateRecurringRun.recurring_run_id}`, + `/pipelineRuns/${projectName}/pipelineRunJob/view/${mockCloneRecurringRun.recurring_run_id}`, ); }); diff --git a/frontend/src/__tests__/cypress/cypress/e2e/pipelines/PipelineRuns.cy.ts b/frontend/src/__tests__/cypress/cypress/e2e/pipelines/PipelineRuns.cy.ts index 4022815c81..4ce6f40aa1 100644 --- a/frontend/src/__tests__/cypress/cypress/e2e/pipelines/PipelineRuns.cy.ts +++ b/frontend/src/__tests__/cypress/cypress/e2e/pipelines/PipelineRuns.cy.ts @@ -327,7 +327,7 @@ describe('Pipeline runs', () => { it('navigate to clone run page', () => { activeRunsTable .getRowByName(mockActiveRuns[0].display_name) - .findKebabAction('Duplicate') + .findKebabAction('Clone') .click(); verifyRelativeURL( `/pipelineRuns/${projectName}/pipelineRun/clone/${mockActiveRuns[0].run_id}`, @@ -1004,7 +1004,7 @@ describe('Pipeline runs', () => { it('navigate to clone scheduled run page', () => { pipelineRunJobTable .getRowByName(mockJobs[0].display_name) - .findKebabAction('Duplicate') + .findKebabAction('Clone') .click(); verifyRelativeURL( `/pipelineRuns/${projectName}/pipelineRun/cloneJob/${mockJobs[0].recurring_run_id}?runType=scheduled`, diff --git a/frontend/src/__tests__/cypress/cypress/e2e/pipelines/PipelinesTopology.cy.ts b/frontend/src/__tests__/cypress/cypress/e2e/pipelines/PipelinesTopology.cy.ts index 387c2540e0..e2be0e7cfa 100644 --- a/frontend/src/__tests__/cypress/cypress/e2e/pipelines/PipelinesTopology.cy.ts +++ b/frontend/src/__tests__/cypress/cypress/e2e/pipelines/PipelinesTopology.cy.ts @@ -309,15 +309,15 @@ describe('Pipeline topology', () => { initIntercepts(); }); - it('Test pipeline run duplicate navigation', () => { + it('Test pipeline run clone navigation', () => { pipelineRunDetails.visit(projectId, mockRun.run_id); pipelineRunDetails.selectActionDropdownItem('Clone'); verifyRelativeURL(`/pipelineRuns/${projectId}/pipelineRun/clone/${mockRun.run_id}`); }); - it('Test pipeline job duplicate navigation', () => { + it.only('Test pipeline job clone navigation', () => { pipelineRunJobDetails.visit(projectId, mockJob.recurring_run_id); - pipelineRunJobDetails.selectActionDropdownItem('Duplicate'); + pipelineRunJobDetails.selectActionDropdownItem('Clone'); verifyRelativeURL( `/pipelineRuns/${projectId}/pipelineRun/cloneJob/${mockJob.recurring_run_id}?runType=scheduled`, ); diff --git a/frontend/src/concepts/pipelines/content/createRun/CloneRunPage.tsx b/frontend/src/concepts/pipelines/content/createRun/CloneRunPage.tsx index e465da1ba3..984b67a169 100644 --- a/frontend/src/concepts/pipelines/content/createRun/CloneRunPage.tsx +++ b/frontend/src/concepts/pipelines/content/createRun/CloneRunPage.tsx @@ -14,7 +14,7 @@ const CloneRunPage: React.FC = ({ breadcrumbPath, contextPath }) => { const [run, loaded, error] = useCloneRunData(); const { runType: runTypeString } = useGetSearchParamValues([PipelineRunSearchParam.RunType]); const runType = asEnumMember(runTypeString, PipelineRunType); - const title = `Duplicate ${runTypeCategory[runType || PipelineRunType.Active]}`; + const title = `Clone ${runTypeCategory[runType || PipelineRunType.Active]}`; return ( = ({ breadcrumbPath, contextPath }) => { {breadcrumbPath} - {run ? `Duplicate of ${run.display_name}` : 'Duplicate'} + {run ? `Clone of ${run.display_name}` : 'Clone'} } diff --git a/frontend/src/concepts/pipelines/content/createRun/useRunFormData.ts b/frontend/src/concepts/pipelines/content/createRun/useRunFormData.ts index 5e55adc90b..3de942169d 100644 --- a/frontend/src/concepts/pipelines/content/createRun/useRunFormData.ts +++ b/frontend/src/concepts/pipelines/content/createRun/useRunFormData.ts @@ -132,7 +132,7 @@ const useRunFormData = ( const formState = useGenericObjectState({ project, nameDesc: { - name: run?.display_name ? `Duplicate of ${run.display_name}` : '', + name: run?.display_name ? `Clone of ${run.display_name}` : '', description: run?.description ?? '', }, pipeline: pipeline ?? null, diff --git a/frontend/src/concepts/pipelines/content/pipelinesDetails/pipelineRunJob/PipelineRunJobDetailsActions.tsx b/frontend/src/concepts/pipelines/content/pipelinesDetails/pipelineRunJob/PipelineRunJobDetailsActions.tsx index c472f90ad3..d6aed9f1c1 100644 --- a/frontend/src/concepts/pipelines/content/pipelinesDetails/pipelineRunJob/PipelineRunJobDetailsActions.tsx +++ b/frontend/src/concepts/pipelines/content/pipelinesDetails/pipelineRunJob/PipelineRunJobDetailsActions.tsx @@ -56,7 +56,7 @@ const PipelineRunJobDetailsActions: React.FC }) } > - Duplicate + Clone , , onDelete()}> diff --git a/frontend/src/concepts/pipelines/content/tables/pipelineRun/PipelineRunTableRow.tsx b/frontend/src/concepts/pipelines/content/tables/pipelineRun/PipelineRunTableRow.tsx index 4353d2cf58..2dcb0236da 100644 --- a/frontend/src/concepts/pipelines/content/tables/pipelineRun/PipelineRunTableRow.tsx +++ b/frontend/src/concepts/pipelines/content/tables/pipelineRun/PipelineRunTableRow.tsx @@ -51,7 +51,7 @@ const PipelineRunTableRow: React.FC = ({ const actions: IAction[] = React.useMemo(() => { const cloneAction: IAction = { - title: 'Duplicate', + title: 'Clone', onClick: () => { navigate( cloneRunRoute(namespace, run.run_id, isExperimentsAvailable ? experimentId : undefined), diff --git a/frontend/src/concepts/pipelines/content/tables/pipelineRunJob/PipelineRunJobTableRow.tsx b/frontend/src/concepts/pipelines/content/tables/pipelineRunJob/PipelineRunJobTableRow.tsx index e2f4f16c90..90c76eb91c 100644 --- a/frontend/src/concepts/pipelines/content/tables/pipelineRunJob/PipelineRunJobTableRow.tsx +++ b/frontend/src/concepts/pipelines/content/tables/pipelineRunJob/PipelineRunJobTableRow.tsx @@ -85,7 +85,7 @@ const PipelineRunJobTableRow: React.FC = ({ { navigate({ pathname: cloneScheduleRoute( diff --git a/frontend/src/pages/modelServing/customServingRuntimes/CustomServingRuntimeAddTemplate.tsx b/frontend/src/pages/modelServing/customServingRuntimes/CustomServingRuntimeAddTemplate.tsx index a501e495af..f6f252e7b0 100644 --- a/frontend/src/pages/modelServing/customServingRuntimes/CustomServingRuntimeAddTemplate.tsx +++ b/frontend/src/pages/modelServing/customServingRuntimes/CustomServingRuntimeAddTemplate.tsx @@ -126,7 +126,7 @@ const CustomServingRuntimeAddTemplate: React.FC )} - {existingTemplate ? 'Edit' : state ? 'Duplicate' : 'Add'} serving runtime + {existingTemplate ? 'Edit' : state ? 'Clone' : 'Add'} serving runtime } diff --git a/frontend/src/pages/modelServing/customServingRuntimes/CustomServingRuntimeTableRow.tsx b/frontend/src/pages/modelServing/customServingRuntimes/CustomServingRuntimeTableRow.tsx index 989b0f2bd9..4faf16a549 100644 --- a/frontend/src/pages/modelServing/customServingRuntimes/CustomServingRuntimeTableRow.tsx +++ b/frontend/src/pages/modelServing/customServingRuntimes/CustomServingRuntimeTableRow.tsx @@ -63,7 +63,7 @@ const CustomServingRuntimeTableRow: React.FC templateOOTB ? [ { - title: 'Duplicate', + title: 'Clone', onClick: () => navigate('/servingRuntimes/addServingRuntime', { state: { template }, @@ -77,7 +77,7 @@ const CustomServingRuntimeTableRow: React.FC navigate(`/servingRuntimes/editServingRuntime/${servingRuntimeName}`), }, { - title: 'Duplicate', + title: 'Clone', onClick: () => navigate('/servingRuntimes/addServingRuntime', { state: { template }, diff --git a/frontend/src/pages/modelServing/screens/metrics/bias/BiasConfigurationPage/BiasConfigurationTableRow.tsx b/frontend/src/pages/modelServing/screens/metrics/bias/BiasConfigurationPage/BiasConfigurationTableRow.tsx index 036b8fb4c7..e3616205b7 100644 --- a/frontend/src/pages/modelServing/screens/metrics/bias/BiasConfigurationPage/BiasConfigurationTableRow.tsx +++ b/frontend/src/pages/modelServing/screens/metrics/bias/BiasConfigurationPage/BiasConfigurationTableRow.tsx @@ -46,7 +46,7 @@ const BiasConfigurationTableRow: React.FC = ({ { onCloneConfiguration(obj); },