ROX-33792: perf(build): combine roxctl and roxagent builds per arch#19781
Closed
ROX-33792: perf(build): combine roxctl and roxagent builds per arch#19781
Conversation
…ecture Build roxctl and roxagent together in a single go build invocation for each Linux architecture, following the pattern from main-build-nodeps. Problem: - CLI builds invoked go build separately for roxctl and roxagent on each architecture - 8 separate build invocations for Linux (4 roxctl + 4 roxagent) - Go toolchain restarted for each binary - Common dependencies recompiled multiple times - No build cache sharing within same architecture Solution: - Created cli_linux-% pattern rule that builds both binaries together - Single go build with multiple package paths: ./roxctl ./compliance/virtualmachines/roxagent - roxctl-linux and roxagent-linux now depend on combined targets - Preserves existing pattern rules for backward compatibility and darwin/windows builds Performance (warm cache, 4 Linux architectures): - Old approach (separate builds): 10m 6s - New approach (sequential): 2m 18s → 4.4x faster - New approach (make -j 2): 1m 6s → 9.2x faster - New approach (make -j 4): 37s → 16.4x faster Similar pattern used in: - main-build-nodeps: builds 9 binaries in one invocation - PR #19417: consolidated operator build Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Contributor
Author
|
It's not that much faster in CI |
Contributor
|
Images are ready for the commit at d087c94. To use with deploy scripts, first |
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.
Description
Build roxctl and roxagent together in a single go build invocation for each Linux architecture, following the pattern from main-build-nodeps.
Problem:
Solution:
Performance (warm cache, 4 Linux architectures):
Similar pattern used in:
User-facing documentation
Testing and quality
Automated testing
How I validated my change
CI