Repository navigation
fix(ci): use project deploy tokens for GitLab - #13849
Merged
Merged
Conversation
GitLab automatically revokes user PATs when it detects that they were leaked. That is what these private repository tests used, and both tokens were revoked. GitLab does not document the same automatic response for project deploy tokens. Replace the PATs with read-only deploy tokens scoped to the test project. Deploy tokens use a username and token pair, so pass the matching username through each Git authentication path. These credentials are intentionally committed for end-to-end tests. They can only read one disposable test repository, which contains no private code or data, so exposing them does not grant access beyond the test fixture. Keep both credentials in the shared VCS fixture so future rotations happen in one place. The second token is still needed to test two different credentials for the same repository. Signed-off-by: Guillaume de Rouville <[email protected]>
deploy tokens for GitLab
sipsma
approved these changes
Aug 6, 2026
sipsma
pushed a commit
to sipsma/dagger
that referenced
this pull request
Aug 13, 2026
GitLab automatically revokes user PATs when it detects that they were leaked. That is what these private repository tests used, and both tokens were revoked. GitLab does not document the same automatic response for project deploy tokens. Replace the PATs with read-only deploy tokens scoped to the test project. Deploy tokens use a username and token pair, so pass the matching username through each Git authentication path. These credentials are intentionally committed for end-to-end tests. They can only read one disposable test repository, which contains no private code or data, so exposing them does not grant access beyond the test fixture. Keep both credentials in the shared VCS fixture so future rotations happen in one place. The second token is still needed to test two different credentials for the same repository. Signed-off-by: Guillaume de Rouville <[email protected]> (cherry picked from commit 66337ba) Signed-off-by: Erik Sipsma <[email protected]>
sipsma
added a commit
that referenced
this pull request
Aug 13, 2026
* fix(telemetry): hide registry HTTP noise in the TUI Registry pulls, resolves, and pushes spawn dozens of low-level HTTP request spans from containerd and otelhttp instrumentation, flooding the TUI when a user expands a container.from call. Mark the pulling, resolving, and pushing spans with Encapsulate so their children are hidden, and stop revealing encapsulated failures when the parent span succeeded: the registry auth dance always begins with a 401 challenge that otherwise renders as a scary failed span. Genuinely failed pulls still reveal the underlying HTTP spans for debugging. Signed-off-by: Alex Suraci <[email protected]> (cherry picked from commit b9cdb66) Signed-off-by: Erik Sipsma <[email protected]> * chore: add v0.21.9 release note for #13410 Signed-off-by: Erik Sipsma <[email protected]> * test: use project deploy tokens for GitLab (#13849) GitLab automatically revokes user PATs when it detects that they were leaked. That is what these private repository tests used, and both tokens were revoked. GitLab does not document the same automatic response for project deploy tokens. Replace the PATs with read-only deploy tokens scoped to the test project. Deploy tokens use a username and token pair, so pass the matching username through each Git authentication path. These credentials are intentionally committed for end-to-end tests. They can only read one disposable test repository, which contains no private code or data, so exposing them does not grant access beyond the test fixture. Keep both credentials in the shared VCS fixture so future rotations happen in one place. The second token is still needed to test two different credentials for the same repository. Signed-off-by: Guillaume de Rouville <[email protected]> (cherry picked from commit 66337ba) Signed-off-by: Erik Sipsma <[email protected]> --------- Signed-off-by: Alex Suraci <[email protected]> Signed-off-by: Erik Sipsma <[email protected]> Signed-off-by: Guillaume de Rouville <[email protected]> Co-authored-by: Alex Suraci <[email protected]> Co-authored-by: Guillaume de Rouville <[email protected]>
sipsma
pushed a commit
to sipsma/dagger
that referenced
this pull request
Aug 13, 2026
GitLab automatically revokes user PATs when it detects that they were leaked. That is what these private repository tests used, and both tokens were revoked. GitLab does not document the same automatic response for project deploy tokens. Replace the PATs with read-only deploy tokens scoped to the test project. Deploy tokens use a username and token pair, so pass the matching username through each Git authentication path. These credentials are intentionally committed for end-to-end tests. They can only read one disposable test repository, which contains no private code or data, so exposing them does not grant access beyond the test fixture. Keep both credentials in the shared VCS fixture so future rotations happen in one place. The second token is still needed to test two different credentials for the same repository. Signed-off-by: Guillaume de Rouville <[email protected]> (cherry picked from commit 66337ba) Signed-off-by: Erik Sipsma <[email protected]>
sipsma
pushed a commit
to sipsma/dagger
that referenced
this pull request
Aug 13, 2026
GitLab automatically revokes user PATs when it detects that they were leaked. That is what these private repository tests used, and both tokens were revoked. GitLab does not document the same automatic response for project deploy tokens. Replace the PATs with read-only deploy tokens scoped to the test project. Deploy tokens use a username and token pair, so pass the matching username through each Git authentication path. These credentials are intentionally committed for end-to-end tests. They can only read one disposable test repository, which contains no private code or data, so exposing them does not grant access beyond the test fixture. Keep both credentials in the shared VCS fixture so future rotations happen in one place. The second token is still needed to test two different credentials for the same repository. Signed-off-by: Guillaume de Rouville <[email protected]> (cherry picked from commit 66337ba) Signed-off-by: Erik Sipsma <[email protected]>
This was referenced Aug 13, 2026
sipsma
pushed a commit
to sipsma/dagger
that referenced
this pull request
Aug 13, 2026
GitLab automatically revokes user PATs when it detects that they were leaked. That is what these private repository tests used, and both tokens were revoked. GitLab does not document the same automatic response for project deploy tokens. Replace the PATs with read-only deploy tokens scoped to the test project. Deploy tokens use a username and token pair, so pass the matching username through each Git authentication path. These credentials are intentionally committed for end-to-end tests. They can only read one disposable test repository, which contains no private code or data, so exposing them does not grant access beyond the test fixture. Keep both credentials in the shared VCS fixture so future rotations happen in one place. The second token is still needed to test two different credentials for the same repository. Signed-off-by: Guillaume de Rouville <[email protected]> (cherry picked from commit 66337ba) Signed-off-by: Erik Sipsma <[email protected]>
sipsma
pushed a commit
to sipsma/dagger
that referenced
this pull request
Aug 13, 2026
GitLab automatically revokes user PATs when it detects that they were leaked. That is what these private repository tests used, and both tokens were revoked. GitLab does not document the same automatic response for project deploy tokens. Replace the PATs with read-only deploy tokens scoped to the test project. Deploy tokens use a username and token pair, so pass the matching username through each Git authentication path. These credentials are intentionally committed for end-to-end tests. They can only read one disposable test repository, which contains no private code or data, so exposing them does not grant access beyond the test fixture. Keep both credentials in the shared VCS fixture so future rotations happen in one place. The second token is still needed to test two different credentials for the same repository. Signed-off-by: Guillaume de Rouville <[email protected]> (cherry picked from commit 66337ba) Signed-off-by: Erik Sipsma <[email protected]>
sipsma
added a commit
that referenced
this pull request
Aug 13, 2026
* docs: design metadata-aware cache pruning Signed-off-by: Erik Sipsma <[email protected]> (cherry picked from commit 615a02d) * docs: refine metadata pruning design Signed-off-by: Erik Sipsma <[email protected]> (cherry picked from commit b087da9) * docs: rewrite metadata pruning design Signed-off-by: Erik Sipsma <[email protected]> (cherry picked from commit fa45dbd) * docs: clarify metadata pruning execution Signed-off-by: Erik Sipsma <[email protected]> (cherry picked from commit 0a46329) * docs: specify candidate snapshot locking Signed-off-by: Erik Sipsma <[email protected]> (cherry picked from commit d114c9a) * docs: simplify DAGQL metadata pruning design Signed-off-by: Erik Sipsma <[email protected]> (cherry picked from commit d801635) * docs: address metadata pruning council review Signed-off-by: Erik Sipsma <[email protected]> (cherry picked from commit 27fc2b5) * docs: clarify metadata pruning trigger and calibration Signed-off-by: Erik Sipsma <[email protected]> (cherry picked from commit dc1e998) * dagql: prune cache by metadata estimate Signed-off-by: Erik Sipsma <[email protected]> (cherry picked from commit 348fbe2) * engine: schedule DAGQL metadata pruning Signed-off-by: Erik Sipsma <[email protected]> (cherry picked from commit 4573145) * dagql: silence untriggered metadata prune output Signed-off-by: Erik Sipsma <[email protected]> (cherry picked from commit 73687bb) * test: cover automatic DAGQL metadata pruning Signed-off-by: Erik Sipsma <[email protected]> (cherry picked from commit 49c3302) * dagql: calibrate metadata class estimate Lower the class-slot coefficient to 768 bytes after the required 200k churn benchmark measured the 1024-byte hypothesis at a 2.199 estimate-to-post-GC-heap ratio. The calibrated coefficient measures 1.649 while preserving the approved structural formula and keeping a common one-million-entry graph above the 4 GiB trigger. Signed-off-by: Erik Sipsma <[email protected]> (cherry picked from commit c81de1c) * test: benchmark DAGQL metadata pruning Signed-off-by: Erik Sipsma <[email protected]> (cherry picked from commit ca83937) * docs: document DAGQL metadata pruning Signed-off-by: Erik Sipsma <[email protected]> (cherry picked from commit d032d00) * engine: tighten metadata pruning correction coverage Signed-off-by: Erik Sipsma <[email protected]> (cherry picked from commit 686e238) * test: measure sparse metadata class compaction Signed-off-by: Erik Sipsma <[email protected]> (cherry picked from commit 938cc52) * test: keep metadata pruning workload active longer Signed-off-by: Erik Sipsma <[email protected]> (cherry picked from commit 3b5780b) * docs: clarify metadata pruning calibration defaults Signed-off-by: Erik Sipsma <[email protected]> (cherry picked from commit 06c452b) * engine: satisfy cache pruning lints Signed-off-by: Erik Sipsma <[email protected]> (cherry picked from commit b19467f) * chore: adapt metadata pruning backport for v0.21 Signed-off-by: Erik Sipsma <[email protected]> * test: use project deploy tokens for GitLab (#13849) GitLab automatically revokes user PATs when it detects that they were leaked. That is what these private repository tests used, and both tokens were revoked. GitLab does not document the same automatic response for project deploy tokens. Replace the PATs with read-only deploy tokens scoped to the test project. Deploy tokens use a username and token pair, so pass the matching username through each Git authentication path. These credentials are intentionally committed for end-to-end tests. They can only read one disposable test repository, which contains no private code or data, so exposing them does not grant access beyond the test fixture. Keep both credentials in the shared VCS fixture so future rotations happen in one place. The second token is still needed to test two different credentials for the same repository. Signed-off-by: Guillaume de Rouville <[email protected]> (cherry picked from commit 66337ba) Signed-off-by: Erik Sipsma <[email protected]> --------- Signed-off-by: Erik Sipsma <[email protected]> Signed-off-by: Guillaume de Rouville <[email protected]> Co-authored-by: Guillaume de Rouville <[email protected]>
sipsma
added a commit
that referenced
this pull request
Aug 13, 2026
…tdown path (#13884) * fix(engine): decouple active-clients API from session lifecycle locks (#13542) The active-clients API (engine.clients, polled by the cloud keepalive) and the client-DB GC ticker acquired each session's stateMu. That lock is held across the entire session/client initialization and across removeDaggerSession teardown (which has a 60s safeguard). A single session stuck initializing or tearing down therefore stalled the active-clients enumeration for ALL sessions, so the keepalive could age past the cloud's 15s inactivity timeout and the consolidator would suspend a live engine, crashing connected clients. Hard-cut the session/client lock model so observer paths never touch a per-session lifecycle lock: - Session identity (sessionID, mainClientCallerID) is immutable, set at construction before the session is published into the registry. - Session state is an atomic, read lock-free by observers. - The per-session lock (renamed stateMu -> lifecycleMu) serializes only init and teardown; no observer path acquires it. - Clients / activeClientIDs / clientFromIDs read atomic state + immutable identity (plus a brief clientMu for the client map), never lifecycleMu, so they can never stall on a session in init or teardown. - Teardown stores state=removed first, leaves the session in the registry as a tombstone during cleanup, and pointer-conditionally deletes it only after lifecycleMu is released. This also fixes a latent same-id resurrection race in the old code, which deleted the session from the registry before releasing its session-scoped cache. - getOrInitClient fast-path returns a retryable error for a removed tombstone without taking lifecycleMu; the new session locks lifecycleMu before publication (init-owner guarantee); clients are inserted only after full initialization; the client DB is opened outside clientMu. - GracefulStop snapshots session pointers into a slice before iterating. Adds -race regression tests for the active-clients stall, the same-id fast-return on a removed tombstone, clientFromIDs state gating, and a lifecycle/observer concurrency stress test; adapts the #13474 concurrent-map and init-window race tests to the new field types. Signed-off-by: Erik Sipsma <[email protected]> (cherry picked from commit 0e21927) Signed-off-by: Matias Pan <[email protected]> * fix(engine): take session teardown off the client shutdown path The main client's /shutdown POST could exceed the CLI's shutdown budget (default 10s) even though the run itself succeeded, failing CI jobs at cleanup with: shutdown: do shutdown: Post "http://dagger/shutdown": context deadline exceeded The mechanism: serveShutdown's beginClosing() cancels the main client's session-attachables request, so the /shutdown POST is usually the main client's last active connection. Its per-request cleanup then ran the entire removeDaggerSession synchronously — in the request handler, before the response is flushed. Teardown is unbounded: the dagql cache release alone walks every session-owned result and runs their release funcs sequentially (one production trace showed ~11.8k buildkit ref releases consuming the whole budget on an engine with ~188k live cache entries). The symptom disappears on a fresh cache and scales with parallelism, matching user reports on 0.21.7. Schedule teardown on a background reaper instead of running it in the request's cleanup. The reaper re-makes the teardown decision under lifecycleMu (state still initialized, main client still at zero active connections), so a reconnect that lands between the last disconnect and the reap abandons the reap, duplicate reaps no-op via the removed state, and GracefulStop coordinates through lifecycleMu exactly as before. The removed-tombstone machinery already keeps same-id reconnects safe during background teardown (retryable error until the tombstone drops). The client-critical drain (workspace lock flush, service stop, session-wide telemetry flush) still runs synchronously in serveShutdown before the response; only the engine-internal reclamation moves off the ACK path. Adds -race regression tests: last-disconnect cleanup returns while teardown is blocked mid-drain, same-id connects during background teardown fail retryable and the tombstone survives until teardown completes, a reconnect abandons a scheduled reap, and concurrent reaps tear down exactly once. Signed-off-by: Erik Sipsma <[email protected]> (cherry picked from commit b395309) * chore: add v0.21.9 release note for #13681 Signed-off-by: Erik Sipsma <[email protected]> * test(engine): adapt teardown fixtures for v0.21 Signed-off-by: Erik Sipsma <[email protected]> * test: use project deploy tokens for GitLab (#13849) GitLab automatically revokes user PATs when it detects that they were leaked. That is what these private repository tests used, and both tokens were revoked. GitLab does not document the same automatic response for project deploy tokens. Replace the PATs with read-only deploy tokens scoped to the test project. Deploy tokens use a username and token pair, so pass the matching username through each Git authentication path. These credentials are intentionally committed for end-to-end tests. They can only read one disposable test repository, which contains no private code or data, so exposing them does not grant access beyond the test fixture. Keep both credentials in the shared VCS fixture so future rotations happen in one place. The second token is still needed to test two different credentials for the same repository. Signed-off-by: Guillaume de Rouville <[email protected]> (cherry picked from commit 66337ba) Signed-off-by: Erik Sipsma <[email protected]> --------- Signed-off-by: Erik Sipsma <[email protected]> Signed-off-by: Matias Pan <[email protected]> Signed-off-by: Guillaume de Rouville <[email protected]> Co-authored-by: Guillaume de Rouville <[email protected]>
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.
GitLab automatically revokes user PATs when it detects that they were leaked. That is what these private repository tests used, and both tokens were revoked. GitLab does not document the same automatic response for project deploy tokens.
Replace the PATs with read-only deploy tokens scoped to the test project. Deploy tokens use a username and token pair, so pass the matching username through each Git authentication path.
These credentials are intentionally committed for end-to-end tests. They can only read one disposable test repository, which contains no private code or data, so exposing them does not grant access beyond the test fixture.
Keep both credentials in the shared VCS fixture so future rotations happen in one place. The second token is still needed to test two different credentials for the same repository.