UpdateMaxSeatsUsedForGitLabComSubscriptionsWorker failing to run
First noticed in: https://gitlab.com/gitlab-com/support/internal-requests/-/issues/2937
Kibana: https://log.gprd.gitlab.net/goto/775b2a74b5a53536f6903c427e4cfbc6
It seems like the worker that updates the GitlabSubscriptions
table with historical max data has been failing on some bad data in the DB.
https://sentry.gitlab.net/gitlab/gitlabcom/issues/1738214/?referrer=gitlab_plugin
NoMethodError: undefined method `billable_members_count' for nil:NilClass
gitlab_subscription.rb:46:in `seats_in_use'
namespace.billable_members_count
update_max_seats_used_for_gitlab_com_subscriptions_worker.rb:19:in `block (2 levels) in perform'
seats_in_use = subscription.seats_in_use
update_max_seats_used_for_gitlab_com_subscriptions_worker.rb:18:in `each'
subscriptions.each do |subscription|
update_max_seats_used_for_gitlab_com_subscriptions_worker.rb:18:in `block in perform'
subscriptions.each do |subscription|
active_record/relation/batches.rb:136:in `block in find_in_batches'
yield batch.to_a
...
(84 additional frame(s) were not displayed)
undefined method `billable_members_count' for nil:NilClass
Edited by Lyle Kozloff