Repository navigation
test: launch Unity two fewer times per integration test build - #2903
Draft
bitsandfoxes wants to merge 3 commits into
Draft
bitsandfoxes wants to merge 3 commits into
bitsandfoxes wants to merge 3 commits into
Conversation
bitsandfoxes
force-pushed
the
ci/cache-content-keys
branch
from
October 26, 2026 05:38
023a17d to
a8bef03
Compare
bitsandfoxes
force-pushed
the
ci/fewer-editor-launches
branch
from
October 26, 2026 06:25
6ee554e to
dc3fd9a
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.
The integration test build jobs now launch Unity two fewer times each, so they ask the floating license server for two fewer seats.
Every editor launch starts its own LicensingClient and acquires its own floating lease, and each acquisition can land in the "no valid Unity Editor license" retry loop. A build job launched the editor 4 times (3 for WebGL, Windows x86 and Windows Mono): add-sentry, configure-sentry, build #1, build #2. In the 30 days of green logs in the research, 65–86% of the build jobs had at least one license retry, and the mean retry sleep was ~9 min per job. Two of those four launches don't need an editor of their own:
add-sentry.ps1launched the editor only to callClient.Add("file:…"), which writes one line intoPackages/manifest.json. In the sampled logs that launch waited 9:26 and 3:05 for a seat.configure-sentry.ps1launched the editor only to runSentryEditorWindowInstrumentation.ConfigureOptions, which the first build launch can just as well do before it builds.How it works now:
add-sentry.ps1writes"io.sentry.unity": "file:../../../test-package-release"into the manifest with pwsh. The path is relative toPackages/, which UPM supports, so it resolves the same on the host and inside the Docker container. The next launch (the build) resolves and imports the package before it runs-executeMethod. The-installSentryhandler in the test project is gone.SentrySetup.csonly keptCommandLineArguments, so it's renamed after it.build-project.ps1 -ConfigureSentrypasses-optionsScript IntegrationOptionsConfiguration -cliOptionsScript CliConfiguration [-dsn …]to the build launch, expectsConfigureOptions: SUCCESSand keeps the check that both option assets exist.Builder.BuildIl2CPPPlayercalls the sameConfigureOptions()(by reflection, since the project is also built without Sentry) and saves the assets before it builds. The second build reads them from disk, like it did after configure-sentry.-ConfigureSentryandSENTRY_DSNto the first build with Sentry.configure-sentry.ps1is gone.integration-test.ps1configures in the first build when it created the project, which is when it ran configure-sentry before.That's 52 → 24 launches per PR run (+1 per job on a build-without-Sentry cache miss), and 2 fewer for each of the extra build jobs
mainruns.ci/uaal-integration-teststouches the same "Configure Sentry" steps. Its External build doesn't need-ConfigureSentry, because the options are already saved by then.Stacked on #2902.
CI evidence: run 40199161262 is green, including every Run job, which send events and assert symbol uploads with the options from the first build. In all 14 build jobs, add-sentry wrote
io.sentry.unity: file:../../../test-package-releasewithout a Unity launch, and the first build loggedBuilder: Configuring Sentry options→ConfigureOptions: SUCCESS. Editor launches with Sentry were 2 per job (1 for WebGL, Windows x86 and Windows Mono), 24 in total, against 52 in the previous run. The run also had a build-without-Sentry cache miss per job, since this PR changes files in its key, and on 6000.6 an existing exit-137 retry of that launch. Linux 6000.6 needed one rerun: its Native build succeeded, then Unity crashed on shutdown (signo:5afterCleanup mono, exit 133). That launch is unchanged here, and it passed on the rerun.Rebased onto #2907: run 40279729113 is green on the first attempt in 34.8 min.
🤖 Generated with Claude Code