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

chore: refactor pipelines to be goroutine-safe #122

Merged
merged 1 commit into from
Mar 10, 2024

Conversation

twelvelabs
Copy link
Owner

Refactors the Pipeline methods so they can safely be used in coroutines.

  • Removes the paths slice from Processor to make it immutable. Needed because we pass pointers to the processors around everywhere.
  • Merges Pipeline.Index into Pipeline.Match.
  • Updates Pipeline.Match to return a collection of match responses, each containing the matched processor and paths.

Copy link

codecov bot commented Mar 10, 2024

Codecov Report

Attention: Patch coverage is 57.69231% with 11 lines in your changes are missing coverage. Please review.

Project coverage is 76.86%. Comparing base (43473c5) to head (ee1b27b).
Report is 2 commits behind head on main.

Files Patch % Lines
internal/cmd/files.go 0.00% 5 Missing ⚠️
internal/cmd/init.go 0.00% 4 Missing ⚠️
internal/stylist/pipeline.go 86.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #122      +/-   ##
==========================================
+ Coverage   76.59%   76.86%   +0.27%     
==========================================
  Files          27       27              
  Lines        2153     1733     -420     
==========================================
- Hits         1649     1332     -317     
+ Misses        463      361     -102     
+ Partials       41       40       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@twelvelabs twelvelabs merged commit 4f7a267 into main Mar 10, 2024
4 of 5 checks passed
@twelvelabs twelvelabs deleted the goroutine-safe-pipeline branch March 10, 2024 07:17
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