Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

tanderson-ld
Copy link
Contributor

@tanderson-ld tanderson-ld commented Jan 7, 2025

Splitting these changes up into multiple PRs to keep them manageable and because we can't merge directly to main as applyChanges is dependent on transaction support in the PersistentDataStore.

Existing tests are exercising applyChanges, but through init, upsert, and delete. Plan to add applyChanges tests in ta/fdv2-temporary-holding after transaction support is added to PersistentDataStore in a subsequent PR as part of SDK-1029

Copy link
Contributor

github-actions bot commented Jan 7, 2025

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Size: 19014 bytes
Size limit: 21000

Copy link
Contributor

github-actions bot commented Jan 7, 2025

@launchdarkly/js-client-sdk-common size report
This is the brotli compressed size of the ESM build.
Size: 15354 bytes
Size limit: 20000

Copy link
Contributor

github-actions bot commented Jan 7, 2025

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Size: 19814 bytes
Size limit: 21000

@tanderson-ld tanderson-ld changed the base branch from main to ta/fdv2-temporary-holding January 9, 2025 17:41
@tanderson-ld tanderson-ld marked this pull request as ready for review January 9, 2025 20:24
@tanderson-ld tanderson-ld requested a review from a team as a code owner January 9, 2025 20:24
@tanderson-ld tanderson-ld changed the title chore: preparation work for FDv2 support chore: preparation work for FDv2 feature store and persistence support Jan 9, 2025
this._featureStore.get(kind, key, doUpsert);
} else {
doUpsert();
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

For reviewers: upsert and init have been combined and the distinction is now driven by the bool basis.

};
doInit(oldData);
});
});
Copy link
Contributor Author

Choose a reason for hiding this comment

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

For reviewers: These all calls feel a bit off, but without a refactoring of layer responsibility, I don't see a change that is worth the effort. Thoughts?

Copy link
Member

Choose a reason for hiding this comment

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

I think something of this sort will generally be required. Though they could be combined potentially into some "get all for kinds", but I don't see a huge amount of value in that.

With FDv2 they should at least always be in memory.

} else {
items[key] = item;
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

For reviewers: This logic has moved into apply changes.

}
});
});
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

For reviewers: Guts of this logic comes from _addItem at the top of this file. Small tweaks from there.

});
_callback();
}
}
Copy link
Contributor Author

@tanderson-ld tanderson-ld Jan 9, 2025

Choose a reason for hiding this comment

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

For reviewers: This code is not shippable (why this PR is going to a temp branch) due to the intermediate states potentially being invalid, but this temporary code allows contract tests not checking intermediate state to pass.

};
doInit(oldData);
});
});
Copy link
Member

Choose a reason for hiding this comment

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

I think something of this sort will generally be required. Though they could be combined potentially into some "get all for kinds", but I don't see a huge amount of value in that.

With FDv2 they should at least always be in memory.

@tanderson-ld tanderson-ld merged commit 179b199 into ta/fdv2-temporary-holding Jan 22, 2025
1 check passed
@tanderson-ld tanderson-ld deleted the ta/sdk-850/fdv2-store branch January 22, 2025 17:26
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.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.