Skip to content

Add sanitization, validation, and basic tests for the error_count input parameter #172

Open

Description

@JamesMGreene

Add sanitization, validation, and basic tests for the error_count input parameter.

Some possible rules:

  • ensure it is a finite number
  • ensure it is greater than 0
  • [optional] ensure it is less than the finalized timeout input parameter value (which may be adjusted to MAX_TIMEOUT, depending on the user's input) divided by the finalized reporting_interval
    • That is optional as it's unlikely that every single status check will report a temporary recoverable error 🤷🏻
    • Also, allowing the users to specify a number greater than that gives them the opportunity to allow as many errors as possible before timing out, which is OK if that's what they really want 🤷🏻

Similar to the a part of the changes made for timeout as shown in PR:

See also:

Activity

  1. self-assigned this
    on May 22, 2023
  2. assigned and unassigned on Jun 13, 2023
  3. TWiStErRob commented on Oct 25, 2023

    @TWiStErRob

    ensure it is greater than 0

    Should this be >= 0? because 0 means I want to allow no errors. Having > 0 would force everyone to accept 1 error.

  4. JamesMGreene commented on Nov 21, 2023

    @JamesMGreene
    ContributorAuthor

    @TWiStErRob Understandable confusion, but the behavior you're describing would be achieved with error_count: 1. In other words, "fail on the first error".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions