fix(target): make --target flag case insensitive to match Tanka#56
Merged
julienduchesne merged 1 commit intomasterfrom Feb 26, 2026
Merged
fix(target): make --target flag case insensitive to match Tanka#56julienduchesne merged 1 commit intomasterfrom
julienduchesne merged 1 commit intomasterfrom
Conversation
Tanka's --target flag performs case-insensitive regex matching on kind/name, but rtk was using case-sensitive matching. This caused filters like "configmap/.*" to not match "ConfigMap" resources. Fix both target filtering code paths (extract_manifests in util.rs for show/apply/diff/prune, and compile_target_patterns in export.rs for export) to use RegexBuilder with case_insensitive(true). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Benchmark Results
Full results available in workflow artifacts. Benchmark run on commit |
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.
Summary
--targetflag performs case-insensitive regex matching onkind/name, but rtk was using case-sensitive matchingRegexBuilder::new().case_insensitive(true):extract_manifests()inutil.rs(used by show, apply, diff, prune)compile_target_patterns()inexport.rs(used by export)target_filter_case_insensitive_envthat uses--target "configmap/.*"(lowercase) to matchConfigMapresourcesTest plan
configmap/.*filter againstConfigMapresources)🤖 Generated with Claude Code