-
Notifications
You must be signed in to change notification settings - Fork 597
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
Merged
Merged
Conversation
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
carles-grafana
approved these changes
Jun 2, 2025
carles-grafana
requested changes
Jun 2, 2025
@@ -106,5 +106,8 @@ func (p *partitionAssignmentVar) Set(s string) error { | |||
} | |||
|
|||
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.
carles-grafana
approved these changes
Jun 3, 2025
knylander-grafana
pushed a commit
to knylander-grafana/tempo-doc-work
that referenced
this pull request
Jun 3, 2025
* Nil check partitionAssignmentVar * Changelog
mattdurham
pushed a commit
to mattdurham/tempo
that referenced
this pull request
Aug 6, 2025
* Nil check partitionAssignmentVar * Changelog # Conflicts: # CHANGELOG.md
mattdurham
added a commit
that referenced
this pull request
Aug 6, 2025
* 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] <support@github.com> 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 <number101010@gmail.com> * changelog Signed-off-by: Joe Elliott <number101010@gmail.com> * test cleanup Signed-off-by: Joe Elliott <number101010@gmail.com> * a single space raised up as an offering to the lint gods Signed-off-by: Joe Elliott <number101010@gmail.com> --------- Signed-off-by: Joe Elliott <number101010@gmail.com> * 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 <9503187+electron0zero@users.noreply.github.com> * 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 <104772500+knylander-grafana@users.noreply.github.com> * Update CHANGELOG.md Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com> * Update CHANGELOG.md Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com> * add release notes --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Joe Elliott <number101010@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: A. Stoewer <adrian@stoewer.me> Co-authored-by: J Pham <94262131+ie-pham@users.noreply.github.com> Co-authored-by: Joe Elliott <number101010@gmail.com> Co-authored-by: Ruslan Mikhailov <195758209+ruslan-mikhailov@users.noreply.github.com> Co-authored-by: Mario <mariorvinas@gmail.com> Co-authored-by: Suraj Nath <9503187+electron0zero@users.noreply.github.com> Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>
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.
What this PR does:
Adds nil check for
partitionAssignmentVar.String()
.It used to panic when Tempo was run with
--help
and the config wasn't set.Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]