Skip to content

fix(compactor): Fix delete request when using Thanos objstore client with filesystem backend [release-3.7.x] - #22811

Merged
jnewbigin merged 1 commit into
release-3.7.xfrom
backport-22809-to-release-3.7.x
Jul 16, 2026
Merged

fix(compactor): Fix delete request when using Thanos objstore client with filesystem backend [release-3.7.x]#22811
jnewbigin merged 1 commit into
release-3.7.xfrom
backport-22809-to-release-3.7.x

Conversation

@loki-gh-app

@loki-gh-app loki-gh-app Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Backport eae43e1 from #22809 job run


Summary

The compactor selected the chunk-key encoder via a concrete type assertion on *local.FSObjectClient. With use_thanos_objstore enabled the object client is a *bucket.ObjectClientAdapter, so FSEncoder was skipped and chunks were looked up with raw, un-encoded keys. This diverged from the keys written by the rest of the storage stack (storage.NewChunkClient applies FSEncoder for the thanos filesystem backend), causing chunk rewrites during retention to fail and line-filter delete requests to remain stuck in the received state.

…with filesystem backend (#22809)

The compactor selected the chunk-key encoder via a concrete type assertion on *local.FSObjectClient. With use_thanos_objstore enabled the object client is a *bucket.ObjectClientAdapter, so FSEncoder was skipped and chunks were looked up with raw, un-encoded keys. This diverged from the keys written by the rest of the storage stack (storage.NewChunkClient applies FSEncoder for the thanos filesystem backend), causing chunk rewrites during retention to fail and line-filter delete requests to remain stuck in the received state.

(cherry picked from commit eae43e1)

Co-authored-by: Christian Haudum <christian.haudum@gmail.com>
@loki-gh-app
loki-gh-app Bot requested a review from a team as a code owner June 30, 2026 10:06
@loki-gh-app loki-gh-app Bot added backport type/bug Somehing is not working as expected labels Jun 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ The workflow jobs listed below don't declare a permissions: block and may break when the organization's default GITHUB_TOKEN permissions are restricted to read-only.

Expand for findings
warning[excessive-permissions]: overly broad permissions
  --> ./.github/workflows/operator-images.yaml:1:1
   |
 1 | / name: operator images
 2 | |
 3 | | on:
 4 | |   push:
...  |
45 | |       image_name: "storage-size-calculator"
46 | |       tag: "latest"
   | |____________________^ default permissions used due to no permissions: block
   |
   = note: audit confidence → Medium
   = help: audit documentation → https://docs.zizmor.sh/audits/#excessive-permissions

warning[excessive-permissions]: overly broad permissions
  --> ./.github/workflows/operator-images.yaml:12:3
   |
12 | /   publish-grafana-operator:
13 | |     uses: ./.github/workflows/operator-reusable-image-build.yml
14 | |     with:
15 | |       dockerfile: "operator/Dockerfile"
...  |
18 | |       image_name: "loki-operator"
19 | |       tag: "latest"
   | |                   ^
   | |                   |
   | |___________________this job
   |                     default permissions used due to no permissions: block
   |
   = note: audit confidence → Medium
   = help: audit documentation → https://docs.zizmor.sh/audits/#excessive-permissions

warning[excessive-permissions]: overly broad permissions
  --> ./.github/workflows/operator-images.yaml:21:3
   |
21 | /   publish-openshift-operator:
22 | |     uses: ./.github/workflows/operator-reusable-image-build.yml
23 | |     with:
24 | |       dockerfile: "operator/Dockerfile"
...  |
27 | |       image_name: "loki-operator"
28 | |       tag: "latest"
   | |                   ^
   | |                   |
   | |___________________this job
   |                     default permissions used due to no permissions: block
   |
   = note: audit confidence → Medium
   = help: audit documentation → https://docs.zizmor.sh/audits/#excessive-permissions

warning[excessive-permissions]: overly broad permissions
  --> ./.github/workflows/operator-images.yaml:30:3
   |
30 | /   publish-openshift-bundle:
31 | |     uses: ./.github/workflows/operator-reusable-image-build.yml
32 | |     with:
33 | |       dockerfile: "operator/bundle/openshift/bundle.Dockerfile"
...  |
36 | |       image_name: "loki-operator-bundle"
37 | |       tag: "latest"
   | |                   ^
   | |                   |
   | |___________________this job
   |                     default permissions used due to no permissions: block
   |
   = note: audit confidence → Medium
   = help: audit documentation → https://docs.zizmor.sh/audits/#excessive-permissions

warning[excessive-permissions]: overly broad permissions
  --> ./.github/workflows/operator-images.yaml:39:3
   |
39 | /   publish-openshift-size-calculator:
40 | |     uses: ./.github/workflows/operator-reusable-image-build.yml
41 | |     with:
42 | |       dockerfile: "operator/calculator.Dockerfile"
...  |
45 | |       image_name: "storage-size-calculator"
46 | |       tag: "latest"
   | |                    ^
   | |                    |
   | |____________________this job
   |                      default permissions used due to no permissions: block
   |
   = note: audit confidence → Medium
   = help: audit documentation → https://docs.zizmor.sh/audits/#excessive-permissions
@jnewbigin
jnewbigin merged commit dd6fdb5 into release-3.7.x Jul 16, 2026
86 checks passed
@jnewbigin
jnewbigin deleted the backport-22809-to-release-3.7.x branch July 16, 2026 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport type/bug Somehing is not working as expected

1 participant