ct-test-srv: cap tracked submissions#8752
Open
mcpherrinm wants to merge 3 commits into
Open
Conversation
When using long-running test environments, ct-test-srv grows until it OOMs, which is causing some noise in my efforts to right-size memory usage.
There was a problem hiding this comment.
Pull request overview
This PR attempts to bound memory growth in ct-test-srv by capping the number of distinct hostnames tracked for CT submission counts.
Changes:
- Adds a
submissionsCapfield andSubmissionsCapconfig option. - Moves submission-count update logic into a helper intended to enforce the cap.
- Defaults the cap to 100 when unset.
Comments suppressed due to low confidence (2)
test/ct-test-srv/main.go:175
- The helper indexes the map with
hostnames, but that identifier is only local toaddChainOrPreand is not in scope here. This causes a compile error and also ignores thehostnameargument.
_, ok := is.submissions[hostnames]
if ok || len(is.submissions) < is.submissionsCap {
is.submissions[hostnames]++
test/ct-test-srv/main.go:169
- After removing the inline increment from
addChainOrPre, this new helper is never called anywhere in the package. Even if the compile errors are fixed, successful CT submissions will no longer updateis.submissions, so/submissionswill always return 0 for new hosts.
func (is *integrationSrv) addSubmission(hostname String) {
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+224
to
+226
| cap := p.SubmissionsCap | ||
| if cap == 0 { | ||
| cap = 100 |
Comment on lines
+174
to
+177
| _, ok := is.submissions[hostnames] | ||
| if ok || len(is.submissions) < is.submissionsCap { | ||
| is.submissions[hostnames]++ | ||
| } |
Contributor
Author
There was a problem hiding this comment.
that's the idea. I don't think evicting or reset is useful for integration tests
jsha
reviewed
May 18, 2026
Contributor
jsha
left a comment
There was a problem hiding this comment.
Looks good in general. For Boulder CI let's configure the cap to something ludicrous like 1M. If we add test cases in the future that do lots more issuance, I don't want to wind up with a mysterious flake because sometimes we hit the cap and sometimes don't.
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.
When using long-running test environments, ct-test-srv grows until it OOMs, which is causing some noise in my efforts to right-size memory usage.