Skip to content

"Applying" potential Copilot code review rules#2182

Merged
trask merged 6 commits into
open-telemetry:mainfrom
trask:copilot-code-review-test
Sep 2, 2025
Merged

"Applying" potential Copilot code review rules#2182
trask merged 6 commits into
open-telemetry:mainfrom
trask:copilot-code-review-test

Conversation

@trask

@trask trask commented Aug 25, 2025

Copy link
Copy Markdown
Member

Hopefully this is reflective of the changes copilot code review will suggest after #2170.

Please comment either here or there if you have suggestions about the style-guide.md that was used to generate this PR.

This PR was generated by running this prompt module-by-module:

Make minimal changes to update {module} module to follow all of the recommendations in docs/style-guide.md. Ignore the @Nullable annotation usage section of the style guide.

I made very minor manual fixes to Copilot's work after the fact, including reverting adding final to public classes in the stable aws-xray module.

(I skipped the consistent-sampling module for now, will apply to that later)

@trask
trask requested a review from a team as a code owner August 25, 2025 03:36
@trask trask changed the title Copilot code review test "Applying" potential Copilot code review rules Aug 25, 2025

@KarstenSchnitter KarstenSchnitter left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I reviewed the changes to the cloudfoundry-resources subproject. They look fine, I approve.

@SylvainJuge SylvainJuge left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM for the following modules:

  • inferred-spans
  • jmx-metrics
  • jmx-scraper
  • span-stacktrace

@trask
trask force-pushed the copilot-code-review-test branch from ce7b79f to 2ae0ed8 Compare August 26, 2025 18:56
Comment thread aws-resources/build.gradle.kts Outdated
testImplementation("io.opentelemetry:opentelemetry-sdk-extension-autoconfigure")
testImplementation("io.opentelemetry:opentelemetry-api-incubator")
testImplementation("io.opentelemetry:opentelemetry-sdk-testing")
testImplementation("com.google.auto.service:auto-service")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Seems harmless but I don't immediately see why it's required.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

yeah, removed

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I found out this is required, because javac -Werror on the test files throws an error if it can't find the annotations used on the classes that the tests reference 🤯

Which I assume affects downstream consumer of our libraries also as long as we make autoservice a compileOnly dependency.

so I reverted all the autoservice changes in this PR so we can discuss it separately

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

oh wild! thanks for seeing that through...did not expect that. :)

Comment thread azure-resources/build.gradle.kts
Comment thread baggage-processor/build.gradle.kts Outdated
Comment on lines -30 to +31
Arrays.asList(
asList(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hmmm, this is fine I guess, but this one seems less idiomatic to me.

Comment thread samplers/build.gradle.kts Outdated

@breedx-splk breedx-splk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

So @trask and I talked a little bit about this out of band. I think it's good, but we agreed that the classes in "internal" packages (and also package-private) should retain their final designations (which this PR attempts to remove).

The final is good because it also discourages other developers, even within the project itself, from introducing inheritance, and it maintains the status quo.

Otherwise, looks pretty good.

@trask
trask force-pushed the copilot-code-review-test branch 2 times, most recently from 2c76010 to 5d3375f Compare August 31, 2025 19:52
@trask
trask force-pushed the copilot-code-review-test branch from 5d3375f to e514e99 Compare September 1, 2025 00:12
@zeitlinger

Copy link
Copy Markdown
Member

looks like improving @Nullable (or adding NullAway) is still too hard - right?

@trask

trask commented Sep 2, 2025

Copy link
Copy Markdown
Member Author

looks like improving @Nullable (or adding NullAway) is still too hard - right?

I'll try that in a follow-up (didn't try it yet)

@breedx-splk

Copy link
Copy Markdown
Contributor

Was a11d406 just done with an abundance of caution because users might have done inheritance? I wish we could keep that, but won't hold this PR up with it.

@breedx-splk breedx-splk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think it's in pretty good shape now.

@trask

trask commented Sep 2, 2025

Copy link
Copy Markdown
Member Author

Was a11d406 just done with an abundance of caution because users might have done inheritance? I wish we could keep that, but won't hold this PR up with it.

yeah, I plan to send that in a follow-up, realized I should draw a bit more attention to that change since it's a breaking change (to alpha modules)

@trask
trask added this pull request to the merge queue Sep 2, 2025
Merged via the queue into open-telemetry:main with commit 712ad7c Sep 2, 2025
25 checks passed
@trask
trask deleted the copilot-code-review-test branch September 2, 2025 18:15
@trask trask mentioned this pull request Sep 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.