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: add client side rules #141

Merged
merged 1 commit into from
May 18, 2022
Merged

Conversation

mchuangatmp
Copy link
Contributor

Instructions

  1. PR target branch should be against development
  2. PR title name should follow this format: https:/mParticle/mparticle-workflows/blob/stable/.github/workflows/pr-title-check.yml
  3. PR branch prefix should follow this format: https:/mParticle/mparticle-workflows/blob/stable/.github/workflows/pr-branch-check-name.yml

Summary

  • add client side rules

Testing Plan

  • test in sample app editing one event batch

Master Issue

@mchuangatmp mchuangatmp force-pushed the feat/SQDSDKS-3734-clientrules3 branch 2 times, most recently from fd57f69 to 0614181 Compare May 18, 2022 17:20
Also note: Unlike other callbacks, this block will be called on the SDK queue to prevent batches from being processed out of order. Please avoid excessively blocking in this handler as this will prevent the SDK from doing other tasks.
*/
public interface BatchCreationListener {
JSONObject onBatchCreated(JSONObject batch);
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Annotate the return and parameter types, this will make our Kotlin interop a lot smoother :)

@mchuangatmp mchuangatmp force-pushed the feat/SQDSDKS-3734-clientrules3 branch from 0614181 to 702312e Compare May 18, 2022 17:23
Comment on lines 314 to 321
if (options.getBatchCreationListener() != null) {
batch = options.getBatchCreationListener().onBatchCreated(batch);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

we should wrap this in a try/catch so the client code doesn't blow up the rest of this procedure if their code throws an exception

@mchuangatmp mchuangatmp force-pushed the feat/SQDSDKS-3734-clientrules3 branch 2 times, most recently from 3d68551 to ff11358 Compare May 18, 2022 17:55
Copy link
Contributor

@willpassidomo willpassidomo left a comment

Choose a reason for hiding this comment

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

Looks great! FF with integration tests before release

@mchuangatmp mchuangatmp force-pushed the feat/SQDSDKS-3734-clientrules3 branch from ff11358 to e21cb34 Compare May 18, 2022 19:58
@mchuangatmp mchuangatmp force-pushed the feat/SQDSDKS-3734-clientrules3 branch from e21cb34 to 9b16d5c Compare May 18, 2022 20:04
@mchuangatmp mchuangatmp merged commit 033ec68 into development May 18, 2022
@mchuangatmp mchuangatmp deleted the feat/SQDSDKS-3734-clientrules3 branch May 18, 2022 20:34
github-actions bot pushed a commit that referenced this pull request May 19, 2022
## [5.40.0](v5.39.0...v5.40.0) (2022-05-19)

### Features

* add client side rules ([#141](#141)) ([033ec68](033ec68))

### Updates & Maintenance

* add BatchCreationListener integration tests ([#143](#143)) ([7642acc](7642acc))
* Update Submodules ([94dd501](94dd501))
@mparticle-automation
Copy link
Collaborator

🎉 This PR is included in version 5.40.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants