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: Update Activation Call to Include Billing Limit #18498

Closed
wants to merge 9 commits into from
3 changes: 3 additions & 0 deletions ee/api/billing.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ def activation(self, request: Request, *args: Any, **kwargs: Any) -> HttpRespons

plan = request.GET.get("plan", None)
product_keys = request.GET.get("products", None)
custom_limits = request.GET.get("custom_limits_usd", None)
if not plan and not product_keys:
# If no plan or product keys are specified, we default to the standard plan
# This is to support the old activation flow
Expand All @@ -110,6 +111,8 @@ def activation(self, request: Request, *args: Any, **kwargs: Any) -> HttpRespons
url = f"{url}&plan={plan}"
if product_keys:
url = f"{url}&products={product_keys}"
if custom_limits:
url = f"{url}&custom_limits_usd={custom_limits}"

if license:
billing_service_token = build_billing_token(license, organization)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions frontend/src/scenes/billing/billing-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ export const getUpgradeProductLink = (
}
// remove the trailing comma that will be at the end of the url
url = url.slice(0, -1)
if (product.type === 'data_warehouse') {
// TODO: remove once data_warehouse is out of beta
url += `&custom_limits_usd=${product.type}:500`
}
if (redirectPath) {
url += `&redirect_path=${redirectPath}`
}
Expand Down
2 changes: 0 additions & 2 deletions frontend/src/scenes/onboarding/onboardingLogic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,6 @@ export const onboardingLogic = kea<onboardingLogicType>([
}
if (step) {
actions.setStepKey(step)
} else {
actions.resetStepKey()
Copy link
Contributor Author

@xrdt xrdt Nov 9, 2023

Choose a reason for hiding this comment

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

Removing seems to fix some weird bug in the /products onboarding flow where I have to click on "set up again" twice to get the next page to show up. I'm not entirely sure why this works...

Here's a before video:

Screen.Recording.2023-11-09.at.3.17.24.PM.mp4

And after video:

Screen.Recording.2023-11-09.at.3.18.56.PM.mp4

}
},
})),
Expand Down
Loading