Add a Gnu build-id to gitlab-pages binary
What does this MR do?
By default go binaries only include a Go build-id. Which is deterministic and unique.
They don't include a Gnu build-id that should have the same properties.
The Gnu build-id is used by several observably tools including perf. Having a Gnu build-id allow these tools to uniquely identify a binary and avoid conflicts when resolving debug symbols for those binaries.
We're generating a Gnu build-id from the Go build-id, that way we're sure to also have a deterministic and unique build-id. We do this by compiling the binary once, getting the Go build-id from that, and then re-building including a Gnu build-id.
For gitlab-com/gl-infra/scalability#1536 (closed)
More about the reasoning for this approach in this comment by Matt: gitlab-com/gl-infra/scalability#1464 (comment 769013218)
This is consistent with how we're generating Gnu build-id's in Gitaly (gitaly!4192 (merged)) and Workhorse (gitlab!78721 (merged))
TODO
-
I added the Changelog
trailer (e.g.Changelog: added
) to the commits that need to be included in the changelog -
I added unit tests or they are not required -
I added acceptance tests or they are not required -
I added documentation (or it's not required) -
I followed code review guidelines -
I followed Go Style guidelines