Skip to content

Vendor pull does not support double-star glob for exclusions or templating on the include/exclude list #835

Closed

Description

Describe the Bug

atmos vendor pull can't exclude subdirs.

If I have :

stacks/
  mystacks/
    us-east-1
     pepe1
     pepe2

and vendor yaml with :

exclude_paths:
  - "**/stacks/**/pepe2"

Atmos is not able to match the path of the subdir and it vendors all the files under pepe2 dir

it is also not possible to templatize the exclude or include paths, which is helpful when you have automated pipelines that can expose the names of dirs you want to exclude.

- "**/stacks/**/${exclude_me}"

That will be nice to have.

Atmos 1.110.0

Expected Behavior

Atmos should support regexes fully for the exclude and include paths

Steps to Reproduce

atmos vendor pull

Screenshots

No response

Environment

No response

Additional Context

No response

Activity

  1. added
    bug
    on Dec 9, 2024
  2. added
    feature
    and removed
    bug
    on Dec 9, 2024
  3. changed the title [-]Vendor pull do not support subdir regex for exclusion or templating on the include/exclude list[/-] [+]Vendor pull do not support subdir double-star glob for exclusion or templating on the include/exclude list[/+] on Dec 9, 2024
  4. changed the title [-]Vendor pull do not support subdir double-star glob for exclusion or templating on the include/exclude list[/-] [+]Vendor pull does not support double-star glob for exclusions or templating on the include/exclude list[/+] on Dec 9, 2024
  5. osterman commented on Dec 9, 2024

    @osterman
    Member

    PePe Amengual (@jamengual) in this example, I'm a little bit confused by this: ${exclude_me} as that's not Go templating syntax and not sure what you would be referring to.

  6. jamengual commented on Dec 9, 2024

    @jamengual
    ContributorAuthor

    PePe Amengual (@jamengual) in this example, I'm a little bit confused by this: ${exclude_me} as that's not Go templating syntax and not sure what you would be referring to.

    My vendor file uses :

    - source: 'git::https://x-access-token:{{env "GITHUB_TOKEN"}}@github.com/ORG/pepe-iac.git'

    where the token comes from the github workflow.

    supporting go-template could be even better.

  7. osterman commented on Feb 7, 2025

    @osterman
    Member

    Injecting the GitHub token is now handled automatically by atmos:

  8. osterman commented on Feb 7, 2025

    @osterman
    Member

    We won't support regexes at this time, but we will fix double-star globs to work as expected.

    excluded_paths:
    - **/*.{md,txt}
    
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

    feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions