Commit Graph
14 Commits
Author SHA1 Message Date
KilianSwissborg b86b297996 [2.x] fix: Preserve '=' in remote cache header values (#9534)
**Problem**
`remoteCacheHeaders` entries are parsed in GrpcActionCacheStore.AuthCallCredentials
with h.split("="), which splits on every =. Java's split discards trailing empty
strings, so a Basic auth header such as authorization=Basic dXNlcjpwdw== produces
exactly two elements and matches List(k, v) with the base64 padding silently removed.
The truncated credential is rejected by the cache server with UNAUTHENTICATED.

**Solution**
Split on the first = only, keeping the remainder of the string verbatim as the header
value. The error case narrows to a header containing no = at all.

Generated-by: Claude Opus 5
2026-08-03 01:01:03 -04:00
Eugene Yokota aed2719f02 [2.x] fix: Intern GrpcActionCacheStore
**Problem**
GrpcActionCacheStore gets recreated per reload.

**Solution**
This interns GrpcActionCacheStore based on the parameters.
2026-07-26 15:00:58 -04:00
35e99d27c1 [2.0.x] fix: apply ByteStream deadline per-call, not on the memoized stub (#9413) (#9431)
The byteStreamStub lazy val applied withDeadlineAfter once, baking in an
absolute deadline that was reused for the store's whole (session-long)
lifetime. remoteTimeoutInSec after the first blob transfer, every later
ByteStream read/write was rejected with DEADLINE_EXCEEDED, so the remote
cache could neither upload nor download blobs >chunkSizeBytes for the rest
of the sbt server's life.

Derive a fresh stub with the deadline per RPC so each call gets its own
relative timeout.

Co-authored-by: Yannick Heiber <[email protected]>
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
2026-07-11 13:58:24 -04:00
eugene yokota aacd98231d [2.0.x] fix: Fixes chunked upload/download (#9318) (#9323)
**Problem**
Chunked upload/download doesn't work.

**Solution**
1. This fixes the SERVICE_NAME shading.
2. This fixes the resource name.
3. This fixes download stream processing.
2026-06-10 01:52:17 -04:00
eugene yokota 06d7047003 [2.0.x] fix: ByteStream chunked upload/download (#9298) (#9301)
**Problem**

BatchUpdateBlobsRequest suffers from gRPC's message size limitation.

**Solution**

For larger files, we switch to using the ByteStream API, chunked to 1MB at a time.
2026-06-07 15:47:38 -04:00
xuwei-k 5d660ab8b5 remove unnecessary case
- https://github.com/xuwei-k/scalafix-rules/blob/3ca36335057154ef4431fee464a86b721013d334/rules/src/main/scala/fix/RemoveParameterUntuplingCase.scala
- https://docs.scala-lang.org/scala3/reference/other-new-features/parameter-untupling.html
- https://docs.scala-lang.org/scala3/reference/other-new-features/parameter-untupling-spec.html
2025-02-22 08:48:29 +09:00
xuwei-k 13d6626564 update .scalafmt.conf. enforce new scala 3 syntax 2025-01-02 11:25:34 +09:00
eugene yokota e04039a2ed Merge pull request #7992 from xuwei-k/foreach-map
[2.x] use `foreach` instead of `map`
2025-01-01 03:07:05 -05:00
xuwei-k 580722994a use foreach instead of map 2025-01-01 16:42:25 +09:00
xuwei-k 5438781142 use collectFirst instead of collect and headOption 2025-01-01 16:06:34 +09:00
Eugene Yokota 56941dac04 refactor: Update Scala 3 syntax 2024-10-27 23:55:30 -04:00
Adrien Piquerez f08f272d23 [2.x] Fix scripted cache tests 2024-09-18 10:28:11 +02:00
Eugene Yokota c9e5924b09 Implement on after sync event
When the disk cache syncs dirzip file, it compares the
item hashes against the existing files, and synchronizes them
using the disk cache.
2024-08-18 12:57:29 -04:00
Eugene Yokota 86cf7c3a0c Remote caching support
This implements Bazel-compat remote caching support via a plugin.
2024-04-11 13:55:29 +02:00