-
Notifications
You must be signed in to change notification settings - Fork 631
Add nil check to partitionAssignmentVar
#5198
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
Conversation
|
|
||
| func (p *partitionAssignmentVar) String() string { | ||
| if p.p == nil { | ||
| return "map[]" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would "{}" be clearer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The string representation of an empty map in Go is map[] (https://go.dev/play/p/RNM_DdmfxbS), IMO that's clearest.
* Nil check partitionAssignmentVar * Changelog
* Nil check partitionAssignmentVar * Changelog # Conflicts: # CHANGELOG.md
* Bump github.com/go-viper/mapstructure/v2 from 2.2.1 to 2.3.0 (#5333) Bumps [github.com/go-viper/mapstructure/v2](https://github.com/go-viper/mapstructure) from 2.2.1 to 2.3.0. - [Release notes](https://github.com/go-viper/mapstructure/releases) - [Changelog](https://github.com/go-viper/mapstructure/blob/main/CHANGELOG.md) - [Commits](go-viper/mapstructure@v2.2.1...v2.3.0) --- updated-dependencies: - dependency-name: github.com/go-viper/mapstructure/v2 dependency-version: 2.3.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update go tools to 1.24.4 (#5322) * cherry pick * Update changelog * cherry pick * Bugfix: Correctly assign backend shard numbers depending on ingester shards (#5438) * Correctly assign backend shard numbers depending on ingester shards Signed-off-by: Joe Elliott <[email protected]> * changelog Signed-off-by: Joe Elliott <[email protected]> * test cleanup Signed-off-by: Joe Elliott <[email protected]> * a single space raised up as an offering to the lint gods Signed-off-by: Joe Elliott <[email protected]> --------- Signed-off-by: Joe Elliott <[email protected]> * cherry picking * Propagate tracing context in distributor for HTTP requests (#5312) * Propagate OTel context in distributor * Changelog * chlog v2 * Only propagate sampled traces * Refactor # Conflicts: # CHANGELOG.md * [bugfix] Correct instant query calculation (#5252) * [bugfix] TraceQL Metrics: correct interval number calculation * [bugfix] Force to return one interval for instant queries * linter fix: apply De Morgan's law * e2e: refactoring * e2e: refactoring * e2e: function to call instant query * e2e: instant query * e2e: remove redundant param * e2e: add traces with high cardinality attributes * e2e: test instant bottomk/topk * Add tests for topk and bottomk Instant queries * Changelog * test refactoring * Basic test to check corner cases for instant query * [bugfix] Correct instant query calculation when query both generator and backend --------- Co-authored-by: Suraj Nath <[email protected]> * Add nil check to `partitionAssignmentVar` (#5198) * Nil check partitionAssignmentVar * Changelog # Conflicts: # CHANGELOG.md * True up changelog * True up linter * Apply suggestions from code review Co-authored-by: Kim Nylander <[email protected]> * Update CHANGELOG.md Co-authored-by: Kim Nylander <[email protected]> * Update CHANGELOG.md Co-authored-by: Kim Nylander <[email protected]> * add release notes --------- Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Joe Elliott <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: A. Stoewer <[email protected]> Co-authored-by: J Pham <[email protected]> Co-authored-by: Joe Elliott <[email protected]> Co-authored-by: Ruslan Mikhailov <[email protected]> Co-authored-by: Mario <[email protected]> Co-authored-by: Suraj Nath <[email protected]> Co-authored-by: Kim Nylander <[email protected]>
What this PR does:
Adds nil check for
partitionAssignmentVar.String().It used to panic when Tempo was run with
--helpand the config wasn't set.Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]