Skip to content

--actions flag does not support * wildcards despite CLI help text claiming it does #2224

Description

@IzakMaraisTAL

The dataform run help text for --actions states:

▎ A list of action names or patterns to run. Can include '*' wildcards.

In practice, no wildcard pattern is matched — not even a bare *.

Steps to reproduce:

dataform run --dry-run --actions "*"
dataform run --dry-run --actions "mrd*"
dataform run --dry-run --actions "*mrd_features*"

Expected: matches every/any action whose name contains the pattern.

Actual: Compiled successfully. followed by No actions to run. for every wildcard pattern tried, even though the target actions clearly exist in the compiled graph. Only an exact unqualified action name (e.g. --actions "mrd_features_inference") selects anything.

Root cause: matchPatterns in core/utils.ts does plain string equality only:

function matchPatterns(patterns: string[], values: string[]) {
  const fullyQualifiedActions: string[] = [];
  patterns.forEach(pattern => {
    if (pattern.includes(".")) {
      if (values.includes(pattern)) fullyQualifiedActions.push(pattern);
    } else {
      const matchingActions = values.filter(value => pattern === value.split(".").slice(-1)[0]);
      ...
    }
  });
  return fullyQualifiedActions;
}

There is no glob/regex handling of * anywhere in this function, so the documented wildcard behavior never executes.

Suggested fix: either implement glob matching in matchPatterns (e.g. via minimatch) to match the documented behavior, or update the --actions help text in cli/index.ts to remove the wildcard claim.

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