Skip to content

[infra] investigate Flutter-provisioning build speed-ups #8950

@pq

Description

@pq

Background

Our CI/CD builds (Kokoro & GitHub Actions) spend significant time setting up the environment on clean VM instances. A primary contributor to this setup overhead is how the Flutter SDK is provisioned.

Currently, we use git clone --depth 1 to download the Flutter repository. Because a raw git clone does not include pre-compiled binaries, the subsequent call to flutter doctor or flutter config is forced to sequentially download the Dart SDK (~180 MB) and the Flutter Engine binaries (~250 MB) from scratch on every run. This adds several minutes of unnecessary network and processing overhead to each build.

Why This Matters

Slow CI/CD builds directly bottleneck developer velocity. When presubmits take over an hour, it creates a painful feedback loop for pull requests, forcing us to switch contexts while waiting and delaying critical code reviews. It's also expensive! Long-running builds consume significant CI runner compute resources and can lead to developer frustration and delayed releases.

Proposed Solution

We should be able to drastically speed up this setup step by switching from a git clone to downloading a fully pre-packaged Flutter SDK release archive directly from the official Google Cloud Storage bucket. These official zip/tarball releases already contain the pre-compiled Dart SDK and engine binaries out-of-the-box. By curling the archive from GCS (which benefits from extremely fast internal Google network speeds on Kokoro) and unzipping it, we should be able to eliminate the downstream setup downloads entirely, reducing the total Flutter setup duration to less than a minute. 🤞

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions