Skip to content

chore(ci): improve clippy annotation reporter comment#2229

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 3 commits into
mainfrom
ekump/APMSP-3782-reduce-verbosity-of-clippy-annotation-reporter
Jul 13, 2026
Merged

chore(ci): improve clippy annotation reporter comment#2229
gh-worker-dd-mergequeue-cf854d[bot] merged 3 commits into
mainfrom
ekump/APMSP-3782-reduce-verbosity-of-clippy-annotation-reporter

Conversation

@ekump

@ekump ekump commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

What does this PR do?

  • Only post a comment when there are diffs from baseline
  • Only show crates with annotation changes, not every crate in the repo

Motivation

libdatadog guild request

Additional Notes

Anything else we should know when reviewing?

How to test the change?

Temporarily added annotations to this PR to validate comment creation and suppression when no changes.

@pr-commenter

pr-commenter Bot commented Jul 10, 2026

Copy link
Copy Markdown

Benchmarks

Comparison

Candidate

Candidate benchmark details

Baseline

Baseline benchmark details

@ekump ekump force-pushed the ekump/APMSP-3782-reduce-verbosity-of-clippy-annotation-reporter branch from e1c4567 to 81ce3fb Compare July 10, 2026 19:16
@github-actions github-actions Bot removed the sampling label Jul 10, 2026
@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Tests

🔄 Datadog auto-retried 1 job - 1 passed on retry View in Datadog

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 74.37% (-0.02%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 808f30e | Docs | Datadog PR Page | Give us feedback!

@ekump ekump marked this pull request as ready for review July 10, 2026 19:21
@ekump ekump requested a review from a team as a code owner July 10, 2026 19:21
@dd-octo-sts

dd-octo-sts Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Artifact Size Benchmark Report

aarch64-alpine-linux-musl
Artifact Baseline Commit Change
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.a 85.97 MB 85.97 MB 0% (0 B) 👌
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.so 7.88 MB 7.88 MB 0% (0 B) 👌
aarch64-unknown-linux-gnu
Artifact Baseline Commit Change
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so 10.61 MB 10.61 MB 0% (0 B) 👌
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.a 97.21 MB 97.21 MB 0% (0 B) 👌
libdatadog-x64-windows
Artifact Baseline Commit Change
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.dll 25.43 MB 25.43 MB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.lib 88.44 KB 88.44 KB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.pdb 184.76 MB 184.75 MB -0% (-16.00 KB) 👌
/libdatadog-x64-windows/debug/static/datadog_profiling_ffi.lib 956.10 MB 956.10 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.dll 8.33 MB 8.33 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.lib 88.44 KB 88.44 KB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.pdb 24.66 MB 24.66 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/static/datadog_profiling_ffi.lib 49.11 MB 49.11 MB 0% (0 B) 👌
libdatadog-x86-windows
Artifact Baseline Commit Change
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.dll 22.10 MB 22.10 MB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.lib 89.82 KB 89.82 KB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.pdb 189.17 MB 189.16 MB -0% (-16.00 KB) 👌
/libdatadog-x86-windows/debug/static/datadog_profiling_ffi.lib 944.11 MB 944.11 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.dll 6.45 MB 6.45 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.lib 89.82 KB 89.82 KB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.pdb 26.48 MB 26.48 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/static/datadog_profiling_ffi.lib 46.73 MB 46.73 MB 0% (0 B) 👌
x86_64-alpine-linux-musl
Artifact Baseline Commit Change
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.a 76.78 MB 76.78 MB 0% (0 B) 👌
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.so 8.79 MB 8.79 MB 0% (0 B) 👌
x86_64-unknown-linux-gnu
Artifact Baseline Commit Change
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.a 92.19 MB 92.19 MB 0% (0 B) 👌
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so 10.70 MB 10.70 MB 0% (0 B) 👌

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 81ce3fbffa

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

/// Whether the number of tracked annotations differs between the base and
/// PR branches. When this is false there is nothing to report.
pub fn has_changes(&self) -> bool {
self.base_counts != self.head_counts

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include file/crate deltas before suppressing the report

When a PR removes a tracked allow for a rule from one file or crate and adds the same rule elsewhere, the per-rule totals compare equal here, so main takes the no-change path and deletes/skips the comment. In that scenario the new file/crate breakdown would have non-empty deltas, so the reporter misses the crate/file-level annotation changes this PR is trying to surface; base this predicate on those deltas too, not only the rule totals.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deliberate trade-off to reduce complexity. It won't reflect removing an annotation in a file in one place, and adding one in another place in that file. The diff count is the same.


// Nothing changed: don't post a comment, and remove any stale one left over
// from an earlier revision of this PR.
if !analysis_result.has_changes() {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Delete stale comments when no Rust files remain

This cleanup only runs after run_analysis returns an AnalysisResult, but run_analysis returns the No Rust files changed error for a PR whose Rust changes have all been removed and the error branch returns before this block. If an earlier revision of the same PR posted a reporter comment and the PR is later updated to touch no Rust files, the stale comment is left behind even though there are no baseline diffs to report; route that no-Rust path through the same delete helper.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants