Skip to content

Feature Request: Allow cancellation of running applier/destroyer tasks #440

@karlkfi

Description

@karlkfi

Currently, the baserunner handles context cancellation, but the only task it can currently interrupt is WaitTask, which it does by calling private methods (eww).

As a user who uses the global context for cancellation/timeout, I want to be able to interrupt the applier/destoryer and have it exit quickly, without finishing the ApplyTask/PruneTask.

Solution:

  • Pass context to tasks by adding it to the TaskContext
  • Update all tasks to handle context.Done() and exit early
  • Update all tasks to pass the context to all network calls, so they also can be cancelled (most already take a context)
  • Add a Task method to handle status events, so WaitTask can exit early.

Metadata

Metadata

Assignees

No one assigned

    Labels

    lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions