Repository navigation
benchmarking(boomer): disentangle dynConfig - #2160
Merged
Haven Xia (HavenXia) merged 1 commit intoOct 16, 2026
Merged
Conversation
Max Smythe (maxsmythe)
requested a review
from Aditya Shantanu (aditya-shantanu)
October 3, 2026 18:59
Max Smythe (maxsmythe)
force-pushed
the
dynconfig-json
branch
2 times, most recently
from
October 7, 2026 22:27
eeffb42 to
e3a5337
Compare
Aditya Shantanu (aditya-shantanu)
approved these changes
Oct 7, 2026
2 tasks done
Tim Hockin (thockin)
previously approved these changes
Oct 13, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Oct 13, 2026
Max Smythe (maxsmythe)
force-pushed
the
dynconfig-json
branch
from
October 14, 2026 22:38
e3a5337 to
cdfcd5b
Compare
haiyanmeng
approved these changes
Oct 14, 2026
haiyanmeng
left a comment
Collaborator
There was a problem hiding this comment.
The changes to resumepaused user class looks good to me
2 tasks done
Haven Xia (HavenXia)
previously approved these changes
Oct 15, 2026
Haven Xia (HavenXia)
enabled auto-merge
October 15, 2026 17:20
Max Smythe (maxsmythe)
force-pushed
the
dynconfig-json
branch
from
October 16, 2026 00:54
cdfcd5b to
0ee2c78
Compare
Max Smythe (maxsmythe)
force-pushed
the
dynconfig-json
branch
from
October 16, 2026 01:40
0ee2c78 to
fd9fcda
Compare
…e config dynconfig had become one struct of every knob every user class ever needed, with a payload mirror, a merge, a validator, and a log line that all had to grow by hand for each new field, and every class saw and was checked against every other class's knobs. The payload is now an arbitrary JSON object, and a worker runs exactly one user class, known at launch. So each class declares the keys it reads as a struct with json tags, wraps it in a dynconfig.Typed codec with its defaults and its validation func, and registers the codec with its userclass.Entry. The worker builds the holder from that codec; the holder stores the typed value, decodes each payload over the class's defaults, refuses a payload the class cannot run on, an empty body included, in favor of the last good config, and hands the class its knobs back through dynconfig.Get. Keys the class does not name are ignored. The wait window and the resume and lifecycle modes are shared pieces a class embeds; durations travel as seconds, the unit the locust flags use, and print as durations in the applied-config log line, which reports the snapshot the payload stored rather than whatever a concurrent fetch put there since. Each payload stands on its own. The master serves every flag it knows, null for the ones the operator left blank, so a field cleared in the web form takes its knob back to the class default. The old merge over the running value kept the last set value instead, with no way back to the default short of a restart. The startup --config-json still names only the keys the run sets, and the rest start at the defaults as before. The GluttonUser defaults the worker used to seed from main.go (a 500ms max wait, one ping per wake) live in that class's codec now, and the durdir read modes move into the glutton package with the class that reads them. Each class's codec has a test that decodes every key it reads and refuses the values the old shared validator refused.
Max Smythe (maxsmythe)
force-pushed
the
dynconfig-json
branch
from
October 16, 2026 21:16
fd9fcda to
4dc32f7
Compare
Aditya Shantanu (aditya-shantanu)
approved these changes
Oct 16, 2026
Zoe Zhao (zoez7)
approved these changes
Oct 16, 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.
dynconfig had become one struct of every knob every user class ever needed, with a payload mirror, a merge, a validator, and a log line that all need to grow by hand for each new field, and every class saw and was checked against every other class's knobs.
The payload is now an arbitrary JSON object, and a worker runs exactly one user class, known at launch. So each class declares the keys it reads as a struct with json tags, wraps it in a dynconfig.Typed codec with its defaults and its validation func, and registers the codec with its userclass.Entry. The worker builds the holder from that codec; the holder stores the typed value, folds each payload into it with one decode over the current value (so an absent or null key keeps what it had), refuses a payload the class cannot run on in favor of the last good config, and hands the class its knobs back through dynconfig.Get. Keys the class does not name are ignored. The wait window and the resume and lifecycle modes are shared pieces a class embeds; durations travel as seconds, the unit the locust flags use.
Now we can implement user classes more independently of each other.