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

cleanup: Add no-internalModels-flag variants to methods used by GMS's #475

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jphui
Copy link
Contributor

@jphui jphui commented Nov 13, 2024

Summary

Add no-flag variants to methods so that consumer GMS's don't need to call "lix logic", which is confusing since there is no Lix active any more.

Non-TMS Codesearch: https://jarvis.corp.linkedin.com/codesearch/results/?query=mp%3A*-gms%20getResourceLix

TMS Codesearch: https://jarvis.corp.linkedin.com/codesearch/results?query=mp%3Ametadata-store+getResourceLix&current=1&nresults=10

Testing Done

n/a

Checklist

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 14 lines in your changes missing coverage. Please review.

Project coverage is 67.87%. Comparing base (14ff8c8) to head (f7d8cb9).

Files with missing lines Patch % Lines
...m/linkedin/metadata/restli/BaseEntityResource.java 0.00% 13 Missing ⚠️
.../metadata/restli/BaseSearchableEntityResource.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #475      +/-   ##
============================================
- Coverage     68.02%   67.87%   -0.16%     
  Complexity     1635     1635              
============================================
  Files           143      143              
  Lines          6252     6266      +14     
  Branches        682      682              
============================================
  Hits           4253     4253              
- Misses         1709     1723      +14     
  Partials        290      290              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Nonnull
protected Map<URN, VALUE> getInternal(@Nonnull Collection<URN> urns,
@Nonnull Set<Class<? extends RecordTemplate>> aspectClasses) {
final boolean isInternalModelsEnabled = getResourceLix().testGetAll(_urnClass.getSimpleName());
Copy link
Contributor

Choose a reason for hiding this comment

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

the getResourceList().testGetAll() gives low granular lix control on getAll method. Putting it inside the getInternal() will lose this granularity.

@Nonnull
protected Map<URN, VALUE> getInternalNonEmpty(@Nonnull Collection<URN> urns,
@Nonnull Set<Class<? extends RecordTemplate>> aspectClasses) {
final boolean isInternalModelsEnabled = getResourceLix().testGetAll(_urnClass.getSimpleName());
Copy link
Contributor

Choose a reason for hiding this comment

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

same here, unless only getAll is calling this method. But there's no restriction for future cases

Copy link
Contributor

@yangyangv2 yangyangv2 left a comment

Choose a reason for hiding this comment

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

what is the motivation on this clean up?

If getResourceLix() is no longer used, better to cleanup in the original methods rather than introducing new ones.

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.

3 participants