dart-lang / dart-lang/pub-dev

Gracefully handle QuotaExhaustedException

Open
#6,507 0 comments 0 reactions 0 assignees View on GitHub
Type: bug
Dominant language
Dart
Stars
944
Forks
184
Avg merge
1d 15h
Merged PRs (30d)
12

Description

Since this isn't a bad error, it should probably just be a warning, and written in a manner that we know that it might happen from time to time.

When we have two instances running, it's likely to happen because while they can count instances, they'll both try to schedule as many as possible.

```
pub.task.schedule: Quota exhausted trying to create worker-01gvnbwemd8bshnn5h6vv9yfb5, banning all zones for 10 minutes

Error:
QuotaExhaustedException: Quota exceeded creating instance, api.instances.insert(name=worker-01gvnbwemd8bshnn5h6vv9yfb5), error: QUOTA_EXCEEDED: Quota 'PREEMPTIBLE_CPUS' exceeded. Limit: 2000.0 in region us-central1.

Stack:
#0 _GoogleCloudCompute.createInstance.logWarningsThrowErrors (package:pub_dev/task/cloudcompute/googlecloudcompute.dart:571:15)
#1 _GoogleCloudCompute.createInstance (package:pub_dev/task/cloudcompute/googlecloudcompute.dart:599:9)

#2 StackZoneSpecification._registerUnaryCallback. (package:stack_trace/src/stack_zone_specification.dart:124:15)


```

Contributor guide

Open the contributing guide

Research direction

Start in package/pub_dev/task/cloudcompute/googlecloudcompute.dart at createInstance and logWarningsThrowErrors around lines 571 and 599. Trace how QuotaExhaustedException is handled, then verify that quota exhaustion is reported as a warning rather than an unexpected error and that the existing scheduling behavior remains clear.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, google-cloud
Domain
cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.