Skip to content

[pull] main from thanos-io:main#516

Merged
pull[bot] merged 14 commits intoyeya24:mainfrom
thanos-io:main
Mar 11, 2026
Merged

[pull] main from thanos-io:main#516
pull[bot] merged 14 commits intoyeya24:mainfrom
thanos-io:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull bot commented Mar 11, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

madaraszg-tulip and others added 14 commits February 3, 2026 14:03
Signed-off-by: Gergely Madarasz <gergely.madarasz@tulip.co>
Signed-off-by: Gergely Madarasz <gergely.madarasz@tulip.co>
Signed-off-by: Gergely Madarasz <gergely.madarasz@tulip.co>
Signed-off-by: Gergely Madarasz <gergely.madarasz@tulip.co>
  GetStoreClients creates endpointRef copies to return as store clients.
  The official race fix in c7ee54a added Status() method for GetEndpointStatus,
  but missed that GetStoreClients copies don't share the mutex.

  When ProxyStore calls methods like LabelSets() or HasStoreAPI() on returned
  clients, they lock a different mutex than Update() uses, causing data races.

  Fix by making mtx a pointer so all copies share the same lock.

  Complements the fix in commit c7ee54a.

Signed-off-by: Abhishek Dadwal <dadwalabhishek10@gmail.com>
Signed-off-by: Adam Jasinski <adam.jasinski@vinted.com>
Signed-off-by: Adam Jasinski <adam.jasinski@vinted.com>
query-frontend: retries for instant queries, enable backoff on retries
traceGRPCOptions silently ignored the TLSConfig struct that is parsed
from the YAML configuration, while traceHTTPOptions already applied it
correctly via exthttp.NewTLSConfig. As a result, the ca_file, cert_file
and key_file fields had no effect for gRPC clients, even though the
configuration was valid and the values were present.

Without TLS credentials being supplied to the gRPC dialer, the exporter
fell through to the default credentials.NewTLS(nil) path in the OTel SDK
which only trusts system root CAs. Any deployment using a private or
internal CA therefore failed with:

  transport: authentication handshake failed: tls: failed to verify
  certificate: x509: certificate signed by unknown authority

The only available workaround was to supply the OTEL_EXPORTER_OTLP_CERTIFICATE,
OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE and OTEL_EXPORTER_OTLP_CLIENT_KEY
environment variables directly, bypassing the Thanos configuration entirely.

Fix this by mirroring the HTTP behaviour: when insecure is false, build a
*tls.Config from the parsed TLSConfig via exthttp.NewTLSConfig and pass it
to the gRPC exporter as credentials.TransportCredentials via
WithTLSCredentials. This enables ca_file (custom CA verification), cert_file
and key_file (mTLS client authentication) to work correctly for gRPC.

Signed-off-by: roth-wine <git@roth-wine.de>
…esponse-errors

Fix: Improve partial-response handling
Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
fix(query): Fix data race in GetStoreClients by making endpointRef mutex a pointer
Before the fix in the preceding commit, the tls_config fields ca_file,
cert_file and key_file were silently ignored by traceGRPCOptions, making
it impossible to verify through existing tests that TLS configuration
was actually applied to the gRPC exporter. This commit adds a test that
directly validates the fix by exercising the full export path against a
real TLS-secured gRPC server.

The test spins up an in-process gRPC server secured with a self-signed
ECDSA certificate issued by a private CA (not present in the system
trust store). It then configures NewTracerProvider with client_type: grpc
and tls_config.ca_file pointing to that CA certificate. A span is created
and tp.Shutdown is called to force a synchronous flush, which triggers the
actual gRPC connection and TLS handshake. If tls_config.ca_file were not
applied to the gRPC dialer, the TLS handshake would fail with:

  x509: certificate signed by unknown authority

and tp.Shutdown would return an error, failing the test.

The test infrastructure consists of:
- generateTestCert: generates a self-signed ECDSA P-256 certificate in
  memory, valid for 127.0.0.1, usable as both CA and server certificate.
- startTLSGRPCServer: starts a grpc.Server with TLS credentials and
  registers a minimal mock OTLP TraceService that accepts any export
  request, ensuring the full export RPC succeeds once TLS is established.

Signed-off-by: roth-wine <git@roth-wine.de>
fix(tracing/otlp): apply tls_config to gRPC exporter
@pull pull bot locked and limited conversation to collaborators Mar 11, 2026
@pull pull bot added the ⤵️ pull label Mar 11, 2026
@pull pull bot merged commit ae995d3 into yeya24:main Mar 11, 2026
16 of 17 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants