feat(size): Drive binary analysis worker count from sentry-options - #672
Merged
Conversation
The pool-versus-serial decision for Apple per-binary analysis was a deploy-time env var, so flipping a region back to the serial path or trimming workers to fit a smaller pod meant an ops change and a rollout. Move it to a `size.binary_analysis.workers` option so the value can change per region without a redeploy; 0 keeps the previous in-process behaviour. The processor reads the option when it builds the analyzer and passes it as a constructor argument, so the size package stays free of the options client and the CLI keeps the default of four.
Contributor
Size Analysis1 component analyzed, 1 component processing iOS Builds
Android Builds
|
Contributor
📲 Install BuildsiOS
Android
|
jshchnz
approved these changes
Sep 4, 2026
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.
Follow-up to #663 and #671. The choice between the process pool and the old in-process path for Apple per-binary analysis was controlled by a deploy-time env var. Changing it meant an ops PR and a rollout, which is the wrong shape for a rollout lever: the point of the switch is to flip a region back to serial quickly if the parallel path misbehaves, or to trim workers for a region with smaller pods, without redeploying.
This moves the knob to a sentry-option,
size.binary_analysis.workers, using the wiring from #668. It's an integer with a schema default of 4; 0 selects the in-process path. The processor reads the option when it builds the analyzer and passes it as a constructor argument alongside the existingskip_*flags, so the size package stays free of the options client, the CLI keeps the default of four, and each task picks up the current value. The env var and its parsing are removed rather than kept as a second knob.The paired getsentry/sentry-options-automator#9609 sets the value explicitly to 4 in launchpad's default values, so a later change, or a region override such as 0 for a serial baseline or 2 for a memory-constrained region, is a one-line edit there. That PR validates against this schema, so it merges after this one.
Tests: unit tests on the analyzer factory for the schema default and an overridden value via
override_options, following theprojects.skiptests; the worker-count and in-process-versus-parallel equivalence integration tests now set the count through the constructor, as do the worker-logging tests.