Skip to content

ci: keep the Firebase JS SDK's build between runs - #193

Closed
sanjevirau wants to merge 2 commits into
mainfrom
ci/js-sdk-jobs
Closed

sanjevirau wants to merge 2 commits into
mainfrom
ci/js-sdk-jobs

Conversation

@sanjevirau

Copy link
Copy Markdown
Collaborator

Third round after #191 and #192, for the 0.2.4 milestone.

The four Firebase JS SDK browser jobs are now the longest in CI (9–12 min). About 4 minutes of each is building the SDK from source at its pinned commit, the same build every run. The SDK's build tool (Nx) reuses what it built when the inputs are the same, so this keeps its cache between runs, keyed on the SDK commit. The tests themselves are unchanged.

The first run fills the cache; timings from a second run follow in a comment.

🤖 Generated with Claude Code

https://claude.ai/code/session_01APfZAFCQzCmvhJqWKMT47g

Each of the four SDK browser jobs built the SDK from source at its pinned
commit, about 4 of its 9-12 minutes. The SDK's build tool (Nx) reuses
what it built when the inputs are the same, so its cache is kept between
runs, keyed on the SDK commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01APfZAFCQzCmvhJqWKMT47g
@sanjevirau sanjevirau added this to the 0.2.4 milestone Nov 12, 2026
The cache saved 39 KB and the build still took 193 s: the SDK's nx.json
asks for caching in a form its Nx no longer reads. The build target is
marked cacheable in the checkout before the build.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01APfZAFCQzCmvhJqWKMT47g
@sanjevirau

Copy link
Copy Markdown
Collaborator Author

Closing: it does not work, measured twice.

  • With Nx's cache folder kept between runs, the cache held 39 KB and the SDK build still took 193 s.
  • With the build target marked cacheable in the checkout, the cache held 11 MB and the build still took 204 s: Nx ran all eight builds again and did not reuse them.

The remaining way is for the harness to skip build:deps when a saved build matches the pinned commit. The run's evidence records that the SDK was built from source, so that is a change to what the check proves, for about 3 minutes of a 12-minute run. Not worth it now. CI stays as #192 left it.

@sanjevirau sanjevirau closed this Nov 12, 2026
@sanjevirau
sanjevirau deleted the ci/js-sdk-jobs branch November 12, 2026 10:44
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.

1 participant