feat: [M3-6973] - Add DC-specific pricing Object Storage overages#9813
feat: [M3-6973] - Add DC-specific pricing Object Storage overages#9813mjac0bs merged 20 commits intolinode:developfrom
Conversation
2d298bd to
66487b0
Compare
| {flags.objDcSpecificPricing && clusterRegion?.[0]?.id && ( | ||
| <OveragePricing regionId={clusterRegion?.[0]?.id} /> | ||
| )} |
There was a problem hiding this comment.
OveragePricing is a new component with the helper text and text tooltips about OBJ storage and network transfer overages. It will display in the Create Bucket drawer once a region has been selected.
| it('Renders a tooltip for DC-specific transfer pools for a region with price increases', async () => { | ||
| const { findByRole, getByText } = renderWithTheme( | ||
| <OveragePricing regionId="br-gru" /> | ||
| ); | ||
|
|
||
| fireEvent.mouseEnter(getByText('network transfer pool for this region')); | ||
|
|
||
| const tooltip = await findByRole(/tooltip/); | ||
|
|
||
| expect(tooltip).toBeInTheDocument(); | ||
| expect(getByText(DC_SPECIFIC_TRANSFER_POOLS_TOOLTIP_TEXT)).toBeVisible(); | ||
| }); | ||
|
|
||
| it('Renders a tooltip for global network transfer pools for a region without price increases', async () => { | ||
| const { findByRole, getByText } = renderWithTheme( | ||
| <OveragePricing regionId="us-east" /> | ||
| ); | ||
|
|
||
| fireEvent.mouseEnter(getByText('global network transfer pool')); | ||
|
|
||
| const tooltip = await findByRole(/tooltip/); | ||
|
|
||
| expect(tooltip).toBeInTheDocument(); | ||
| expect(getByText(GLOBAL_TRANSFER_POOL_TOOLTIP_TEXT)).toBeVisible(); | ||
| }); |
There was a problem hiding this comment.
While enable-object-storage.spec.ts does test for the presence of the overage pricing helper text in the flow, I didn't go so far as to check whether the tooltip displays correctly and so we cover that in a unit test here.
There was a problem hiding this comment.
Most of the adjustments in this file are just to account for my removal of the dcSpecificPricing feature flag from the component.
The component now displays DC-specific pricing logic by default and will display the copy changes covered in this ticket if objDcSpecificPricing flag is enabled.
There was a problem hiding this comment.
There are a few UI changes in this file that I did NOT feature flag: updating the title of the modal and increasing the font size and spacing of the text. These are general improvements, unrelated to the move from beta to real OBJ DC-specific pricing, so there's no reason to hide them behind the objDcSpecificPricing feature flag.
| // with special pricing during beta period, then cancel. | ||
| ui.dialog | ||
| .findByTitle('Just to confirm...') | ||
| .findByTitle('Enable Object Storage') |
There was a problem hiding this comment.
As I commented in another spot, I did not hide this title change behind a feature flag because it's a general improvement, so these tests needed updating in multiple spots.
| // Click "Enable Object Storage". | ||
| ui.button | ||
| .findByTitle('Enable Object Storage') | ||
| .findByAttribute('data-qa-enable-obj', 'true') |
There was a problem hiding this comment.
Now that the modal title and primary action button match, this selector needed to be changed to be more specific, or the test would fail.
| ui.dialog | ||
| .findByTitle('Just to confirm...') | ||
| .findByTitle('Access Keys') | ||
| .should('be.visible') | ||
| .within(() => { | ||
| // Confirm that pricing and cancellation explanations are present, but | ||
| // DC-specific information is hidden. | ||
| confirmModalContents(); | ||
| ui.button |
There was a problem hiding this comment.
The diff looks weird here, but I think it is just because I deleted the test that checked that old modal copy displayed when the dcSpecificPricing feature flag was off - now that this code has been released, we won't be turning it off.
abailly-akamai
left a comment
There was a problem hiding this comment.
Great work - just left a couple questions
matches mocks ✅
Created your first access key and enable OBJ. ✅
Created your first bucket and enable OBJ. ✅
Overage pricing display ✅
Create Bucket in Jakarta. ✅
Create Bucket in any other region ✅
Unit test ✅
e2e ✅
packages/manager/src/features/ObjectStorage/EnableObjectStorageModal.tsx
Show resolved
Hide resolved
|
EDIT: It was the curly apostrophe ( |
@bnussman-akamai Yeah, agreed. We made Region Worth noting in this PR that the only reason we're passing |
bnussman-akamai
left a comment
There was a problem hiding this comment.
Great work as always @mjac0bs





Description 📝
Object storage has hardcoded prices throughout the codebase. The service is a flat $5/month. Beyond the first 250GB storage and 1TB outbound transfer, it's and $0.02/GB/month. We need to update this due to pricing changes for DC-specific overage rates and clarification that outbound transfer is not added to DC-specific pools, only the global pool.
The only time a user sees the Enable Object Storage notice is the first time they create a bucket or access key and must opt-in to the service.
Note: Access keys are not currently tied to regions.
Changes 🔄
dcSpecificPricingfeature flag in the Enable OBJ Modal and related tests, since initial DC-specific pricing work has been released, to avoid extra conditional logic. DC-specific pricing behavior is now the default.Preview 📷
How to test 🧪
Prerequisites
(How to setup test environment)
objDCSpecificPricingfeature flag.Verification steps
Verify unit tests pass:
Verify Cypress test passes:
As an Author I have considered 🤔
Check all that apply