🛠️ Tuist Run Report 🛠️
Tests 🧪
| Scheme | Status | Cache hit rate | Tests | Skipped | Ran | Commit |
|---|---|---|---|---|---|---|
| TuistAcceptanceTests | ✅ | 0 % | 193 | 0 | 193 | 0e9354493 |
Builds 🔨
| Scheme | Status | Duration | Commit |
|---|---|---|---|
| TuistAcceptanceTests | ✅ | 4m 54s | 0e9354493 |
| TuistUnitTests | ✅ | 5m 22s | 0e9354493 |
Hive
GitHub issue · Closed
This caps best-effort run metadata uploads at 15 seconds in both places where they can run:
analytics-upload command used by normal local commands.The command tracking path still keeps report-producing uploads on the existing foreground path. The new timeout applies only to best-effort uploads, logs a warning in the foreground case, and lets the completed command finish.
The retry provider now runs work in the caller task instead of wrapping each operation in an unstructured task. That lets cancellation from the upload deadline reach retry-wrapped server calls and retry sleeps promptly.
tuist install can run against a self-hosted server. When that server is slow or unhealthy, the command has already done its useful work, so run metadata upload should not make the process wait much longer than users expect.
The same principle applies outside continuous integration. Local commands already put non-required analytics into a background process, but that hidden process should also have a clear budget instead of lingering on a bad connection.
Fixes #11452.
Non-required analytics normally upload in a background process, but continuous integration forces the same upload into the foreground so the process can finish publishing metadata before the job exits. That made best-effort metadata share the same blocking behavior as required build and test reporting.
The background upload command also had no explicit total deadline. Local command latency was protected by backgrounding, but the spawned upload process could still spend too long waiting on a slow or unhealthy server.
The first timeout implementation exposed another issue: retry-wrapped uploads went through Task { ... }.value, so cancelling the caller did not cancel the in-flight retry operation. The deadline could log late, after the server call or retry loop had already finished waiting.
Required analytics still run without the new short deadline because they produce report links and job summaries. Best-effort uploads now get a 15 second total budget around the whole upload operation, whether they are foregrounded for continuous integration or executed by the hidden background upload command.
The background upload service keeps using its cleanup wrapper, so the temporary event file is removed even when the timeout fires.
Retry cancellation is preserved by keeping retry attempts in the caller task and treating CancellationError as a non-retryable result. That makes the upload deadline an actual upper bound for cooperative operations such as server requests and retry sleeps.
Commands such as tuist install can finish promptly when their configured server is slow or unhealthy. Outside continuous integration, the user-facing command was already decoupled from upload latency, and now the hidden upload process also stops promptly.
Build and test report uploads keep their previous behavior because their analytics are marked as required.
Retry callers now stop promptly when their parent task is cancelled instead of continuing in a detached task.
TUIST_CACHE_ENDPOINT=http://127.0.0.1:1 tuist installTUIST_CACHE_ENDPOINT=http://127.0.0.1:1 tuist generate TuistKitTests tuist ProjectDescription --no-open --cache-profile noneTUIST_CACHE_ENDPOINT=http://127.0.0.1:1 tuist generate TuistKitTests TuistServerTests tuist ProjectDescription --no-open --cache-profile nonexcodebuild test -workspace Tuist.xcworkspace -scheme Tuist-Workspace -only-testing TuistKitTests/TrackableCommandTests -only-testing TuistKitTests/AnalyticsUploadCommandServiceTests -only-testing TuistServerTests/RetryProviderTests CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY=""xcodebuild test -workspace Tuist.xcworkspace -scheme Tuist-Workspace -only-testing TuistKitTests/AnalyticsUploadCommandServiceTests CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY=""mise run cli:lint| Scheme | Status | Cache hit rate | Tests | Skipped | Ran | Commit |
|---|---|---|---|---|---|---|
| TuistAcceptanceTests | ✅ | 0 % | 193 | 0 | 193 | 0e9354493 |
| Scheme | Status | Duration | Commit |
|---|---|---|---|
| TuistAcceptanceTests | ✅ | 4m 54s | 0e9354493 |
| TuistUnitTests | ✅ | 5m 22s | 0e9354493 |