Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [UIE-8009] - DBaaS enhancements Backups #10961

Conversation

mpolotsk-akamai
Copy link
Contributor

@mpolotsk-akamai mpolotsk-akamai commented Sep 18, 2024

Description ๐Ÿ“

DBaaS 2.0 Backups

Changes ๐Ÿ”„

  • Added a section titled โ€œSummaryโ€ with additional subtitle text.
  • Implemented a DatePicker and TimePicker.
  • Added a dialog window for new restore.
  • Added Database Logo

Target release date ๐Ÿ—“๏ธ

9/16/24

Preview ๐Ÿ“ท

Before After
Screenshot 2024-09-18 at 3 09 52โ€ฏPM Screenshot 2024-09-19 at 8 46 30โ€ฏPM
Screenshot 2024-09-19 at 8 44 28โ€ฏPM
Screenshot 2024-09-18 at 3 08 13โ€ฏPM Screenshot 2024-09-18 at 3 08 00โ€ฏPM

How to test ๐Ÿงช

Note:
To test all beta features, beta must be enabled, and the user must have the "Managed Databases Beta" account capability.

Prerequisites

(How to setup test environment)

Enable DatabaseV2Beta flag

Verification steps

(How to verify changes)

  1. Navigate to the Databases section.
  2. Choose the Database Cluster.
  3. Go to the Backups tab.
  4. Select a date from the DatePicker.
  5. Choose the time from the TimePicker.
  6. Click the 'Restore' button.
  7. A popup will appear with the Database Label and the chosen date and time.
  8. Click the 'Restore' button in the popup dialog.
  9. You will be redirected to the Summary tab.

As an Author I have considered ๐Ÿค”

Check all that apply

  • ๐Ÿ‘€ Doing a self review
  • โ” Our contribution guidelines
  • ๐Ÿค Splitting feature into small PRs
  • โž• Adding a changeset
  • ๐Ÿงช Providing/Improving test coverage
  • ๐Ÿ” Removing all sensitive information from the code and PR description
  • ๐Ÿšฉ Using a feature flag to protect the release
  • ๐Ÿ‘ฃ Providing comprehensive reproduction steps
  • ๐Ÿ“‘ Providing or updating our documentation
  • ๐Ÿ•› Scheduling a pair reviewing session
  • ๐Ÿ“ฑ Providing mobile support
  • โ™ฟ Providing accessibility support

@mpolotsk-akamai mpolotsk-akamai requested a review from a team as a code owner September 18, 2024 13:39
@mpolotsk-akamai mpolotsk-akamai requested review from mjac0bs and abailly-akamai and removed request for a team September 18, 2024 13:39
@mjac0bs mjac0bs added DBaaS Relates to Database as a Service Ready for Review labels Sep 18, 2024
@mpolotsk-akamai mpolotsk-akamai force-pushed the feature/UIE-8009-new-customer-flow-backups branch from ee0608f to 64e161a Compare September 18, 2024 16:19
Copy link

github-actions bot commented Sep 18, 2024

Coverage Report: โœ…
Base Coverage: 86.94%
Current Coverage: 86.94%

@mpolotsk-akamai mpolotsk-akamai force-pushed the feature/UIE-8009-new-customer-flow-backups branch from 64e161a to 3c8396c Compare September 18, 2024 17:00
Copy link
Contributor

@mjac0bs mjac0bs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mpolotsk-akamai

This PR contains some changes that would have been best separated out into their own PRs (the creation of new components - which we typically abstract, style, unit test, and add to Storybook). If DBaaS is willing to use more basic components for date and/or time selection for now, the Cloud Manager team would then follow up with the core components in an M3 ticket to do the abstraction with calendar and time components.

As far as the actual functionality of the Backups tab for new DBs - the changes worked and I did not see any regressions for legacy DBs Backups.

I did leave some feedback throughout.

<Grid item lg={3} md={4} xs={12}>
<Typography variant="h3">Time(UTC)</Typography>
<LocalizationProvider dateAdapter={AdapterLuxon}>
<StyledTimePicker
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This component has some styling issues, which are especially visible in dark mode. The double scroll bars, different colored options in dark mode, extra spacing before the OK button, and the transparency of the button itself are things we'd want to address. Building out our own TimePicker component is how we'd style this more consistently, rather than a direct import from MUI.

Screenshot 2024-09-18 at 10 02 29โ€ฏAM

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gitkcosby Wanted to check in with you about this. We have planned to build a date picker but it isn't available yet. Here, @mpolotsk-akamai has imported the component straight from MUI which is problematic for a variety of reasons (functionality, styling, testing, reliability) and we'd like to ask for a grace period to build this right and make it available to the Cloud Manager ecosystem the right way.

I'd like to suggest using a <Texfield type="date"><Texfield type="date"> combo during this grace period and replace it once the has been built, which I estimate to be done one or two releases following the DBaaS 9/30 beta release (in short we'd live with the temp solution for a sprint or two).

Any thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abailly-akamai , I've updated the time picker, to match the one in Settings Tab, for consistency.

packages/manager/src/components/Dialog/Dialog.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@abailly-akamai abailly-akamai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution @mpolotsk-akamai - great PR and attention to testing and coding conventions. I added a few comments to clean things up and let's see what we do with the picker before moving forward

@mjac0bs
Copy link
Contributor

mjac0bs commented Sep 19, 2024

I'll give this a final approval once the date and time picker are swapped out and Alban's feedback is addressed, but thank you for making initial changes - this is looking good and clean overall!

As far as test failures:

  • The unit test failure is legit and is a quick fix to include the space betweenTime and (UTC).
    Screenshot 2024-09-19 at 8 40 32โ€ฏAM

  • I noticed a Cypress failure on the update-databases.spec.ts that I hadn't seen recently. But from running that test locally and watching it, it only seems to be touching the Settings page, and I don't see any interaction with the Backups tab changes made here. Seems like it may have been flake - worth keeping an eye on, though.

@mpolotsk-akamai
Copy link
Contributor Author

@mjac0bs , @abailly-akamai thank you for the review.
Iโ€™ve updated the time picker and made all the necessary changes.

@mpolotsk-akamai mpolotsk-akamai force-pushed the feature/UIE-8009-new-customer-flow-backups branch from 99e3a75 to 5854ae3 Compare September 19, 2024 16:32
@mpolotsk-akamai mpolotsk-akamai force-pushed the feature/UIE-8009-new-customer-flow-backups branch from 5854ae3 to 1d0575d Compare September 19, 2024 17:05
Copy link
Contributor

@mjac0bs mjac0bs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm approving pending CI finishes and looks good.

Just so we're all on the same page (cc @abailly-akamai , @gitkcosby) - we're on board with keeping the MUI imported calendar at the moment, because this use case (specific day) does differ a little from the Settings tab, which is only selecting a week day?

@abailly-akamai
Copy link
Contributor

abailly-akamai commented Sep 19, 2024

@mpolotsk-akamai @mjac0bs @gitkcosby I believe we agreed on using a day select as well and removing this version of the calendar waiting for the real component. This is the request that was agreed upon. Pretty much

Screenshot 2024-09-19 at 11 23 17

except it would be a date field on the left

@mpolotsk-akamai
Copy link
Contributor Author

@abailly-akamai , based on our discussion with @gitkcosby , @corya-akamai weโ€™ll proceed with the MUI Calendar and a standard drop down for selecting a time.

@mjac0bs
Copy link
Contributor

mjac0bs commented Sep 19, 2024

except it would be a date field on the left

Right. @mpolotsk-akamai, @mpolotsk-akamai, @corya-akamai - I think @abailly-akamai's recommendation of <Texfield type="date"> is the way to go here, as it will get you the same data and avoid introducing the new calendar component just yet.

@abailly-akamai
Copy link
Contributor

@mjac0bs I cleared it with @gitkcosby - we'll keep it for DBaaS and we'll do as quick a follow up as possible to replace this instance soon, hoping no more pop up. If we catch other instances in other PRs we can prevent spread.

I am reviewing the e2e failures now but this should be good to go otherwise

@mjac0bs
Copy link
Contributor

mjac0bs commented Sep 19, 2024

Note that the update-database spec failure will be fixed by #10975.

@abailly-akamai abailly-akamai merged commit 109bac6 into linode:develop Sep 19, 2024
18 of 20 checks passed
@mjac0bs mjac0bs added the Approved Multiple approvals and ready to merge! label Sep 19, 2024
@corya-akamai corya-akamai deleted the feature/UIE-8009-new-customer-flow-backups branch October 7, 2024 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved Multiple approvals and ready to merge! DBaaS Relates to Database as a Service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants