-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split debuginfo out in release builds and upload to polarsignals #2403
Conversation
RUN $(just --set arch $TARGETARCH --evaluate _arch)-linux-gnu-objcopy --only-keep-debug target/restate-server target/restate-server.debug | ||
RUN $(just --set arch $TARGETARCH --evaluate _arch)-linux-gnu-objcopy --strip-debug target/restate-server |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should make stripping optional, or keep an option to copy debug symbols into the final container?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imo there is no benefit to uploading the debug symbols if we aren't going to strip them. otherwise you can just run your tool against the binary directly? hence i treated the request to upload as a request to strip. nb we have a separate mechanism in the ci to keep debug symbols but not upload
FROM builder AS upload-true | ||
RUN $(just --set arch $TARGETARCH --evaluate _arch)-linux-gnu-objcopy --only-keep-debug target/restate-server target/restate-server.debug | ||
RUN $(just --set arch $TARGETARCH --evaluate _arch)-linux-gnu-objcopy --strip-debug target/restate-server | ||
RUN --mount=type=secret,id=parca parca-debuginfo upload --store-address=grpc.polarsignals.com:443 --bearer-token-file=/run/secrets/parca target/restate-server.debug |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does that mean that we'll only keep a single/latest debuginfo file there or is there a way to attach this to the sha/version somehow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its indexed against the elf build id (which is also how debuginfod works)
* Update Dockerfile to support creating and uploading debuginfos * Use targetarch objcopy * Upload to parca on release builds * Reorder dockerfile
We will benefit both when uploading heaps/profiles to polar signals, but we also have our own debuginfod endpoint so tools like perf will be able to magically find the debug symbols for a given binary