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

feat: log warning if there is diff between client/features and delta api #9047

Merged
merged 2 commits into from
Jan 2, 2025

Conversation

sjaanus
Copy link
Contributor

@sjaanus sjaanus commented Jan 2, 2025

Log out the diff and warn if there is gap between old logic and new delta.

Copy link

vercel bot commented Jan 2, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Visit Preview Jan 2, 2025 10:40am
unleash-monorepo-frontend ⬜️ Ignored (Inspect) Visit Preview Jan 2, 2025 10:40am

Copy link
Contributor

github-actions bot commented Jan 2, 2025

@sjaanus, core features have been modified in this pull request. Please review carefully!

Copy link
Contributor

github-actions bot commented Jan 2, 2025

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Files

await this.clientFeatureToggleService.getClientDelta(
undefined,
query!,
const delta =
Copy link
Contributor

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) => {
Copy link
Contributor

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) => {
Copy link
Contributor

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

@sjaanus sjaanus merged commit 54d6bd5 into main Jan 2, 2025
8 checks passed
@sjaanus sjaanus deleted the diff-tool branch January 2, 2025 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants