-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
populate empty resonse for IndexStatsResponse and VolumeResponse #11209
Conversation
Signed-off-by: Owen Diehl <[email protected]>
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.
Nice one. Could you extend the tests?
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-11209-to-k174 origin/k174
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x 265018b7293329241ffe9b7c56f38afb07b6b08f When the conflicts are resolved, stage and commit the changes:
If you have the GitHub CLI installed: # Push the branch to GitHub:
git push --set-upstream origin backport-11209-to-k174
# Create the PR body template
PR_BODY=$(gh pr view 11209 --json body --template 'Backport 265018b7293329241ffe9b7c56f38afb07b6b08f from #11209{{ "\n\n---\n\n" }}{{ index . "body" }}')
# Create the PR on GitHub
echo "${PR_BODY}" | gh pr create --title "[k174] populate empty resonse for IndexStatsResponse and VolumeResponse" --body-file - --label "size/S" --label "type/bug" --label "backport" --base k174 --milestone k174 --web Or, if you don't have the GitHub CLI installed (we recommend you install it!): # Push the branch to GitHub:
git push --set-upstream origin backport-11209-to-k174
# Create a pull request where the `base` branch is `k174` and the `compare`/`head` branch is `backport-11209-to-k174`.
# Remove the local backport branch
git switch main
git branch -D backport-11209-to-k174 |
) Fixes a panic when the underlying response struct is accessed but not populated after an out-of-bounds request is short-circuited via `NewEmptyResponse` [here](https://github.com/grafana/loki/blob/main/pkg/querier/queryrange/limits.go#L155-L164). This PR ensures the embedded types are not nil in accordance with the other variants in this function. (cherry picked from commit 265018b)
…se (#11224) Backport 265018b from #11209 --- Fixes a panic when the underlying response struct is accessed but not populated after an out-of-bounds request is short-circuited via `NewEmptyResponse` [here](https://github.com/grafana/loki/blob/main/pkg/querier/queryrange/limits.go#L155-L164). This PR ensures the embedded types are not nil in accordance with the other variants in this function. Co-authored-by: Owen Diehl <[email protected]>
…fana#11209) Fixes a panic when the underlying response struct is accessed but not populated after an out-of-bounds request is short-circuited via `NewEmptyResponse` [here](https://github.com/grafana/loki/blob/main/pkg/querier/queryrange/limits.go#L155-L164). This PR ensures the embedded types are not nil in accordance with the other variants in this function.
Fixes a panic when the underlying response struct is accessed but not populated after an out-of-bounds request is short-circuited via
NewEmptyResponse
here. This PR ensures the embedded types are not nil in accordance with the other variants in this function.