Repository navigation
fix: restore a hardened SQL queue worker for backend rollout - #3139
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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 production API still queues Explorer SQL work, while its running job server exists only in an old host checkout. Replacing the API alone would leave that consumer outside the current SQL and database policy. This adds a supported Node 24 worker to the API package and documents a coordinated rollout and rollback.
The producer stores only the question ID in Redis. The worker reloads the authoritative record and checks ownership, status and queue identity before using the shared SQL executor. Startup verifies TLS, table-level analytics grants and session settings; the worker needs no LLM or GitHub credentials. Errors fail jobs without storing private driver errors or results in Redis, logs contain only task metadata, completed/failed records have bounded retention, shutdown drains active work, and the loopback health/metrics listener protects metrics with the operations token.
Preserves two deployed data-quality fixes discovered during host comparison: absent Data Service endpoints remain 404, and degraded-data notices link to existing fallback routes. A failed SQL session initialization now destroys its connection rather than leaking a pool slot.
Validation: Node 24 builds for API, shared types, pipeline and prefetch; offline security regressions; real Redis execution covering deferred startup, failure state, private results and graceful drain. CI runs the existing real TiDB permission/execution tests plus the Redis worker integration on Node 24. All CI checks passed at 797280e, including 269 offline security tests and the real TiDB/Redis integration checks. The same source tree is deployed for the production API, SQL worker and prefetch on Node 24.22.2; all three processes are healthy and authenticated Prometheus scraping is up. Public health and named queries return 200, unauthenticated operations and ask routes return 401, and forged forwarding headers cannot reset the caller’s quota. Source/configuration and process rollback backups are retained. The deployed web hardening from #3137 remains verified in production.