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

xdsclient: remove unexported method from ResourceData interface #7835

Merged
merged 1 commit into from
Nov 18, 2024

Conversation

easwars
Copy link
Contributor

@easwars easwars commented Nov 13, 2024

Having an unexported method in the ResourceData interface is not very useful since it has other exported methods. Implementations are currently forced to embed this interface to satisfy it. But if a breaking change is made to the interface, implementations will panic at runtime if the newly added method is called (since they embed the interface and therefore satisfy the interface, but don't have an implementation for the newly added method).

Removing the unexported interface results in implementations no longer having to embed this interface. Instead, they can rely on compile time type assertions to ensure that their implementation satisfies the interface, and therefore their build will fail at compile time if a breaking change is made to the interface (instead of a runtime panic).

RELEASE NOTES: none

@easwars easwars requested a review from dfawley November 13, 2024 20:17
@easwars easwars added the Type: Internal Cleanup Refactors, etc label Nov 13, 2024
@easwars easwars added this to the 1.69 Release milestone Nov 13, 2024
@easwars
Copy link
Contributor Author

easwars commented Nov 13, 2024

@purnesh42H : FYI

Copy link

codecov bot commented Nov 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.88%. Comparing base (274830d) to head (8ef24df).
Report is 7 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7835      +/-   ##
==========================================
- Coverage   81.90%   81.88%   -0.02%     
==========================================
  Files         374      374              
  Lines       37978    37978              
==========================================
- Hits        31105    31099       -6     
+ Misses       5579     5578       -1     
- Partials     1294     1301       +7     
Files with missing lines Coverage Δ
...ds/internal/xdsclient/xdsresource/resource_type.go 100.00% <ø> (ø)

... and 18 files with indirect coverage changes

---- 🚨 Try these New Features:

@easwars easwars merged commit fdc28bf into grpc:master Nov 18, 2024
15 checks passed
@easwars easwars deleted the resource_data branch November 18, 2024 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants