Navigation Menu

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

Change large file exclude by type to per session ignore support #142

Conversation

davidalger
Copy link
Collaborator

Use of composer artifact repositories requires that .zip files be synchronized into the FPM containers. The change to exclude large files (.sql, *.gz, *.zip, *.bz2) from sync sessions broke the ability to use these without individually mounting each zip in the artifact repository into the container. It also disrupted some data migration routines that leverage SQL scripts.

This PR accomplishes the following:

a) Removes the file extension based excludes

b) Introduces WARDEN_SYNC_IGNORE setting for use on a per-project basis for setting a comma-separated list of additional ignores to Mutagen when the sync session is started

Example Use Case

In a project using a flat repository layout (i.e. does NOT leverage a custom web root such as this project template does) there are cases where extremely large back fill files may be downloaded from an FTP server into the project root for no other purpose than (for example) expanding a media archive on to of pub/media. There is no reason these files need to be nor should be synced into the FPM containers, and doing so can cause side-effects like long wait to start the sync sessions and/or extended CPU spikes as multi-GB files are copied into the container on a macOS setup.

To prevent the above from happening, the following will add a single exclude rule to prevent anything in the ./backfill directory from synchronizing into the container giving the user a place to download these large files:

WARDEN_SYNC_IGNORE=backfill/**

Another example would be using this to exclude files by-type (similar to what 0.4.0 had begun to do, and which this PR unravels) to simply exclude files of these types from being synchronized into the containers across the board on a per-project basis:

WARDEN_SYNC_IGNORE=*.sql,*.gz,*.zip,*.bz2

@davidalger davidalger added bug Something isn't working enhancement New feature or request labels Apr 15, 2020
@davidalger davidalger added this to the Warden 0.4.2 milestone Apr 15, 2020
@davidalger davidalger self-assigned this Apr 15, 2020
@davidalger davidalger merged commit e97f86c into develop Apr 15, 2020
@davidalger davidalger deleted the feature/change-large-file-exclude-to-per-session-ignore-support branch May 21, 2020 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant