Fix ListWorkers query support for BuildId and Status columns#9568
Merged
Fix ListWorkers query support for BuildId and Status columns#9568
Conversation
b880d73 to
0931526
Compare
BuildId was documented in the API proto but missing from the worker query engine's property map. Status was documented as "Status" in the proto but the code used "WorkerStatus", causing queries with Status to fail. Additionally, "Status" is a SQL reserved word so the parser lowercases it. Made all column name lookups case-insensitive to handle this and similar edge cases. Updated comments to fix stale references to LastHeartbeatTime. Made-with: Cursor
396d687 to
f71a54c
Compare
ShahabT
approved these changes
Mar 18, 2026
stephanos
pushed a commit
that referenced
this pull request
Mar 20, 2026
## What changed? - Added `BuildId` as a supported query attribute in `worker_query_engine.go` (was documented in proto but missing from implementation) - Added `Status` query support by registering the lowercased form (`status`) that the SQL parser produces for reserved words, using `sqlparser.String()` + backtick strip consistent with the rest of the codebase - Kept `WorkerStatus` as a backward-compatible alias - Fixed stale comment references (`LastHeartbeatTime` → `HeartbeatTime`) ## Why? `BuildId` and `Status` are documented as supported query attributes in `ListWorkersRequest` proto but were not working. `BuildId` was entirely missing from the property map, and `Status` is a SQL reserved word so the parser lowercases and backtick-quotes it — the old code used `WorkerStatus` which didn't match the proto docs. ## How did you test it? - [x] built - [x] covered by existing tests - [x] added new unit test(s)
birme
pushed a commit
to eyevinn-osaas/temporal
that referenced
this pull request
Mar 23, 2026
…lio#9568) ## What changed? - Added `BuildId` as a supported query attribute in `worker_query_engine.go` (was documented in proto but missing from implementation) - Added `Status` query support by registering the lowercased form (`status`) that the SQL parser produces for reserved words, using `sqlparser.String()` + backtick strip consistent with the rest of the codebase - Kept `WorkerStatus` as a backward-compatible alias - Fixed stale comment references (`LastHeartbeatTime` → `HeartbeatTime`) ## Why? `BuildId` and `Status` are documented as supported query attributes in `ListWorkersRequest` proto but were not working. `BuildId` was entirely missing from the property map, and `Status` is a SQL reserved word so the parser lowercases and backtick-quotes it — the old code used `WorkerStatus` which didn't match the proto docs. ## How did you test it? - [x] built - [x] covered by existing tests - [x] added new unit test(s)
stephanos
pushed a commit
that referenced
this pull request
Mar 23, 2026
## What changed? - Added `BuildId` as a supported query attribute in `worker_query_engine.go` (was documented in proto but missing from implementation) - Added `Status` query support by registering the lowercased form (`status`) that the SQL parser produces for reserved words, using `sqlparser.String()` + backtick strip consistent with the rest of the codebase - Kept `WorkerStatus` as a backward-compatible alias - Fixed stale comment references (`LastHeartbeatTime` → `HeartbeatTime`) ## Why? `BuildId` and `Status` are documented as supported query attributes in `ListWorkersRequest` proto but were not working. `BuildId` was entirely missing from the property map, and `Status` is a SQL reserved word so the parser lowercases and backtick-quotes it — the old code used `WorkerStatus` which didn't match the proto docs. ## How did you test it? - [x] built - [x] covered by existing tests - [x] added new unit test(s)
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.
What changed?
BuildIdas a supported query attribute inworker_query_engine.go(was documented in proto but missing from implementation)Statusquery support by registering the lowercased form (status) that the SQL parser produces for reserved words, usingsqlparser.String()+ backtick strip consistent with the rest of the codebaseWorkerStatusas a backward-compatible aliasLastHeartbeatTime→HeartbeatTime)Why?
BuildIdandStatusare documented as supported query attributes inListWorkersRequestproto but were not working.BuildIdwas entirely missing from the property map, andStatusis a SQL reserved word so the parser lowercases and backtick-quotes it — the old code usedWorkerStatuswhich didn't match the proto docs.How did you test it?