Issue parsing surrogate pair encoded emoji in pipeline JSON file
- Dominant language
- Go
- Stars
- 1.1k
- Forks
- 378
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 74
Description
We're seeing an issue where the buildkite agent fails to parse the JSON-formatted pipeline file we're passing to `buildkite-agent pipeline upload`:
```
Pipeline parsing of "tmpjdd2BG" failed (Failed to parse tmpjdd2BG: line 531: found invalid Unicode character escape code)
```
I was able to reproduce the issue [on the Go Playground](https://go.dev/play/p/iyAetDay0rc) using the same YAML library that the agent uses. The Go standard library JSON parser handles the input without an issue.
I found [a related issue](https://github.com/go-yaml/yaml/issues/279) on the upstream go-yaml project.
Contributor guide
Research direction
Start by reproducing the failure through `buildkite-agent pipeline upload`, comparing the Go Playground example with the agent's pipeline parsing path and the related go-yaml issue. Done means a pipeline JSON file containing a surrogate-pair-encoded emoji parses successfully without the invalid Unicode escape error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- ci-cd
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100