Commit a7f469a
committed
fix(cicd): chunk bot messages on character boundaries
_chunk_up_api_message sliced the UTF-8 encoded message at fixed byte
offsets and decoded each slice with errors="ignore". A multibyte
character that straddled a chunk boundary had its bytes split across two
slices, so the "ignore" handler silently dropped it from the bot's PR
comment or check-run output.
Accumulate characters into a chunk while the running UTF-8 byte length
stays within MAX_BYTE_LENGTH instead of slicing raw bytes, so no
character is ever bisected. ASCII-only messages chunk identically to
before, and an empty message still yields no chunks.
Signed-off-by: Anas Khan <83116240+anxkhn@users.noreply.github.com>1 parent b0bc176 commit a7f469a
2 files changed
Lines changed: 38 additions & 6 deletions
File tree
- sqlmesh/integrations/github/cicd
- tests/integrations/github/cicd
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1182 | 1182 | | |
1183 | 1183 | | |
1184 | 1184 | | |
1185 | | - | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
1186 | 1190 | | |
1187 | | - | |
1188 | | - | |
1189 | | - | |
1190 | | - | |
1191 | | - | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
1192 | 1205 | | |
1193 | 1206 | | |
1194 | 1207 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
915 | 915 | | |
916 | 916 | | |
917 | 917 | | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
0 commit comments