Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions ruby/lib/ci/queue/redis/build_record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ def record_error(id, payload, stats: nil)
end

def record_success(id, stats: nil, skip_flaky_record: false, acknowledge: true)
@queue.acknowledge(id) if acknowledge
error_reports_deleted_count, requeued_count, _ = redis.pipelined do |pipeline|
pipeline.hdel(key('error-reports'), id)
pipeline.hget(key('requeues-count'), id)
record_stats(stats, pipeline: pipeline)
_, error_reports_deleted_count, requeued_count, _ = redis.multi do |transaction|
@queue.acknowledge(id, pipeline: transaction) if acknowledge
transaction.hdel(key('error-reports'), id)
transaction.hget(key('requeues-count'), id)
record_stats(stats, pipeline: transaction)
end
record_flaky(id) if !skip_flaky_record && (error_reports_deleted_count.to_i > 0 || requeued_count.to_i > 0)
nil
Expand Down
1 change: 1 addition & 0 deletions ruby/test/integration/minitest_redis_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,7 @@ def test_redis_reporter_flaky_tests_file
content = File.read(flaky_tests_file)
flaky_tests = JSON.parse(content)
assert_includes flaky_tests, "ATest#test_flaky"
assert_equal 1, flaky_tests.count
end
end

Expand Down
Loading