Skip to content

include_patterns ignored unless at least one project has direct changes #2485

@sidpalas

Description

@sidpalas

While include_patterns is mostly working after #2430... I noticed that it only functions properly if at least one project has a change within it.

NOTE: This may only impact blocks with terragrunt: true

My digger.yml contains:

generate_projects:
  blocks:
    # terraform/live/{env}/{region}/{project}
    - include: "terraform/live/*/*/**"
      exclude: "**/.terraform/**"
      root_dir: "terraform/live/"
      terragrunt: true
      workflow: "default"
      workflow_file: digger-workflow.yml
      include_patterns:
        - terraform/modules/**
        - digger.yml

The behavior I am seeing:

  1. Case 1: Modify a file within a project but NOT any files that match any include_patterns patterns:

    • ✅ The single project which contains the modification is planned
  2. Case 2: Modify a file within a project AND a files that matches an include_patterns pattern

    • ✅ All projects are planned
  3. Case 3: Modify a file that matches an include_patterns pattern, but DO NOT modify any files within any projects directly

    • ❌ No projects are planned

Additional context on previous bug in this issue: #2383

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