uber / cadence

Cadence is a distributed, scalable, durable, and highly available orchestration engine to execute asynchronous long-running business logic in a scalable and resilient way.
https://cadenceworkflow.io
MIT License
7.96k stars 772 forks source link

Fix encoding bug to index context header in search attributes #6148

Closed shijiesheng closed 4 days ago

shijiesheng commented 4 days ago

What changed?

json marshal raw string bytes before store in search attributes

Why?

Context Header stores the raw string bytes; but search attributes should store json strings rather than raw string bytes. Otherwise, it will cause unmarshal error in creating visibility message.

How did you test it?

unit test

Potential risks

Release notes

Documentation Changes

coveralls commented 4 days ago

Pull Request Test Coverage Report for Build 019056be-55a4-4346-b869-f5fdf9d38650

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
service/history/task/transfer_active_task_executor.go 5 6 83.33%
service/history/task/transfer_standby_task_executor.go 5 6 83.33%
service/history/task/transfer_task_executor_base.go 5 7 71.43%
<!-- Total: 15 19 78.95% -->
Files with Coverage Reduction New Missed Lines %
common/task/weighted_round_robin_task_scheduler.go 2 89.05%
common/task/fifo_task_scheduler.go 2 85.57%
common/util.go 2 91.84%
service/history/task/task.go 3 84.81%
service/history/handler/handler.go 3 96.2%
service/history/task/timer_standby_task_executor.go 3 85.63%
service/matching/tasklist/task_reader.go 4 77.19%
service/history/task/transfer_standby_task_executor.go 6 86.23%
service/history/execution/cache.go 6 74.61%
<!-- Total: 31 -->
Totals Coverage Status
Change from base Build 0190508e-3f7e-4c0d-b546-4eaa2a2045f1: 0.004%
Covered Lines: 107099
Relevant Lines: 149690

💛 - Coveralls