-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Remove Duplicated Strip Projects Code from SDKs #820
Remove Duplicated Strip Projects Code from SDKs #820
Conversation
…se to specify project override
…ts do not interfere with otheer tests
…'s CachedSpecService
…e feature set Caused by passing entire get online request in unpackValueMap(), when in fact it should have been individual featureSetRequests. Caused features that was not in the first feature row to be nulled out.
String.format("Unsupported feature reference: %s", featureRefString)); | ||
} | ||
throw new IllegalArgumentException( | ||
String.format("Unsupported feature reference: %s", featureRefString)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we be more specific with this exception?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected.
}); | ||
return featureSetRequests; | ||
} | ||
|
||
/** Build a Feature Set request from the Feature Set specified by name and Feature References */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A full Javadoc comment would be nice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected.
FeatureSetSpec featureSetSpec; | ||
try { | ||
featureSetSpec = featureSetCache.get(featureSetName); | ||
} catch (ExecutionException e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One of the major pain point that I have seen is when users are requesting features that dont exist because a store is not subscribed to it. It maybe out of scope for this PR, but is there a way that we can address that problem?
Basically they should get an exception that a feature set exists but is not being populated, instead of just "this feature or feature set doesnt exist".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think one way we can resolve this populate the feature set cache from core wholesale and apply the subscription checking only when request is made. This way we be able to determine if the request is rejected due missing feature set or because subscription was not applied properly.
…jectOverride parameter in docs
/lgtm |
/test test-end-to-end-batch |
1 similar comment
/test test-end-to-end-batch |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mrzzy, woop The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What this PR does / why we need it:
Problem
Continuation of: #693.
In v0.5 SDK, projects stripped from string Feature References in individual SDKs. This is a source of code duplication as the same strip project code is implemented and re implemented in the 3 SDKs. This duplication makes maintenance difficult as we have to maintain the same logic in all 3 SDKs.
What does the PR do
project
toGetOnlineFeaturesRequest
as optional field in ServingService.proto.project
with project name, Serving get online features from the specifiedproject
.GetOnlineFeaturesRequest
'sproject
field will take precedence overproject
specified inFeatureReferences
if both are specified.GetOnlineFeatureRequest
'sproject
field.Which issue(s) this PR fixes:
Fixes #
Does this PR introduce a user-facing change?: