Skip to content

tkn customrun delete exits 0 and silently succeeds when resource is not found #3329

Description

@ankrsinha

Description

tkn customrun delete does not fail when one or more given names are missing. It prints a "not found" message and still succeeds. Task and Pipeline delete fail the command in the same situation, in both text mode and -o json/-o yaml.

Steps to Reproduce the Problem

  1. Run tkn customrun delete nonexistent -n ns
  2. Observe that a "not found" message is printed and the command succeeds

Actual Behavior

  • Missing names are printed to stderr and skipped.
  • The command still succeeds if no DELETE call fails.
  • Names that exist are deleted as usual.

Expected Behavior

  • Missing names still print a message and are skipped.
  • Names that exist are still deleted and reported.
  • The command fails if any name was not found, matching Task and Pipeline delete.

Additional Info

Found in review of #3318.

Task and Pipeline collect lookup errors (taskExists / pipelineExists) and return them after successful deletes. CustomRun prints the lookup error in deleteCustomRuns and continues without recording it.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions