Skip to content

Parallelize security advisories and package status fetching#4824

Merged
sigurdm merged 13 commits into
dart-lang:masterfrom
sigurdm:parallel_advisories
May 22, 2026
Merged

Parallelize security advisories and package status fetching#4824
sigurdm merged 13 commits into
dart-lang:masterfrom
sigurdm:parallel_advisories

Conversation

@sigurdm
Copy link
Copy Markdown
Contributor

@sigurdm sigurdm commented May 18, 2026

Related to #4818

Also fix a bug where we were not passing a maxAge to gate the advisory cache age.

Also adds a 24-hour buffer to the file-timestamp comparison we do to fast-check if the cached advisories is out of date. (We compare against the written timestamp afterwards).

@sigurdm sigurdm requested review from jonasfj and szakarias May 18, 2026 11:55
cachedAdvisoriesUpdated,
);
final advisoriesUpdated =
(await status(id.toRef(), id.version, cache)).advisoriesUpdated;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we were missing the maxAge

Comment thread lib/src/system_cache.dart
futures.add(advisoriesFuture);
}
}
await Future.wait(futures);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have concurrency limits here? probably that exists in fetch and schedule logic, just wanted to check.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really good point. Shared the pool with the ratelimitedscheduler

Copy link
Copy Markdown
Contributor

@szakarias szakarias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sigurdm sigurdm merged commit 8e36831 into dart-lang:master May 22, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants