Skip to content

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

Open

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.

Activity

  1. ihistand commented on Jul 16, 2026

    @ihistand

    I do have a good fix for this on a fork. If we'd like to fix it so the behavior matches the documentation, let me know I'd be glad to submit a PR. I don't have much of an opinion about fixing it one way or the other, mostly because I tend to manage my workflows using tags.

  2. kolina commented on Jul 25, 2026

    @kolina
    Contributor

    Feel free to send a PR :)

    But keep in mind that GCP Dataform behaviour of actions filter doesn't use open-source implementation

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions