Skip to content
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

Restore previous behaviour of no trailing newlines in HTTP error response bodies #11606

Merged
merged 4 commits into from Jan 8, 2024

Conversation

dannykopping
Copy link
Contributor

@dannykopping dannykopping commented Jan 8, 2024

What this PR does / why we need it:
#11487 introduced a regression which added trailing newlines to HTTP error response bodies, which may affect client integrations.

This regression hasn't made it into the 2.9.x or 2.8.x releases yet so no backporting is necessary.

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • CHANGELOG.md updated
    • If the change is worth mentioning in the release notes, add add-to-release-notes label
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/setup/upgrade/_index.md
  • For Helm chart changes bump the Helm chart version in production/helm/loki/Chart.yaml and update production/helm/loki/CHANGELOG.md and production/helm/loki/README.md. Example PR
  • If the change is deprecating or removing a configuration option, update the deprecated-config.yaml and deleted-config.yaml files respectively in the tools/deprecated-config-checker directory. Example PR

Danny Kopping added 2 commits January 8, 2024 20:17
…onse bodies

Signed-off-by: Danny Kopping <danny.kopping@grafana.com>
Signed-off-by: Danny Kopping <danny.kopping@grafana.com>
Signed-off-by: Danny Kopping <danny.kopping@grafana.com>
@dannykopping dannykopping added the type/bug Somehing is not working as expected label Jan 8, 2024
@dannykopping dannykopping marked this pull request as ready for review January 8, 2024 18:27
@dannykopping dannykopping requested a review from a team as a code owner January 8, 2024 18:27
Copy link
Contributor

github-actions bot commented Jan 8, 2024

Trivy scan found the following vulnerabilities:

  • HIGH, Target: docker.io/grafana/loki:main-142d356 (alpine 3.18.4), Type: alpine openssl: Incorrect cipher key and IV length processing in libcrypto3 v3.1.3-r0. Fixed in v3.1.4-r0
  • HIGH, Target: docker.io/grafana/loki:main-142d356 (alpine 3.18.4), Type: alpine openssl: Incorrect cipher key and IV length processing in libssl3 v3.1.3-r0. Fixed in v3.1.4-r0
    \nTo see more details on these vulnerabilities, and how/where to fix them, please run docker build -t grafana/loki:main-142d356 -f cmd/loki/Dockerfile .
    trivy i grafana/loki:main-142d356 on your branch. If these were not introduced by your PR, please considering fixing them in via a subsequent PR. Thanks!

Signed-off-by: Danny Kopping <danny.kopping@grafana.com>
@dannykopping dannykopping enabled auto-merge (squash) January 8, 2024 20:21
@dannykopping dannykopping merged commit 627e093 into grafana:main Jan 8, 2024
7 checks passed
@grafanabot
Copy link
Collaborator

The backport to release-2.8.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-11606-to-release-2.8.x origin/release-2.8.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x 627e09365beef213b3044631803df0080061efe0

When the conflicts are resolved, stage and commit the changes:

git add . && git cherry-pick --continue

If you have the GitHub CLI installed:

# Push the branch to GitHub:
git push --set-upstream origin backport-11606-to-release-2.8.x
# Create the PR body template
PR_BODY=$(gh pr view 11606 --json body --template 'Backport 627e09365beef213b3044631803df0080061efe0 from #11606{{ "\n\n---\n\n" }}{{ index . "body" }}')
# Create the PR on GitHub
echo "${PR_BODY}" | gh pr create --title "[release-2.8.x] Restore previous behaviour of no trailing newlines in HTTP error response bodies" --body-file - --label "size/S" --label "type/bug" --label "backport" --base release-2.8.x --milestone release-2.8.x --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-11606-to-release-2.8.x

# Create a pull request where the `base` branch is `release-2.8.x` and the `compare`/`head` branch is `backport-11606-to-release-2.8.x`.

# Remove the local backport branch
git switch main
git branch -D backport-11606-to-release-2.8.x

@grafanabot
Copy link
Collaborator

The backport to release-2.9.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-11606-to-release-2.9.x origin/release-2.9.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x 627e09365beef213b3044631803df0080061efe0

When the conflicts are resolved, stage and commit the changes:

git add . && git cherry-pick --continue

If you have the GitHub CLI installed:

# Push the branch to GitHub:
git push --set-upstream origin backport-11606-to-release-2.9.x
# Create the PR body template
PR_BODY=$(gh pr view 11606 --json body --template 'Backport 627e09365beef213b3044631803df0080061efe0 from #11606{{ "\n\n---\n\n" }}{{ index . "body" }}')
# Create the PR on GitHub
echo "${PR_BODY}" | gh pr create --title "[release-2.9.x] Restore previous behaviour of no trailing newlines in HTTP error response bodies" --body-file - --label "size/S" --label "type/bug" --label "backport" --base release-2.9.x --milestone release-2.9.x --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-11606-to-release-2.9.x

# Create a pull request where the `base` branch is `release-2.9.x` and the `compare`/`head` branch is `backport-11606-to-release-2.9.x`.

# Remove the local backport branch
git switch main
git branch -D backport-11606-to-release-2.9.x

@dannykopping dannykopping deleted the dannykopping/error-newlines branch January 24, 2024 11:52
rhnasc pushed a commit to inloco/loki that referenced this pull request Apr 12, 2024
…onse bodies (grafana#11606)

**What this PR does / why we need it**:
grafana#11487 introduced a regression which added trailing newlines to HTTP
error response bodies, which may affect client integrations.

This regression hasn't made it into the 2.9.x or 2.8.x releases yet so
no backporting is necessary.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants