-
-
Notifications
You must be signed in to change notification settings - Fork 736
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: log warning if there is diff between client/features and delta api #9047
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Skipped Deployments
|
@sjaanus, core features have been modified in this pull request. Please review carefully! |
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Files |
await this.clientFeatureToggleService.getClientDelta( | ||
undefined, | ||
query!, | ||
const delta = |
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.
do you want to run this sequentially or in parallel with the query you compare it against?
); | ||
|
||
const deepEqualIgnoreOrder = (obj1, obj2) => { |
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.
this is a pure function that can live outside of the class and doesn't need to be initialized on each HTTP request
@@ -407,4 +399,14 @@ export default class FeatureController extends Controller { | |||
const jsonString = JSON.stringify(value); | |||
return Buffer.byteLength(jsonString, 'utf8'); | |||
} | |||
|
|||
deepEqualIgnoreOrder = (obj1, obj2) => { |
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.
types seem to be missing here and this function doesn't need to be attached to class
Log out the diff and warn if there is gap between old logic and new delta.