Skip to content

feat: add support for input filtering with wildcard patterns#30

Merged
k1LoW merged 4 commits intomainfrom
input
Oct 21, 2025
Merged

feat: add support for input filtering with wildcard patterns#30
k1LoW merged 4 commits intomainfrom
input

Conversation

@k1LoW
Copy link
Copy Markdown
Owner

@k1LoW k1LoW commented Oct 21, 2025

This pull request introduces improvements to input handling and filtering for the tailor-log tool, both in the CLI and its GitHub Action integration. The changes simplify the configuration of input sources, allowing users to specify patterns for filtering function and pipeline logs more flexibly. The implementation now supports wildcard matching for input sources, and the configuration structure has been streamlined for clarity.

Input handling and filtering improvements:

  • Replaced the previous Inputs struct in config.Config with a flat []string slice, simplifying how input sources are specified and used throughout the codebase (config/config.go).
  • Updated CLI flags to support multiple input sources via the --input flag, defaulting to *, and ensured workspace-id is required (cmd/root.go). [1] [2]
  • In both ingest and stream commands, input sources are split and flattened, preparing them for use in filtering logic (cmd/ingest.go, cmd/stream.go). [1] [2]

Wildcard filtering logic:

  • Added wildcard pattern matching for input sources using the github.com/IGLOU-EU/go-wildcard/v2 library. Function and pipeline log fetchers now filter logs based on user-specified input patterns (tailor/function.go, tailor/pipeline.go). [1] [2] [3] [4] [5] [6]

GitHub Action integration:

  • Updated the GitHub Action configuration to accept and pass the new inputs parameter to the CLI, enabling pattern-based input filtering in workflows (action.yml). [1] [2]

Minor CLI improvements:

  • Adjusted fetch interval flag in the stream command to remove the short flag for clarity (cmd/stream.go).

@k1LoW k1LoW self-assigned this Oct 21, 2025
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Copy Markdown
Contributor

Code Metrics Report

main (a20f34f) #30 (4d8cf7e) +/-
Coverage 6.0% 5.6% -0.4%
Code to Test Ratio 1:0.1 1:0.1 -0.1
Test Execution Time 10s 2s -8s
Details
  |                     | main (a20f34f) | #30 (4d8cf7e) |  +/-  |
  |---------------------|----------------|---------------|-------|
- | Coverage            |           6.0% |          5.6% | -0.4% |
  |   Files             |             10 |            10 |     0 |
  |   Lines             |            379 |           405 |   +26 |
  |   Covered           |             23 |            23 |     0 |
- | Code to Test Ratio  |          1:0.1 |         1:0.1 |  -0.1 |
  |   Code              |            901 |           939 |   +38 |
  |   Test              |            102 |           102 |     0 |
+ | Test Execution Time |            10s |            2s |   -8s |

Code coverage of files in pull request scope (0.0% → 0.0%)

Files Coverage +/- Status
cmd/ingest.go 0.0% 0.0% modified
cmd/root.go 0.0% 0.0% modified
cmd/stream.go 0.0% 0.0% modified
tailor/function.go 0.0% 0.0% modified
tailor/pipeline.go 0.0% 0.0% modified

Reported by octocov

@k1LoW k1LoW merged commit 068e629 into main Oct 21, 2025
2 checks passed
@k1LoW k1LoW deleted the input branch October 21, 2025 07:40
@github-actions github-actions Bot mentioned this pull request Oct 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant