Skip to content

feature: exported task resolver status types #183

Description

@cb80

Feature Description

In the registry we were missing logs when a task got cancelled. This happened because in the registry config a region was allowed in the validation rules, but was missing as target. It took us a while to figure this out. As a workaround we implemented openkcm/registry#189 but it would be better being able to log this in a more central place. But the TaskResolveFunc returns a private struct, which we cannot inspect in such a central place.

Proposed Solution

Proposal: Let the TaskResolveFunc return (or directly return) an exported struct, which represent the status of the task.
Goal: Enable consumers to inspect the exported struct to be able to log appropriately. E.e.:

switch taskStatus {
case TaskResolverCancelled:
    // log error
case TaskResolverContinue:
    // log warning
case TaskResolverComplete:
    // log success
}

Alternative Solutions

No response

Want to contribute?

  • I would like to work on this issue.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions