Send batch requests when scheduling new commit builds#1999
Merged
auto-submit[bot] merged 3 commits intoflutter:mainfrom Jul 22, 2022
Merged
Send batch requests when scheduling new commit builds#1999auto-submit[bot] merged 3 commits intoflutter:mainfrom
auto-submit[bot] merged 3 commits intoflutter:mainfrom
Conversation
CaseyHillers
approved these changes
Jul 22, 2022
| int get schedulingShardSize => 5; | ||
|
|
||
| @override | ||
| int get batchSize => batchSizeValue ?? 5; |
Contributor
There was a problem hiding this comment.
Making this const in config.dart would prevent need to add this stub in the test
Contributor
Author
There was a problem hiding this comment.
I need to have customized batchSize values to validate from test.
|
|
||
| /// Schedule all builds in batch requests instead of a single request. | ||
| /// | ||
| /// Each batch request contains `kBatchSize` builds to be scheduled. |
Contributor
There was a problem hiding this comment.
Suggested change
| /// Each batch request contains `kBatchSize` builds to be scheduled. | |
| /// Each batch request contains [Config.batchSize] builds to be scheduled. |
| for (int i = 0; i < toBeScheduled.length; i += config.batchSize) { | ||
| futures.add(luciBuildService.schedulePostsubmitBuilds( | ||
| commit: commit, | ||
| toBeScheduled: toBeScheduled.sublist(i, min(i + config.batchSize, toBeScheduled.length)), |
Contributor
There was a problem hiding this comment.
is sublist upper bound index non-inclusive?
19 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With cocoon scheduling, a single schedule request of all builds will be created. This causes unpredicted builds schedule failure.
This PR use batch requests instead of a single request of ~300 builds: each batch is with default 5 builds.
Validation: a test version of cocoon wit this change has been running since yesterday.
Related: flutter/flutter#103443, flutter/flutter#92300