Repository navigation
Conversation
levb
commented
May 19, 2026
| var rc io.ReadCloser | ||
| var cacheHit bool | ||
| var err error | ||
| switch { |
levb
commented
May 19, 2026
| recordError(span, err) | ||
| span.End() | ||
|
|
||
| return nil, err | ||
| } | ||
|
|
||
| // The gauge counts readers serving NFS-cached data; misses fetch remotely. | ||
| opts := []readerOption{withSpan(span)} |
Owner
Author
There was a problem hiding this comment.
0/5 just have the openCompressed/Uncompressed functions do the wrapping, as appropriate in their respective context?
The OIDC verifier in packages/auth/pkg/auth/oidc previously enforced an https-only scheme on both the configured issuer URL and the discovery/JWKS URLs returned by it. This made it impossible to use a self-hosted Hydra running on http://localhost:4444/ as an OIDC issuer without standing up a TLS terminator in front of it. Relax validateURL to accept http when the URL host is a loopback address: the literal name 'localhost', any IPv4 in 127.0.0.0/8, or the IPv6 loopback ::1. The check matches strings + parsed literal IPs only; we deliberately do not resolve DNS so the result stays pure and TOCTOU-free. Mirrors the same carve-out Kubernetes' apiserver applies to --oidc-issuer-url for in-cluster test deployments. Any non-loopback host still requires https, preserving the production posture. Adds positive tests covering localhost, 127.0.0.1, and the IPv6 loopback; the existing non-https/non-loopback rejection test is unchanged.
Install UFFD MISSING faults by writing source bytes into the FC-shared memfd and calling UFFDIO_WAKE, instead of UFFDIO_COPY. Read faults arm WP before populate so the kernel retry installs a write-protected PTE. Behind `use-memfd-wake` (sub-flag of `use-memfd`). `resume-build -resume-bench` compares `default` / `memfd-copy` / `memfd-wake` on the same template. Stacked on e2b-dev#2590. --------- Signed-off-by: Babis Chalios <babis.chalios@e2b.dev> Co-authored-by: Babis Chalios <babis.chalios@e2b.dev> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Nikita Kalyazin <nikita.kalyazin@e2b.dev>
…2816) The n == 0 safety net guard in pwritevAll breaks out of the retry loop if pwritev(2) returns zero bytes written with no error, which would otherwise spin forever. The old message called this "EOF", but pwritev() on a regular file has no write-side EOF concept. Rename to "no progress" which describes what actually happened: the syscall succeeded but transferred nothing.
…v#2803) Compression-audit correctness fixes: - reject misaligned writes in `Cache.WriteAtWithoutLock` - cap V4 header LZ4 decompression at the size prefix - drop corrupt compressed cache entries on size mismatch - retry GCS 404 within a post-transition window with backoff - per-Read idle timeout on GCS range reads
Memfd dedup ran the page write phase synchronously on the Pause RPC, ignoring the bgCopy detachment. Split `dedupPages` into a sync compare and an async drain wrapped in `DedupedMemfdCache` (mirrors `MemfdCache`); reads block via `SetOnce[*Cache].WaitWithContext`, the goroutine owns and closes the memfd. The diff metadata/header still comes back synchronously so `AddSnapshot`/`NewUpload` keep working unchanged. Also coalesces contiguous dirty pages in `drainDirtyPages` (mirrors `Cache.copyProcessMemory`) and moves the best-effort `IsCached`/`uuid.Nil` check to per-page granularity so a single uncached neighbour no longer poisons cached pages of the same block. Integration matrix wires `TESTS_USE_MEMFD` so two of the three variants exercise the new async path end-to-end.
Removes the `memory` and `populate_redis` Storage implementations along with the in-memory `ReservationStorage`, the `SANDBOX_STORAGE_BACKEND` config knob, and all related Terraform/HCL/CI plumbing. - Drop `Name()` from the Storage interface and the related `StorageName*` constants. - Simplify `Store.Add` and `Store.Reconcile` (orphan-kill only). - Port store/orchestrator unit tests to spin up a redis testcontainer via `shared/pkg/redis.SetupInstance`. --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Petr Vaněk <petr.vanek@e2b.dev>
e2b-dev#2814 detached only the dedup drain; the page-by-page compare and the diff header build still ran synchronously on the Pause RPC, so deduped pauses still scaled with dirty-page count and base-layer fetch latency. Wrap `Snapshot.{Memfile,Rootfs}DiffHeader` in a `*utils.SetOnce[*header.Header]`. The memfd-dedup goroutine now resolves the header after compare; all other paths resolve it sync before returning. `storageTemplate.Fetch` and the upload paths Wait on the future, so the Pause RPC returns before compare/drain finishes.
…#2820) Add .env.local template and build-debug Makefile target to match the conventions used in packages/api for local development.
…v#2822) `NormalizeMappings` returns its working slice (`cap == len(input)`), and the merged `Header` is held in the orchestrator template cache for up to 25h. On snapshot-heavy nodes that unused trailing capacity is what's dominating retained heap. Clone before returning so only the exact-size copy survives.
levb
force-pushed
the
lev-storage-rationalize
branch
from
May 26, 2026 17:45
354b7fa to
aa41f01
Compare
Unify the storage read path on one RangeReader interface (io.Reader + Close(ctx)) so no wrapper stores a context. Cross-cutting read concerns — OTEL timer/span/gauge, cancellation, and decompression — collapse into a single `reader` configured by with* builder methods; backend leaves are adapted via NewRangeReader.
levb
force-pushed
the
lev-storage-rationalize
branch
from
May 26, 2026 18:23
aa41f01 to
92433bf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fold the timer/span/gauge/cancel reader wrappers into one instrumentedReader with with* options, and gather the offset/section adapters into io_wrappers.go. Each OpenRangeReader result is now wrapped exactly once.