feat(sign-cache): increase default concurrency and add configurability#277
Merged
Conversation
Increase default signing concurrency from 5 to 20 concurrent operations to better utilize network I/O for Sigstore API calls. This provides ~4x faster signing for typical workloads. Changes: - Increase default maxConcurrency from 5 to 20 - Add --max-signing-concurrency flag for runtime configuration - Add LEEWAY_MAX_SIGNING_CONCURRENCY environment variable support - Implement proper flag/env var precedence (flag overrides env var) - Add automatic bounds validation (1-100 range) - Add comprehensive tests for env var/flag precedence and validation - Update help text with concurrency documentation and examples - Remove unused cmd parameter from runSignCache function The implementation follows existing Leeway patterns for environment variable handling (same as in-flight-checksums) and includes extensive test coverage. Co-authored-by: Ona <no-reply@ona.com>
geropl
approved these changes
Nov 14, 2025
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.
Summary
Increases default signing concurrency from 5 to 20 concurrent operations to better utilize network I/O for Sigstore API calls, providing ~4x faster signing for typical workloads.
Fixes https://linear.app/ona-team/issue/CLC-2084/improve-the-performance-of-attestation-signing-with-configurable
Changes
--max-signing-concurrencyflag: Runtime configuration (default: 20)LEEWAY_MAX_SIGNING_CONCURRENCYenv var: Environment-based configurationcmdparameter fromrunSignCachePerformance Impact
Implementation Details
Follows existing Leeway patterns:
cmd.Flags().Changed()pattern (same asin-flight-checksums)LEEWAY_*patternlog.WithField()Testing
All tests pass:
TestMaxSigningConcurrencyEnvironmentVariable- 8 test cases for env var/flag precedenceTestMaxSigningConcurrencyValidation- 6 test cases for bounds validationsign-cachetests continue to passgo test ./... -shortExamples