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-6576] - Dbaas total disk size and used disk size #9638

Merged

Conversation

corya-akamai
Copy link
Contributor

Description 📝

Adding two new fields to display (1) the total disk size available for the database (Selected size - OS overhead) and (2) the used disk space so the customer will now how much space is remaining in the DB. BE will be feature gated, so UI will fallback to current storage field if the API response does not contain the total_disk_space

Major Changes 🔄

  • Field total_disk_space_gb
  • Field used_disk_space_gb
  • database_low_disk_space_remaining event

Preview 📷

Screenshot 2023-08-02 at 1 53 30 PM

How to test 🧪

  1. Use the mock service workers
  2. Navigate to http://localhost:3000/databases/mysql/0
  3. Verify Total Disk Size and Used fields are present. Modify packages > manager > src > factories > databases.ts > total_disk_size_gb to undefined to revert to previous view with the Storage field.
  4. E2E test will be added from QA sujai

@corya-akamai corya-akamai force-pushed the feature/UIE-6757-dbass-disk-size-2 branch from 70518ef to e1b1a53 Compare September 6, 2023 17:43
@bnussman-akamai bnussman-akamai added the DBaaS Relates to Database as a Service label Sep 6, 2023
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 submitting! left a few comments

packages/manager/src/dev-tools/FeatureFlagTool.tsx Outdated Show resolved Hide resolved
<Typography className={classes.label}>Storage</Typography>
{convertMegabytesTo(type.disk, true)}
</Box>
{database.total_disk_size_gb ? (
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't we want to make a new feature flag and use it as an additional conditional here? This works but wondering if the scope may expand?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The backend has a feature gate for the rollout. I asked about a UI flag, but they said the backend API response should suffice.

Copy link
Contributor

Choose a reason for hiding this comment

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

gotcha, thx for the explanation

packages/api-v4/src/databases/types.ts Show resolved Hide resolved
@jaalah-akamai jaalah-akamai changed the title Feat: [UIE-6576] - Dbaas total disk size and used disk size feat: [UIE-6576] - Dbaas total disk size and used disk size Sep 7, 2023
Copy link
Member

@bnussman-akamai bnussman-akamai left a comment

Choose a reason for hiding this comment

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

Looks good in alpha! 🎉

I'd like to know why this is feature flagged on the API side. Do we expect this feature to ever be turned off? Should we add our own feature flag on the frontend for this?

@corya-akamai
Copy link
Contributor Author

Looks good in alpha! 🎉

I'd like to know why this is feature flagged on the API side. Do we expect this feature to ever be turned off? Should we add our own feature flag on the frontend for this?

The backend added a feature flag for the rollout. It's turned off initially to verify no regressions were introduced. When I asked about adding a flag on the UI, they said the API response can drive the behavior.

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.

Tested in alpha and looks good. 🚢

@bnussman-akamai
Copy link
Member

Ran e2es locally and everything passed ✅

@bnussman-akamai bnussman-akamai merged commit 1420641 into linode:develop Sep 13, 2023
11 checks passed
@corya-akamai corya-akamai deleted the feature/UIE-6757-dbass-disk-size-2 branch September 13, 2023 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DBaaS Relates to Database as a Service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants