Page MenuHomePhabricator

Make it impossible to spend more than 5% of Wikibase Cloud's total infrastructure budget in one day
Closed, DeclinedPublic5 Estimated Story Points

Description

As a Wikibase Cloud EM I want to have the ability to limit the daily spending of Wikibase Cloud's infrastructure budget, so that I am confident I am in control of the budget usage.

We suspect that this entails setting a "lock" (budget) in GCS that prevents spending above 5% of the total budget in one day. We might want to investigate what GCS offers in this regard: https://cloud.google.com/billing/docs/how-to/budgets.

This could potentially also be set up in Terraform: https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/billing_budget.

Notes from Storytime:

  • Do we need to set up notifications for when the budget is reached (or close to being reached) within a given day? LM: Ultimately, yes. For the minimal closed beta version, this is a corner which could be cut. The minimal requirement is that massive overspending is blocked. However adding notifications that the threshold was reached would be expected soon thereafter (e.g. within a sprint) so it may make sense to tackle together depending on effort involved

Event Timeline

Samantha_Alipio_WMDE renamed this task from Make it impossible to spend a significant share of Wikibase Cloud's infrastructure budget over night to Make it impossible to spend more than 5% of Wikibase Cloud's infrastructure budget in one day.Mar 4 2022, 9:54 AM
Samantha_Alipio_WMDE updated the task description. (Show Details)
Samantha_Alipio_WMDE renamed this task from Make it impossible to spend more than 5% of Wikibase Cloud's infrastructure budget in one day to Make it impossible to spend more than 5% of Wikibase Cloud's total infrastructure budget in one day.Mar 4 2022, 10:34 AM
Samantha_Alipio_WMDE updated the task description. (Show Details)
Samantha_Alipio_WMDE updated the task description. (Show Details)

Reading the user story in the task

As a Wikibase Cloud EM I want to have the ability to limit the daily spending of Wikibase Cloud's infrastructure budget, so that I am confident I am in control of the budget usage.

This is already done / the ability exists, and I would propose to decline / mark this engineering task as invalid.
The feature is already linked in the description too https://cloud.google.com/billing/docs/how-to/budgets
I don't see the point in an enginneer reading the docs, to recount the docs to the person that needs to then twiddle the knobs.

I believe a person responsible needs to read the documentation at https://cloud.google.com/billing/docs/how-to/budgets including budget creation, threholds, rules and actions.
And set wahtever budget, thresholds etc are deemed required.

As I understand this should then be tracked as a task on asana for a responsible person to do (as only engineering / sprint tasks end up being tracked on phab?)

WMDE-leszek lowered the priority of this task from High to Medium.Apr 5 2022, 6:33 PM
WMDE-leszek added a subscriber: conny-kawohl_WMDE.

@Addshore note that on the linked docs page it states very clearly that

Tip: Setting a budget does not automatically cap Google Cloud or Google Maps Platform usage/spending. Budgets trigger alerts to inform you of how your usage costs are trending over time. Budget alert emails might prompt you to take action to control your costs, but do not automatically prevent the use or billing of your services when the budget amount or threshold rules are met or exceeded.

Capping the budget spending has been the intent of the that story, so your point is not exactly accurate


Meanwhile, the budget has been set in google cloud console. @conny-kawohl_WMDE has decided for the initial phase it is sufficient to have notifications sent by google cloud when budget is being spent. Therefore this story is de-prioritized for now.

This ticket may then be over specified as the story at the top is not something we can achieve?
A simpler story of EM is happy that we can't spend too much money and it go in noticed is probably more appropriate?
Is @Conny happy with the control / automatic oversight of spending in place then we could close this?
Otherwise if we determine the thing a tally described in the description is impossible then let's decline it?