-
Notifications
You must be signed in to change notification settings - Fork 365
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
fix: [M3-7739] - Fix error when enabling backups for Linodes in regions with $0 price #10153
fix: [M3-7739] - Fix error when enabling backups for Linodes in regions with $0 price #10153
Conversation
const hasBackupsMonthlyPriceError = | ||
!backupsMonthlyPrice && backupsMonthlyPrice !== 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wasn't 100% sure what the clearest way to express this is
Opted for this since it telegraphs that 0
is a valid value, but if something else would be clearer to the team, like checking explicitly for null
or undefined
, I'm happy to tweak this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No objections from me.
…ions with /bin/sh pricing
Coverage Report: ❌ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const hasBackupsMonthlyPriceError = | ||
!backupsMonthlyPrice && backupsMonthlyPrice !== 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No objections from me.
Shakes fist |
Co-authored-by: Mariah Jacobs <114685994+mjac0bs@users.noreply.github.com>
…ns with $0 price (linode#10153) * Fix error when enabling backups for Linodes in regions with $0 price * Add unit tests for EnableBackupsDialog --------- Co-authored-by: Mariah Jacobs <114685994+mjac0bs@users.noreply.github.com>
…xes for release (#10177) * fix: [M3-7741] - Hide error notices for $0 regions in Resize Pool and Add a Node Pool drawers (#10157) * Allow -zsh LKE prices without error notices in Resize Pool and Add Pool drawers * Fix loading spinner displaying above what was supposed to be loading * Fix conditional to render notice if either price is invalid * Add test coverage * Added changeset: Hide error notices for /bin/sh regions for LKE Resize and Add Node Pools * Fix changeset wording * Address feedback: use invalid price util * fix: [M3-7746] - Fix $0 region price error in "Enable All Backups" drawer (#10161) * Remove error indicator for Linodes in $0 regions * Fix $0 total price display issue * Cover $0 pricing cases in Cypress backup tests * Add BackupLinodeRow tests to account for error states and $0 regions * Add unit tests for BackupDrawer component * fix: [M3-7747] - Fix Linode Migration dialog hidden $0 price (#10166) * Add unit tests for MigrationPricing component * Accounting for $0 prices in MigrationPricing component * fix: [M3-7739] - Fix error when enabling backups for Linodes in regions with $0 price (#10153) * Fix error when enabling backups for Linodes in regions with $0 price * Add unit tests for EnableBackupsDialog --------- Co-authored-by: Mariah Jacobs <114685994+mjac0bs@users.noreply.github.com> * Replace "toBeDisabled" with "toHaveAttribute" assertion --------- Co-authored-by: Mariah Jacobs <114685994+mjac0bs@users.noreply.github.com>
Description 📝
This fixes an error message that appears when enabling Linode backups in regions with $0 prices.
Changes 🔄
null
orundefined
, but allow0
How to test 🧪
Automated Tests
Serve Cloud with
yarn && yarn build && yarn start:manager:ci
, and then:(Note: This will only work on accounts that have access to the
es-mad
region, and won't be properly validated by our CI)Manual
es-mad
region(Edit: You can also test that the error message still appears when expected by blocking the request to the
/linode/types/:type
endpoint via Chrome's dev tools)Reproduction steps
You can reproduce the error with the tests if
develop
is checked out.yarn && yarn build && yarn start:manager:ci
, and then:(Note: This will only work on accounts that have access to the
es-mad
region)Similarly, you can follow the steps above to reproduce the issue manually.
As an Author I have considered 🤔
Check all that apply