Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ final class BatchBackfiller extends RequestHandler {
(commit, [...tasks.map((t) => t.toRef())]),
], postsubmitTargets: currentTargets);
}
log.debug('Built a grid of ${grid.eligibleTasks.length} target columns');
log.debug(
'Built a grid of ${grid.eligibleTasks.length} target columns for $grid',
);

// Produce a list of tasks, ordered from highest to lowest, to backfill.
// ... but only take the top N tasks, at most.
Expand Down
29 changes: 23 additions & 6 deletions app_dart/lib/src/request_handlers/vacuum_github_commits.dart
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,28 @@ final class VacuumGithubCommits extends ApiRequestHandler {
'Listing commit for slug: $slug branch: $branch and msSinceEpoch: '
'${queryAfter.millisecondsSinceEpoch}',
);
commits = await githubService.listBranchedCommits(
slug,
branch,
queryAfter.millisecondsSinceEpoch,
);

try {
commits = await githubService.listBranchedCommits(
slug,
branch,
queryAfter.millisecondsSinceEpoch,
);
} catch (e) {
log.error('Failed retrieving commits from githubService', e);

final gh = config.createGitHubClientWithToken(
await config.githubOAuthToken,
);
commits = await gh.repositories
.listCommits(
slug,
sha: branch,
since: queryAfter,
until: queryBefore,
)
.toList();
}
log.debug('Retrieved ${commits.length} commits from GitHub');
// Do not try to add recent commits as they may already be processed
// by cocoon, which can cause race conditions.
Expand All @@ -99,7 +116,7 @@ final class VacuumGithubCommits extends ApiRequestHandler {
)
.toList();
} on gh.GitHubError catch (e) {
log.error('Failed retriving commits from GitHub', e);
log.error('Failed retrieving commits from GitHub', e);
}

return [
Expand Down
Loading