From f0e7c37ffca63ef06ef601f503f14dda28c5d561 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Silva?= Date: Fri, 3 May 2024 11:03:53 +0100 Subject: [PATCH] RC fixes (#268) * feat: hide retention copies for pg * chore: change welcome message * feat: add backupSource * fix: backup source name * fix: try new creds --- .github/workflows/dev-fe-ci.yaml | 10 ++++----- .../schedule-form/schedule-form.tsx | 22 +++++++++++-------- .../welcome-dialog/welcome-dialog.messages.ts | 6 ++--- .../hooks/api/restores/useDbClusterRestore.ts | 1 + .../schedule-section/schedule-section.tsx | 1 + .../scheduled-backup-modal-form.tsx | 5 ++++- .../db-cluster-details/restores/restores.tsx | 4 ++++ .../src/shared-types/restores.types.ts | 2 ++ 8 files changed, 33 insertions(+), 18 deletions(-) diff --git a/.github/workflows/dev-fe-ci.yaml b/.github/workflows/dev-fe-ci.yaml index 120ebf901..39e02dafb 100644 --- a/.github/workflows/dev-fe-ci.yaml +++ b/.github/workflows/dev-fe-ci.yaml @@ -218,11 +218,11 @@ jobs: - name: Run integration tests env: - EVEREST_LOCATION_BUCKET_NAME: '${{ secrets.EVEREST_LOCATION_BUCKET_NAME }}' - EVEREST_LOCATION_ACCESS_KEY: '${{ secrets.EVEREST_LOCATION_ACCESS_KEY }}' - EVEREST_LOCATION_SECRET_KEY: '${{ secrets.EVEREST_LOCATION_SECRET_KEY }}' - EVEREST_LOCATION_REGION: '${{ secrets.EVEREST_LOCATION_REGION }}' - EVEREST_LOCATION_URL: '${{ secrets.EVEREST_LOCATION_URL }}' + EVEREST_LOCATION_BUCKET_NAME: '${{ secrets.BACKUP_LOCATION_BUCKET_NAME }}' + EVEREST_LOCATION_ACCESS_KEY: '${{ secrets.BACKUP_LOCATION_ACCESS_KEY }}' + EVEREST_LOCATION_SECRET_KEY: '${{ secrets.BACKUP_LOCATION_SECRET_KEY }}' + EVEREST_LOCATION_REGION: '${{ secrets.BACKUP_LOCATION_REGION }}' + EVEREST_LOCATION_URL: '${{ secrets.BACKUP_LOCATION_URL }}' MONITORING_USER: 'admin' MONITORING_PASSWORD: 'admin' run: | diff --git a/ui/apps/everest/src/components/schedule-form/schedule-form.tsx b/ui/apps/everest/src/components/schedule-form/schedule-form.tsx index 882a009aa..989e90b2f 100644 --- a/ui/apps/everest/src/components/schedule-form/schedule-form.tsx +++ b/ui/apps/everest/src/components/schedule-form/schedule-form.tsx @@ -32,6 +32,7 @@ type ScheduleFormProps = { storageLocationFetching: boolean; storageLocationOptions: BackupStorage[]; showTypeRadio: boolean; + hideRetentionCopies?: boolean; }; export const ScheduleForm = ({ allowScheduleSelection, @@ -42,6 +43,7 @@ export const ScheduleForm = ({ storageLocationFetching, storageLocationOptions, showTypeRadio, + hideRetentionCopies, }: ScheduleFormProps) => { const schedulesNamesList = (schedules && schedules.map((item) => item?.name)) || []; @@ -87,15 +89,17 @@ export const ScheduleForm = ({ enableFillFirst={autoFillLocation} disabled={disableStorageSelection} /> - + {!hideRetentionCopies && ( + + )} diff --git a/ui/apps/everest/src/components/welcome-dialog/welcome-dialog.messages.ts b/ui/apps/everest/src/components/welcome-dialog/welcome-dialog.messages.ts index f28bfa5cc..d93aaf704 100644 --- a/ui/apps/everest/src/components/welcome-dialog/welcome-dialog.messages.ts +++ b/ui/apps/everest/src/components/welcome-dialog/welcome-dialog.messages.ts @@ -1,8 +1,8 @@ export const Messages = { header: 'Welcome to Everest Beta!', - subHead: `We're excited to announce that Percona Everest is now in Beta! - Under development for the past five months and in testing since October 2023, we're now taking Percona Everest public, making it open for anyone who wants to explore our Cloud Native database platform. - During this Beta phase, we will be fine-tuning the functionality based on feedback we receive from you via `, + subHead: `We are excited to announce that Percona Everest is now in Beta! + We are now taking Percona Everest public, making it open to anyone who wants to explore our Cloud Native database platform. + During this Beta phase, we will be fine-tuning the functionality based on feedback we receive from you via `, githubIssues: 'GitHub issues', subHead2: 'Ready to get started?', card1: { diff --git a/ui/apps/everest/src/hooks/api/restores/useDbClusterRestore.ts b/ui/apps/everest/src/hooks/api/restores/useDbClusterRestore.ts index 210b3413a..58f75f99b 100644 --- a/ui/apps/everest/src/hooks/api/restores/useDbClusterRestore.ts +++ b/ui/apps/everest/src/hooks/api/restores/useDbClusterRestore.ts @@ -109,6 +109,7 @@ export const useDbClusterRestores = ( endTime: item.status.completed, state: item.status.state, type: item.spec.dataSource.pitr ? 'pitr' : 'full', + backupSource: item.spec.dataSource.dbClusterBackupName || '', })), }); diff --git a/ui/apps/everest/src/pages/database-form/database-form-body/steps/backups/schedule-section/schedule-section.tsx b/ui/apps/everest/src/pages/database-form/database-form-body/steps/backups/schedule-section/schedule-section.tsx index 42467045c..bc43383df 100644 --- a/ui/apps/everest/src/pages/database-form/database-form-body/steps/backups/schedule-section/schedule-section.tsx +++ b/ui/apps/everest/src/pages/database-form/database-form-body/steps/backups/schedule-section/schedule-section.tsx @@ -59,6 +59,7 @@ export const ScheduleBackupSection = ({ mode === 'edit' && schedules.length === 1 && dbType === DbType.Mongo } showTypeRadio={dbType === DbType.Mongo} + hideRetentionCopies={dbType === DbType.Postresql} /> ); }; diff --git a/ui/apps/everest/src/pages/db-cluster-details/backups/scheduled-backup-modal/scheduled-backup-modal-form/scheduled-backup-modal-form.tsx b/ui/apps/everest/src/pages/db-cluster-details/backups/scheduled-backup-modal/scheduled-backup-modal-form/scheduled-backup-modal-form.tsx index 76a665ac2..3b50e00cd 100644 --- a/ui/apps/everest/src/pages/db-cluster-details/backups/scheduled-backup-modal/scheduled-backup-modal-form/scheduled-backup-modal-form.tsx +++ b/ui/apps/everest/src/pages/db-cluster-details/backups/scheduled-backup-modal/scheduled-backup-modal-form/scheduled-backup-modal-form.tsx @@ -54,10 +54,13 @@ export const ScheduledBackupModalForm = () => { trigger(ScheduleFormFields.storageLocation); } }, [dbClusterActiveStorage]); - + console.log(dbCluster.spec.engine.type); return ( { accessorKey: 'type', Cell: ({ cell }) => (cell.getValue() === 'pitr' ? 'PITR' : 'Full'), }, + { + header: 'Backup Source', + accessorKey: 'backupSource', + }, ]; }, []); diff --git a/ui/apps/everest/src/shared-types/restores.types.ts b/ui/apps/everest/src/shared-types/restores.types.ts index 1554aca79..86b6e7a1b 100644 --- a/ui/apps/everest/src/shared-types/restores.types.ts +++ b/ui/apps/everest/src/shared-types/restores.types.ts @@ -22,6 +22,7 @@ export type GetRestorePayload = { spec: { dataSource: { pitr?: object; + dbClusterBackupName?: string; }; }; status: { @@ -54,6 +55,7 @@ export type Restore = { endTime?: string; type: 'full' | 'pitr'; state: string; + backupSource: string; }; export enum PXC_STATUS {