Skip to content
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

Document and check resource comparability #6272

Merged
merged 9 commits into from
Feb 12, 2025

Conversation

MrAlias
Copy link
Contributor

@MrAlias MrAlias commented Feb 5, 2025

Ensure backwards compatibility by adding a compile-time check that the Resource remains comparable.

Document the shortcomings of direct comparison of a Resource.

Ensure backwards compatibility by adding a compile-time check that the
Resource remains comparable.

Document the shortcomings of direct comparison of a Resource.
@MrAlias MrAlias added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Feb 5, 2025
@MrAlias MrAlias added this to the v1.35.0 milestone Feb 5, 2025
sdk/resource/resource.go Outdated Show resolved Hide resolved
Copy link

codecov bot commented Feb 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.8%. Comparing base (afbe545) to head (c30f3f1).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #6272   +/-   ##
=====================================
  Coverage   81.8%   81.8%           
=====================================
  Files        283     283           
  Lines      24892   24892           
=====================================
  Hits       20379   20379           
  Misses      4109    4109           
  Partials     404     404           

see 1 file with indirect coverage changes

sdk/resource/resource.go Outdated Show resolved Hide resolved
@pellared pellared requested a review from dashpole February 5, 2025 22:38
@pellared
Copy link
Member

pellared commented Feb 6, 2025

How about making a changelog entry for this so that we give more chance for users to proactively change their codebases?

@MrAlias
Copy link
Contributor Author

MrAlias commented Feb 6, 2025

How about making a changelog entry for this so that we give more chance for users to proactively change their codebases?

What do you suggest?

@pellared
Copy link
Member

pellared commented Feb 6, 2025

Something like: Document the pitfalls of using Resource as a comparable type. Favor its Equal and Equivalent methods instead.

@MrAlias
Copy link
Contributor Author

MrAlias commented Feb 12, 2025

Updated PTAL.

@MrAlias MrAlias merged commit 3c1286a into open-telemetry:main Feb 12, 2025
32 checks passed
@MrAlias MrAlias deleted the res-comp branch February 12, 2025 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants