Conversation
Contributor
Code Metrics Report
Details | | main (01c749f) | #32 (adffa60) | +/- |
|---------------------|----------------|---------------|-------|
- | Coverage | 30.7% | 26.6% | -4.1% |
| Files | 12 | 12 | 0 |
| Lines | 482 | 556 | +74 |
| Covered | 148 | 148 | 0 |
- | Code to Test Ratio | 1:1.4 | 1:1.3 | -0.2 |
| Code | 1354 | 1462 | +108 |
| Test | 1924 | 1924 | 0 |
- | Test Execution Time | 6s | 7s | +1s |Code coverage of files in pull request scope (0.0% → 0.0%)
Reported by octocov |
Mistat
approved these changes
Sep 22, 2025
Contributor
Author
|
Thank you! |
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.
This pull request introduces significant performance improvements to the
tailor/resource.goresource fetching logic by adding parallelism at multiple levels. The main changes refactor the code to use goroutines anderrgroupfor concurrent fetching of pipeline, TailorDB, and StateFlow resources, as well as their nested details. Mutexes are introduced to ensure thread-safe writes to shared data structures.Key improvements and changes:
Parallelization and Concurrency:
Resourcesmethod to useerrgroupfor concurrent fetching of Pipeline, TailorDB, and StateFlow services, reducing overall resource fetch time. (tailor/resource.go)errgroup, with mutexes to ensure thread safety when appending to shared slices. (tailor/resource.go) [1] [2] [3] [4]Code Structure and Maintainability:
fetchPipelineServices,fetchPipelineResolvers,fetchPipelineResolverDetails,fetchTailorDBServices,fetchTailorDBTypes,fetchTailorDBTypeDetails,fetchStateFlowServices,fetchExecutionResults) for better readability and testability. (tailor/resource.go) [1] [2] [3] [4] [5]Thread Safety:
sync.Mutexfield to theResourcesstruct and used local mutexes in helper functions to prevent race conditions when updating shared slices. (tailor/resource.go) [1] [2] [3] [4]Dependency Updates:
golang.org/x/synctogo.modto provideerrgroupfor managing goroutine lifecycles and error propagation. (go.mod)These changes collectively make resource loading much faster and more robust, especially for projects with a large number of pipelines or database types.