ci(libdatadog): comment wasm size reports on pull requests - #258
Conversation
libdatadog WASM size
Raw WebAssembly sections
Code by Rust crate
Crate ownership comes from a separate symbol-preserving build with the same size settings. Debug-name bytes are excluded; generic functions are assigned to their symbol owner. Generated from |
Overall package sizeSelf size: 31.65 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------|🤖 This report was automatically generated by heaviest-objects-in-the-universe |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3e597b4c90
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| - name: Post WASM size report | ||
| if: ${{ always() && github.event_name == 'pull_request' }} | ||
| uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 |
There was a problem hiding this comment.
Avoid failing fork pull requests when posting the report
For fork-originated pull requests, including Dependabot PRs, GitHub normally downgrades GITHUB_TOKEN to read-only despite the requested permissions, but this condition still runs the script and its createComment/updateComment call fails with 403. In this workflow that turns build-libdatadog red after a successful build, prevents the artifact upload, and skips both dependent libdatadog test jobs; gate commenting to PRs whose head repository is this repository, make the comment operation non-fatal, or move it into a separately privileged workflow.
Useful? React with 👍 / 👎.
| await github.rest.issues.updateComment({ | ||
| ...context.repo, | ||
| comment_id: previous.id, | ||
| body, | ||
| }) |
There was a problem hiding this comment.
Prevent older runs from overwriting the latest size report
When a pull request receives another push while its previous build is still running, both workflow runs can update this same marker comment, and whichever run finishes last wins even if it built the older commit. Because the workflow has no concurrency control and this update does not verify that the run's SHA is still the PR head, the displayed size report can silently become stale; check the current head before updating or otherwise serialize/cancel these updates.
Useful? React with 👍 / 👎.
BridgeAR
left a comment
There was a problem hiding this comment.
This is generally pretty neat!
Just the open comments seem legit and should be addressed
Summary
Testing
Generated by Codex.