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

Usage in usage view is not updated within 15 min #13060

Closed
jldec opened this issue Sep 18, 2022 · 4 comments
Closed

Usage in usage view is not updated within 15 min #13060

jldec opened this issue Sep 18, 2022 · 4 comments
Assignees
Labels
feature: billing team: webapp Issue belongs to the WebApp team

Comments

@jldec
Copy link
Contributor

jldec commented Sep 18, 2022

New usage takes much longer than 15min to appear in the usage view of a team with UBP billing configured.
This will be a problem for users, and also for us internally because it slows down our testing.

See internal discussion - this may be related to missing DB indexes.

@easyCZ
Copy link
Member

easyCZ commented Sep 19, 2022

This is a known issue at the moment. To fix this, we need the following changes:

This has been currently blocked due to new indices causing downtime.

For now, we could change the wording to say (refreshes every 1h) which is roughly how often we do it now. See dashboard for details.

@easyCZ easyCZ moved this from Scheduled to In Progress in 🍎 WebApp Team Sep 19, 2022
@easyCZ easyCZ self-assigned this Sep 19, 2022
@easyCZ easyCZ moved this from In Progress to In Validation in 🍎 WebApp Team Sep 26, 2022
@easyCZ
Copy link
Member

easyCZ commented Sep 27, 2022

US migrations now applied. We still need to apply the stoppingTime migration in EU

@easyCZ
Copy link
Member

easyCZ commented Sep 27, 2022

To apply the EU indices, execute the following:

# your kubecontext name may vary
kubectx webapp-eu2

# Disable usage controller
# Remove the following config line to disable the controller:
#       "controllerSchedule": "15m",
kubectl edit configmap usage

# Delete existing pod to make it restart with the new config
kubectl delete pods -l component=usage

kubectl port-forward svc/cloudsqlproxy 3306:3306

# Connect to the DB on port 3306
# ...
# Run the following query:
CREATE INDEX IDX_workspace_instance__stopping_time ON d_b_workspace_instance (stoppingTime);

# Re-add controller schedule config 
# Add   "controllerSchedule": "15m",  to the config
kubectl edit configmap usage

# Delete existing pod to make it restart with the new config
kubectl delete pods -l component=usage

# Check there are now running pods  of `usage` again
kubectl get pod 

Expected run time is ~25 minutes.

@geropl
Copy link
Member

geropl commented Sep 29, 2022

Done with the steps above ✔️

@easyCZ easyCZ moved this from In Validation to Done in 🍎 WebApp Team Sep 29, 2022
@easyCZ easyCZ closed this as completed Nov 4, 2022
Repository owner moved this from Done to In Validation in 🍎 WebApp Team Nov 4, 2022
@geropl geropl moved this from In Validation to Done in 🍎 WebApp Team Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: billing team: webapp Issue belongs to the WebApp team
Projects
Status: Done
Development

No branches or pull requests

3 participants