feat: Modularize SystemStatus to allow custom backpressure mechanisms#3529
feat: Modularize SystemStatus to allow custom backpressure mechanisms#3529
Conversation
nikitachapovskii-dev
left a comment
There was a problem hiding this comment.
Thank you so much for addressing this problem, I really appreciate it!
| if (BUILTIN_SIGNAL_NAMES.has(signal.name)) { | ||
| (result as any)[signal.name] = info; | ||
| } else { |
There was a problem hiding this comment.
I’m a bit puzzled about loadSignals.
If I understand it correctly, SystemStatus now evaluates both:
the built-in signals coming from Snapshotter and
user-provided signals passed via systemStatusOptions.loadSignals
And if a user provides a custom signal named e.g. memInfo, cpuInfo, it will overwrite the corresponding built-in field in the resulting SystemInfo?
Is that expected, or should the built-in signals remain reserved?
There was a problem hiding this comment.
Well, I think we should let users overwrite the default memory/cpu/... signals if they know what they're doing. If everyone agrees, I guess let's sure that that's really the case and document it properly.
Thanks @l2ysho, added two basic ones to autoscaled pool test suite. |
LoadSignalinterface andSnapshotStorewithfromInterval/fromEventfactories, rewired the four built-in resources as signal implementations, and madeSystemStatusiterate over all signals in one loop. New signals like navigation timeouts can now be passed in viasystemStatusOptions.loadSignalswith zero changes to the core.AutoscaledPool