Skip to content

Mark objects as stale based on time-since logic rather than during polling #29

Description

@arikkfir

Currently, when we update the state of an object, e.g. a Repository object, by polling its provider for updates, it will be marked as Stale=Unknown for the duration of the check.

This means that the condition will keep popping up during the validation cycle - even if there are no errors and the object is updated on schedule.

Instead, we can mark objects as Stale only if a certain amount of time has passed when no successful validation has been achieved. For instance, let's say we have a Repository object with a refresh interval of 5m - we can mark it as stale if the Repository cannot be successfully polled for changes for more than 10 minutes.

This ensures that conditions really do represent an error (or potential error) state.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions