-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: Bandits part 5: load and store bandit models from API #28
Conversation
@@ -36,7 +45,7 @@ public function getFlag(string $key): ?Flag | |||
return null; | |||
} | |||
|
|||
$inflated = unserialize($result); | |||
$inflated = $result; |
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.
underlying cache layer is already doing the serializing... 🤦
Thanks for the review! |
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.
Thanks for iterating!
*/ | ||
private function fetchAndStoreBandits(): void | ||
{ | ||
// TODO: implement optimized fetching by checking for expected bandit models from UFC response. |
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.
❤️
// Only load bandits if there are any referenced by the flags. | ||
if ($indexer->hasBandits()) { |
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.
👍
Motivation and Context
The bandit model data is retrieved from an endpoint different than that used to load the rest of the UFC flag configuration data. Again, similar to previous PRs, we see refactoring in order to leverage existing codepaths for different data types
Description
APIRequestWrapper
class to load from a second endpointHow is this tested