clickhouse(depstore): return error instead of panic in GetDependencies#8172
Open
jkowall wants to merge 1 commit intojaegertracing:mainfrom
Open
clickhouse(depstore): return error instead of panic in GetDependencies#8172jkowall wants to merge 1 commit intojaegertracing:mainfrom
jkowall wants to merge 1 commit intojaegertracing:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR replaces a runtime panic in the ClickHouse dependency reader with a regular error return, and updates the unit test accordingly. This aligns the ClickHouse depstore implementation with safer, production-friendly behavior when a feature is not yet implemented.
Changes:
- Replace
panic("not implemented")inGetDependencieswith anerrorreturn. - Update the dependency reader test to assert on the returned error and nil dependencies.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| internal/storage/v2/clickhouse/depstore/reader.go | Return a non-panicking “not implemented” error from GetDependencies. |
| internal/storage/v2/clickhouse/depstore/reader_test.go | Update test to validate the error return instead of expecting a panic. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
yurishkuro
approved these changes
Mar 14, 2026
Member
|
commits not signed? |
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.
Motivation
panic("not implemented"), which can crash the query service when invoked and cause a DoS. This change prevents process termination by returning an error.Description
(*Reader).GetDependencieswith a returned error.internal/storage/v2/clickhouse/depstore/reader_test.goto assert anilresult and the expected error instead of expecting a panic.Testing
make fmtmake lintmake test