Skip to content

Support for excluding entire namespaces in addition to individual tasks #2300

@dgroh

Description

@dgroh

Description

Problem Statement

Currently, the excludes feature in Task only allows excluding individual tasks by their full names (e.g., "flight-recorder:start", "flight-recorder:dump"). This becomes cumbersome when you want to exclude all tasks within a specific namespace.

Current Behavior

version: "3"
includes:
  common:
    taskfile: ../common/Taskfile.yml
    excludes:
      - "flight-recorder:start"
      - "flight-recorder:dump"
      # Need to list each task individually

Desired Behavior

Allow excluding entire namespaces to simplify the configuration:

version: "3"
includes:
  common:
    taskfile: ../common/Taskfile.yml
    excludes:
      - "flight-recorder"  # Excludes all tasks in flight-recorder namespace

Use Case

When including a large taskfile with multiple namespaces, it's common to want to exclude entire groups of related tasks rather than listing each one individually.

This is especially useful for:

  • Excluding debugging/monitoring tools (like flight-recorder) from production services
  • Excluding development-only tasks from deployment pipelines
  • Excluding test suites that aren't relevant for certain contexts

Proposed Implementation

The excludes array could support both:

  • Individual task names (current behavior): "namespace:task"
  • Namespace patterns (new feature): "namespace" or "namespace:*"

Related

This builds upon the existing excludes feature introduced in #1859.

Metadata

Metadata

Assignees

No one assigned

    Labels

    state: needs triageWaiting to be triaged by a maintainer.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions