fix: send Basic Auth header on TAP WebSocket handshake#2
Closed
fix: send Basic Auth header on TAP WebSocket handshake#2
Conversation
The TAP /channel WebSocket endpoint requires Basic Auth when TAP_ADMIN_PASSWORD is set. The consumer was sending no Authorization header, causing a 401 which gorilla/websocket surfaces as 'bad handshake'. Wire cfg.TapAdminPassword into ConsumerConfig.Password and build the Authorization header in runOnce() before dialing, matching the pattern already used by AdminClient for HTTP requests.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…ecord drops
Three interconnected bugs caused health check failures when acks were enabled
and records to be silently dropped:
1. Empty-body create/update events caused hard ParseEvent errors → never acked
→ Tap's un-acked queue grew → Tap's /health degraded → Railway health check
failed. Fix: allow these events to parse successfully; handler skips them
gracefully (nothing to store without a body) and returns nil so they get acked.
2. Records with empty CID (Tap omits cid field on some events) were silently
skipped by the Insert dedup check: existingCID("") == cid("") → Skipped.
New records were never written to the DB. Fix: only skip when cid != "".
Also log Skipped results at DEBUG for observability.
3. /health proxied to Tap's admin HTTP API, so any Tap restart/blip caused
Railway to fail the health check and restart hyperindex. Fix: /health now
reflects hyperindex's own health only. Tap sidecar status moves to /stats
where it is visible but non-blocking.
Collaborator
Author
|
closing since #3 covers this as well |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The TAP /channel WebSocket endpoint requires Basic Auth when TAP_ADMIN_PASSWORD is set. The consumer was sending no Authorization header, causing a 401 which gorilla/websocket surfaces as 'bad handshake'.
Wire cfg.TapAdminPassword into ConsumerConfig.Password and build the Authorization header in runOnce() before dialing, matching the pattern already used by AdminClient for HTTP requests.