Skip to content
This repository has been archived by the owner on Jan 12, 2022. It is now read-only.

fix: loki tail websocket endpoint #1329

Merged
merged 2 commits into from
Aug 26, 2021
Merged

fix: loki tail websocket endpoint #1329

merged 2 commits into from
Aug 26, 2021

Conversation

sreis
Copy link
Contributor

@sreis sreis commented Aug 26, 2021

A user reported that it could no longer use the loki tail endpoint with the latest version. This regression was introduced with #1140
because in microservices mode, /loki/api/v1/tail is exposed by the querier.

PR also adds a test.

@jgehrcke
Copy link
Contributor

PR also adds a test.

The only right thing. :) Thank you!

Signed-off-by: Simão Reis <sreis@opstrace.com>
Signed-off-by: Simão Reis <sreis@opstrace.com>
@sreis
Copy link
Contributor Author

sreis commented Aug 26, 2021

AWS test hit a known flake #1226.

Confirmation the new test ran:

[2021-08-26T12:35:27Z]   Loki tail API test suite
[2021-08-26T12:35:27Z] 2021-08-26T12:35:27.154Z info: suite setup
[2021-08-26T12:35:27Z] 2021-08-26T12:35:27.154Z info: globalTestSuiteSetupOnce()
[2021-08-26T12:35:27Z] 2021-08-26T12:35:27.155Z info: Connecting to websocket url: wss://loki.system.prs-bk-5633-6db-a.opstrace.io/loki/api/v1/tail?query=%7Bk8s_namespace_name%3D%22cortex%22%2Ck8s_container_name%3D%22ingester%22%7D
[2021-08-26T12:35:27Z] 2021-08-26T12:35:27.157Z info: waiting 30s for a websocket message...
[2021-08-26T12:35:27Z] 2021-08-26T12:35:27.261Z info: got a message over websocket: {"streams":[{"stream":{"k8s_namespace_name":"cortex","k8s_pod_name":"ingester-1","k8s_container_name":"ingester","k8s_host":"ip-192-168-47-86.us-west-2.compute.internal"},"values":
[2021-08-26T12:35:27Z]     ✓ connect and stream cortex ingester pod logs from /loki/api/v1/tail (107ms)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants