Skip to content

✨ Apply ignore patterns from Directory argument in dagger call #7832

Closed

Description

@helderco

With #7744 we can define ignore patterns to apply when loading a default directory from the context. See:

However, if you specify a directory explicitly with dagger call, those patterns won’t be applied. Module authors need to continue setting views and tell end users to specify it next to the path.

If there are ignore patterns for a Directory type, the CLI can use them. If a view is passed, use it. But if not, use the ignore patterns from the argument.

I’m assuming that when a module author specifies ignore patterns in a directory argument it’s always desirable to apply those patterns to any directory. An example of that is a function that lints Python code. There’s only very specific file extensions that you’d want to filter here, as any others would unnecessarily invalidate the cache or upload more than it needs to.

If not, there’s the views escape hatch, however I’m not sure if views should continue to exist since they were created as a stopgap to enable filtering local directories, provided as input to the CLI. If we do remove views, then we need to think a bit more if there’s a need for an escape hatch or not.

Activity

  1. added
    area/cli
    on Jul 5, 2024
  2. jedevc commented on Sep 24, 2024

    @jedevc
    Contributor

    Can we split out a separate issue for passing directories from a module to another module? Just so we have a place to track this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/cli

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions