refactor(cli): remove client-side tag filtering from issue.go#383
Open
refactor(cli): remove client-side tag filtering from issue.go#383
Conversation
Pass --tag and --tag-any filters to daemon API instead of filtering client-side. The daemon already supports server-side tag filtering via ListIssuesRequest.tags and ListIssuesRequest.tags_mode fields. Changes: - Update proto_client.ListIssues to accept tags/tagsMode parameters - Update daemon_client.ListIssues to pass tag filters through - Modify runIssueListViaDaemon to pass tags to daemon API - Remove matchTagsAnd function (daemon handles AND logic) - Remove matchIssueFilters function (no longer used) - Keep matchTagsOr for edge case when both --tag and --tag-any are used Note: When both --tag (AND) and --tag-any (OR) are specified, we pass --tag to daemon and do secondary filtering client-side for --tag-any since daemon only supports one tag mode at a time. Closes orch-389
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
--tagand--tag-anyfilters to daemon API instead of filtering client-sidematchTagsAndandmatchIssueFiltersfunctions from issue.go (daemon handles this server-side)matchTagsOrfor edge case when both--tagand--tag-anyare specifiedChanges
internal/daemon/proto_client.gotagsandtagsModeparameters toListIssuesinternal/orchapi/daemon_client.gointernal/cli/issue.gointernal/cli/issue_test.goVerification
Notes
The daemon already supported server-side tag filtering via
ListIssuesRequest.tagsandListIssuesRequest.tags_mode(implemented in orch-383). This PR updates the CLI to leverage that capability instead of duplicating the filtering logic client-side.When both
--tag(AND) and--tag-any(OR) are specified, we pass--tagto daemon and do secondary filtering client-side for--tag-anysince the daemon only supports one tag mode at a time.Closes orch-389