Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check ignore matches before Bucket item downloads #337

Merged
merged 3 commits into from
Apr 14, 2021

Commits on Apr 13, 2021

  1. Check ignore matches before Bucket item downloads

    Signed-off-by: Hidde Beydals <hello@hidde.co>
    hiddeco committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    cca2c4a View commit details
    Browse the repository at this point in the history
  2. Make Storage#Archive file filtering configurable

    This commit makes the filtering applied during the archiving
    configurable by introducing an optional `ArchiveFileFilter`
    callback argument and a `SourceIgnoreFilter` implementation.
    
    `SourceIgnoreFilter` filters out files matching
    sourceignore.VCSPatterns and any of the provided patterns.
    If an empty gitignore.Pattern slice is given, the matcher is set to
    sourceignore.NewDefaultMatcher.
    
    The `GitRepository` now loads the ignore patterns before archiving
    the repository contents by calling `sourceignore.LoadIgnorePatterns`
    and other helpers. The loading behavior is **breaking** as
    `.sourceignore` files in the (subdirectories of the) repository are
    now still taken into account if `spec.ignore` for a resource is
    defined, overwriting is still possible by creating an overwriting
    rule in the `spec.ignore` of the resource.
    
    This change also makes it possible for the `BucketReconciler` to not
    configure a callback at all and prevent looking for ignore
    matches twice. To finalize the bucket refactor, a change to the
    reconciler has been made to look for a `.sourceignore` file in
    the root of the bucket to provide an additional way of configuring
    (global) exclusions.
    
    Signed-off-by: Hidde Beydals <hello@hidde.co>
    hiddeco committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    b5004a9 View commit details
    Browse the repository at this point in the history
  3. Update Go to 1.16

    This commit updates Go to 1.16, a required change because of the use of
    `os.WriteFile` in one of the tests introduced by commit
    b5004a9.
    
    Normally _just_ this would not justify the change, but given the
    introduction of breaking changes (and thereby forcing a MINOR update
    anyway), and the various file{system, path} improvements introduced in
    Go 1.16 like
    [`filepath#WalkDir`](https://golang.org/pkg/path/filepath/#WalkDir),
    going ahead with this should be fine.
    
    Signed-off-by: Hidde Beydals <hello@hidde.co>
    hiddeco committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    d3bcc6a View commit details
    Browse the repository at this point in the history