Cancel semantics for AgentRun and AgentWorkflowRun

Open
#65 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
52/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
go, kubernetes

Research direction

Start by reading ADR 0006, then locate the AgentRun and AgentWorkflowRun resource definitions and their controllers. Trace the Hub cancel handler and the pending and running controller paths. Done means cancel requests revoke the Hub API token, set spec.cancel, produce the Cancelled phase, avoid creating pending Sandboxes, delete running Sandboxes, and clean up tokens and Secrets idempotently.

Written by the indexing model from the issue text.

Description

enhancement

Add cancellation support for AgentRun and AgentWorkflowRun.

Design (per ADR 0006)

  • Add spec.cancel field to AgentRun and AgentWorkflowRun
  • Add Cancelled phase to AgentRunPhase
  • Controller behavior on spec.cancel: true:
    • Running: delete the Sandbox, set phase to Cancelled
    • Pending (queued behind maxConcurrentRuns): no Sandbox exists; set phase to Cancelled immediately, preventing Sandbox creation
  • Token and Secret cleanup is idempotent in both cases

Hub side

  • Hub cancel handler (POST /hub/agent/runs/:name/cancel): revokes the Hub API token, then sets spec.cancel: true on the CR
  • The UI cancels runs (never deletes them)

References

Dominant language
Go
Stars
5
Forks
13
Avg merge
4d 2h
Merged PRs (30d)
27

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from konveyor/agentic-controller

All issues in konveyor/agentic-controller

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.