HealthCheck: add validation for minimum accepted start-interval (1ms)#46646
HealthCheck: add validation for minimum accepted start-interval (1ms)#46646neersighted merged 1 commit intomoby:masterfrom
Conversation
|
Also wondering if setting a start-interval without a StartPeriod (or StartInterval > StartPeriod ) should be an error-condition 🤔 wdyt? |
cpuguy83
left a comment
There was a problem hiding this comment.
This seems ok however I think the absolute minimum would need to be 1s and that is pushing it.
Really I guess the API type should be in seconds, I just copied what we'd already had for interval IIRC.
|
Yeah, the currently minimum is quite short. ISTR we had some discussion around that when it was originally implemented, and at the time 1 second was considered possibly too long (or we didn't want to be too restrictive), and we chose to at least set "some" minimum to prevent the accidental invalid value (the integer being used as 'seconds' by the user.. ) Changing the API to use seconds may have been better in hindsight, but I guess that ship has sailed (although second MAY be too large of a precision?) |
|
For a slight bit of context; I arrived here when I was revendoring moby in BuildKit, and noticed that it was using the So, I was considering to;
|
This is a follow-up to 2216d3c, which implemented the StartInterval for health-checks, but did not add validation for the minimum accepted interval; > The time to wait between checks in nanoseconds during the start period. > It should be 0 or at least 1000000 (1 ms). 0 means inherit. This patch adds validation for the minimum accepted interval (1ms). Signed-off-by: Sebastiaan van Stijn <[email protected]>
ab148fa to
2df6980
Compare
This is a follow-up to 2216d3c (#40894), which implemented the StartInterval for health-checks, but did not add validation for the minimum accepted interval;
This patch adds validation for the minimum accepted interval (1ms).
- What I did
- How I did it
- How to verify it
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)