Support shell wildcards in generator name filters - #610
Merged
Conversation
The -ignore-tables, -ignore-views and -ignore-enums flags (and their allow-list counterparts) only matched names exactly, so ignoring partitioned tables meant listing every partition by hand and updating that list whenever partitions rotated. Match names with path.Match so a single pattern like "payment_*" covers them. Names without wildcard characters still match exactly, so existing configs behave as before. Closes go-jet#518
Owner
|
Thanks. LGTM. 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #518.
Right now
-ignore-tables(and-ignore-views/-ignore-enums, plus the allow-list variants) only match names exactly. With partitioned tables the partition names change over time, so you end up listing every one by hand and editing the list whenever they rotate.This lets the entries use shell wildcards through
path.Match, sopayment_*ignorespayment_2020,payment_2021and so on. Names without any wildcard characters still match exactly, so existing setups keep working the same way.Added unit tests for the matcher and the shouldSkip helpers.