Replace tab-delimited QueueEntry format with JSON serialization#381
Merged
Replace tab-delimited QueueEntry format with JSON serialization#381
Conversation
f674f6b to
b740e69
Compare
gmalette
reviewed
Mar 25, 2026
ruby/lib/ci/queue/queue_entry.rb
Outdated
| def self.test_id(entry) | ||
| pos = entry.index(DELIMITER) | ||
| pos ? entry[0, pos] : entry | ||
| return entry unless entry.start_with?('{') |
Contributor
There was a problem hiding this comment.
do all these entry.start_with? need to be there? Seems like the workers should all be running the same versoin
984a409 to
17204fd
Compare
gmalette
approved these changes
Mar 25, 2026
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.
Situation
QueueEntryused\tas a delimiter betweentest_idandfile_pathin queue entries (#375). When a test name contains a literal tab — e.g. from dynamically generated XSS payload tests —parsesplits on the wrong tab, producing a garbage file path that causesFileLoadError. Closes #379.Execution
Replaced the tab-delimited format with JSON hash serialization (
{"test_id":"...","file_path":"..."}). Entries without a file path remain plain strings. The Lua scripts (heartbeat.lua,reserve_lost.lua) now use Redis's built-incjson.decodeinstead of string splitting, which also let us remove theentry_delimiterparameter threaded throughHeartbeatProcess,Monitor, andWorker.